Hi
I'm programming cc2640r2f (simplelink_cc2640r2_sdk_3_10_00_15 using ble5_project_zero_cc2640r2lp_app) .
My problem is that sometimes I get 0x31 error while GAP_LINK_ESTABLISHED_EVENT happens and it says that i have 1 device connected and it disables advertising. I know that status code 0x31 doesn't mean SUCCESS but I don't know why sometimes this errors happens. it occurs while advertising while no device going to connect. I receive "Link establish event, status 0x31. Num Conns: 1 Max Number of Connection reach: 1, Adv. will not be enable again" message in Logs . After that I must reset the launchpad hoping this time not going to get this message and error. I have to say that I get this error randomly and 10-15 % of times that I test my scenario. Status code reference is in pPkt->hdr.status and number of active connections is linkDB_NumActive() .and I also tried to remove this failed connection "ProjectZero_removeConn(pPkt->connectionHandle)" but it didn't work.
My questions are:
1- What does this error mean. and why happens?
2- Why this error occurs randomly. sometimes occurs sometimes not?
3- how can I remove that fake connection to continue advertising?
I will be appreciated if you can solve my problem.
Best regards,
Alireza