TS-4900 Silex Bluetooth: Difference between revisions
From embeddedTS Manuals
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
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 more. Refer 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. | 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 more. Refer 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 11: | Line 15: | ||
</source> | </source> | ||
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>. | |||
< | |||
<console> | |||
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 | |||
</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