This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is it possible to refuse a connection from a central device?

I'm developing a project based on the Nordik UART Service and I wouldn't use pairing as in the example.

However I have some problem when a central device is already connected to my nRF52, if I try to connect a second central, I don't have any refuse but some sort of timeout from my second central.

It's actually possible to refuse a pairing by responding BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP on a BLE_GAP_EVT_SEC_PARAMS_REQUEST, is it possible to do something similar with connection to clearly signal to a new central device that the peripheral isn't accessible or the only asumption is that the advertisement will stop after a connection ?

Thanks

Parents
  • You cannot "refuse" connection by forcing Soft Device to "ignore" CONNECT_REQ packet but you can terminate connection any time from any side so you can terminate it on very next connection interval if you want.

    [Edit]

    Sorry, I've probably misunderstood. If you speak about issuing CONNECT_REQ from GAP Central side then it's little bit strange. If Peripheral is ready for connection it advertises. If it doesn't then there is no advertisement hence nowhere to connect. If you want to just broadcast there are non-connectable advertising formats. If you want to accept connection only from certain Central there is directed advertisement. What exactly is your problem?

Reply
  • You cannot "refuse" connection by forcing Soft Device to "ignore" CONNECT_REQ packet but you can terminate connection any time from any side so you can terminate it on very next connection interval if you want.

    [Edit]

    Sorry, I've probably misunderstood. If you speak about issuing CONNECT_REQ from GAP Central side then it's little bit strange. If Peripheral is ready for connection it advertises. If it doesn't then there is no advertisement hence nowhere to connect. If you want to just broadcast there are non-connectable advertising formats. If you want to accept connection only from certain Central there is directed advertisement. What exactly is your problem?

Children
No Data
Related