I’m trying to use the Boron as a central device to connect to a peripheral advertising at a rate of 5.140s. I’m able to successfully scan for it, but not connect. I’m calling:
BlePeerDevice peer = BLE.connect(scanResult->address);
I always get the following response after a few seconds:
[hal.ble] ERROR: connection failed: -250
I don’t see any options in the BLE documentation for extending the connection timeout period (the timeout parameter refers to timeout once a connection is already made, not timeout trying to connect). When connecting with a smartphone it usually successfully connects at second 10 or 15, but sometimes even longer, but it appears with the Boron it will stop trying to connect after 5 seconds, so it will never even have the chance to connect successfully to my peripheral. My Boron is running OS 1.4.4. Is there a way to extend the duration of attempting to connect, or do I just need to keep running BLE.connect multiple times until it works?