How to read an SDI-12 sensor from your browser

SDI-12 is a low-speed, single-wire serial protocol widely used by environmental and agricultural sensors. Its logic is simple; once you understand it, reading a sensor straight from the browser is just a handful of commands.

SDI-12 basics

On an SDI-12 bus every sensor has a single-character address in the range 0–9, a–z, A–Z — so up to 62 devices per bus. Communication runs at 1200 baud, 7 data bits, even parity, 1 stop bit (7E1); commands are ASCII and end with !. A master (a data recorder, or in this case the browser GUI) sends a command and the addressed sensor replies.

Step 1 — Address scan

If you don't know which sensors are on the bus, you send a! (the address query) to each address in turn; the addresses that answer are the devices present. In the Salixus SDI-12 GUI this comes as a one-click 62-address scan, and you can name/label the found addresses — a free feature usable without hardware or a login.

Step 2 — Identify: aI!

The aI! command returns the sensor's identification string: SDI-12 version number, vendor name, model, version and an optional info field. It's the fastest way to confirm you're talking to the right sensor.

Step 3 — Measure: aM! and aD0!

Measurement is a two-step exchange. First you send aM!; the sensor reports how many seconds until how many values are ready (for example, "3 seconds, 2 values"). Once that time elapses you fetch the values with aD0! (and aD1!… if needed). For continuous measurement this loop repeats — exactly what the continuous poll table in the Salixus GUI does.

Why from the browser?

Classic SDI-12 adapters need a terminal program and, often, a driver install. The Salixus SDI-12 bridge runs on driverless WebUSB: in Chrome/Edge, or on a USB-C Android phone, you read the sensor in the field with no extra software. The device can also supply 12 V VOUT, so you can power the sensor without an external supply.

For test and training there is a second device — an SDI-12 sensor emulator — that behaves like a real sensor: you define the identity fields and the measurement values. This lets you exercise a data recorder or your own software without a sensor in the field; a category competitors don't offer.

Explore the SDI-12 bridge + sensor-emulator pair and the browser GUI.

See the SDI-12 kit Compare with competitors