VAR-SOM-AM33 Bluetooth: Difference between revisions
From Variscite Wiki
(Created page with "= Bluetooth = * Bring BT device up: <pre> $ hciconfig hci0 up </pre> * Scan for BT devices and ping: <pre> $ hcitool scan $ l2ping 98:03:D8:C7:1A:96 </pre> Then work with ...") |
(Added BLE commands) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* Bring BT device up: | * Bring BT device up: | ||
<pre> | <pre> | ||
$ rmmod btwilink | |||
$ modprobe btwilink | |||
$ hciconfig hci0 up | $ hciconfig hci0 up | ||
</pre> | </pre> | ||
Line 9: | Line 11: | ||
$ hcitool scan | $ hcitool scan | ||
$ l2ping 98:03:D8:C7:1A:96 | $ l2ping 98:03:D8:C7:1A:96 | ||
</pre> | |||
* Scan for BLE devices: | |||
<pre> | |||
$ hcitool lescan | |||
</pre> | |||
* Connect to BLE device | |||
<pre> | |||
$ gatttool [-t random] -b 7B:43:66:3D:D9:5D -I | |||
[ ][7B:43:66:3D:D9:5D][LE]> connect | |||
[CON][7B:43:66:3D:D9:5D][LE]> | |||
Indication handle = 0x0003 value: 01 00 ff ff | |||
</pre> | </pre> | ||
Then work with any other standard bluetooth API and commands. | Then work with any other standard bluetooth API and commands. |
Latest revision as of 15:37, 14 November 2016
Bluetooth
- Bring BT device up:
$ rmmod btwilink $ modprobe btwilink $ hciconfig hci0 up
- Scan for BT devices and ping:
$ hcitool scan $ l2ping 98:03:D8:C7:1A:96
- Scan for BLE devices:
$ hcitool lescan
- Connect to BLE device
$ gatttool [-t random] -b 7B:43:66:3D:D9:5D -I [ ][7B:43:66:3D:D9:5D][LE]> connect [CON][7B:43:66:3D:D9:5D][LE]> Indication handle = 0x0003 value: 01 00 ff ff
Then work with any other standard bluetooth API and commands.