Using the Simple_Central example, SDK 3.40.0.02, as a starting point, i have modified it to look for a specific BLE device based upon a number of bytes in the manufacturing specific advertising data. I am able to identify the device upon receipt of the SC_EVT_ADV_REPORT event and checking the advertisiing data. I then disable scanning (GapScan_disable()), and issue a GapInit_connect(...) with a status return of SUCCESS. I then see a GAP_LINK_ESTABLISHED_EVENT, save the handle and do nothing else. Within a second I receive a GAP_LINK_TERMINATED_EVENT. I don't understand what/where the disconnect is coming from. The BLE device I am connecting to is a device that works well with smart phone apps.
Any suggestions will be appreciated.