New protocol decoder: Avago ADNS-5020

We're happy to announce that libsigrokdecode now supports the adns5020 PD, a decoder for the Avago ADNS-5020 optical mouse sensor protocol.

The decoder was contributed by Karl Palsson, thanks a lot!

It stacks on top of the common SPI PD and decodes ADNS-5020 specific registers reads and writes.

There is an example file in the sigrok-dumps repository if you want to test the decoder, as well as a test config in our sigrok-test repository.


New protocol decoder: 24xx I²C EEPROM

It's been a while since the eeprom24xx protocol decoder was added to libsigrokdecode, but there hasn't been an "official" announce yet, so here goes.

The eeprom24xx PD can decode the I²C-based protocol of (almost) all 24xx series EEPROMs from various vendors.

Supported chips include for example the Microchip 24LC64 or 24AA025UID, the ST M24C01 or M24C02, the Siemens SLx24C01 or SLx24C02, and others. Various other chip families can be added relatively easily via chip spec entries in the decoder's file.

These ICs usually have only very few bytes of storage (e.g. 128 or 256 bytes), where the memory is organized into pages (the page size is e.g. 8 or 16 bytes). They usually support various types of accesses (command sequences) such as "byte write", "page write", "current address read", "random read", "sequential random read", "sequential current address read", and others.

Apart from a common command subset, some of the chips also support custom non-standard commands such as "set write protection" or "read write protection status" (on ICs that have write-protectable areas), and some others.

UNI-T UT372 now supported

libsigrok now supports a new device class, tachometers! The first supported device of this type is the UNI-T UT372.

It's a USB-attached device (uses one of the WCH CH9325 ICs commonly found in UNI-T gear) that can measure RPM and counts.

The protocol of the device (now documented in the sigrok wiki) was reverse engineered by Mike Walters, using a somewhat unusual and quite interesting technique. Instead of the usual method of sniffing the USB traffic and then staring at hex numbers until things start to make sense, he used the following method:

After a first quick look at the USB traffic it was pretty clear that the packets usually look something like this:


Now, instead of trying to figure out which bit and byte means what by looking at many of these packets, Mike instead generated his own packets that looked like the real packets from the UT372. He sent them to the vendor's PC software (via a custom-built "emulator" on a USB-enabled Arduino), which then interpreted and displayed the values and flags that it thought were sent by an actual UT372 device.

By randomly flipping bits in these packets and observing how the PC software's interpretation of the packets differed, Mike was able to figure out the individual protocol details a lot faster than using other methods.

Shortly after the protocol was known, Martin Ling wrote a libsigrok driver for the UT372 by hooking up a device-specific ut372 parser to the existing uni-t-dmm driver in libsigrok (which already handles the somewhat "special" CH9325 details).

Thanks a lot to Mike Walters and Martin Ling for their contributions!


BayLibre ACME now supported

libsigrok now supports the BayLibre ACME device.

This a BeagleBone Black cape with an I²C-attached Texas Instruments INA226 current/power monitor and an I²C-attached TI TMP435 temperature sensor.

The sensors are supported in mainline Linux. The drivers expose a standard interface via the Linux sysfs pseudo file system, which the libsigrok driver uses.

The driver was contributed by Bartosz Golaszewski (of BayLibre), thanks a lot!

Bartosz will also present a Sigrok: Adventures in Integrating a Power-Measurement Device talk at the Embedded Linux Conference on March 24, 2015 (schedule) in San Jose, CA.


New protocol decoders: ARM TPIU, ITM, ETMv3

We're happy to announce that libsigrokdecode now supports three new, closely related, protocol decoders: arm_tpiu, arm_itm, and arm_etmv3.

Here's a quick overview of the protocols that are decoded:

  • The TPIU (Trace Port Interface Unit) is a stream formatter and multiplexer that combines data from several sources into one stream. It is used inside an ARM-based microcontroller or SoC to combine ITM and ETM trace output into a single port.
  • ARM ITM (Instrumentation Trace Macroblock) allows tracing of software events, and also with the help of DWT (Debug, Watchpoint and Trace) the tracing of exceptions and data watchpoints. It also supports periodic sampling of PC values.
  • ARM ETM (Embedded Trace Macroblock) allows tracing of every instruction executed on the CPU. Currently only ETM version 3 (the newest version, present in Cortex-M3 and other ARMv7-m) is supported.

The data is captured on the SWO (TRACESWO) pin, e.g. on commonly available ARM SWD (serial wire debug) programmers/debuggers. Hint: libsigrokdecode also ships with an SWD decoder, if you're interested in that...

You can test the decoders with some sample files from the sigrok-dumps repository. If you optionally supply the location of ARM (cross-)toolchain utilities such as arm-none-eabi-objdump or arm-none-eabi-addr2line you can decode even more information, including source code snippets (see screenshot below)!

That opens up a whole new bunch of debugging possibilities; you can basically debug your code by not only tracing instructions but also tracing them in relation to other signals you're capturing with your logic analyzer at the same time (e.g. GPIOs you're toggling, UART, SPI, I²C, or whatever else may be going on in the system you're debugging)!

