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

what will happen if somebody will connect to peripheral which has already 1 BLE connection established

What is expected behaviour of s132 device (4.0.2) if peripheral is initialized with periph_role_count=1 and somebody tries to connect when BLE connection is already establsihed? How this is handled from the point of view of  BLE standart?

Parents
  • Hi,

    This is a bit of an odd case. I am not aware of anything that covers this specifically in the Bluetooth specification, but that is probably because it is in itself invalid to use connectable advertising in a state where you cannot accept the connection.

    In practice, the SoftDevice will stop advertising when a central connects. If the application only supports a single connection, it will wait and not start connectable advertising until after a disconnect occurred. In this case, the scenario you have described never happens. You should get a NRF_ERROR_CONN_COUNT error returned from the call to sd_ble_gap_adv_start() in case you try to stat connectable advertising while in a connection with periph_role_count=1.

Reply
  • Hi,

    This is a bit of an odd case. I am not aware of anything that covers this specifically in the Bluetooth specification, but that is probably because it is in itself invalid to use connectable advertising in a state where you cannot accept the connection.

    In practice, the SoftDevice will stop advertising when a central connects. If the application only supports a single connection, it will wait and not start connectable advertising until after a disconnect occurred. In this case, the scenario you have described never happens. You should get a NRF_ERROR_CONN_COUNT error returned from the call to sd_ble_gap_adv_start() in case you try to stat connectable advertising while in a connection with periph_role_count=1.

Children
Related