cancel
Showing results for 
Search instead for 
Did you mean: 

device advertises as expected but unable to connect and get services

SMaes.1
Associate II

I've setup a P2PServer based firmware created from CubeMx. So far so good. It advertises as expected. But when I run the lightblue app, it won't connect to my advertising device.

I've already compared my firmware to the P2PSERVCE example project from the STM32CubeWB library and don't see any big suspicious differences.

I also compared the cubeMX configuration settings fot the STM_WPAN.

When I try to connect in the lightblue android app it pop ups the following message:

"No data available"

"Failed to establish connection to device, please select anaother device or try again"

Does anyone sounds this behaviour familiar and has a clue to start debugging?

The raw advertisement packet of the working and the not working firmware is 100% equal

3 REPLIES 3
YSN
Senior

Have you also tried to connect ST BLE Sensor APP, Which will detect P2P server Service automatically !

Yes I tried that also, but also a connection error. If I debug the code I get a disconnect​ event continuously.

SMaes.1
Associate II

I've made a log over the debug messages.

This is how the working p2pserver application logs:

0693W00000D1101QAB.jpgand this is how the failing one logs:

0693W00000D110uQAB.jpgboth applications receive the HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE in function SVCCTL_App_Notification in app_ble.c

but the failing application afterwards comes into the HCI_DISCONNECTION_COMPLETE_EVT_CODE.

The working one comes in the HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE with sub code ACI_GAP_PAIRING_COMPLETE_VSEVT_CODE

But I cannot relate why. Are these codes comming directly from the ble stack in the RF core M0 processor?

Anyone any tips to figure out what's going wrong. It must be a small thing, because code is 99,9% equal

I am already searching for days why ;(