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

S120 send notification to peripheral

Hello,

I am working on S120 stack and 9.0 SDK and the central will connect to 2 different peripherals with unique IDs and both unique ID is having different service.

Like P1 and P2 are peripherals having different IDs and P1 will be sending data(notification) to central and the data has to be sent(notification) to P2.

I tried by adding the write notification characteristic to be send to P2 but I am not getting data reception at P2. Am I missing anything in the configuration of central write characteristics? Is there any example for central wrt notfication?

  • The peripheral is generally setup with the GATT server and the central as the GATT client. If this is the case, the central will have to do a write to the P2 to send data, see the Message Sequence Chart and the function API. You can also see how it is implemented in the ble_app_uart examples (peripheral and central).

  • Thank you ole. I checked the UART and HRM application and changed only the UUID and service in my application. But I am getting BLE_DB_DISCOVERY_SRV_NOT_FOUND event in db_discover_evt_handler function. But I verified the service and UUID on both master and slave and they are same. Could you please help me, how to handle service in central device?

  • You have changed the UUID in both peripheral and central? The central will search for services with specific UUIDs when calling ble_db_discovery_evt_register(...).

  • Yes I have changed. One more testing I did, the same central code is working when I connect to iPad but not working with nRF51822 peripheral board. The nRF51822 peripheral board is working with BT dongle which will act as client.

  • Use ble_app_uart_c example from SDK 10 or from github here (for using s120 and SDK 9 it should be enough to change the flash and RAM memory start address and size)

1 2