Reverse Engineering the TEC-06 Serial Protocol

When I’m reviewing hardware, I always look around to see what I can find about it on the internet (beyond the 500 pages selling some version or another).  For the TEC-06 I reviewed last week, I came across a helpful hint on BangGood about how to make the non-serial version of the hardware a serial-enabled version - along with some links to the software that talks to it.  Given that (and the tools in my office), I set out to reverse engineer the serial protocol, because, well, it sounded fun.  And a serial enabled battery tester is a handy thing to have around, if you want to do some data analysis or logging.


This is a companion discussion topic for the original entry at https://www.sevarg.net/2018/01/20/reverse-engineering-tec-06-serial/

(Comments from Blogger)

2018-01-21 by Unknown

For setting custom baud rates on linux in a more compatible way, one case use the termios2 api,. Picocom talks about using it here: picocom/termios2.txt at master · npat-efault/picocom · GitHub . It still relies on some support from the driver, but should be more widely usable the B38400 override (which I believe is FTDI specific)


2018-01-21 by Russell Graves

Thanks, that might be useful if anyone else is using non-FTDI stuff!

It doesn’t look much cleaner to implement, though…


2019-02-11 by Unknown

"I can’t promise compatibility with any other serial adapters"
Perfectly works with CP2102 dongle ) Didn’t solder cable, both RXD and TXD are within mini USB connector. Hooked up and launched software. Nice tester, more stable that EBD-USB.


2019-11-08 by fernando

Hi, i have downloaded your code. How could I use it in windows? Do i have to compile it? How? And what are the command line arguments that we need to use? Any help? Thanks


2019-11-08 by fernando

Hi, I have also tried to connect with official software (I have configured my windows 10 driver: 128000, 8, 1bit stop, even, and I have tried all hardware,xoff/on and none control. No luck. I have also tried with RX pin also connected. Not luck. With a serial monitor I could see data arriving to computer, but no luck with official software. Any help? (i prefer your program as after that you could use it in excel or whatever, but may be the official software is also good). Thanks a lot for your help


2019-11-10 by Russell Graves

The code is a reference intended for other people to use. If it works for you out of the box, great, but I’m 100% certain it won’t work as written on Windows, because it uses some Linuxisms and some FTDI-isms for setting the baud rate properly. You’d have to rewrite that part of it for Windows, at a minimum, and I simply don’t care about making my code Windows-compatible - sorry.