L2CAP: Unknown error: 431 and 436

I am trying to work with L2CAP channels over BLE. The service discovery, PSM lookup (via characteristics) and such all work fine.

The channel connects and I am able to exchange a couple of packets before the input stream is closed unexpectedly.

Meanwhile, the console reports the following CoreBluetooth messages:

Code Block
error WARNING: Unknown error: 431
error WARNING: Unknown error: 436


As far as I can tell these error codes are undocumented and the L2CAP documentation is scarce at best. Does anyone know what they mean?
Answered by neilalexander in 662739022
For anyone else who finds this in the future, I have been advised that the error codes are as follows:
  • 431: Peer device requested an L2CAP disconnection

  • 436: Local device requested an L2CAP disconnection

Accepted Answer
For anyone else who finds this in the future, I have been advised that the error codes are as follows:
  • 431: Peer device requested an L2CAP disconnection

  • 436: Local device requested an L2CAP disconnection

We are experiencing this on Monterey. The Bluetooth Core Framework has changed significantly. I hope apple will fix it ASAP.

I'd applaud a proper mapping table in the documentation…

L2CAP: Unknown error: 431 and 436
 
 
Q