Created
August 7, 2022 06:16
-
-
Save Elwell/792a401c586c8949ecd86ed37df02393 to your computer and use it in GitHub Desktop.
Trivial script to sniff slow Tuya traffic between an embedded MCU and the TYWE3S serial pins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import serial | |
TX = serial.Serial(port = "/dev/ttyS2", baudrate=9600, timeout=1) | |
RX = serial.Serial(port = "/dev/ttyS4", baudrate=9600, timeout=1) | |
while True: | |
tx = TX.readline().hex() | |
if tx != '': | |
print('TX: ', tx) | |
rx = RX.readline().hex() | |
if rx != '': | |
print('RX: ', rx) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment