disconnect after the connection

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

disconnect after the connection

868 Views
romain_auber
Contributor I

Hello, 

i use the QN908X device. 

I modify the private_profile_client_project for my project and i want to connect at an other ble device.

i success to scan and connect to the server device.

However, sometimes, after to connect at the server device, the client device disconnect automatically and i need to make an reset MCU to reconnect to it. 

when i look in the pConnectionEvent when a receive the disconnect event, the fail reason is gHciConnectionFailedToBeEstablished_c. Do you know why this disconnection happens

Tags (2)
0 Kudos
Reply
3 Replies

758 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

By any chance do you have more details on when does this situation happen ? Do you have an sniffer log so we can see the complete process being followed? When you mention you modify to communicate with another device, which kind of modification are you talking about ?

Regards,

Estephania

0 Kudos
Reply

758 Views
romain_auber
Contributor I

Hello,

I don't have a sniffer to see the proces of the connection. 

I modify the example private profile serveur and private profile client with my own profiles.

The private profile client is modify too to work in serveur mode. i launch the scan with the function App_StartScanning(&gScanParams, BleApp_ScanningCallback,TRUE). I found the serveur device and i launch the connection with function App_Connect(&gConnReqParams, BleApp_ConnectionCallback) in the function BleApp_ScanningCallback (gapScanningEvent_t* pScanningEvent). 

I see always the client connect to the serveur in the BleApp_ConnectionCallback() function in the client device. However, i don't see connection in the serveur device and i see next a deconnection in the BleApp_ConnectionCallback() function in the client device.

 I dont 't change the connection parameters gConnReqParams and i use the parameter than the private profile client. 

0 Kudos
Reply

758 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Without the sniffer log and the modification I can't really know what it is happening to your device. Still, you need to be sure that your second client-server connection is advertising correctly and sending the correct packet to the correct address.

Also, you need to be careful as you might get out of memory due to the necessary footprint for the Wireless Connectivity Framework, using both libraries and the different application.

You can try adding the next defines to your application to try to find out if your issue is a memory ones or a different.

#define gUsePanic_c 1
#define MEM_TRACKING
#define MEM_STATISTICS
#define MEM_DEBUG
#define MEM_DEBUG_OUT_OF_MEMORY

Hope it helps.

Regards,

Estephania

0 Kudos
Reply