1 of 1 people found this helpful
The error "BLE_ERROR_INSUFFICIENT_RESOURCES" is returned by the enum class CyStatus and not the ICyBleDevice.Pair() (which returns the status as part of CyApiErr class as mentioned in page#163 in the API reference guide)
API reference guide link: http://www.cypress.com/file/232791/download
Hence, it looks like the connection handler which is part of BleMgrCb class is not able to connect with the device. Because the connection handler returns the result and status which is the peer device connected and errors associated with the connection which is BLE_ERROR_INSUFFECIENT_RESOURCES in your case.
Hence, attach your project so that I can have a look at your code and assist you better.
Thanks for the quick response. Actually, the connection request is sent by the Host and received by the target. In fact, the CyBleMgrCallback.OnConnected() handler returns a status of CyStatus.BLE_STATUS_OK along with a CyConnectResult object containing a peer device. This leads me to believe that the connection has been established.
Because the status indicates success, my code next registers my device callbacks with this CyConnectResult.Device, and then invokes the device's Pair() method after instantiating a CyPairSettings object. It is this device's CyBleDeviceCallback.OnPairingCompleted handler that returns a status of CyStatus.BLE_ERROR_INSUFFICIENT_RESOURCES.
I will attach my Visual Studio project (C#/.NET plus WinForms) for your review.
Thanks again for your help!
blehostemulator.7z.zip 347.4 K
I figured out what the issue was: my dongle's pairing table was full! The reason why the peripheral used to work but stopped working after a minor code change is because the Bluetooth Device Address was inadvertently changed. The previous BDA was already in the dongle's pairing table, but after the peripheral's firmware was updated it used a new, different BDA. Naturally, the dongle didn't have any extra room for this new BDA and thus reported 'Insufficient Resources'. I confirmed this using the CySmart program itself, which finally revealed the cause of this error condition.
Thanks once again for all your help,