esp-idf
esp-idf copied to clipboard
feat[bt] - allow use of RESERVED bits in COD (IDFGH-13374)
This is a very niche-case patch, one that most people should never have need to bother with.
But in my case, trying to make a replacement for an obsolete Bluetooth board, I ran into an issue with a nonstandard use of the BT COD field: the two low "reserved" bits were used! Without access to the controlling firmware (and having to maintain compatibility with the thousands of "obsolete Bluetooth boards" in the field which will not function without said "reserved" bits being transmitted in the outgoing COD), this is the neatest solution to the problem.
I did a deep dive straight into the Bluedroid stack, and found exactly where (amongst the multiple unnecessary data type changes the provided COD went through) the two bits were getting lost. The very simple changes here were successful in allowing the ESP32 to work as a drop-in replacement for the obsolete board.