TS-TPC-7990 Bluetooth: Difference between revisions

From embeddedTS Manuals
(Created page with "{{:TS-4900 Bluetooth}}")
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{:TS-4900 Bluetooth}}
The WIFI option on the board also includes a bluetooth 4.0 LE module.  This is supported in Linux using the [http://www.bluez.org/ Bluez stack].
 
<source lang=bash>
# First bring up wifi.  This loads the firwmare for
# both WIFI and Bluetooth
modprobe wilc3000
ifconfig wlan0 up
# WIFI can optionally be brought back down
# ifconfig wlan0 down
 
hciattach /dev/ttymxc1 any 115200 noflow
hciconfig hci0 up
hcitool cmd 0x3F 0x0053 00 10 0E 00 01
stty -F /dev/ttymxc1 921600 crtscts
 
# If your board is REV A use this setup instead:
echo 237 > /sys/class/gpio/export
echo low > /sys/class/gpio/gpio237/direction
echo high > /sys/class/gpio/gpio237/direction
sleep .1
hciattach /dev/ttymxc1 texas 3000000
hciconfig hci0 up
</source>
 
Now you may scan for available devices with:
<source lang=bash>
hcitool scan
</source>
This will return a list of devices such as:
<source lang=bash>
14:74:11:AB:12:34 SAMSUNG-SM-G900A
</source>
 
You may request more information from a detected device like so:
<source lang=bash>
hcitool info 14:74:11:AB:12:34
</source>
 
This will produce lots of details about the device, for example:
 
<source lang=bash>
Requesting information ...                                                     
        BD Address:  14:74:11:AB:12:34                                         
        OUI Company: Samsung Electronics Co.,Ltd (4C-A5-6D)                   
        Device Name: SAMSUNG-SM-G900A                                         
        LMP Version: 4.1 (0x7) LMP Subversion: 0x610c                         
        Manufacturer: Broadcom Corporation (15)                               
        Features page 0: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87       
        .
        .
        .
</source>
 
Bluez has support for many different profiles for HID, A2DP, and many more. Refer to the Bluez documentation for more information.

Latest revision as of 09:52, 1 August 2017

The WIFI option on the board also includes a bluetooth 4.0 LE module. This is supported in Linux using the Bluez stack.

# First bring up wifi.  This loads the firwmare for
# both WIFI and Bluetooth
modprobe wilc3000
ifconfig wlan0 up
# WIFI can optionally be brought back down
# ifconfig wlan0 down

hciattach /dev/ttymxc1 any 115200 noflow
hciconfig hci0 up
hcitool cmd 0x3F 0x0053 00 10 0E 00 01
stty -F /dev/ttymxc1 921600 crtscts

# If your board is REV A use this setup instead:
echo 237 > /sys/class/gpio/export
echo low > /sys/class/gpio/gpio237/direction
echo high > /sys/class/gpio/gpio237/direction
sleep .1
hciattach /dev/ttymxc1 texas 3000000
hciconfig hci0 up

Now you may scan for available devices with:

hcitool scan

This will return a list of devices such as:

14:74:11:AB:12:34	SAMSUNG-SM-G900A

You may request more information from a detected device like so:

hcitool info 14:74:11:AB:12:34

This will produce lots of details about the device, for example:

Requesting information ...                                                      
        BD Address:  14:74:11:AB:12:34                                          
        OUI Company: Samsung Electronics Co.,Ltd (4C-A5-6D)                     
        Device Name: SAMSUNG-SM-G900A                                           
        LMP Version: 4.1 (0x7) LMP Subversion: 0x610c                           
        Manufacturer: Broadcom Corporation (15)                                 
        Features page 0: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87        
        .
        .
        .

Bluez has support for many different profiles for HID, A2DP, and many more. Refer to the Bluez documentation for more information.