Frequently asked questions/Bluetooth

From GumstixDocsWiki

Jump to: navigation, search

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Note: these FAQs do NOT apply to the Gumstix Overo product line launched in the Winter of 2008/9.

If your question is not in this FAQ, please feel free to ask it on the Mailing list

Contents

Where are the PBA31308 Rohs-compliant Bluetooth module specifications?

Infineon publishes this PBA31308 documentation

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.

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.

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

Personal tools