TS-4900 Silex Bluetooth: Difference between revisions

From embeddedTS Manuals
(Created page with "The Silex compatible images include support for a patched bluez that include support for qualcomm's firmware loading mechanism. Load the driver with: <source lang=bash> echo...")
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The Silex compatible images include support for a patched bluez that include support for qualcomm's firmware loading mechanismLoad the driver with:
Support for Bluetooth is provided by the [http://www.bluez.org/ BlueZ project]. BlueZ has support for many different profiles for HID, A2DP, and many moreRefer to the BlueZ documentation for more information. Please see our [[BLE_Examples_Silex|BLE Examples page]] for information on installing the latest BlueZ release, getting started, and using demo applications.


First load the driver in bluez.  For 5.10 and later, run:
<source lang=bash>
btattach -P qca -S 115200 -B /dev/ttymxc1 &
</source>
For kernel 4.9 and below, run:
<source lang=bash>
<source lang=bash>
echo 27 > /sys/class/gpio/export
echo 27 > /sys/class/gpio/export
Line 6: Line 12:
sleep .5
sleep .5
echo high > /sys/class/gpio/gpio27/direction
echo high > /sys/class/gpio/gpio27/direction
hciattach /dev/ttymxc1 qca 1000000 -t30 flow  
hciattach /dev/ttymxc1 qca 115200 -t30 flow  
</source>
</source>


This will create an hci0 bluez interface:
Either will create an hci0 interface that can interface with bluez. For example, to scan devices use blutoothctl commands <source inline>power on</source> and <source inline>scan on</source>.
<source lang=bash>
 
hciconfig hci0 up
<console>
hcitool scan
root@tsimx6:~# bluetoothctl
</source>
Agent registered
[CHG] Controller 84:25:3F:B6:1C:4D Pairable: yes
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 84:25:3F:B6:1C:4D Discovering: yes
[NEW] Device 19:CD:41:6B:AC:09 19-CD-41-6B-AC-09
</console>

Latest revision as of 13:03, 7 August 2023

Support for Bluetooth is provided by the BlueZ project. BlueZ has support for many different profiles for HID, A2DP, and many more. Refer to the BlueZ documentation for more information. Please see our BLE Examples page for information on installing the latest BlueZ release, getting started, and using demo applications.

First load the driver in bluez. For 5.10 and later, run:

btattach -P qca -S 115200 -B /dev/ttymxc1 &

For kernel 4.9 and below, run:

echo 27 > /sys/class/gpio/export
echo low > /sys/class/gpio/gpio27/direction
sleep .5
echo high > /sys/class/gpio/gpio27/direction
hciattach /dev/ttymxc1 qca 115200 -t30 flow

Either will create an hci0 interface that can interface with bluez. For example, to scan devices use blutoothctl commands power on and scan on.

root@tsimx6:~# bluetoothctl
Agent registered
[CHG] Controller 84:25:3F:B6:1C:4D Pairable: yes
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 84:25:3F:B6:1C:4D Discovering: yes
[NEW] Device 19:CD:41:6B:AC:09 19-CD-41-6B-AC-09