Frequently asked questions/Bluetooth
From GumstixDocsWiki
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Customers using Gumstix OpenEmbedded should go to gumstix.net and the related user wiki
Note: all gumstix verdex motherboards available at gumstix.com are pre-flashed with OpenEmbedded.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If your question is not in this FAQ, please feel free to ask it on the Mailing list
Where are the PBA31308 Rohs-compliant Bluetooth module specifications?
Infineon publishes this PBA31308 documentation
What class of Bluetooth(TM) device is the bluetooth models of gumstix basix and connex ?
In 2005, gumstix used the Infineon ROK104001, which is a Class 2 device.
In 2006, gumstix changed to the Bluetooth module SingleStone? PBA31307, which is also a Class 2 device. It offers a qualified ready-to-use solution for accelerated time-to-market and is based on Infineon's successful BlueMoon? R Single Cellular IC, a single-chip Bluetooth solution.
The SingleStone module is Bluetooth 1.2 compliant and is qualified for a temperature range from -40 to +85 °C enabling a wide spectrum of applications in a variety of different environments.
Additionally, SingleStone supports features such as Adaptive Frequency Hopping, Enhanced SCO and Fast Connection Setup.
Is gumstix enginnering considering a Bluetooth Class 1 module?
There is no plan in the near future to move to Bluetooth class 1 module by gumstix.
However, a BT module (class 1) can be connected by serial port — assuming the BT Class 1 module has a standard RS232 connection. Use the same software that ships with the gumstix for the bluetooth stack. Just change /etc/default/bluetooth to specify a different serial port for the connection instead of /dev/ttyS1.
Can the gumstix boards do Serial Bluetooth?
Yes, the bluetooth module on the gumstix basix or connex supports connection to Bluetooth serial ports offered by other devices, through the linux/bluez "rfcomm" device.
What kind of rf jack is provided on the basix and connex boards?
An MMCX connector is enabled for the bluetooth rubber duck antenna connection.
Can the bluetooth unit be disabled?
Yes, the bluetooth unit can be disabled.
Drop GPIO7 to hold the bluetooth module in reset, cutting its power draw and effectively disabling it. Commands:
/etc/init.d/S30bluetooth stop echo clear > /proc/gpio/GPIO7
Is there a TCP/IP protocol that runs on top of Bluetooth automatically?
There is a TCP/IP over bluetooth protocol service called PAN (or personal area network). PAN is provided on linux by the pand daemon, which is configured to run automatically in continuously-scanning client mode on the gumstix.
If the pand daemon sees a PAN master, it'll attempt to pair with it and establish a TCP/IP link, which shows up as the bnep0 interface on the gumstix.
How can obex over bluetooth be enabled in the buildroot?
"make openobex" after the root file system has been built, or else add it as a target in the make file.
What is Craig's script to push a text message to (spam) all bluetooth devices within broadcast range?
Craig's script (and the email thread discussing it) can be found here.
google for "bluespam gumstix" to find this.
From the description there, that latter one sounds like it might be more flexible (and likely better debugged) than Craig's quick shell-script hack.
It might have been inter-tested with more types of device than Craig did.
Does the BTUART port run at 920 kbps ?
Yes, it does. Actually, it's configurable from about 10bps to 921600bps.
More information detailed in this Intel product brief.
What needs to be changed in applications that ran on the ROK bluetooth module to run on the Singlestone bluetooth module?
1. The big change on the bluetooth (which is what stops old code working with new module) is that the starting baud rate for comms to the BT module is now 115200 instead of 57600.
Easy fix though: just modify the config file /etc/default/bluetooth to have starting baud rate of 115200 instead of 57600. Also, the HCI command to switch baud rates has been changed — so set the max baud rate to 115200 also, or you lose contact with the BT module when the gumstix switches baud rates and the module doesn't.
Craig'll be working on looking at why the baud rate switch fails, so that we can get the Singlestone modules running at 921600, but for now, you'll be limited to 115200.
2. The new bluetooth module needs a 32Khz clock signal to be fed to the module from the PXA by setting one of the GPIO lines to a special alt function mode, and enabling the OSCC on the PXA. This is done properly by the u-boot in the latest buildroot revisions, (as of Jan 27, 2006) and double-checked by the latest bluetooth startup scripts in the buildroot using pxaregs to ensure that the clock is in fact ticking before attempting to talk to the BT module.
Where can more information be found about Bluetooth SCO audio support for a gumstix?
The new hardware supports SCO-over-HCI, and also provides a datapath for PCM data to pass directly from the bluetooth module to the CPU not encapsulated in HCI packets. The datasheet says that 3 simultaneous SCO connections are supported in hardware. Linux can support simultaneous SCO connections since the adapter is connected to the CPU on a UART.
On the software side, there are two things which are needed yet to make this completely seemless, both of which are in hand:
1. Change the baud rate at which the bluetooth module connects to the gumstix UART so that HCI comms happens at 921600 baud instead of 115200 — this is needed for SCO over HCI.
2. Alternatively/additionally, implement a kernel audio driver which receives the PCM data from the bluetooth module with the NSSP on the gumstix host processor, and passes that PCM data to userspace. This method will work even with the baud rate at 115200, since the audio data is not passed over HCI.
Also, check out Brad Midgley's website here.
How can I connect to a Bluetooth GPS Receiver?
The following procedure was tested with a GlobalSat BT-359 Bluetooth GPS Receiver, a gumstix connex 400xm-bt, gumstix Buildroot rev 1318, and gpsd 2.34 (built with 1318):
- On the gumstix, add a Serial Port (SP) service on channel 2 (this leaves the default getty on Bluetooth channel 1, /dev/rfcomm0 alone):
# sdptool browse ff:ff:ff:00:00:00 # sdptool add --channel=2 SP # sdptool setattr 0x010000 0x100 "Ch 1 Serial (getty)" # sdptool setattr 0x010001 0x100 "Ch 2 Serial (GPS)" # sdptool browse ff:ff:ff:00:00:00
- Turn on the BT-359 Bluetooth GPS Receiver - the green and blue LEDs should flash
- On the gumstix, scan for the address of the BT-359:
# hcitool scan
Scanning ...
00:0D:B5:34:65:27 BT-GPS-346527
- On the gumstix, ping the BT-359:
# l2ping 00:0D:B5:34:65:27 Ping: 00:0D:B5:34:65:27 from 00:80:37:27:02:C1 (data size 44) ... 4 bytes from 00:0D:B5:34:65:27 id 0 time 73.80ms 4 bytes from 00:0D:B5:34:65:27 id 1 time 77.35ms 4 bytes from 00:0D:B5:34:65:27 id 2 time 88.81ms 3 sent, 3 received, 0% loss
- On the gumstix, bind /dev/rfcomm1 to the BT-359, then check the binding:
# rfcomm bind 1 00:0D:B5:34:65:27 # rfcomm rfcomm1: 00:0D:B5:34:65:27 channel 1 clean
- On the gumstix, start gpsd with /dev/rfcomm1, then run gpspipe to see the NMEA messages coming from the BT-359:
# gpsd -n /dev/rfcomm1 # gpspipe -r GPSD,R=1 $GPRMC,233209.000,A,3902.2074,N,07723.0781,W,0.22,73.08,180307,,*2F $GPGGA,233210.000,3902.2074,N,07723.0778,W,1,06,2.2,130.9,M,-33.4,M,,0000*6B $GPGSA,A,3,09,22,18,12,05,14,,,,,,,4.1,2.2,3.4*33 $GPRMC,233210.000,A,3902.2074,N,07723.0778,W,0.23,91.04,180307,,*20 $GPGGA,233211.000,3902.2073,N,07723.0778,W,1,06,2.2,130.6,M,-33.4,M,,0000*62 $GPGSA,A,3,09,22,18,12,05,14,,,,,,,4.1,2.2,3.4*33 $GPRMC,233211.000,A,3902.2073,N,07723.0778,W,0.36,134.53,180307,,*1E $GPGGA,233212.000,3902.2070,N,07723.0779,W,1,06,2.2,129.9,M,-33.4,M,,0000*64 $GPGSA,A,3,09,22,18,12,05,14,,,,,,,4.1,2.2,3.4*33 $GPRMC,233212.000,A,3902.2070,N,07723.0779,W,0.17,159.34,180307,,*16 $GPGGA,233213.000,3902.2067,N,07723.0778,W,1,06,2.2,130.2,M,-33.4,M,,0000*61 $GPGSA,A,3,09,22,18,12,05,14,,,,,,,4.1,2.2,3.4*33 $GPRMC,233213.000,A,3902.2067,N,07723.0778,W,0.30,107.93,180307,,*13 $GPGGA,233214.000,3902.2065,N,07723.0778,W,1,06,2.2,130.0,M,-33.4,M,,0000*66 $GPGSA,A,3,09,22,18,12,05,14,,,,,,,4.1,2.2,3.4*33 $GPGSV,3,1,11,22,83,352,35,18,56,120,19,14,53,295,22,05,31,109,23*70 $GPGSV,3,2,11,09,29,046,36,12,28,098,32,30,23,136,20,31,18,214,12*7F $GPGSV,3,3,11,01,13,268,21,21,09,176,11,11,00,326,*48 ...
For more information on the gumstix and Bluetooth, see sample chapter 9 - Bluetooth LED Sign, of the book Make: Projects - Small Form Factor PCs. This chapter is available for free from here, via this LinuxDevices article.
For more information on gpsd and Bluetooth GPS receivers, see Bluetooth and gpsd.
There is a script which tries to keep a connection to your GPS here: GpsService

