From e45c66b0109ca14ad52885a2d02f25c7bd5f0254 Mon Sep 17 00:00:00 2001 From: Bjørn Mork Date: Tue, 29 Oct 2019 19:01:33 +0100 Subject: doc: add a note about restarting bluetoothd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bjørn Mork --- dcs8000lh.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/dcs8000lh.md b/dcs8000lh.md index 32a872c..a680e6b 100644 --- a/dcs8000lh.md +++ b/dcs8000lh.md @@ -1653,6 +1653,47 @@ without the source code. +#### Manually restarting bluetoothd for debugging + +It can be useful to run bluetoothd in the foreground when debugging +BLE interaction, or testing modified versions of bluetoothd. Log in +using telnet or serial and simply stop and restart bluetoothd with the +-d and -n options: + +``` +# /etc/rc.d/init.d/bluetoothd.sh stop +Stopping bluetoothd... ok. +# LD_LIBRARY_PATH=/var/bluetooth/lib /var/bluetooth/bin/bluetoothd -d -n -E -p "gatt,gatt_example" +bluetoothd[25020]: Bluetooth daemon 5.28 +bluetoothd[25020]: src/main.c:parse_config() parsing main.conf +bluetoothd[25020]: src/main.c:parse_config() discovto=0 +bluetoothd[25020]: src/main.c:parse_config() pairto=0 +bluetoothd[25020]: src/main.c:parse_config() auto_to=3600 +bluetoothd[25020]: src/main.c:parse_config() name=DCS-8000LH-CDEF +bluetoothd[25020]: src/main.c:parse_config() Key file does not have key 'Class' +bluetoothd[25020]: src/main.c:parse_config() Key file does not have key 'DeviceID' +bluetoothd[25020]: src/main.c:parse_config() Key file does not have key 'ReverseServiceDiscovery' +bluetoothd[25020]: src/main.c:parse_config() ControllerMode=le +bluetoothd[25020]: src/gatt.c:gatt_init() Starting GATT server +bluetoothd[25020]: src/adapter.c:adapter_init() sending read version command +bluetoothd[25020]: Starting SDP server +bluetoothd[25020]: src/sdpd-service.c:register_device_id() Adding device id record for 0002:1d6b:0246:051c +etc. +``` + +Note that the GATT GAP service will only pick up the device name +whenever it is set. This causes an empty Device Name characteristic +(0x2a00) after restarting bluetoothd. + +The name must therefore be changed and set again after every +bluetoothd restart as a workaround: + +``` +/var/bluetooth/bin/hciconfig hci0 name foo +/var/bluetooth/bin/hciconfig hci0 name DCS-8000LH-CDEF +``` + + ### Firmware updates There are at least two shell scripts providing a firmware update -- cgit v1.2.3