Simultanious data reading from connected devices to central.

Hi,

I am working in Nrf52832, Zephyr as central for connecting multiple peripheral devics. I want to read the multiple devices data at a same time. I am using common discovery function for all devices. And I use delayed work queue for conntion update. Give some instruction for simultanous data reading?

Athulya

  • I try to make more than one connection and I want to data from each connected devices simultaneously. But Now I get result like this.

    But actually I want both the data are simultaneously.

  • What do you mean by simultaniously? There is only one radio, and one CPU, so it canot happen at exactly the same time. And the BLE connections will have connection events, and the communication with every peer has to start at that event. So there is no way to get this done exactly at the same time.

    But it is possible to be connected at multiple peripherals at the same time, which I see from the code and the log here that you are not. For that, I suggest you take a look at the multilink central sample that I linked to. Essentially, when connected, just start scanning again and you can be connected to multiple peripherals at once (provided the connection parameters have enough slack,  you configure support for more peripherals as in the sample, and you handel it (as in the sample).

  • How to work multiple notification in central side 

    Athulya

  • Hi,

    I am looking more at your code now, and I see I was too quick earlier. You do connect to multiple devices, and from what I can see, you subscribe from notifications from all of them. And from the printout from earlier I see you also get notifications from at least two of them (that is all that log shows).

    I do not see the source of all the lines in the log in the code, so it has probably evolved a bit, but form what I can see it does not seem like you disconnect o stop subscribing to notifications on the first when you connect to the second, so I would expect you to still get notifications from the first when connected to the second. Does that noe happen? And is that the case? If so, can you check that there is no disconnect?

Related