Skip to content

A script that allows to use two UART bridges to sniff UART fraffic between two MCUs

License

Notifications You must be signed in to change notification settings

condemil/uart-sniffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

UART Sniffer

A script that allows to use two UART bridges to sniff UART fraffic between two MCUs. This is useful as many smart devices from xiaomi and sonoff use separate Wi-Fi modules (ESP8266 or similar) to communicate with main MCU (STM32) over UART.

                                            -------
   ----------         ----------           | MCU 1 |
  |          |       |   UART   |  RX       -------
  |          | ----- | BRIDGE 1 | -----------|   |
  | Computer |        ----------             |   |
  |          |        ----------             |   |----
  |          | ----- |   UART   |  RX       -------   |
   ----------        | BRIDGE 2 | ------   | MCU 2 |  |
                      ----------       |    -------   |
                                        --------------
./sniff.py -h
usage: sniff.py [-h] -t TX -r RX [-s SEPARATOR] [-o OUTPUT]

optional arguments:
  -h, --help            show this help message and exit
  -t TX, --tx TX        transfer uart bridge port to connect to
  -r RX, --rx RX        receive uart bridge port to connect to
  -s SEPARATOR, --separator SEPARATOR
                        line separator in form of \\r, \\n, \\x00 etc
  -o OUTPUT, --output OUTPUT
                        output style, one of: utf8, bytes, pybytes

About

A script that allows to use two UART bridges to sniff UART fraffic between two MCUs

Resources

License

Stars

Watchers

Forks

Languages