All three decoders were contributed by Petteri Aimonen (including sample *.sr files and a small test-suite for our sigrok-test repository), thanks a lot!

Happy debugging!


MASTECH MS8250B supported

libsigrok now supports yet another multimeter, the MASTECH MS8250B.

This is a 4000 counts autorange DMM with USB connectivity (via an internal USB-to-serial IC built into the DMM).

Apart from the usual measurement ranges it also features a nice non-contact voltage detector functionality.

Thanks to Baruch Even for contributing and testing the code for this DMM (which is now part of the serial-dmm driver via a relatively small patch)!


New protocol decoder: PWM

We're happy to announce that libsigrokdecode now supports the pwm protocol decoder.

The PD was contributed by Torsten Duwe and Sebastien Bourdelin, thanks a lot!

This decoder will show the duty cycle of any signal, which in practice can mean various things. E.g. Class-D amplifiers can use PWM to encode audio data.

We have a test file in the sigrok-dumps repository containing audio data.

The decoder also supports a binary output facility which you can use to decode the audio (a direct export to WAV is planned as well, though).

 $ sigrok-cli -i -P pwm:data=4 -B pwm=raw > PWM.raw
 $ sox -t raw -e unsigned -b 8 -r 64000 PWM.raw PWM.wav
 $ aplay PWM.wav


New protocol decoder: Aosong AM230x / DHT11

We're happy to announce that libsigrokdecode now supports the am230x protocol decoder.

This PD decodes the custom protocol of the Aosong AM230x and DHT11 temperature and humidity sensors.

A short description of the protocol is available on the respective wiki page, along with pointers to further reading.

There are also a bunch of teardown photos of these sensors, in case you were wondering what those look like inside. Turns out they usually use some ST STM8S (or other) microcontroller and measure temperature and humidity "directly" without further ICs. The exception being the Aosong AM2303 which actually uses a Dallas/Maxim DS18B20 (1-Wire) sensor for the measurement.

Thanks a lot to Johannes Roemer for contributing the decoder!

sigrok at the Chaos Communication Congress (31C3)

As in previous years various sigrok developers will be at the Chaos Communication Congress (31C3) in Hamburg, Germany. The conference takes place December 27th to 30th, 2014.

There will be a sigrok assembly (on all 4 days) with a few tables and chairs to allow for sigrok hacking and development planning, various demos and Q&A for visitors, and so on.

Apart from sigrok hacking the conference also features the usual set of awesome talks related to security, hardware hacking, and lots of other interesting topics that you shouldn't miss.

If you're interested in sigrok as user or developer, please drop by and say hello. Bring your gear (if possible) for reverse engineering and driver writing purposes. Chat with us, give us your suggestions which features you'd like to see, which devices you want to be supported, which protocol decoders you'd like to have, or even help us write some drivers/decoders!


sigrok + UNIX = Awesome! - part III - Fun and Games with gpsd

So here I am hanging out at the local hacker space in Richmond. We, the group that meet up every Tuesday evening are small, yet perfectly formed. This evening Paul (MØTZO), a friendly radio ham, and co-founder of our group brought along an interesting device to encode GPS location data in APRS (Automatic Packet Reporting System) packets. These packets are fed into to a VHF radio transmitter which transmits the signal at 144.8 MHz. A network of receivers, run by amateur radio operators receives the packets, and streams them over the internet. An interesting device indeed.

Tonight we were just playing with Paul's GPS board, which contains a U-Blox Neo 6 GPS receiver. As with most GPS receivers, simply powering it on is enough to make it emit coordinates encoded in NMEA 0183 sentences transmitted over UART at 9600bps.

These are trivial to receive with an fx2-based logic analyzer and sigrok-cli:

$ sigrok-cli --driver=fx2lafw --config samplerate=50k \
    --continuous -P uart:baudrate=9600:tx=0 -B uart=tx

With the UART protocol decoder and the ASCII binary output, we can see the NMEA sentences:

Here we can see that we're locked on and receiving coordinates. "cat -v" is used to protect the terminal state from being clobbered by any errant binary data being emitted.

Yawn. Let's make this more interesting.

There is a very interesting package called gpsd. This is a GPS location server than can connect to various types of GPS devices, and can serve the position information over the network. And best of all, thanks to the power of UNIX pipes, we can feed the data from sigrok directly into it:

$ gpsd -N <(sigrok-cli --driver=fx2lafw --config samplerate=50k \
    --continuous -P uart:baudrate=9600:tx=0 -B uart=tx)

There are a variety of gpsd clients available. There's a nice ncurses based client, gpsmon:

And best of all, KDE's Marble integrates with gpsd. Here we see Marble, showing a live stream of location data captured by the fx2lafw firmware, decoded by sigrok, handled by gpsd, plotted by Marble on OpenStreetMap map data - a complete free-software stack! Pretty freetarded:


Subscribe to The ever-expanding world of sigrok RSS