Scanning for nearby Bluetooth devices is fairly similar to scanning for WIFI networks. Using the single command:
hcitool scan
the Gumstix is able to list (with some accuracy) Bluetooth devices in the vicinity. I was able to pick up both my phone and the GPS unit with this scan; so far, so good. Apparently, some Gumstix revisions have issues with the default speed of Bluetooth communication, but thankfully I didn't run into this problem.Scanning out of the way, pinging was equally little hassle. The scan had provided me with the MAC address and name of the Bluetooth device scanned, and pinging is another single command:
l2ping 00:0E:6D:5B:41:05
The first character is a lower-case L rather than a 1, and the characters following the ping are the MAC address of the GPS unit.Things start to get a little hazy here.
On the Gumstix's Bluetooth wiki there is a guideline on setting up a GPS unit with the Gumstix system. Everything was pretty self explanatory until I happened upon mentions of "rfcomm bindings". A bit of reading lead me to understand that to establish a serial Bluetooth connection to another device (a "pseudo-tty" connection as one of the documents mentioned), we must use a Bluetooth protocol named "Radio Frequency Communications". Seems understandable enough, but it'll still need further reading to get fully.
Anyway, to help me get to grips with what the rfcomm binding actually did, I attempted to create an rfcomm binding to my phone rather than straight to the GPS unit, as my phone has an interface, and I'd be able to see if anything was happening. Yet another single command:
rfcomm bind 1 00:0E:6D:5B:41:05
The number after "bind" tells the Gumstix which pseudo-serial port to use, and the subsequent characters are, again, the MAC address of the destination unit.I started to get requests on my phone for a connection to the Gumstix; excellent! However, they were looking for a PIN. At first, I tried entering nothing, but that lead me nowhere. Some more reading informed me that I'd have to set the security options on the Gumstix, which I considered doing until I located the PIN file in the "/etc/bluetooth" directory. Using the PIN in this file, I still couldn't connect my phone to the Gumstix, but when the PIN was entered it took slightly longer in refusing my connection, so I guess that's good; besides I'd established that the Gumstix was attempting to communicate with my phone; enough for the time being.
I tried the same rfcomm connection with the GPS unit, and it connected without hassle. However, the next steps listed on the wiki lead nowhere, as the command to start the GPS daemon (gpsd) failed, as it's not on the Buildroot revision on the Gumstix. I'll have to enable this, and the GPS pipe (gpspipe, handily enough) to get decent data from the GPS unit.
This means I'll have to flash the file-system ASAP if I want to get GPS set up, so I'll be doing this over the break. I'm going to enable C++ in the Buildroot also, as Semir's asked for it. I was considering putting python on, but I believe this takes up a good bit of space on the Gumstix itself because of the compilation utilities, and I'd rather keep the space on the Gumstix as free as possible, to avoid using the CF card and adding any extra weight.
That's about it for my recent activity. I weighed the components the other day for Donal: the GPS receiver, WIFIstix, Connex board, and Robostix weighed in at roughly 150g - not even eligable for Flyweight category in boxing, but an excellent weight for attaching to our blimp.
I'm off to Nice for a week, beginning Thursday. Work will re-commence upon my return!





