I’m using TI’s shared transport (ST) driver and am having trouble determining exactly when initialization is complete.
After inserting the btwilink module, is there some event that is available in user-space to tell me so? I changed the ordering of a few things on my development platform and now I need to be able to query the kernel (Linux 3.3) as soon as possible after wilink module insertion.
The ‘install’ file in ‘/sys/devices/platform/kim/install’ notifies me when the line discipline is ready to be installed by UIM, but that’s not quite what I’m looking for.
If I try to open a Bluetooth socket using hci_route/hci_open_dev in libbluetooth (which use the standard ioctl interface), I receive errors from the ioctl with the kernel. I know libbluetooth is not supported by these forums, but I believe my question has more to do with know when the ST and wilink modules have complete initialization within the kernel.
Here is my dmesg output:
# dmesg (stc): st_tty_open (stk) :line discipline installed (stk) :TIInit_8.6.15.bts (stk) :ldisc_install = 2 (stc): st_reg_complete (stc): protocol 9's cb sent 0 (stc): add_channel_to_table: id 4 (stc): st_register(2) (stc): add_channel_to_table: id 2 (stc): st_register(3) (stc): add_channel_to_table: id 3 hci0: type 1 len 4 hci0: type 1 len 4 hci0: type 1 len 4 hci0: type 1 len 4 hci0: type 1 len 4 hci0: type 1 len 4 hci0: type 1 len 4 hci0: type 1 len 4 hci0: type 1 len 5 hci0: type 1 len 6 hci0: type 1 len 11 hci0: type 1 len 12 hci0: type 1 len 4 hci0: type 1 len 5 hci0: type 1 len 5 hci0: type 1 len 4 hci0: type 1 len 5 hci0: type 1 len 6 hci0: type 1 len 6 #
I don’t believe that the ‘hci0’ messages are part of ST, but part of the kernel Bluetooth modules initialization process (I may be wrong here though).
I’m presuming that what I want is a notification in userspace of when the above dmesg output is complete. I would really like an event based solution, so I don't have to poll the output of some command.