Project logo

VirtualWire Analyzer

sem doplne nejake kratke zhrnutie.....


Features

  • Easy analyzation of transmitted data using 433MHz transmitter module (ASK modulation).
  • Auto baud rate detection
  • Auto signal inversion detection
  • Error detection
  • Data timing calibration
  • Adjustable packet settings

How to add to Saleae Logic

  1. Build this library for your operating system
    • Windows Open solution file (VirtualWireAnalyzer.sln) in Microsoft Visual Studio. Select Release configuration, platform and click build. It will create VirtualWireAnalyzer.dll file in Release directory.
    • Linux Start build_analyzer.py python script to build this library for Linux 64bit. It will create VirtualWireAnalyzer.so file.
    • Mac Start build_analyzer.py python script to build this library for Mac 64bit. It will create VirtualWireAnalyzer.dylib file.
  2. Copy VirtualWireAnalyzer.dll or VirtualWireAnalyzer.so or VirtualWireAnalyzer.dylib file to new directory with customs analyzers. You can also add here other custom analyzers files.
  3. Start Saleae Logic then click to Options > Preferences and navigate to tab with name "Developer", click to "Browse" button and choose directory with your VirtualWireAnalyzer.dll or VirtualWireAnalyzer.so or VirtualWireAnalyzer.dylib file.
  4. Click save and close Saleae Logic program.
  5. Start Saleae Logic, click to add analyzer and VirtualWire Analyzer should show there.
  6. If you have some troubles, see Saleae support

How to use

  1. Start Saleae Logic and add VirtualWire Analyzer to channel, you want to use.
  2. Connect selected channel input on Logic analyzer to transmitter pin of your microprocessor (Arduino, STM, Teensy, ESP8266, ...).
  3. Connect GND pin to GND pin of your board.
  4. Add trigger on rising edge to selected channel and hit green "Start" button.
  5. Wait some seconds and you will see result.

Analyzer settings

VirtualWire analyzer supports those settings:

  • Channel - You can chooce channel, where to add analyzer, in list. (You should to connect Logic analyzer to you PC first)
  • Baud Rate - In text box write transmitting bit rate in bits per second. This setting is only for simulation, if you are analyzing real communication, it will find out bit rate from preamble training bits.
  • Use CRC - Check this option if packet you want to analyze uses CRC. Almost every radio packet uses CRC.
  • Unspecified length - Check this option if packet you want to analyze has not specified length in first data byte and end of message should be determined by receiving blank byte. Almost every radio packet has specified length.
  • Unspecified length - Check this option if packet you want to analyze has not specified length in first data byte and end of message should be determined by receiving blank byte. Almost every radio packet has specified length.
  • Inverted singal - Check this option, if you want to generate inverted signal in simulation. If you are analyzing real communication, it will find out if signal is inverted or not.
  • Header bytes count - Write here, how many bytes from received data should be marked as header bytes. In result frame above those header bytes will be hex and ASCII encoding of that header byte. 433MHz packets usually have 4 header bytes.
  • Show invalid preambles - If your signal has lot of noise, it can create a lot of invalid preambles. If you set this setting to unchecked, invalid preambles will not show and results will be clear.

Analyzed results

  • Above received signal you can see blue bubbles, they are called frames. Those frames shows analyzed results.
  • First frame is marked as PREAMBLE. It is above preamble training bits and start symbol. It also shows baud rate in bits per second and if signal is inverted or not. When preamble contains some errot, it will be also shown. Errors, that can show:
    • Timing error - This error is shown, when training bits has more than 10% baud rate error.
    • Few training bits - This error is shown, when packet contains less than 18 training bits (It is half of count, that it should to contain).
    • Start byte 1 error - Start byte consist of two nybble bytes, first nybble byte is 000111 and it marks end of training bits. (It is also used for determining if signal is inverted)
    • Start byte 2 error - Second starty nybble byte is here just for check, if we are receiving correct packet. Its binary value is 001101.
  • Second frame is marked as Length. This frame is shown only if you have unchecked "Unspecified length" option in settings. It shows length of data part in bytes. In length value is calculated as length byte + header bytes + payload bytes + CRC bytes (if checked option "Use CRC").
  • After length frame there are header bytes. Value in frame is displayed in hex and ASCII form.
  • Next frames are payload frames.
  • Last frame is marked as CRC. If CRC is correct, its value is 0xF0B8.
  • All frames instead of preamble can also show byte errors:
    • Corrupted byte - Every nybble byte shoud have 3 LOW bits and 3 HIGH bits, else this byte is marked as Corrupted byte.
    • Blank byte - Blank byte error is shown, when nybble byte is 111111 or 000000. It usually marks end of packet.
  • If you zoom in received signal, you may spot marks. Green dot shows start of nybble byte, red (or orange) dot shows end of nybble byte, it also shows, where bit was sampled (usually in the middle of bit). White dot shows, where bits other bits of nybble byte was sampled. White square is same as white dot, but it is only in preamble. Red dot, cross or square shows, where bit with error was sampled.

    One received byte is composed of 2 nybble bytes (6-bits).

Simulation

Simulation works only on Saleae Logic version 1.x. Before starting simulation, set analyzer settings especially those, they are marked as (Simulation only). Now you can hit green button "Start Simulation" and it will generate packet sample.

Troubleshootig

  • If you connect analyzer to 433MHz receiver, loaded signal can contain some noise and glitches and analyzer may not correctly analyze that packet. To solve this, just turn on glitch filter on selected channel.

Documentation and release

See Apollo.

MIT License

Copyright (c) 2021 Matej Fito

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Credits

Created thanks to Saleae using Sample Analyzer and Analyzer SDK. Also thanks to Mike McCauley for creating the RadioHead library. Special thanks to Slovak University of Technology in Bratislava Faculty of Materials Science and Technology and doc. Ing. Juraj uk, PhD. for support.

See also

MIT License

Copyright (c) 2021 Matej Fitoš

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


C
C++
Objective-C
Batchfile

Git

Documentation