usbhost_t36: faster disconnect

I am working on a project where it is important to more quickly recognize when a BT device disconnects. Basically, I want to make this faster:

Code:
=====================
<<(02):48 20 0C 00 08 00 01 00 06 05 04 00 41 00 F1 00 
    L2CAP disconnect request: ID: 5, Length:4, Dest:41, Source:f1

=====================
<<(02):48 20 0C 00 08 00 01 00 06 06 04 00 40 00 F0 00 
    L2CAP disconnect request: ID: 6, Length:4, Dest:40, Source:f0

=====================
<<(02):48 20 0C 00 08 00 01 00 06 05 04 00 41 00 F1 00 
    L2CAP disconnect request: ID: 5, Length:4, Dest:41, Source:f1

=====================
<<(02):48 20 0C 00 08 00 01 00 06 06 04 00 40 00 F0 00 
    L2CAP disconnect request: ID: 6, Length:4, Dest:40, Source:f0
05 04 00 48 00 13 
<<(01):05 04 00 48 00 13 
    Event: HCI Disconnect complete(0): handle: 48, reason:13
Checking 0 : 1fff27f8
*** BTHID Device - disconnected ***

Right now it takes about 30 total seconds. I'm not sure the best approach to take.
I have considered having the
Code:
void BluetoothController::process_l2cap_disconnect_request(uint8_t *data)
method do "something" to mark the device as offline since that comes in immediately upon powering down the BT device.
I have also considered playing with the HCI Link Supervisor Timeout value, however I am not entirely clear if that is the right thing or how to inject it into the setup process.

Any thoughts?
 
Back
Top