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

Notify to all connections

Hi.

I'm testing multiperipheral function, and have established multiple connections (1 single Peripheral with multiple Centrals). But it seems that the Peripheral can just notify values to the last connected Central.

Could you tell me how to notify values from 1 single Peripheral to all Centrals?

Parents
  • Hi both,

    First of all GATT Notifications don't relate to GAP roles at all, these are independent (in other words you can have GAP Peripheral and on top of that GATT Client or GATT Server or even both). Secondly since BT4.2 you can have multiple GAP Peripheral roles/links active on single controller and that's the case of latest S132/S112/S140 Nordic stacks on nRF52 chips. However each connection is treated separately including all upper layers such as GATT Server.

    Nordic interpret BT4.2 specification in the way that there can be only one GATT Server instance at the time (search for answers on this forum, here is one example) however state of particular GATT objects such as CCCD or exercising (G)ATT methods such as Notification are per link. So in case you want to Notify multiple GATT Clients you need to issue multiple Notifications by calling sd_ble_gatts_hvx as per shishab's suggestion.

Reply
  • Hi both,

    First of all GATT Notifications don't relate to GAP roles at all, these are independent (in other words you can have GAP Peripheral and on top of that GATT Client or GATT Server or even both). Secondly since BT4.2 you can have multiple GAP Peripheral roles/links active on single controller and that's the case of latest S132/S112/S140 Nordic stacks on nRF52 chips. However each connection is treated separately including all upper layers such as GATT Server.

    Nordic interpret BT4.2 specification in the way that there can be only one GATT Server instance at the time (search for answers on this forum, here is one example) however state of particular GATT objects such as CCCD or exercising (G)ATT methods such as Notification are per link. So in case you want to Notify multiple GATT Clients you need to issue multiple Notifications by calling sd_ble_gatts_hvx as per shishab's suggestion.

Children
No Data
Related