Re: USB BT gives problem If device plugged during boot to platform.

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

 



Hi,

>> I just checked BT enable flow from android and found that
>> When USB BT Dongle is not connected during bootm,During Bluez Init
>> (hal-bluetooth.c:init()), hal_ipc_accept is failing.
>> I hope IPC is failing as USB BT dongle is not connected.
>> 
>> From below Logcat suggests that
>> E/BlueZ   (  799): bluetoothd connect timeout
>> E/BluetoothServiceJni(  799): Error while setting the callbacks
>> E/BluetoothAdapterState(  799): Error while turning Bluetooth On
>> 
>> because of this none of the BT interfaces are initialized.
>> 
>> When we connect the USB BT dongle , hal-bluetooth.c:init() is not getting
>> called. because of this BT enable is failing.
>> 
>> 
>> But in working case (USB BT dongle connected during boot). Each time when
>> we connect BT dongle, init is getting called.
>> 
>> I also observed that If I remove the USB dongle without turning off BT
>> from android BT settings menu, at that time
>> also init is not getting called and because of that BT will not get
>> enabled properly.
>> 
>> If we make "init" function to call whenever BT dongle it connected, is
>> that will be enough for BT HAL module to work
>> properly or any other settings might be required?
>> 
> 
> I have added call to init and get_profile_interface function in Android
> JNI in enable Function so that we can initialize the BT HAL.
> With this change BT is turning on even if I connect the dongle after Boot.
> 
> Thanks for the support.
> 
> I observed one more issue when I connect different USB dongle. Was getting
> "Bluetooth address mismatch" error as in cache previous connected USB BT
> hardware address is saved.
> 
> Is that check required? After bypassing that check, BT is working with
> different USB dongle also.

for a lot of Bluetooth controllers we have support for Set Public Address management command. If the kernel driver provides the vendor specific hdev->set_bdaddr callback, then in theory you can have BlueZ for Android programming the address into the controller even if you swap it out.

If you do that, then you would not see this message. However that is just how Android handles things and we have to deal with it. Feel free to send patches to start supporting Set Public Address handling.

Regards

Marcel


--
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