unfortunately I have some problems with "Bluetooth". I request periodically (every 10min) a solar inverter in order to retrieve the data. But quite often the program stuck with: "bluetooth time out"
If this happens, the whole bluetooth does not work any more until restart of the "bluetoothd" daemon. E.g. even other bluetooth programs don't work any more:
Code: Select all
root@raspberrypi:~# hcitool scan
Scanning ...
Inquiry failed: Connection timed out
I start then the bluetoothd manually with the "debug" option - see results below (the problem starts @18:40):
Code: Select all
Jul 15 18:30:01 raspberrypi /USR/SBIN/CRON[3684]: (root) CMD (/opt/sma/sma-request.sh)
Jul 15 18:30:24 raspberrypi bluetoothd[3398]: plugins/hciops.c:conn_complete() status 0x00
Jul 15 18:30:24 raspberrypi bluetoothd[3398]: src/adapter.c:adapter_get_device() 00:80:25:XX:XX:XX
Jul 15 18:30:24 raspberrypi bluetoothd[3398]: src/adapter.c:adapter_create_device() 00:80:25:22:07:E1
Jul 15 18:30:24 raspberrypi bluetoothd[3398]: src/device.c:device_create() Creating device /org/bluez/3398/hci0/dev_00_80_25_XX_XX_XX
Jul 15 18:30:24 raspberrypi kernel: [ 3146.244559] ------------[ cut here ]------------
Jul 15 18:30:24 raspberrypi kernel: [ 3146.244641] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0xa0/0xc8()
Jul 15 18:30:24 raspberrypi kernel: [ 3146.244698] sysfs: cannot create duplicate filename '/devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:42'
Jul 15 18:30:24 raspberrypi kernel: [ 3146.244747] Modules linked in: bnep rfcomm ipv6 snd_bcm2835 snd_pcm snd_page_alloc snd_seq snd_seq_device snd_timer snd aes_generic ecb btusb bluetooth spi_bcm2708 i2c_bcm2708
Jul 15 18:30:24 raspberrypi kernel: [ 3146.245244] [<c00153d4>] (unwind_backtrace+0x0/0xfc) from [<c03f95a0>] (dump_stack+0x20/0x24)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.245349] [<c03f95a0>] (dump_stack+0x20/0x24) from [<c002d830>] (warn_slowpath_common+0x5c/0x74)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.245443] [<c002d830>] (warn_slowpath_common+0x5c/0x74) from [<c002d904>] (warn_slowpath_fmt+0x40/0x48)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.245537] [<c002d904>] (warn_slowpath_fmt+0x40/0x48) from [<c015d92c>] (sysfs_add_one+0xa0/0xc8)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.245628] [<c015d92c>] (sysfs_add_one+0xa0/0xc8) from [<c015d9c8>] (create_dir+0x74/0xcc)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.245695] [<c015d9c8>] (create_dir+0x74/0xcc) from [<c015daf0>] (sysfs_create_dir+0x94/0x10c)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.245773] [<c015daf0>] (sysfs_create_dir+0x94/0x10c) from [<c02503e4>] (kobject_add_internal+0xb4/0x1d8)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.245870] [<c02503e4>] (kobject_add_internal+0xb4/0x1d8) from [<c02507fc>] (kobject_add+0x58/0x98)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.245956] [<c02507fc>] (kobject_add+0x58/0x98) from [<c029b29c>] (device_add+0xdc/0x5a4)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.246223] [<c029b29c>] (device_add+0xdc/0x5a4) from [<bf0499f0>] (add_conn+0x48/0x188 [bluetooth])
Jul 15 18:30:24 raspberrypi kernel: [ 3146.246473] [<bf0499f0>] (add_conn+0x48/0x188 [bluetooth]) from [<c0049210>] (process_one_work+0x154/0x480)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.246579] [<c0049210>] (process_one_work+0x154/0x480) from [<c004bf48>] (worker_thread+0x168/0x3ac)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.246682] [<c004bf48>] (worker_thread+0x168/0x3ac) from [<c0050b5c>] (kthread+0x98/0xa0)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.246793] [<c0050b5c>] (kthread+0x98/0xa0) from [<c000f1dc>] (kernel_thread_exit+0x0/0x8)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.246871] ---[ end trace f53f973d33019315 ]---
Jul 15 18:30:24 raspberrypi kernel: [ 3146.247002] kobject_add_internal failed for hci0:42 with -EEXIST, don't try to register things with the same name in the same directory.
Jul 15 18:30:24 raspberrypi kernel: [ 3146.247085] [<c00153d4>] (unwind_backtrace+0x0/0xfc) from [<c03f95a0>] (dump_stack+0x20/0x24)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.247164] [<c03f95a0>] (dump_stack+0x20/0x24) from [<c02504f0>] (kobject_add_internal+0x1c0/0x1d8)
Jul 15 18:30:24 raspberrypi bluetoothd[3398]: src/device.c:btd_device_ref() 0x40a34e00: ref=1
Jul 15 18:30:24 raspberrypi bluetoothd[3398]: src/device.c:device_set_temporary() temporary 1
Jul 15 18:30:24 raspberrypi kernel: [ 3146.247259] [<c02504f0>] (kobject_add_internal+0x1c0/0x1d8) from [<c02507fc>] (kobject_add+0x58/0x98)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.247337] [<c02507fc>] (kobject_add+0x58/0x98) from [<c029b29c>] (device_add+0xdc/0x5a4)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.247514] [<c029b29c>] (device_add+0xdc/0x5a4) from [<bf0499f0>] (add_conn+0x48/0x188 [bluetooth])
Jul 15 18:30:24 raspberrypi kernel: [ 3146.247712] [<bf0499f0>] (add_conn+0x48/0x188 [bluetooth]) from [<c0049210>] (process_one_work+0x154/0x480)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.247822] [<c0049210>] (process_one_work+0x154/0x480) from [<c004bf48>] (worker_thread+0x168/0x3ac)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.247919] [<c004bf48>] (worker_thread+0x168/0x3ac) from [<c0050b5c>] (kthread+0x98/0xa0)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.248025] [<c0050b5c>] (kthread+0x98/0xa0) from [<c000f1dc>] (kernel_thread_exit+0x0/0x8)
Jul 15 18:30:24 raspberrypi kernel: [ 3146.248152] Bluetooth: Failed to register connection device
Jul 15 18:30:24 raspberrypi bluetoothd[3398]: plugins/hciops.c:remote_features_information() hci0 status 0
Jul 15 18:30:24 raspberrypi bluetoothd[3398]: plugins/hciops.c:remote_name_information() hci0 status 0
Jul 15 18:30:33 raspberrypi bluetoothd[3398]: plugins/hciops.c:disconn_complete() handle 42 status 0x00
Jul 15 18:30:33 raspberrypi bluetoothd[3398]: src/event.c:btd_event_disconn_complete()
Jul 15 18:30:33 raspberrypi bluetoothd[3398]: src/adapter.c:adapter_remove_connection()
Jul 15 18:30:33 raspberrypi bluetoothd[3398]: src/adapter.c:adapter_remove_connection() Removing temporary device /org/bluez/3398/hci0/dev_00_80_25_22_07_E1
Jul 15 18:30:33 raspberrypi bluetoothd[3398]: src/device.c:device_remove() Removing device /org/bluez/3398/hci0/dev_00_80_25_22_07_E1
Jul 15 18:30:33 raspberrypi bluetoothd[3398]: src/device.c:btd_device_unref() 0x40a34e00: ref=0
Jul 15 18:30:33 raspberrypi bluetoothd[3398]: src/device.c:device_free() 0x40a34e00
Jul 15 18:40:01 raspberrypi /USR/SBIN/CRON[3689]: (root) CMD (/opt/sma/sma-request.sh)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.943307] ------------[ cut here ]------------
Jul 15 18:40:22 raspberrypi bluetoothd[3398]: plugins/hciops.c:conn_complete() status 0x00
Jul 15 18:40:22 raspberrypi bluetoothd[3398]: src/adapter.c:adapter_get_device() 00:80:25:22:07:E1
Jul 15 18:40:22 raspberrypi bluetoothd[3398]: src/adapter.c:adapter_create_device() 00:80:25:XX:XX:XX
Jul 15 18:40:22 raspberrypi bluetoothd[3398]: src/device.c:device_create() Creating device /org/bluez/3398/hci0/dev_00_80_25_XX_XX_XX
Jul 15 18:40:22 raspberrypi bluetoothd[3398]: src/device.c:btd_device_ref() 0x40a34e00: ref=1
Jul 15 18:40:22 raspberrypi bluetoothd[3398]: src/device.c:device_set_temporary() temporary 1
Jul 15 18:40:22 raspberrypi kernel: [ 3743.943409] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0xa0/0xc8()
Jul 15 18:40:22 raspberrypi kernel: [ 3743.943457] sysfs: cannot create duplicate filename '/devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:42'
Jul 15 18:40:22 raspberrypi kernel: [ 3743.943512] Modules linked in: bnep rfcomm ipv6 snd_bcm2835 snd_pcm snd_page_alloc snd_seq snd_seq_device snd_timer snd aes_generic ecb btusb bluetooth spi_bcm2708 i2c_bcm2708
Jul 15 18:40:22 raspberrypi kernel: [ 3743.944035] [<c00153d4>] (unwind_backtrace+0x0/0xfc) from [<c03f95a0>] (dump_stack+0x20/0x24)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.944138] [<c03f95a0>] (dump_stack+0x20/0x24) from [<c002d830>] (warn_slowpath_common+0x5c/0x74)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.944241] [<c002d830>] (warn_slowpath_common+0x5c/0x74) from [<c002d904>] (warn_slowpath_fmt+0x40/0x48)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.944334] [<c002d904>] (warn_slowpath_fmt+0x40/0x48) from [<c015d92c>] (sysfs_add_one+0xa0/0xc8)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.944425] [<c015d92c>] (sysfs_add_one+0xa0/0xc8) from [<c015d9c8>] (create_dir+0x74/0xcc)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.944533] [<c015d9c8>] (create_dir+0x74/0xcc) from [<c015daf0>] (sysfs_create_dir+0x94/0x10c)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.944615] [<c015daf0>] (sysfs_create_dir+0x94/0x10c) from [<c02503e4>] (kobject_add_internal+0xb4/0x1d8)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.951095] [<c02503e4>] (kobject_add_internal+0xb4/0x1d8) from [<c02507fc>] (kobject_add+0x58/0x98)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.951208] [<c02507fc>] (kobject_add+0x58/0x98) from [<c029b29c>] (device_add+0xdc/0x5a4)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.951483] [<c029b29c>] (device_add+0xdc/0x5a4) from [<bf0499f0>] (add_conn+0x48/0x188 [bluetooth])
Jul 15 18:40:22 raspberrypi kernel: [ 3743.951709] [<bf0499f0>] (add_conn+0x48/0x188 [bluetooth]) from [<c0049210>] (process_one_work+0x154/0x480)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.951816] [<c0049210>] (process_one_work+0x154/0x480) from [<c004bf48>] (worker_thread+0x168/0x3ac)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.951917] [<c004bf48>] (worker_thread+0x168/0x3ac) from [<c0050b5c>] (kthread+0x98/0xa0)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.952027] [<c0050b5c>] (kthread+0x98/0xa0) from [<c000f1dc>] (kernel_thread_exit+0x0/0x8)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.952082] ---[ end trace f53f973d33019316 ]---
Jul 15 18:40:22 raspberrypi kernel: [ 3743.952187] kobject_add_internal failed for hci0:42 with -EEXIST, don't try to register things with the same name in the same directory.
Jul 15 18:40:22 raspberrypi kernel: [ 3743.952305] [<c00153d4>] (unwind_backtrace+0x0/0xfc) from [<c03f95a0>] (dump_stack+0x20/0x24)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.952406] [<c03f95a0>] (dump_stack+0x20/0x24) from [<c02504f0>] (kobject_add_internal+0x1c0/0x1d8)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.952510] [<c02504f0>] (kobject_add_internal+0x1c0/0x1d8) from [<c02507fc>] (kobject_add+0x58/0x98)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.952614] [<c02507fc>] (kobject_add+0x58/0x98) from [<c029b29c>] (device_add+0xdc/0x5a4)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.952813] [<c029b29c>] (device_add+0xdc/0x5a4) from [<bf0499f0>] (add_conn+0x48/0x188 [bluetooth])
Jul 15 18:40:22 raspberrypi kernel: [ 3743.953057] [<bf0499f0>] (add_conn+0x48/0x188 [bluetooth]) from [<c0049210>] (process_one_work+0x154/0x480)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.953157] [<c0049210>] (process_one_work+0x154/0x480) from [<c004bf48>] (worker_thread+0x168/0x3ac)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.953260] [<c004bf48>] (worker_thread+0x168/0x3ac) from [<c0050b5c>] (kthread+0x98/0xa0)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.953362] [<c0050b5c>] (kthread+0x98/0xa0) from [<c000f1dc>] (kernel_thread_exit+0x0/0x8)
Jul 15 18:40:22 raspberrypi kernel: [ 3743.953457] Bluetooth: Failed to register connection device
Jul 15 18:40:22 raspberrypi bluetoothd[3398]: plugins/hciops.c:remote_features_information() hci0 status 0
Jul 15 18:40:22 raspberrypi bluetoothd[3398]: plugins/hciops.c:remote_name_information() hci0 status 0
Jul 15 18:42:04 raspberrypi bluetoothd[3398]: plugins/hciops.c:set_state() hci0: new state 3
Jul 15 18:42:04 raspberrypi kernel: [ 3846.228427] Bluetooth: hci0 link tx timeout
Jul 15 18:42:04 raspberrypi kernel: [ 3846.228519] Bluetooth: hci0 killing stalled connection 00:80:25:22:07:E1
Jul 15 18:42:04 raspberrypi kernel: [ 3846.228883] Bluetooth: hci0 link tx timeout
Jul 15 18:42:04 raspberrypi kernel: [ 3846.228964] Bluetooth: hci0 killing stalled connection 00:80:25:22:07:E1
Jul 15 18:42:04 raspberrypi bluetoothd[3398]: plugins/hciops.c:resolve_names() found_dev 0 need_name 0
Jul 15 18:42:04 raspberrypi bluetoothd[3398]: plugins/hciops.c:set_state() hci0: new state 0
Jul 15 18:42:04 raspberrypi bluetoothd[3398]: plugins/hciops.c:auth_complete() hci0 status 5
Jul 15 18:42:05 raspberrypi kernel: [ 3847.228279] Bluetooth: hci0 command tx timeout
Jul 15 18:42:06 raspberrypi kernel: [ 3848.228305] Bluetooth: hci0 command tx timeout
Jul 15 18:50:01 raspberrypi /USR/SBIN/CRON[3694]: (root) CMD (/opt/sma/sma-request.sh)