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

Error in NUS Peripheral and central

Hello,

i’m using NRF52832 with SoftDevice S132 and Sdk 15.3 to develop a NUS peripheral and central. The system is tested as follows:

I have two NUS peripherals , a NUS Central-Peripheral device that echoes the data received from the peripherals and a central, in my case a SmartDevice(IOS). For the software I was based on the Nus examples and the Relay example. The 2 NUS Peripheral work perfectly. The Problem lies in the NUS Peripheral-Central-device. When I connect first the 2 Nus peripherals and afterwards connect the IOS-device, everything works perfectly. The Problem occurs if a sensor or both connects after the IOS-device. In this case the ble_nus_data_send() returns NRF_ERROR_INVALID_STATE. During Debugging I found out that on_connect() method in ble_nus.h was called, when the Nus peripherals were connected to the NUS peripheral-central-device. (Note Nus peripherals are ble_nus_c instances from the perspective of NUS peripheral-central-device and It should not call/trigger methods from ble_nus.h)

Thanks for your help in advance.

Parents Reply Children
Related