Reading off the shelf BLE Moisture Sensor w/ Boron?


#1

Hello.

I am attempting to read an off the shelf bluetooth moisture sensor with a gen3 Particle device (Boron). I am comfortable with microcontrollers but have never setup bluetooth before. I have read the Particle BLE tutorial, but still feeling a bit overwhelmed. https://docs.particle.io/tutorials/device-os/bluetooth-le

There are a lot of fragments of code in the above tutorial, and I’m not sure how to actually put them together into a working example.

The second major problem I have is I don’t see any docs for the moisture sensor I’m using. It is intended to connect to a proprietary phone app and doesn’t tell me what services or characteristics it uses. Looking over the Services list and Characteristics list from the BLE site (the one linked in the tutorial) I don’t see anything that would be used for moisture.

The sensor I’m using is an HHCC brand sensor that measures sunlight, moisture, temperature, and fertilizer. I believe this is a link to it:

I’m hoping someone can help me piece together a quick example. I’ve been at this for hours digging around the internet and still don’t really know where to begin on this.

Also if anyone has suggestions on the Service or Characteristic I may try to poll to discover useful data from this thing. Other than writing a block of code to poll all the known UUIDs, I’m not sure where to go.

I’m sure this is super easy to do once I’ve seen it done, I’m just not finding something that explicitly spells it out.

Thank you.


#2

Quick google brought me here https://github.com/vrachieru/xiaomi-flower-care-api#protocol which I think provides info of the vendor specific services and characteristics.


#3

Thanks!!! That’s it. Man I’ve been digging for a while on the various UUID codes I sniffed with a scanner and didn’t find this. Very much appreciated. :facepunch:

I’ll also add this for anyone finding this later… sniffing data from BLE, this video was very helpful, and his first video he mentions is also very good primer knowledge of how the packets actually work. Good stuff.

I ended up ordering the sniffer board for about $40 here:

Thanks again!