-
|
Right out of the gate I'm pretty new to BLE so apologies if this is a naive question... I have a number of thermometers running pvvx firmware. Some emit data as a single BTHome format message which I can reliable receive. The other devices, LYWSD03MMC's, send their data in two packets. Receiving these is quite unreliable, often I only get one or the other and they may be in either order. The order doesn't matter, easily dealt with but not getting the packets reliably is an issue. I am using an active scan and getting data via a onResult callback. My scan time is 10 seconds, scan interval is 100 and window is 99. I am allowing duplicates. Hardware is an esp32 (m5 atom lite) and obviously Arduino environment. When I say multiple packets I mean that the scan finds two messages from the same mac address but the service data is different between the two. They have a "packet number" which is the same which I think means they are both components of the same message (ie 0xCA in the following example): 40 00 CA 01 21 02 74 07 03 88 14 I will try to provide a small example of my code later but firstly wondered if there were any examples of how to handle multi-packet beacons or some hints and tips on how to do this with NimBLE? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I decided to start from scratch using the continuous scanner example and figured out how to get what I wanted. My original code was old and obviously sub-optimal. |
Beta Was this translation helpful? Give feedback.
I decided to start from scratch using the continuous scanner example and figured out how to get what I wanted. My original code was old and obviously sub-optimal.