Any flag indicating bt/fm is ready to run "hcitool cmd"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there any flag indicating bt/fm is ready to run "hcitool cmd", ie,
"hciconfig hci0 up" is really finished.

We met error "Send failed: File descriptor in bad state", if run
hcitool immediately after "hciconfig hci0 up"
For example:
hciconfig hci0 up
hcitool cmd 3f 66 02 26 00 00 00 30

And it could be workaround adding sleep.
The reason is "hciconfig hci0 up" is asynchronous, when it return,
bt/fm is not ready in fact, so add sleep could solve the issue, but
still may fail in stress test since race condition.
We have test bit HCI_UP, but hcitool cmd still would failed, when
HCI_UP=1, which is set in hci_dev_open instead of handler.
How about HCI_RAW?

The question is any bit user place could check and then safe to send
any command via hcitool cmd.

Thanks in advance.
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux