bluez5-init: ccimx93: add fix to enable LE
This fix is needed for bluez-5.65 version. We can drop it when using a newer version. https://onedigi.atlassian.net/browse/DEL-8346 Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
parent
f7943a9fd5
commit
ac1e4633fb
|
|
@ -24,6 +24,21 @@ set_btaddr() {
|
|||
hcitool -i ${HCI_IFACE} cmd 0x3f 0x0022 0xfe 0x06 ${bt_addr}
|
||||
}
|
||||
|
||||
le_fix() {
|
||||
hcitool -i ${HCI_IFACE} cmd 0x03 0x0003
|
||||
sleep 0.2
|
||||
hcitool -i ${HCI_IFACE} cmd 0x03 0x0001 ff ff ff ff ff ff 3f ff
|
||||
sleep 0.2
|
||||
hcitool -i ${HCI_IFACE} cmd 0x08 0x0001 ff ff 7f 00 00 00 00 00
|
||||
sleep 0.2
|
||||
hcitool -i ${HCI_IFACE} cmd 0x08 0x000B 01 10 00 10 00 00 00
|
||||
sleep 0.2
|
||||
hcitool -i ${HCI_IFACE} cmd 0x08 0x000C 01 01
|
||||
sleep 0.2
|
||||
hcitool -i ${HCI_IFACE} cmd 0x08 0x000C 00 00
|
||||
sleep 0.2
|
||||
}
|
||||
|
||||
bluetooth_start() {
|
||||
if ! [ -e "/proc/device-tree/bluetooth/mac-address" ]; then
|
||||
log "[ERROR] Bluetooth mac-address not found"
|
||||
|
|
@ -39,6 +54,9 @@ bluetooth_start() {
|
|||
killall hciattach && \
|
||||
sleep 0.2 && \
|
||||
hciattach -t5 /dev/ttyBt any -s 3000000 3000000 flow && \
|
||||
hciconfig ${HCI_IFACE} up && \
|
||||
sleep 0.2 && \
|
||||
le_fix && \
|
||||
log "Bluetooth activated" && return
|
||||
|
||||
log "[ERROR] Cannot initialize Bluetooth"
|
||||
|
|
|
|||
Loading…
Reference in New Issue