Closed tfabris closed 6 years ago
This is implemented but when running the code it doesn't seem to reconnect as quickly as it did when I was typing the commands on the console directly. Needs more experimentation. Perhaps a slight time delay between the disconnect and reconnect commands would actually be faster? Not sure.
Added the slight time delay between the disco/reco and that seems to help.
Still need to test make sure that on the car stereo that this actually fixes the "Bad PDU Registration" problem.
Though the routine seemed to work well on the BT headset, when I brought it into the car and repro'd the issue, the strings got mangled and it's got something to do with the string lengths and the line-by-line logging and something else I'm not quite understanding.
Temporarily reverting to a full reset until I can debug this some more, but it's after 3am and I'm stumped. More later.
Investigate possible problems with DisplayAndProcessCommands, perhaps there should be no delays.
After a ton of debugging and code rearranging (some of which was still good and useful) the "speedy" version of the force reconnect ended up not solving the issue that I wanted it to solve. Reconnecting with a close/call pair did indeed result in a very speedy reconnect which... played music without any AVRCP commands working at all.
Closing this as "Cannot Do". Sigh. Stayed up till 4am on this one too.
When I encounter the problem where the host stereo asks me for a PDU Register Notification message that I don't like, I fix the problem by resetting the bluetooth module completely. The reconnect occurs and the second reconnect solves the problem.
This however creates a brief dropout in the audio and the host stereo says "no device connected". This is irritating. See if you can fix this by doing the following:
Double check that you even need the address. Maybe you don't? Check it.