cancel
Showing results for 
Search instead for 
Did you mean: 

BLE_STATUS_TIMEOUT with terminate_gap_procedure

GBara.3
Associate II

Hi everyone,

I am developing an IOT solution using the BLUENRG-M0 from ST.

I am coding in C and I use a custom board with SPI communication between the BLUENRG and my MSP430F5255 from T.I . I am using the ACI API to transmit commands to the BLE module. 

I have 2 boards, and while one is advertising, I want the other to perform scanning in order to receive an advertising report. (And to get the RSSI after). 

My issue is when I want to make another scan. I use the aci_gap_terminate_gap_procedure() with the good opcode link to the function that I use for scanning, but I always receive a BLE_Timeout error. Therefore my primary scan has not ended correctly and I can’t begin a new one. 

I have tried increasing the time before TIMEOUT but nothing changes. 

I didn’t see people talking about the issue with the gap_terminate function, so I ask this here. 

It would be nice if someone could clarify for me the use of this function and why it has this behavior.  

Best regards.

11 REPLIES 11
GBara.3
Associate II

I have checked the project BlueNRG-MS_New_Chat from the BlueNRG-DK and I saw something strange in it.


_legacyfs_online_stmicro_images_0693W00000bVgUrQAK.png 

It is said that Procedure Complete Event proc only when a GAP Terminate is done. So nom I'm a bit confused.

Could you explain me that ? I will share the project here.

GBara.3
Associate II

I did some tests of my own and the behavior of my scan is really not good. The init goes well but after 5 adertising reports it stops when it should continue until its timeout. I should point out that I have a custom board with an MSP430 processor.

I was able to test a Nucleo64 evaluation board with the IDB05A1 module with the Blue-NRG Gui interface and the scan behavior was normal.

I don't understand what could make the scan behavior change so much, knowing that I'm using the same BlueNRG stack in both cases (x-cube-BLE1).