Skip to content

BLE Configure

Uffe Björklund edited this page Jun 16, 2015 · 7 revisions

Make sure BLE is up

Navigate to the folder where Bluez was installed (in my case /usr/lib/bluez-5.30/)

Run:

tools/hciconfig

This should show something like

hci0:   Type: BR/EDR  Bus: USB
    BD Address: 00:1A:7D:DA:71:0A  ACL MTU: 310:10  SCO MTU: 64:8
    DOWN
    RX bytes:48436 acl:121 sco:0 events:1615 errors:0
    TX bytes:2371 acl:98 sco:0 commands:84 errors:0

As you can see above the the BLE is DOWN, so to enable it we run.

tools/hciconfig hci0 up

Now, when we run the hcifonfig the BLE will be UP.

root@raspberrypi:/bluez/bluez-5.28# tools/hciconfig
hci0:   Type: BR/EDR  Bus: USB
    BD Address: 00:1A:7D:DA:71:0A  ACL MTU: 310:10  SCO MTU: 64:8
    UP RUNNING
    RX bytes:49000 acl:121 sco:0 events:1644 errors:0
    TX bytes:2729 acl:98 sco:0 commands:113 errors:0

Enable BLE at startup

  1. Edit crontab

    crontab -e

  2. Add the line

    @reboot sudo hciconfig hci0 up

next

Clone this wiki locally