Quozl's BlueTooth RSSI Mapping & Debian Configuration |
| quozl@us.netrek.org
| up |
|
Quozl bought a couple of 100m USB BlueTooth dongles and tried them out. They each have a cool blue LED.
Here's how to use them as a poor man's wireless network link.
apt-get install hotplug bluez-pan kernel-image-2.4.24 lockfile-progs |
pand --listen --role NAP && \ ifconfig bnep0 10.2.0.1 netmask 255.255.255.0 |
pand --nodetach --role PANU --search --encrypt && \ ifconfig bnep0 10.2.0.2 netmask 255.255.255.0 |
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward |
# bluetooth network server iface bnep0 inet static address 10.2.0.1 netmask 255.255.255.0 |
mkdir /etc/bluetooth/pan |
#!/bin/sh ifup bnep0 |
chmod +x /etc/bluetooth/pan/dev-up |
# Run pand -- ethernet: creates new network interfaces bnep<N> # that can be configured in /etc/network/interfaces # set to 1 for enabled, 0 for disabled PAND_ENABLED=1 # Act as a network access point: routes to other networks PAND_OPTIONS="--listen --role NAP" |
/etc/init.d/bluez-pan start |
iface bnep0 inet static address 10.2.0.2 netmask 255.255.255.0 gateway 10.2.0.1 |
mkdir /etc/bluetooth/pan |
#!/bin/sh ifup bnep0 |
chmod +x /etc/bluetooth/pan/dev-up |
#!/bin/sh LOCK=/var/run/bluetooth.hotplug lockfile-create --retry 0 ${LOCK} || exit case $PRODUCT in a12/1/525) break ;; *) exit ;; esac case $TYPE in 224/1/1) break ;; *) exit ;; esac case $ACTION in add) pand --nodetach --role PANU --search --encrypt ;; remove) ifdown bnep0 ;; esac lockfile-remove ${LOCK} |
Note: keventd created three instances of the script, so code is present to lock out two instances. The lockfile-create program is used.
chmod +x /etc/hotplug.d/usb/bluetooth.hotplug |
hci_acl_tx_to: hci0 ACL tx timeout hci_acl_tx_to: hci0 killing stalled ACL connection FF:E5:01:72:02:00 |
One reader suggested removing the modules that are not required. See .config for the options used. Unfortunately, it still occurs, during periods of high traffic load.
One unit was placed near a window of a house in a rural area. This
unit was attached to the server. A second unit was attached through a 3m USB cable, to a laptop, which had a script recording time, BlueTooth received signal strength, link quality and geographic coordinates from a GPS. It was a bad satellite day, so assume plus or minus ten metres error. The laptop was driven around in a car, with the dongle hanging from the rear view mirror, although for the run along the western road it was hanging out the window nearest the house. The image to the right is the received signal strength on a 5m raster, with 100m grid. The colour code is for the RSSI value recorded. An aerial photo image has been overlaid; dark green sections are tree cover. Conclusion is that the device performs to specification with ample margin. At the longest distance of almost 400m, near the south western edge of the map, line of sight was obscured by a creek crossing. The link may have been capable of a greater distance if there was better line of sight. The low signal strength on the western road corresponded to trees obstructing line of sight. Image made with GRASS, the GPL'd geographic information system, followed by manual perspective and shearing of the aerial photo with GIMP.
|
|