HK-T6Av2 protocol dissected
-
- Posts: 31
- Joined: Mon Jun 16, 2014 10:50 pm
HK-T6Av2 protocol dissected
This is not strictly MW related but I suspect of interest.
I was quite surprised that although there is at least one 3th party application to configure the HK-T6Av2 remote I could not found a protocol description on the net. Also I want to be able to use it in Linux without installing Mono. Therefore I spend last night sniffing and dissecting the protocol. There are a few loose ends which I intend to fix/test as soon as I have the time. Corrections welcome!
You can find it at github: https://github.com/yschaeff/HK-T6Av2
I was quite surprised that although there is at least one 3th party application to configure the HK-T6Av2 remote I could not found a protocol description on the net. Also I want to be able to use it in Linux without installing Mono. Therefore I spend last night sniffing and dissecting the protocol. There are a few loose ends which I intend to fix/test as soon as I have the time. Corrections welcome!
You can find it at github: https://github.com/yschaeff/HK-T6Av2
-
- Posts: 31
- Joined: Mon Jun 16, 2014 10:50 pm
Re: HK-T6Av2 protocol dissected
I spend some extra time implementing a small tool to use this protocol. In the same github repository. I tested it on Linux. I expect the backup/restore functionality to work in Windows as well. When started without -u or -d switches it will enter the (still very limited) interactive GUI mode (which does probably not work on Windows). This is its usage:
Obligatory screenshot of terminal

Code: Select all
$ python hkctrl.py -h
usage: hkctrl.py [-h] [-t TTY] [-b BAUDRATE] [-u FILE | -d FILE]
HK-T6A V2 configuration tool
optional arguments:
-h, --help show this help message and exit
-t TTY, --tty TTY Serial port. Default /dev/ttyUSB0
-b BAUDRATE, --baud BAUDRATE
Transmitter baudrate. Default 115200
-u FILE, --upload FILE
Load config in to transmitter and exit. Make sure
transmitter is switched on prior to running program.
-d FILE, --download FILE
Dump config from transmitter and exit. Make sure
transmitter is switched on prior to running program.
Obligatory screenshot of terminal

-
- Posts: 31
- Joined: Mon Jun 16, 2014 10:50 pm
Re: HK-T6Av2 protocol dissected
There you have it. You can now natively program your Hobby King remote control from Linux. Plus it is fully open sourced. "Buy it, use it, break it, fix it, Trash it, change it, mail - upgrade it"
Features: Auto trim, save/restore, context help
Features: Auto trim, save/restore, context help
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: HK-T6Av2 protocol dissected
Thank you, very valuable. I have a similar T6 transmitter sitting, will give this a test.
-
- Posts: 31
- Joined: Mon Jun 16, 2014 10:50 pm
Re: HK-T6Av2 protocol dissected
copterrichie wrote:Thank you, very valuable. I have a similar T6 transmitter sitting, will give this a test.
Great! When you do, please let me know what you think.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: HK-T6Av2 protocol dissected
Worked perfectly after installing the python-serial.
I need to clean the Trainer port connector because would get a checksum error but that has nothing to do with your work. Excellent job.
I have an EXCEED-RC

I need to clean the Trainer port connector because would get a checksum error but that has nothing to do with your work. Excellent job.
I have an EXCEED-RC
-
- Posts: 31
- Joined: Mon Jun 16, 2014 10:50 pm
Re: HK-T6Av2 protocol dissected
Thanks! I will document the python-serial dependency. That the checksum error message actually showed up in the gui is not on purpose. Also it is perfectly possible to get some errors when the program starts as it might not be in sync with the radio yet. I just removed the checksum error message.
Also I notice in your screenshot values I have never seen. Do you know what their meaning is? Most notably:
SWA, SWB, VRA values
Mix3 uprate value (should this maybe be a negative value? -20 perhaps?)
or did you at one point write random data to your radio?
Also I notice in your screenshot values I have never seen. Do you know what their meaning is? Most notably:
SWA, SWB, VRA values
Mix3 uprate value (should this maybe be a negative value? -20 perhaps?)
or did you at one point write random data to your radio?
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: HK-T6Av2 protocol dissected
In all honesty, I have forgotten what the SWA, SWB, VRA values are for. I will seen if I can locate some documentation.
Oh, I remember now, I am using the Switches to activate ch5 and 6
Oh, I remember now, I am using the Switches to activate ch5 and 6
-
- Posts: 31
- Joined: Mon Jun 16, 2014 10:50 pm
Re: HK-T6Av2 protocol dissected
copterrichie wrote:In all honesty, I have forgotten what the SWA, SWB, VRA values are for. I will seen if I can locate some documentation.
Oh, I remember now, I am using the Switches to activate ch5 and 6
Yes I can see that in your table with mix settings. So it could be that the switch functions are just never set? And just in effect are random gibberish.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: HK-T6Av2 protocol dissected
Is it possible to do a factory reset with your program? I am not doing anything with the transmitter right now and will test it fully.
-
- Posts: 31
- Joined: Mon Jun 16, 2014 10:50 pm
Re: HK-T6Av2 protocol dissected
Implementing that would be trivial however I have no idea how the radio is configured when it leaves the factory... I could provide a "sane configuration for multirotors" file (which would very much look like your current settings) for one to upload.