cancel
Showing results for 
Search instead for 
Did you mean: 

BLE connection terminates after discovery of primary service using X-Nucleo-BNRG2A1

JWall.1
Associate II

I am using the X-Nucleo-BNRG2A1 with a Nucleo L476RG. I have loaded the sample application called Central Device from the X-CUBE_BLE2 Rev 3.30 pack. This application is already configured for the two boards previously mentioned. The code builds and loads ok. I run the code and first step is to enter a "s" to start a scan of all devices. It will provide a list of what it find. Then a prompt to select which device to connect to. After I do that, this is what I get.

CONNECTION_COMPLETE

 SERVICE_DISCOVERY

 connection handle 0x0801

aci_gatt_disc_all_primary_services() OK

 hci_disconnection_complete_event() unexpected reason: 0x08

CONNECTION_TERMINATED

 GATT Procedure completed with error 0x41 (0x0801)

 ---------------- DISCONNECTION_COMPLETE ----------------

The code finds the device, seems to connect and discover the service then it disconnects. I cant get past this point. As previously mentioned, this is the exact code out of the BLE pack from STM, no modifications. It uses the boards it was configured to. I also tried several different BLE devices, one custom and one STM Blue tile. Both of these work fine with other applications but neither works with this example code.

Any ideas why it crashes at this point and how to fix. I have been debugging it for several days and cant seem to find the issue.

0 REPLIES 0