Silvair UART Decoder is a python library for parsing Silvair UART protocol messages. It also includes two applications that could be used for message parsing:
- HLA Extension for
Saleae Logic 2. - Python script for parsing .csv file with serial values for
Saleae Logic 1.
Recommended way is to use Logic 2 and HLA extension. Python script could be unstable in future versions.
UART Decoder is using construct python library to parse all UART messages. Also, it validates CRC value using Crcmod package. All used packages can be obtained from setup.py file.
Tested on Ubuntu 20.04 with Python 3.8 and Windows 11 with Python 3.10.
Make sure, you have Python with at least 3.6 version and installed pip.
- Install UART-Decoder using pip:
pip install silvair-uart-decoder. WARNING: IfThe script is installed in directory, which is not PATHwill appear during installation, add this directory to PATH environment variable. - In terminal, call
generate_uart_decoder_extension <PATH>executable, where<PATH>is directory when you want to install HLA Extension. Example:generate_uart_decoder_extension .to install in current directory.SilvairUARTDecoderdirectory should be generated in passed path.
- Download Repository
- Run script according to system are you using:
- Windows:
install_windows.bat - Linux:
install_linux.bat
- Windows:
SilvairUARTDecoderdirectory should be generated in repository path.
- Open Logic 2, click "Extensions" icon on right side.
- In upper-right corner should be three dots with "Load existing extensions" option. Click it.
- Load
extension.jsonlocated in previously generatedSilvairUARTDecoderdirectory. - Click "Analyzers" icon on right side.
- Load
Async Serialanalyzer for appropriate channel, and then loadSilvair UART Decoder. - Hooray, Silvair UART messages should be described above waveforms! :)
- Make sure, you have
Pythonwith at least 3.6 version and installed pip. - Install UART-Decoder using pip:
pip install silvair-uart-decoder. WARNING: IfThe script is installed in directory, which is not PATHwill appear during installation, add this directory to PATH environment variable. - Run application using command:
silvair-uart-decoder
Pass -h parameter to show help with instruction how to use script.
Parameters:
-for--format-converter: input format converter (optional)-Oor--output-file: output file path (result will be saved in this file) (optional)- input csv file (required)
Currently two input format decoders are available:
default- data must be in format:<timestamp>,<label>,<uart_command_frame>saleae- data must be in format:<timestamp>,<label>,<byte>(default Saleae export format).
Parse logs stored in example.csv from Logic 1, and save it to example.txt. example.csv is in saleae Logic 1 format:
silvair-uart-decoder -f saleae -O example.txt example.csv
- Open Logic 1 with measurements
- Add
Async Serialanalyzers for appropriate channels - Click on gear circle near
Decoded Protocols - Click
Export search results


