Bluetooth/en

Материал из Wiren Board
Версия от 16:18, 23 апреля 2019; RomanKulibaba (обсуждение | вклад) (Новая страница: «You can find out which Bluetooth services are supported by the device found (phone, for example) by the following command <pre>sdptool browse 58:40:4E:60:C5:B1 |…»)

Другие языки:

Wiren Board 6: Bluetooth module

Wiren Board 6 controllers are equipped with a combined Wi-Fi + Bluetooth 4.0 BLE (Bluetooth Low Energy) radio module manufactured by Realtek. Controllers do not support Bluetooth in modification without Wi-Fi! The same antenna as for Wi-Fi is used for Bluetooth communication.


Software

There is preinstalled software[BlueZ|http://www.bluez.org/ BlueZ], that supports the Bluetooth stack on Linux. A detailed description and purpose of the commands is given on the project page. Check the availability of Bluetooth with hciconfig command:

Hciconfig.png

The hcitool devcommand can be used to check if the device is enabled.

You can control the Bluetooth interface mode on/off with the hciconfig hci0 up | down command.

Searching for classic Bluetooth-devices (BR/EDR, Bluetooth Basic Rate/Enhanced Data Rate) is proceed by the hcitool scan command, searching for BLE-devices — hcitool lescan.


Searching for Bluetooth devices near the controller is described in [our article|https://habr.com/company/wirenboard/blog/420831/ нашей статье] in "Bluetooth" section(only ru version).


Scanning services

You can find out which Bluetooth services are supported by the device found (phone, for example) by the following command

sdptool browse 58:40:4E:60:C5:B1 | grep "Service Name"

Btservices.png


Работа с сервисами

Различные устройства поддерживают свой набор Bluetooth-сервисов, например, передачу файлов, работу в качестве сетевой карты, устройство воспроизведения аудио и т.п. Возможность работы с этими сервисами описана в документации к ПО [BlueZ|http://www.bluez.org/ BlueZ], в документации к устройствам и на профильных форумах. Использование каждого сервиса требует сооетветвующей настройки.