cancel
Showing results for 
Search instead for 
Did you mean: 

aci_gap_set_non_discoverable intermittently returns `COMMAND_DISALLOWED`

ADing.1
Associate II

I am using the STM32WB5MMG. Once per minute the chip wakes up and performs a measurement, then connects to another device to transfer the data. After transfer is complete, the chip disconnects (using aci_gap_terminate) then waits for 100 ms, then stops advertsising using aci_gap_set_non_discoverable. This works roughly 4/5 times, but sometimes this will return the COMMAND_DISALLOWED status code (0x0C).

Under what circumstances does the controller return this command? How can I ensure that this does not happen?

1 REPLY 1
Remy ISSALYS
ST Employee

Hello,

Did you restart the advertising after the disconnection? 

Best Regards