Android usb serial for direct read

Hi,
Where can i get an android lib (arr) to connect an android phone directly from the Pm2.5 meter to my android phone?
Thanks

1 Like

What are you trying to accomplish? There’s no serial port on the PurpleAir. You can query the device directly for its readings, but you need IP connectivity to the sensor to do that, usually by WiFi.

1 Like

I code wireless interfaces to scientific meters for Safeenv.com. I’m coding an Android app for the PurpleZen to add to the 100+ meters we currently have interfaced with. See www.safeenv.com for more information.
Initially I was having difficulty connecting to the Zen with an Android phone using a USB Serial connection to complete the app. I have solved that issue. But at the time of the post I was wondering if Purple had a serial interface.

1 Like

Looks like I’m wrong here, they all have USB Serial capabilities, described here:

3 Likes

Good serial doc however it’s missing the format for the gas record:

.0h16:43.322 2025/01/29T00:07:20z: p:971.71 gasR:974310.19 iaq:50.00(1) T:26.65(32.25) H:16.91(12.27) sIaq:50.00(1) Stabilization:1 Run in:1

I can guess the uptime and utc time but the p: gasR iaq: T: H: fields not sure? do you know what they mean?

The serial output format is described in this post, though it doesn’t explain the gas output:

You can get the field descriptions from the chip’s datasheet:

  • p: Pressure in millibars/hPa
  • iaq: Index for Air Quality (mobile sensor), like EPA AQI
  • T: Temperature
  • H: Humidity
  • sIaq: Static Index for Air Quality (“static” meaning “stationary” here), like EPA AQI; is not subject to the auto-trim algorithm like iaq is
  • gasR: Gas resistance value (raw reading of the sensing device, may or may not be temperature- and humidity-compensated depending on which field they’re reading)

There may be more fields depending on which chip your sensor is equipped with. I linked the datasheet for the BME688, but I believe older sensors may have the predecessor chip, the BME680.