bt-trx / firmware

bt-trx firmware
GNU General Public License v3.0
5 stars 1 forks source link

Delete stored pairing on SDC_CONNECTION_FAILED #37

Open dl1com opened 4 years ago

dl1com commented 4 years ago

If a pairing fails with SDC_CONNECTION_FAILED, iWrap still stores a pairing entry in its internal database. With the data of this pairing, it's often impossible to achieve a pairing later on. Therefore it is desirable to delete the pairing of the device to have a clean base for the next try to pair. The other possibility is to use the Webinterface to delete all pairings.

Example:

> call 41:42:8c:00:7f:56 111e hfp-ag
STATE: CONNECTING
< CALL 0
< NAME ERROR 0x104 41:42:8c:00:7f:56 HCI_ERROR_PAGE_TIMEOUT
< NO CARRIER 0 ERROR b01 SDC_CONNECTION_FAILED

-> delete pairing for 41:42:8c:00:7f:56 111e

dl1com commented 4 years ago

I observed that there is still a possibility to get a connection after the SDC_CONNECTION_FAILED. This is the case when the remote device issues a RING to us. But if this does not happen, we are stuck in an infinite loop of SDC_CONNECTION_FAILED messages. So perhaps count up to 3 of those messages, then delete our pairing for a fresh start.