<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://sigrok.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Buttim</id>
	<title>sigrok - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://sigrok.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Buttim"/>
	<link rel="alternate" type="text/html" href="https://sigrok.org/wiki/Special:Contributions/Buttim"/>
	<updated>2026-04-19T09:31:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://sigrok.org/w/index.php?title=Protocol_decoder_HOWTO&amp;diff=15861</id>
		<title>Protocol decoder HOWTO</title>
		<link rel="alternate" type="text/html" href="https://sigrok.org/w/index.php?title=Protocol_decoder_HOWTO&amp;diff=15861"/>
		<updated>2020-11-19T17:49:39Z</updated>

		<summary type="html">&lt;p&gt;Buttim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page serves as a quick-start guide for people who want to write their own [[libsigrokdecode]] protocol decoders ([[Protocol decoders|PDs]]).&lt;br /&gt;
&lt;br /&gt;
It is &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; intended to replace the [[Protocol decoder API]] page, but rather to give a short overview/tutorial and some tips.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Protocol decoders are written entirely in Python (&amp;gt;= 3.0).&lt;br /&gt;
&lt;br /&gt;
== Files ==&lt;br /&gt;
&lt;br /&gt;
Every protocol decoder is a Python module and has its own subdirectory in libsigrokdecode&amp;#039;s &amp;#039;&amp;#039;&amp;#039;[http://sigrok.org/gitweb/?p=libsigrokdecode.git;a=tree;f=decoders decoders]&amp;#039;&amp;#039;&amp;#039; directory.&lt;br /&gt;
&lt;br /&gt;
This is a minimalistic example of how a protocol decoder looks like, in this case the &amp;#039;&amp;#039;&amp;#039;[[Protocol_decoder:I2c|i2c]]&amp;#039;&amp;#039;&amp;#039; decoder (license header, comments, and some other parts omitted).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;&amp;#039;: Do not start new protocol decoders by copying code from here. Instead, it&amp;#039;s recommended to select an already existing decoder in the source code which is similar to the one you plan to write, and copy that as a starting point.&lt;br /&gt;
&lt;br /&gt;
=== __init__.py ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 I²C (Inter-Integrated Circuit) is a bidirectional, multi-master&lt;br /&gt;
 bus using two signals (SCL = serial clock line, SDA = serial data line).&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;Insert notes and hints for the user here&amp;gt;&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
 from .pd import Decoder&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a standard Python file, required in every Python module. It contains a module-level docstring, which is accessible by frontends via the [http://sigrok.org/api/libsigrokdecode/unstable/index.html libsigrokdecode API]. It should contain a (very) short description of what the protocol (in this case [[Protocol_decoder:I2c|I²C]]) is about, and some notes and hints for the user of this protocol decoder (which can be shown in GUIs when the user selects/browses different PDs).&lt;br /&gt;
&lt;br /&gt;
This docstring should &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; contain the full, extensive protocol description. Instead, the per-PD wiki page should be used for protocol description, photos of devices or photos of example acquisition setups, and so on. Each decoder has one unique wiki page at the URL &amp;#039;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;http://sigrok.org/wiki/Protocol_decoder:&amp;lt;pd&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;#039;, where &amp;#039;&amp;#039;&amp;#039;&amp;lt;pd&amp;gt;&amp;#039;&amp;#039;&amp;#039; is the Python module name of the decoder (&amp;#039;&amp;#039;&amp;#039;i2c&amp;#039;&amp;#039;&amp;#039; in this case). Some examples for such per-PD wiki pages: [[Protocol_decoder:Uart|UART]], [[Protocol_decoder:Pan1321|PAN1321]], [[Protocol_decoder:Mx25lxx05d|MX25Lxx05D]], [[Protocol_decoder:Dcf77|DCF77]].&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;&amp;#039;&amp;#039;&amp;#039;from .pd import Decoder&amp;#039;&amp;#039;&amp;#039;&amp;quot; line will make sure the code from &amp;#039;&amp;#039;&amp;#039;pd.py&amp;#039;&amp;#039;&amp;#039; gets properly imported when this module is used.&lt;br /&gt;
&lt;br /&gt;
=== pd.py ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 import sigrokdecode as srd&lt;br /&gt;
 &lt;br /&gt;
 class Decoder(srd.Decoder):&lt;br /&gt;
     api_version = 2&lt;br /&gt;
     id = &amp;#039;i2c&amp;#039;&lt;br /&gt;
     name = &amp;#039;I²C&amp;#039;&lt;br /&gt;
     longname = &amp;#039;Inter-Integrated Circuit&amp;#039;&lt;br /&gt;
     desc = &amp;#039;Two-wire, multi-master, serial bus.&amp;#039;&lt;br /&gt;
     license = &amp;#039;gplv2+&amp;#039;&lt;br /&gt;
     inputs = [&amp;#039;logic&amp;#039;]&lt;br /&gt;
     outputs = [&amp;#039;i2c&amp;#039;]&lt;br /&gt;
     channels = (&lt;br /&gt;
         {&amp;#039;id&amp;#039;: &amp;#039;scl&amp;#039;, &amp;#039;name&amp;#039;: &amp;#039;SCL&amp;#039;, &amp;#039;desc&amp;#039;: &amp;#039;Serial clock line&amp;#039;},&lt;br /&gt;
         {&amp;#039;id&amp;#039;: &amp;#039;sda&amp;#039;, &amp;#039;name&amp;#039;: &amp;#039;SDA&amp;#039;, &amp;#039;desc&amp;#039;: &amp;#039;Serial data line&amp;#039;},&lt;br /&gt;
     )&lt;br /&gt;
     optional_channels = ()&lt;br /&gt;
     options = (&lt;br /&gt;
         {&amp;#039;id&amp;#039;: &amp;#039;address_format&amp;#039;, &amp;#039;desc&amp;#039;: &amp;#039;Displayed slave address format&amp;#039;,&lt;br /&gt;
            &amp;#039;default&amp;#039;: &amp;#039;shifted&amp;#039;, &amp;#039;values&amp;#039;: (&amp;#039;shifted&amp;#039;, &amp;#039;unshifted&amp;#039;)},&lt;br /&gt;
     )&lt;br /&gt;
     annotations = (&lt;br /&gt;
         (&amp;#039;start&amp;#039;, &amp;#039;Start condition&amp;#039;),&lt;br /&gt;
         (&amp;#039;repeat-start&amp;#039;, &amp;#039;Repeat start condition&amp;#039;),&lt;br /&gt;
         (&amp;#039;stop&amp;#039;, &amp;#039;Stop condition&amp;#039;),&lt;br /&gt;
         (&amp;#039;ack&amp;#039;, &amp;#039;ACK&amp;#039;),&lt;br /&gt;
         (&amp;#039;nack&amp;#039;, &amp;#039;NACK&amp;#039;),&lt;br /&gt;
         (&amp;#039;bit&amp;#039;, &amp;#039;Data/address bit&amp;#039;),&lt;br /&gt;
         (&amp;#039;address-read&amp;#039;, &amp;#039;Address read&amp;#039;),&lt;br /&gt;
         (&amp;#039;address-write&amp;#039;, &amp;#039;Address write&amp;#039;),&lt;br /&gt;
         (&amp;#039;data-read&amp;#039;, &amp;#039;Data read&amp;#039;),&lt;br /&gt;
         (&amp;#039;data-write&amp;#039;, &amp;#039;Data write&amp;#039;),&lt;br /&gt;
         (&amp;#039;warnings&amp;#039;, &amp;#039;Human-readable warnings&amp;#039;),&lt;br /&gt;
     )&lt;br /&gt;
     annotation_rows = (&lt;br /&gt;
         (&amp;#039;bits&amp;#039;, &amp;#039;Bits&amp;#039;, (5,)),&lt;br /&gt;
         (&amp;#039;addr-data&amp;#039;, &amp;#039;Address/Data&amp;#039;, (0, 1, 2, 3, 4, 6, 7, 8, 9)),&lt;br /&gt;
         (&amp;#039;warnings&amp;#039;, &amp;#039;Warnings&amp;#039;, (10,)),&lt;br /&gt;
     )&lt;br /&gt;
 &lt;br /&gt;
     def __init__(self, **kwargs):&lt;br /&gt;
         self.state = &amp;#039;FIND START&amp;#039;&lt;br /&gt;
         # And various other variable initializations...&lt;br /&gt;
 &lt;br /&gt;
     def metadata(self, key, value):&lt;br /&gt;
         if key == srd.SRD_CONF_SAMPLERATE:&lt;br /&gt;
             self.samplerate = value&lt;br /&gt;
 &lt;br /&gt;
     def start(self):&lt;br /&gt;
         self.out_ann = self.register(srd.OUTPUT_ANN)&lt;br /&gt;
 &lt;br /&gt;
     def decode(self, ss, es, data):&lt;br /&gt;
         for self.samplenum, (scl, sda) in data:&lt;br /&gt;
             # Decode the samples.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The recommended name for the actual decoder file is &amp;#039;&amp;#039;&amp;#039;pd.py&amp;#039;&amp;#039;&amp;#039;. This file contains some meta information about the decoder, and the actual code itself, mostly in the &amp;#039;&amp;#039;&amp;#039;decode()&amp;#039;&amp;#039;&amp;#039; method.&lt;br /&gt;
&lt;br /&gt;
If needed, large unwieldy lists or similar things can also be factored out into another *.py file (examples: [http://sigrok.org/gitweb/?p=libsigrokdecode.git;a=tree;f=decoders/midi midi], [http://sigrok.org/gitweb/?p=libsigrokdecode.git;a=tree;f=decoders/z80 z80]).&lt;br /&gt;
&lt;br /&gt;
== Copyright and license ==&lt;br /&gt;
&lt;br /&gt;
Every protocol decoder &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; come with source code in the form of &amp;#039;&amp;#039;&amp;#039;*.py&amp;#039;&amp;#039;&amp;#039; files. No pre-compiled code should be present, Python or otherwise. The PD must not use any helpers that are not provided as source code under the same license as the PD itself.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;Decoder&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; class must have a license declaration (see above), stating the license under which all the contents in the decoder&amp;#039;s directory are provided. This is usually &amp;lt;tt&amp;gt;&amp;#039;gplv2+&amp;#039;&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;&amp;#039;gplv3+&amp;#039;&amp;lt;/tt&amp;gt;, whichever you prefer. In either case, the decoder license must be compatible with the [[libsigrokdecode]] license (which is &amp;quot;GPL, version 3 or later&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;tt&amp;gt;channels&amp;lt;/tt&amp;gt; &amp;amp; &amp;lt;tt&amp;gt;optional_channels&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The following excerpt from the [[Protocol_decoder:spi|SPI]] PD shows how to use &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;channels&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;optional_channels&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;. To decode SPI, the clock signal is always needed, the chip-select signal is optional and only used when provided. To give the user the flexibility to provide only one of the MOSI/MISO signals, they are both also defined as optional:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 class Decoder(srd.Decoder):&lt;br /&gt;
     ...&lt;br /&gt;
     id = &amp;#039;spi&amp;#039;&lt;br /&gt;
     ...&lt;br /&gt;
     channels = (&lt;br /&gt;
         {&amp;#039;id&amp;#039;: &amp;#039;clk&amp;#039;, &amp;#039;name&amp;#039;: &amp;#039;CLK&amp;#039;, &amp;#039;desc&amp;#039;: &amp;#039;Clock&amp;#039;},&lt;br /&gt;
     )&lt;br /&gt;
     optional_channels = (&lt;br /&gt;
         {&amp;#039;id&amp;#039;: &amp;#039;miso&amp;#039;, &amp;#039;name&amp;#039;: &amp;#039;MISO&amp;#039;, &amp;#039;desc&amp;#039;: &amp;#039;Master in, slave out&amp;#039;},&lt;br /&gt;
         {&amp;#039;id&amp;#039;: &amp;#039;mosi&amp;#039;, &amp;#039;name&amp;#039;: &amp;#039;MOSI&amp;#039;, &amp;#039;desc&amp;#039;: &amp;#039;Master out, slave in&amp;#039;},&lt;br /&gt;
         {&amp;#039;id&amp;#039;: &amp;#039;cs&amp;#039;, &amp;#039;name&amp;#039;: &amp;#039;CS#&amp;#039;, &amp;#039;desc&amp;#039;: &amp;#039;Chip-select&amp;#039;},&lt;br /&gt;
     )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;, the argument of the decoder&amp;#039;s [[Protocol decoder API#decode-function|&amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;decode()&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;]] function that contains the data to decode, is a list of tuples. These tuples contain the (absolute) number of the sample and the data at that sample. To process all samples, the SPI decoder loops over &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;data&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 def decode(self, ss, es, data):&lt;br /&gt;
     ...&lt;br /&gt;
     for (self.samplenum, pins) in data:&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;channels&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;optional_channels&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; contain in total four channels, therefore the second member of the tuple is an object of Python&amp;#039;s [https://docs.python.org/3/library/stdtypes.html#typebytes &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;bytes&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;] class containing 4 bytes, one for each channel. The decoder unpacks the bytes into the variables &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;clk&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;miso&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;mosi&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; as shown below.&lt;br /&gt;
&lt;br /&gt;
Then, it checks for the optional channels, if their value is either 0 or 1. If it is not, that optional channel is not provided to the decoder. In the case that neither of them is supplied, an exception is raised:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 (clk, miso, mosi, cs) = pins&lt;br /&gt;
 self.have_miso = (miso in (0, 1))&lt;br /&gt;
 self.have_mosi = (mosi in (0, 1))&lt;br /&gt;
 self.have_cs = (cs in (0, 1))&lt;br /&gt;
 &lt;br /&gt;
 # Either MISO or MOSI (but not both) can be omitted.&lt;br /&gt;
 if not (self.have_miso or self.have_mosi):&lt;br /&gt;
     raise ChannelError(&amp;#039;Either MISO or MOSI (or both) pins required.&amp;#039;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;tt&amp;gt;annotations&amp;lt;/tt&amp;gt; &amp;amp; &amp;lt;tt&amp;gt;annotation_rows&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
To make the relation between the &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;annotations&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; and the &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;annotation_rows&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; members of a decoder object more clear, take a look at how the [[Protocol_decoder:Ir_nec|ir_nec]] PD uses them:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 class Decoder(srd.Decoder):&lt;br /&gt;
     ...&lt;br /&gt;
     id = &amp;#039;ir_nec&amp;#039;&lt;br /&gt;
     ...&lt;br /&gt;
     annotations = (                        # Implicitly assigned annotation type ID&lt;br /&gt;
         (&amp;#039;bit&amp;#039;, &amp;#039;Bit&amp;#039;),                    # 0&lt;br /&gt;
         (&amp;#039;agc-pulse&amp;#039;, &amp;#039;AGC pulse&amp;#039;),        # 1&lt;br /&gt;
         (&amp;#039;longpause&amp;#039;, &amp;#039;Long pause&amp;#039;),       # 2&lt;br /&gt;
         (&amp;#039;shortpause&amp;#039;, &amp;#039;Short pause&amp;#039;),     # 3&lt;br /&gt;
         (&amp;#039;stop-bit&amp;#039;, &amp;#039;Stop bit&amp;#039;),          # 4&lt;br /&gt;
         (&amp;#039;leader-code&amp;#039;, &amp;#039;Leader code&amp;#039;),    # 5&lt;br /&gt;
         (&amp;#039;addr&amp;#039;, &amp;#039;Address&amp;#039;),               # 6&lt;br /&gt;
         (&amp;#039;addr-inv&amp;#039;, &amp;#039;Address#&amp;#039;),          # 7&lt;br /&gt;
         (&amp;#039;cmd&amp;#039;, &amp;#039;Command&amp;#039;),                # 8&lt;br /&gt;
         (&amp;#039;cmd-inv&amp;#039;, &amp;#039;Command#&amp;#039;),           # 9&lt;br /&gt;
         (&amp;#039;repeat-code&amp;#039;, &amp;#039;Repeat code&amp;#039;),    # 10&lt;br /&gt;
         (&amp;#039;remote&amp;#039;, &amp;#039;Remote&amp;#039;),              # 11&lt;br /&gt;
         (&amp;#039;warnings&amp;#039;, &amp;#039;Warnings&amp;#039;),          # 12&lt;br /&gt;
     )&lt;br /&gt;
     annotation_rows = (&lt;br /&gt;
         (&amp;#039;bits&amp;#039;, &amp;#039;Bits&amp;#039;, (0, 1, 2, 3, 4)),&lt;br /&gt;
         (&amp;#039;fields&amp;#039;, &amp;#039;Fields&amp;#039;, (5, 6, 7, 8, 9, 10)),&lt;br /&gt;
         (&amp;#039;remote&amp;#039;, &amp;#039;Remote&amp;#039;, (11,)),&lt;br /&gt;
         (&amp;#039;warnings&amp;#039;, &amp;#039;Warnings&amp;#039;, (12,)),&lt;br /&gt;
     )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It groups the first five annotation types together into the &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;bits&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; row and the next six into the &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;fields&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; row. The rows &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;remote&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;warnings&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; both only contain one annotation type.&lt;br /&gt;
&lt;br /&gt;
Without &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;annotation_rows&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;, [[PulseView]] would have to put each annotation type in its own row (which is unhandy if the decoder has many annotations) or it would have to put them all on the same row (which would result in unreadable output due to overlaps). But because of the &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;annotation_rows&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;, the output of the [[Protocol_decoder:Ir_nec|ir_nec]] decoder is grouped together as shown in the following picture (note how different annotation types, distinguishable by their different colors, share the same row):&lt;br /&gt;
&lt;br /&gt;
[[File:Pv example ir nec cropped.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, as you can imagine, handling numeric IDs is quite bothersome - especially if they change and all affected IDs have to be changed throughout the PD. To avoid this, you can use a pseudo-enum:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 ann_bit, ann_agc_pulse, ann_long_pause, ann_short_pause, ann_stop_bit, ann_leader_code, ann_addr, ann_addr_inv, ann_cmd, ann_cmd_inv, ann_repeat_code, ann_remote, ann_warning = range(13)&lt;br /&gt;
&lt;br /&gt;
 class Decoder(srd.Decoder):&lt;br /&gt;
     ...&lt;br /&gt;
     id = &amp;#039;ir_nec&amp;#039;&lt;br /&gt;
     ...&lt;br /&gt;
     annotations = (                        # Implicitly assigned annotation type ID&lt;br /&gt;
         (&amp;#039;bit&amp;#039;, &amp;#039;Bit&amp;#039;),                    # 0  = ann_bit&lt;br /&gt;
         (&amp;#039;agc-pulse&amp;#039;, &amp;#039;AGC pulse&amp;#039;),        # 1  = ann_agc_pulse&lt;br /&gt;
         (&amp;#039;longpause&amp;#039;, &amp;#039;Long pause&amp;#039;),       # 2  = ann_long_pause&lt;br /&gt;
         (&amp;#039;shortpause&amp;#039;, &amp;#039;Short pause&amp;#039;),     # 3  = ann_short_pause&lt;br /&gt;
         (&amp;#039;stop-bit&amp;#039;, &amp;#039;Stop bit&amp;#039;),          # 4  = ann_stop_bit&lt;br /&gt;
         (&amp;#039;leader-code&amp;#039;, &amp;#039;Leader code&amp;#039;),    # 5  = ann_leader_code&lt;br /&gt;
         (&amp;#039;addr&amp;#039;, &amp;#039;Address&amp;#039;),               # 6  = ann_addr&lt;br /&gt;
         (&amp;#039;addr-inv&amp;#039;, &amp;#039;Address#&amp;#039;),          # 7  = ann_addr_inv&lt;br /&gt;
         (&amp;#039;cmd&amp;#039;, &amp;#039;Command&amp;#039;),                # 8  = ann_cmd&lt;br /&gt;
         (&amp;#039;cmd-inv&amp;#039;, &amp;#039;Command#&amp;#039;),           # 9  = ann_cmd_inv&lt;br /&gt;
         (&amp;#039;repeat-code&amp;#039;, &amp;#039;Repeat code&amp;#039;),    # 10 = ann_repeat_code&lt;br /&gt;
         (&amp;#039;remote&amp;#039;, &amp;#039;Remote&amp;#039;),              # 11 = ann_remote&lt;br /&gt;
         (&amp;#039;warnings&amp;#039;, &amp;#039;Warnings&amp;#039;),          # 12 = ann_warning&lt;br /&gt;
     )&lt;br /&gt;
     annotation_rows = (&lt;br /&gt;
         (&amp;#039;bits&amp;#039;, &amp;#039;Bits&amp;#039;, (ann_bit, ann_agc_pulse, ann_long_pause, ann_short_pause, ann_stop_bit)),&lt;br /&gt;
         (&amp;#039;fields&amp;#039;, &amp;#039;Fields&amp;#039;, (ann_leader_code, ann_addr, ann_addr_inv, ann_cmd, ann_cmd_inv, ann_repeat_code)),&lt;br /&gt;
         (&amp;#039;remote&amp;#039;, &amp;#039;Remote&amp;#039;, (ann_remote,)),&lt;br /&gt;
         (&amp;#039;warnings&amp;#039;, &amp;#039;Warnings&amp;#039;, (ann_warning,)),&lt;br /&gt;
     )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way, all you need to ensure is that the order of the enum entries is the same as in the annotations array and you&amp;#039;re set. There is one downside, though, as always: pseudo-enums are pitifully slow in python, so if you use them and you use them in a lot of places, your protocol decoder may be significantly slower (up to 4x has been observed), so choose wisely. You can use the PD test facility to compare, using e.g. &amp;#039;time ./pdtest -r $YOUR_PD&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Random notes, tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
* You should usually only use &amp;#039;&amp;#039;&amp;#039;raise&amp;#039;&amp;#039;&amp;#039; in a protocol decoder to raise exceptions in cases which are a clear bug in how the protocol decoder is invoked (e.g. if no samplerate was provided for a PD which needs the samplerate, or if some of the required channels were not provided by the user, and so on).&lt;br /&gt;
* Use the has_channel() method to check whether an optional channel has been provided or not.&lt;br /&gt;
* A simple and fast way to calculate a parity (i.e., count the number of 1 bits) over a number (0x55 in this example) is:&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 ones = bin(0x55).count(&amp;#039;1&amp;#039;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* A simple function to convert a BCD number (max. 8 bits) to an integer is:&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 def bcd2int(b):&lt;br /&gt;
     return (b &amp;amp; 0x0f) + ((b &amp;gt;&amp;gt; 4) * 10)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* An elegant way to convert a sequence of bus pins to a numeric value:&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 from functools import reduce&lt;br /&gt;
&lt;br /&gt;
 def reduce_bus(bus):&lt;br /&gt;
     if 0xFF in bus:&lt;br /&gt;
         return None # unassigned bus channels&lt;br /&gt;
     else:&lt;br /&gt;
         return reduce(lambda a, b: (a &amp;lt;&amp;lt; 1) | b, reversed(bus))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* A nice way to construct method names according to e.g. protocol commands is (assuming &amp;#039;&amp;#039;&amp;#039;cmd&amp;#039;&amp;#039;&amp;#039; is 8, this would call the function &amp;#039;&amp;#039;&amp;#039;self.handle_cmd_0x08&amp;#039;&amp;#039;&amp;#039;):&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 fn = getattr(self, &amp;#039;handle_cmd_0x%02x&amp;#039; % cmd);&lt;br /&gt;
 fn(arg1, arg2, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* A cheap way to deal with Python&amp;#039;s lack of enumerations (useful for states, pin indices, annotation indices, etc.):&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 class Cycle:&lt;br /&gt;
     NONE, MEMRD, MEMWR, IORD, IOWR, FETCH, INTACK = range(7)&lt;br /&gt;
&amp;lt;/source&amp;gt;Please be aware, though, that using this mechanism may slow down your decoder significantly. It may make sense to perform some basic profiling to see if this affects you, e.g. using &amp;quot;time ./pdtest -r $YOUR_PD&amp;quot;.&lt;br /&gt;
* &amp;lt;div id=&amp;quot;SIGROKDECODE_DIR&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;You don&amp;#039;t need to reinstall the whole [[libsigrokdecode]] project every time you make a change on your decoder. Instead, you can use the environment variable &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;SIGROKDECODE_DIR&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; to point the software to your development directory:&amp;lt;br /&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ SIGROKDECODE_DIR=/path/to/libsigrokdecode/decoders/ sigrok-cli … -P &amp;lt;decodername&amp;gt;&amp;lt;/source&amp;gt;Because this environment variable is evaluated by the [[libsigrokdecode]] code itself, it can be used for any program that uses the library, for example when calling [[PulseView]] or the &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;pdtest&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; unit test utility from the [http://sigrok.org/gitweb/?p=sigrok-test.git;a=summary sigrok-test] repository.&amp;lt;br /&amp;gt;If you compiled a recent [[libsigrokdecode]] by yourself ([http://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commit;h=40c6ac1d3fbded276dcbff23e8bc099896ab2fb5 newer than this commit]), you can also put decoders into your home directory, without the need for an additional environment variable. On Linux systems, this name follows the [http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html XDG base directory specification], which by default resolves to &amp;lt;tt&amp;gt;~/.local/share/libsigrokdecode/decoders&amp;lt;/tt&amp;gt;. If that folder does not exist, you can simply create it and drop your decoders there, in their own subdirectory, like you would do in the libsigrokdecode source tree. On Windows systems additional decoders are read from &amp;lt;tt&amp;gt;%ProgramData%\libsigrokdecode\decoders&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* To debug the Python implementation of a decoder during development, maintenance or research either add print() statements at appropriate locations. Or get WinPDB and use the remote debugging feature as outlined below (add this hook somewhere in pd.py, then &amp;quot;File -&amp;gt; Attach&amp;quot; to the running process). Decoders cannot be used in &amp;quot;regular&amp;quot; debuggers since they expect a rather specific environment to execute in, for all of receiving their input as well as having their output saved or presented as well as processing samples (data types, runtime routines). Remote debugging works in both the sigrok-cli and pulseview context. Adding another print() statement before starting the embedded debugger can help identify the moment in time when to attach.&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 def __init__():&lt;br /&gt;
     import rpdb2&lt;br /&gt;
     rpdb2.start_embedded_debugger(&amp;quot;pd&amp;quot;)&lt;br /&gt;
     ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For Windows you might want to use the following code, adapting it to your Python and WinPDB-reborn version:&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 def __init__():&lt;br /&gt;
     import sys&lt;br /&gt;
     sys.path.insert(0, &amp;#039;c:/Program Files (x86)/Python38-32/Lib/site-packages/winpdb_reborn-2.0.0.1-py3.8.egg&amp;#039;)&lt;br /&gt;
     import rpdb2&lt;br /&gt;
     rpdb2.start_embedded_debugger(&amp;quot;pd&amp;quot;, fAllowRemote=True)&lt;br /&gt;
     ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Unit tests ==&lt;br /&gt;
&lt;br /&gt;
In order to keep protocol decoders in a running state even when we make changes to a decoder or libsigrokdecode itself, we use unit tests for as many decoders as we can. These are stored in the [http://sigrok.org/gitweb/?p=sigrok-test.git sigrok-test repository]. If you want to add, modify or run one of them, clone that repository and [https://sigrok.org/gitweb/?p=sigrok-test.git;a=blob;f=README check the README] for documentation.&lt;br /&gt;
We greatly appreciate it when you submit unit tests for your decoder so we can keep it in good health!&lt;br /&gt;
&lt;br /&gt;
== Submitting your decoder ==&lt;br /&gt;
&lt;br /&gt;
When you&amp;#039;ve finished your decoder and everything is working nicely, please contribute the decoder to the sigrok project so that other people can benefit from it (and test it, improve upon it, and so on).&lt;br /&gt;
&lt;br /&gt;
* Check the decoder&amp;#039;s operation in the most recent version of the software. You expect the decoder to get accepted in the project&amp;#039;s mainline codebase. So it should work in that environment. Either build from up-to-date sources, or download nightly builds.&lt;br /&gt;
* Tell us about the location of your public git repo on the &amp;#039;&amp;#039;&amp;#039;#sigrok&amp;#039;&amp;#039;&amp;#039; IRC channel on FreeNode. As an alternative send the decoder to the [https://lists.sourceforge.net/lists/listinfo/sigrok-devel sigrok-devel] mailing list (preferrably against current master and as a full commit instead of a mere diff). Remember that pushing to a public git repo is preferred over email attachments.&lt;br /&gt;
* Please also make example data files (*.sr) including a small README available. Developers need these in order to properly review and test your decoder. Users need these to learn what the captures are about in the first place. Preferrably these files should also come as patches against the latest git master of the [http://sigrok.org/gitweb/?p=sigrok-dumps.git;a=tree sigrok-dumps] repository. See [[Example dumps]] for details. Submitting captures before any decoder materializes or work on a decoder even starts is very useful.&lt;br /&gt;
* Finally, please also consider adding a few &amp;quot;unit tests&amp;quot; for your decoder in the [http://sigrok.org/gitweb/?p=sigrok-test.git;a=tree sigrok-test] repository. These test will automatically run the decoder against various input files specified in &amp;#039;&amp;#039;&amp;#039;test.conf&amp;#039;&amp;#039;&amp;#039; and check whether the expected output is produced (examples: [http://sigrok.org/gitweb/?p=sigrok-test.git;a=blob;f=decoder/test/rfm12/test.conf rfm12], [http://sigrok.org/gitweb/?p=sigrok-test.git;a=blob;f=decoder/test/nrf24l01/test.conf nrf24l01]). This allows us to notice and fix any regressions in the decoder and/or the [[libsigrokdecode]] backend that may arise over time.&lt;br /&gt;
&lt;br /&gt;
Thanks a lot!&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Buttim</name></author>
	</entry>
	<entry>
		<id>https://sigrok.org/w/index.php?title=UNI-T_UT61E&amp;diff=15631</id>
		<title>UNI-T UT61E</title>
		<link rel="alternate" type="text/html" href="https://sigrok.org/w/index.php?title=UNI-T_UT61E&amp;diff=15631"/>
		<updated>2020-11-01T21:48:03Z</updated>

		<summary type="html">&lt;p&gt;Buttim: added special syntax for Windows COM ports&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox multimeter&lt;br /&gt;
| image           = [[File:Old_ver_front.png|180px]]&lt;br /&gt;
| name            = UNI-T UT61E&lt;br /&gt;
| status          = supported&lt;br /&gt;
| source_code_dir = &lt;br /&gt;
| counts          = 22,000&lt;br /&gt;
| categories      = CAT II (600 V) / CAT III (300 V)&lt;br /&gt;
| connectivity    = [[Device_cables#UNI-T_UT-D02|RS232]] / [[Device_cables#UNI-T_UT-D04|USB]]&lt;br /&gt;
| measurements    = voltage, current, resistance, capacitance, frequency, duty cycle, diode, continuity&lt;br /&gt;
| features        = autorange, true-rms, data hold, min/max, relative, bargraph, backlight&lt;br /&gt;
| website         = [http://www.uni-trend.com/UT61e.html uni-trend.com]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;UNI-T UT61E&amp;#039;&amp;#039;&amp;#039; is a 22,000 counts, CAT II (600&amp;amp;nbsp;V) / CAT III (300&amp;amp;nbsp;V) handheld digital multimeter with RS-232 or USB connectivity.&lt;br /&gt;
&lt;br /&gt;
See [[UNI-T UT61E/Info]] for more details (such as &amp;#039;&amp;#039;&amp;#039;lsusb -vvv&amp;#039;&amp;#039;&amp;#039; output) about the device.&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
* [[Multimeter_ICs#Cyrustek_ES51922|Cyrustek ES51922]] multimeter chip (ES51922A actually, as per various photos: [http://i492.photobucket.com/albums/rr283/DarkShadower/IMAG0005.jpg 1], [http://www.eevblog.com/forum/product-reviews-photos-and-discussion/uni-t-ut61e-multimeter-teardown-photos/?action=dlattach;attach=19985;image;PHPSESSID=14790b9893bed7edb7d8c0505b195ed8 2], [http://img848.imageshack.us/img848/3784/dscf0150w.jpg 3], [http://we.easyelectronics.ru/uploads/images/00/05/21/2011/11/18/553300.jpg 4])&lt;br /&gt;
&lt;br /&gt;
== Photos ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Older version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Old ver.JPG&lt;br /&gt;
File:Old ver front.JPG&lt;br /&gt;
File:Old ver back.JPG&lt;br /&gt;
File:Old ver batt.JPG&lt;br /&gt;
File:Old ver lcd.JPG&lt;br /&gt;
File:Old ver cables.JPG&lt;br /&gt;
File:Old_ver_pcb.JPG&lt;br /&gt;
File:Old ver es51922a.JPG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Newer version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:New ver.JPG&lt;br /&gt;
File:New ver front.JPG&lt;br /&gt;
File:New ver back.JPG&lt;br /&gt;
File:New ver backb.JPG&lt;br /&gt;
File:New ver batt.JPG&lt;br /&gt;
File:New ver frontCover.JPG&lt;br /&gt;
File:New ver Knob.JPG&lt;br /&gt;
File:New ver lcd.JPG&lt;br /&gt;
File:New ver pcb front.JPG&lt;br /&gt;
File:New ver pcb back.JPG&lt;br /&gt;
File:New ver es51922a.JPG&lt;br /&gt;
File:New ver ad737.JPG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Protocol ==&lt;br /&gt;
&lt;br /&gt;
See [[Multimeter_ICs#Cyrustek ES51922|Cyrustek ES51922]] for the DMM IC protocol.&lt;br /&gt;
&lt;br /&gt;
Depending on the cable, additional decoding is needed, though.&lt;br /&gt;
&lt;br /&gt;
Different cables are available to communicate to the DMM: regular serial cables which provide a COM port, and USB HID based cables where applications are required to handle a proprietary protocol of running serial communication on top of HID requests. See the &amp;#039;&amp;#039;[[Device cables]]&amp;#039;&amp;#039; page for details; the same cables can be used with many different DMM models.&lt;br /&gt;
&lt;br /&gt;
Depending on the specific cable in use, either a device driver ending in &amp;#039;&amp;#039;&amp;#039;-ser&amp;#039;&amp;#039;&amp;#039; or not ending in &amp;#039;&amp;#039;&amp;#039;-ser&amp;#039;&amp;#039;&amp;#039; must be used. See README.devices for details. &lt;br /&gt;
&lt;br /&gt;
The message &amp;#039;&amp;#039;&amp;quot;HID feature report error: LIBUSB_ERROR_PIPE&amp;quot;&amp;#039;&amp;#039; results from using the USB HID driver with a USB-to-serial cable. In this case, try using --driver=&amp;#039;&amp;#039;&amp;#039;uni-t-ut61e-ser&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The transmission of the measurement data cannot be disabled. The respective Cyrustek ES51922 pin (111, &amp;#039;&amp;#039;&amp;#039;RS232&amp;#039;&amp;#039;&amp;#039;) is tied to GND (i.e. transmission is always enabled) on this multimeter.&amp;lt;sup&amp;gt;[http://www.steffenvogel.de/2011/01/25/inner-workings-of-uni-trend-ut61e-digital-multimeter/]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
The following [[sigrok-cli]] command can be used to receive five measured values from a device connected via USB (note that the USB VID/PID after the &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;conn&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; option needs to be changed depending on the exact USB adapter cable used):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sigrok-cli --driver=uni-t-ut61e:conn=1a86.e008 -O analog --samples 5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your meter has a serial (RS-232) cable connected to a USB-to-serial adapter, a different driver is used. Example for ttyUSB0:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ sigrok-cli --driver=uni-t-ut61e-ser:conn=/dev/ttyUSB0 -O analog --samples 5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Same example for COM1 (Windows), please note the special syntax for specifying the COM port:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C:\&amp;gt; sigrok-cli --driver=uni-t-ut61e-ser:conn=\\.\COM1 -O analog --samples 5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;--samples &amp;lt;n&amp;gt;&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; stops acquisition after the specified number of measurements, while &amp;#039;&amp;#039;&amp;#039;&amp;lt;tt&amp;gt;--continuous&amp;lt;/tt&amp;gt;&amp;#039;&amp;#039;&amp;#039; does not stop.  Type just &amp;#039;&amp;#039;&amp;#039;sigrok-cli&amp;#039;&amp;#039;&amp;#039; by itself for a summary of options. &lt;br /&gt;
More information on drivers can be found in the [http://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=README.devices README.devices] file of the [[libsigrok]] source tree.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.uni-trend.com/manual2/UT61English.pdf Manual]&lt;br /&gt;
* [http://www.uni-trend.com/Web%20site/DMM%20Software/UT61E_setup%20v2.00.exe Vendor software]&lt;br /&gt;
* [http://www-user.tu-chemnitz.de/~heha/hs_freeware/UNI-T/ Henrik Haftmann: DMM.exe etc.] (Windows software for various UNI-T DMMs, and lots of device/protocol info)&lt;br /&gt;
* [http://www-user.tu-chemnitz.de/~heha/bastelecke/Rund%20um%20den%20PC/hid-ser.en.htm Henrik Haftmann: Hoitek HE2325U info]&lt;br /&gt;
* [http://www-user.tu-chemnitz.de/~heha/hs_freeware/UNI-T/UT61E.LOG Henrik Haftmann: UT61E log and protocol docs]&lt;br /&gt;
* [http://diyftw.de/wiki/doku.php?id=projekte:ut61e diyftw.de: Uni-Trend UT61E (UT-D04 linux treiber)] (device info, Linux software using HIDAPI: [http://diyftw.de/wiki/lib/exe/fetch.php?media=projekte:ut61e-linux-sw-0.02.tar.gz ut61e-linux-sw-0.02.tar.gz])&lt;br /&gt;
* [http://www.steffenvogel.de/2009/11/29/uni-trend-ut61e-digital-multimeter/ Steffen Vogel: UNI-TREND UT61E Digital Multimeter] (device info, Linux software for serial port: [http://static.steffenvogel.de/wp-content/uploads/2009/11/dmmut61e-0.01.tar.gz dmmut61e-0.01.tar.gz])&lt;br /&gt;
* [https://bitbucket.org/kuzavas/dmm_es51922 Multimeter data parsing utility] complete implementation written in Python&lt;br /&gt;
* [http://www.steffenvogel.de/2011/01/25/inner-workings-of-uni-trend-ut61e-digital-multimeter/ Steffen Vogel: Inner workings of UNI-TREND UT61E Digital Multimeter] (teardown)&lt;br /&gt;
* [http://erste.de/UT61/index.html erste.de: UT61 - USB Multimeter unter Linux auslesen] (info on the Hoitek HE2325U (clone?) and how suspend/resume fixes some issues with it)&lt;br /&gt;
* [http://translate.google.de/translate?sl=auto&amp;amp;tl=en&amp;amp;js=n&amp;amp;prev=_t&amp;amp;hl=de&amp;amp;ie=UTF-8&amp;amp;layout=2&amp;amp;eotf=1&amp;amp;u=http%3A%2F%2Fwe.easyelectronics.ru%2FACE%2Fdorabotka-napilnikom-multimetra-ut61e.html&amp;amp;act=url easyelectronics.ru: Refinement of a file multimeter UT61E]&lt;br /&gt;
* [http://translate.google.de/translate?sl=pl&amp;amp;tl=en&amp;amp;u=http%3A%2F%2Fflodins.info%2Fmoim-zdaniem%2F81-multimetr-uni-t-ut61e flodins.info: Multimeter UNI-T UT61E]&lt;br /&gt;
* [http://www.eevblog.com/forum/product-reviews-photos-and-discussion/uni-t-ut61e-multimeter-teardown-photos/?action=dlattach;attach=20302;PHPSESSID=14790b9893bed7edb7d8c0505b195ed8 UNI-T UT61E schematics: ut61e sch.pdf]&lt;br /&gt;
* Teardowns: [http://www.eevblog.com/forum/product-reviews-photos-and-discussion/uni-t-ut61e-multimeter-teardown-photos/msg45069/#msg45069 1], [http://www.eevblog.com/forum/product-reviews-photos-and-discussion/uni-t-ut61e-multimeter-teardown-photos/msg113968/#msg113968 2], [http://www.eevblog.com/forum/product-reviews-photos-and-discussion/uni-t-ut61e-multimeter-teardown-photos/msg86347/#msg86347 3], [http://www.eevblog.com/forum/product-reviews-photos-and-discussion/uni-t-ut61e-multimeter-teardown-photos/msg86378/#msg86378 4], [http://www.eevblog.com/forum/product-reviews-photos-and-discussion/uni-t-ut61e-multimeter-teardown-photos/msg86802/#msg86802 5], [http://www.eevblog.com/forum/product-reviews-photos-and-discussion/uni-t-ut61e-multimeter-teardown-photos/msg82784/#msg82784 6]&lt;br /&gt;
&lt;br /&gt;
[[Category:Device]]&lt;br /&gt;
[[Category:Multimeter]]&lt;br /&gt;
[[Category:Supported]]&lt;/div&gt;</summary>
		<author><name>Buttim</name></author>
	</entry>
</feed>