Use BlueZ Stack As A Peripheral (Advertiser)

With your Bluetooth dongle plugged in, running the following command will tell you the device name and give its state: $ hciconfig The output should look something like this: hci0: Type: BR/EDR Bus: USB BD Address: 00:01:02:aa:bb:cc ACL MTU: 1021:8 SCO MTU: 64:1 DOWN RX bytes:1000 acl:0 sco:0 events:47 errors:0 TX bytes:1072 acl:0 sco:0 commands:47 … Read more

BlueZ: How to set up a GATT server from the command line

So this is now handled with the new bluetoothctl tool. A gatt table can be set up using this tool as follows:- #bluetoothctl [bluetoothctl] menu gatt [bluetoothctl] register-service 0xFFFF # (Choose yes when asked if primary service) [bluetoothctl] register-characteristic 0xAAAA read # (Select a value of 1 when prompted) [bluetoothctl] register-characteristic 0xBBBB read,write # (Select … Read more

Bluetooth Low Energy: listening for notifications/indications in linux

Try this… Run gatttool -b <MAC Address> –interactive like you did before. You’ll get a prompt and then you type connect. You should see a CON in the prompt indicating that you’ve connected to the device. Then type char-read-uuid 2902. You should get a list of all CCC (Client Characteristic Configuration) attributes on the device. … Read more