New Model #1035
closedTYT TH-9000 VHF
0%
Description
support for the TYT TH-9000 VHF (and other) radios. I can support testing and development, as I have a model and build environment for Chirp.
Files
Updated by David Fannin over 11 years ago
Progress so far:
- Acquired a TYT TH9000 VHF Radio
- Confirmed stock TYT 1.05 Windows Software and USB data cable work with the radio.
- Installed Ubuntu 12.10 on kvm virtual machine, set up sw dev environment for Chirp
- cloned the chrip.hg branch in the dev environment, ran unit tests (all passed).
- created a new clone "chirp-def.hg" branch from chirp.hg
next steps:
do a serial port capture of the radio cloning (both read and write) exchange, and analyze.
Need Help:
Any suggestions for free Windows 7 serial port capture software? I am going to try portmon and usbsniffer, but also saw this:[[ http://desowin.org/usbpcap/]]
Also, once I have the capture, are there any other memory formats descriptions that I can review to understand how the radio manufactor's format their memory?
Updated by Tom Hayward over 11 years ago
- Status changed from New to In Progress
Questions like this are best discussed in the chirp_devel mailing list.
I have used portmon in the past.
Once you are able to download an img cleanly from the radio, save it. Then change the first memory channel in the radio very slightly. Now download another img from the radio. Use hexdump and diff to compare the two imgs. You should be able to determine what changed when the memory was modified. This will help you determine the start of the channel list and maybe other details about the channel you programmed. Change the second channel and repeat the process to determine the length of each channel record.
Updated by David Fannin about 11 years ago
Initial decoding of the Channel Memory Map (see attached file). It appears that the memory map for the TH9000 is close to the Anytone 5888, so I'm using it as a guide. There are significant differences, however. The upload/download protocol looks the same. I have been able to confirm all the basic channel settings up to CTCSS. I have not started on the DCS or Cross mode settings yet, so that is not included. I'm including the file here, in case folks are interested, and I will create a patch for including this into source once I have a more complete file.
I'm proposing to use the file name "tyt_th9000_vhf.py" for the chirp/
Updated by Dan Smith about 11 years ago
If it's really similar, I'd prefer a subclass of the Anytone with appropriate changes made. It may be easier to do it as a separate file first and then consult the differences before merging, but I'd really like to avoid two effectively identical drivers in the tree with different names. We have a bit too much of that right now, although some are very good about sharing code. See the Baofeng UV-5R driver for an example.
Thanks for your work on this!
Updated by David Fannin about 11 years ago
I've been using the anytone as a guide, so I'll get all the changes/differences together, to see if it warrants a submodel of the anytone, or a new model class. So far, it appears there are different data fields for the dcs coding, and a number of different options (those are less of an issue). I did review the baofeng approach, but my initial impression is that the Baofeng differences are different ident versions. The difference between Anytone and TYT appear to require different class structures, and different class methods. I'll have to see how the global settings map works, and see how close they are.
Who did the anytone decode? - it may be useful to compare notes with them.
Also, It would be nice to have a wiki page on getting started with a new model - things like suggestions on setting up the serial port monitoring, documentation on memory map conventions, documentation on the model classes, etc. I don't mind winging it, but it would may some me some time downstream. I can add some of this based on my recent experience with getting this set up. In particular, getting portmon working correctly took a couple a days because of a couple of non-intuitive options (setting hardware flow ctl for the usb serial port, setting the max length, and setting the filters so that it was less chatty.).
Updated by mike 240 about 11 years ago
Hi just wondering what the status was of this radio support? Is there a nightly build with it? Also, is there any way I can help?
Updated by David Fannin about 11 years ago
My latest updates is that I have more or less a complete memory map, and have created the memmap data structure. I will post the results here. I plan to get the basic upload/download working this weekend. If that all works, then I will ask to check in an initial version of these to the code base as work in progress.
Updated by mike 240 about 11 years ago
David Fannin wrote:
My latest updates is that I have more or less a complete memory map, and have created the memmap data structure. I will post the results here. I plan to get the basic upload/download working this weekend. If that all works, then I will ask to check in an initial version of these to the code base as work in progress.
Excellent, I have the UHF model but I assume the memory map is the same. I am willing to help test this, I only run linux and the TYT software doesnt work on linux and manual program is horrible. Let me know what you need.
Updated by David Fannin about 11 years ago
- File tytpatch9000-001.patch tytpatch9000-001.patch added
Here is the 1st patch for this model. It includes a base model skeleton and memory map for most of the radio options. It does not include working methods yet, but should give a good start for adding these. I compared this to the Anytone 5888 model; there are a number of similar memory map structures, but there are a number of significant differences, so it didn't make sense to try to overload the Anytone model ; however, there are a number of identical methods (like checksum) that are the same, so I'll look at creating a generic function file that the two can share.
Updated by mike 240 about 11 years ago
David Fannin wrote:
Here is the 1st patch for this model. It includes a base model skeleton and memory map for most of the radio options. It does not include working methods yet, but should give a good start for adding these. I compared this to the Anytone 5888 model; there are a number of similar memory map structures, but there are a number of significant differences, so it didn't make sense to try to overload the Anytone model ; however, there are a number of identical methods (like checksum) that are the same, so I'll look at creating a generic function file that the two can share.
Is there any info you need from me to confirm the UHF version I have is exactly the same? I am guessing it is.
Updated by mike 240 about 11 years ago
Anyone willing to help me finish this work? I really would like to get this working, I have zero experience with this kind of stuff but I am a software developer of sorts, so at least I have that part down. I know some python.
Updated by Nor Idzuwan Mohammad about 11 years ago
Hi,
I have VHF model of the radio, I can help testing after I figure out how to setup and build environment for chirp, I'm no software programer so that could be challenging but I'm up for it
Updated by David Fannin over 10 years ago
- File th9000-002.patch th9000-002.patch added
Here's a alpha version of the TH9000 driver. It's not ready for production. It will download and save a TYT-9000 VHF radio image, and will display the memories. The patch log contains a good view of what's working and not. The upload is not yet working.
I'm working on the memory channels to accept DCS and Cross modes, plus adding in a number of radio settings.
Updated by David Fannin over 10 years ago
- File th9000-003.patch th9000-003.patch added
Alpha version 0.3 for the TYT TH9000 VHF driver. It was developed and tested on a 2 meter version, but should work (with the exception of the ident fields and frequency ranges, for the 200Mhz and UHF version of the TH9000 radio.
This version is still experimental, and may have data corruption bugs - use at your own risk! (Testing, however, would be appreciated.)
This version has:
Download and save image file
Upload an image file to the radio
Memory viewing and editing (for Simplex, Tone and TSQL modes - DCS not yet working)
Global Setting (missing a couple) - Squelch, Beep, Display Color and brightness, APO, Timeout Timer, etc.
Radio Frequency Range Setting (for TX/RX ranges)
The patch is designed to be applied to trunk.
Updated by David Fannin over 10 years ago
- File tytth9000-004.patch tytth9000-004.patch added
Update for TYT TH9000 Radio (new model)
This patch is ready for other user to try out. Still marked as Alpha, but it appears to be fairly solid and stable.
Features working:
Download/Upload to radio
Display and Edit Memories
Save image file
Modes: None, Tone, TSQL
Global Setting
APO
BG Color and Brightness
Squelch Level
TOT
Radio Max Transmit Power
Startup/Welcome Message
TBST Freq
TX/RX Freq Range
Beep
Memory Setting
Freq, Offset, Skip, Step, Ch Width, Name, Power, Mode, Tone-PL, TSQL-PL
Not Working
DCS, Cross and Reverse Modes
Display Mode (VFO/Mem)
VFO MR
Channel Lock
Voice Prompt
Tail Elim Type
Bootup Password
Memory: Reverse, TX Off, Compander, Talk Around, Scrambler
I executed the unit tests, and its failing on one test:
TYT TH9000 BruteForce FAILED: Field tmode' is
', expected `TSQL-R'
Updated by David Fannin over 10 years ago
- File tytth9000.img tytth9000.img added
The image file from the TYT TH9000 for unit testing.
Updated by mike 240 over 9 years ago
David Fannin wrote:
Update for TYT TH9000 Radio (new model)
This patch is ready for other user to try out. Still marked as Alpha, but it appears to be fairly solid and stable.
Features working:
Download/Upload to radio
Display and Edit Memories
Save image file
Modes: None, Tone, TSQL
Global Setting
APO
BG Color and Brightness
Squelch Level
TOT
Radio Max Transmit Power
Startup/Welcome Message
TBST Freq
TX/RX Freq Range
BeepMemory Setting Freq, Offset, Skip, Step, Ch Width, Name, Power, Mode, Tone-PL, TSQL-PL Not Working DCS, Cross and Reverse Modes Display Mode (VFO/Mem) VFO MR Channel Lock Voice Prompt Tail Elim Type Bootup Password Memory: Reverse, TX Off, Compander, Talk Around, Scrambler
I executed the unit tests, and its failing on one test:
TYT TH9000 BruteForce FAILED: Fieldtmode' is
', expected `TSQL-R'
David, I tried to use your patch with my UHF model of the TYT-9000 but get the error when trying to download from the radio of: Unsupported Model
Do you have any idea what I might need to change in the patch file to make it let me use it with my UHF model?
Updated by mike 240 over 9 years ago
- File th9000uhf.py th9000uhf.py added
I modified the patch for the UHF version of the radio and it works well for me. I am able to download from radio and upload to radio. Use at your own risk though.
Updated by David Fannin over 9 years ago
- File th9000-v0.5.patch th9000-v0.5.patch added
- File th9000.py th9000.py added
This is the latest experimental version for the TYT-TH9000D radio driver.
This patch covers the 3 existing TH9000 models - 2meters, 220 and 440 radios in a single class file. The code is based with the latest dev branch of Chirp (a/o 4/18/2015), so this patch should only be applied to this branch.
I've tested it on both 2 meter and 220 models, so I would appreciate if someone could test on the UHF model.
All previous features are currently working for this patch, with the exception of automatic file identifcation. The TH radios do not have a identifer that can safely distingush between the radios, this feature is still TBD. You will need to manually select the correct model when you open a radio image file. You'll get a prompt when you open a image file, so select one of the three available models.
I am attaching both the patch file for those that are using hg and git. I've also included a copy of the plain source file, which can drop the "chirp/driver" directory of the source code to try it out.
I would also welcome feedback on what modifications are need for this to be checked into the main branch. It's ready to used by a wider audience.
Updated by David Fannin over 9 years ago
- File th9000-v0.6.patch th9000-v0.6.patch added
latest version of the TYT-TH9000D driver.
this version removes the string literials, cleans up the copyright messages, and adds auto identification of file types.
Updated by David Fannin over 9 years ago
- File th9000-v0.7.patch th9000-v0.7.patch added
latest patch with base class fixes.
Updated by David Fannin over 9 years ago
Note on the auto identification feature for the image file.
the match_model() for this radio uses two sets of checks for matching up the correct model.
it first checks file size, and then reads four variables in the image file (tx max, tx min, rx min, and rx max), which control the tx/rx frequency range for the radio. If all four match are within range for a specific model, then it returns true. e.g. the 2 meter radio should have settings between 136 Mhz and 172 mhz. The three models freq range do not overlap, so this should be a reliable method to determine the correct model.
Updated by David Fannin over 9 years ago
- File th9000-v0.8.patch th9000-v0.8.patch added
- File TYT_TH9000_144.img TYT_TH9000_144.img added
- File TYT_TH9000_220.img TYT_TH9000_220.img added
New patch - v0.8 for tyt th9000 radio driver
added correct modes (tone, tsql, dcts, and cross)
successfully ran unit tests (all passed) for 2 meter and 220 radios (new images attached):
$ ./run_tests -d TYT_TH9000_144
TYT TH9000_144 Detect PASSED: All tests
TYT TH9000_144 Settings PASSED: All tests
TYT TH9000_144 Clone PASSED: All tests
TYT TH9000_144 Edges PASSED: All tests
TYT TH9000_144 BruteForce PASSED: All tests
TYT TH9000_144 CopyAll PASSED: All tests
TYT TH9000_144 Banks SKIPPED: Banks not supported¶
Results:
TOTAL : 7
FAILED : 0
SKIPPED: 1
PASSED : 6
CRASHED: 0
./run_tests -d TYT_TH9000_220
TYT TH9000_220 Detect PASSED: All tests
TYT TH9000_220 Settings PASSED: All tests
TYT TH9000_220 Clone PASSED: All tests
TYT TH9000_220 Edges PASSED: All tests
TYT TH9000_220 BruteForce PASSED: All tests
TYT TH9000_220 CopyAll PASSED: All tests
TYT TH9000_220 Banks SKIPPED: Banks not supported¶
Results:
TOTAL : 7
FAILED : 0
SKIPPED: 1
PASSED : 6
CRASHED: 0
.
Updated by Bernhard Hailer over 4 years ago
- Status changed from In Progress to Closed
This appears to be complete.