Project

General

Profile

Actions

New Model #4395

open

Kenwood TK-280

Added by Pavel Milanes almost 8 years ago. Updated 5 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
01/11/2017
Due date:
% Done:

10%

Estimated time:
Equipment Loan/Gift Offered:
No
I read the instructions above:
Yes

Description

Hi to all,

I'm working remotely with a willing user to get a serial log one of this radio (TK-280) and start the development of a basic Chirp's driver.

My goal is to make at least a successful download/upload script and parse the general channel data for this model (TK-280), my experience points that making support for one member of the family will make trivial to extend it to the rest of the family (that's how family 60/60G works and this seems like "family 80"), then another developer can follow the lead and continue my work adding settings and options.

By looking to the OEM software the whole "Family 80" could be supported after this basic driver is completed, that may cover all this models: TK-780/880/280/380/980/981/480/481

Further development (beyond upload/download and simple channel data) will be very unlikely from my side as I don't have a radio at reach to test and hack at this time.

Side note: I live in Cuba island, sending me a radio is not an option (yet), I must work remotely and some users must cooperate with me in the testing of this driver; I have done that before, is hard work but works, the BTECH and brothers radios support for chirp was made this way with the great help and dedication of Jim Unroe.

Users of the Kenwood TK-280: if you like your radio supported please upload some portmon logs to this issue as there are at least two know variants, but radios with options boards may present it self as specific sub variants so please report if your radio has an option board.

Instructions for getting the serial logs here: http://chirp.danplanet.com/attachments/2257/how%20to%20portmon.doc

73 Pavel CO7WT


Files

TK-280a.LOG (67.8 KB) TK-280a.LOG portmon logs for the TK-280a Pavel Milanes, 01/16/2017 05:15 AM
tk-280.dat (32 KB) tk-280.dat OEM file from KPG49D windows software Pavel Milanes, 01/16/2017 10:45 AM
tk-280.txt (12 KB) tk-280.txt Download serial log (just the radio to pc part) in hex Pavel Milanes, 01/16/2017 10:45 AM
TK-280_hex.LOG (68.7 KB) TK-280_hex.LOG full serial log with hex, this is the complete one. Pavel Milanes, 01/17/2017 06:51 AM
tk280.py (49.8 KB) tk280.py latest dev driver to test. Pavel Milanes, 01/31/2017 07:44 AM
debug.log (28.1 KB) debug.log Thomas P, 04/30/2021 09:07 PM
debug.log (29 KB) debug.log Thomas P, 05/01/2021 08:50 AM
debug.log (30.6 KB) debug.log Adam Bartlett, 01/02/2022 12:12 PM
debug.log (35.9 KB) debug.log Thomas P, 03/13/2023 12:06 PM
tk981.py (51.4 KB) tk981.py Thomas P, 03/13/2023 12:06 PM
KPG49D.READ.pcapng (363 KB) KPG49D.READ.pcapng TK-981 Wireshark USB capture of copy only Thomas P, 03/13/2023 12:12 PM
tk981.py (51.7 KB) tk981.py Thomas P, 03/16/2023 10:13 AM
debug.log (70.9 KB) debug.log Thomas P, 03/16/2023 05:48 PM
debug.log (115 KB) debug.log Thomas P, 03/19/2023 03:42 PM
Kenwood_TK-981_20230319.img (32.2 KB) Kenwood_TK-981_20230319.img Thomas P, 03/19/2023 03:42 PM
tk981.py (52.6 KB) tk981.py Thomas P, 03/19/2023 03:42 PM
tk981.py (55.9 KB) tk981.py Added the rest of 80 series models Thomas P, 03/20/2023 12:34 PM
tk981ChirpMap.txt (5.09 KB) tk981ChirpMap.txt Partial mapping of Chirp codeplug Thomas P, 03/26/2023 03:04 PM
tk280.py (86 KB) tk280.py 1st working series driver Thomas P, 03/13/2024 12:37 PM
Kenwood_TK-380_20240229.img (32.2 KB) Kenwood_TK-380_20240229.img Example TK-380 chirp dump Thomas P, 03/13/2024 12:40 PM
tk280_py3.py (85.9 KB) tk280_py3.py Darryl Pogue, 07/22/2024 09:12 PM

Related issues 3 (1 open2 closed)

Related to New Model #3475: Kenwood TK-x80, TK-x81FeedbackPavel Milanes03/14/2016

Actions
Related to Feature #3433: Chirp Programming for Kenwood TK-880 and TK-981Closed03/07/2016

Actions
Related to New Model #2835: Kenwood TK Commercial seriesClosed08/26/2015

Actions
Actions #1

Updated by Pavel Milanes almost 8 years ago

Added the first logs about this radios

73 Pavel CO7WT

Updated by Pavel Milanes almost 8 years ago

Hi to all,

Taking a peek and stating to build the skeleton of the new driver I can tell you that this radio is very similar to the Kenwood 60G family (TK-760G/TK272G and friends).

The serial handshake, the ID, the empty block flagging and whole download process are pretty much the same.

Inspecting one image from the OEM software the mem organization are very similar to the ones in the Kenwood 60G Family, chances are good, I will come up with a testing develop driver soon (just to confirm that downloads are working)

73 Pavel CO7WT

Actions #3

Updated by Tom Hayward almost 8 years ago

That is good news! Thank you for your work, Pavel.

Actions #4

Updated by Pavel Milanes almost 8 years ago

Hi Tom,

I hope it doesn't have any special trick, specially in the banks management, because the family 60G got me a few days thinking the mem banks logic.

I'm making it remotely (no radio at hand) from logs and interaction with just ONE willing user that has not so much free time, so other owners of the TK-280/380 are invited to join this thread (yes the TK-380 is the same radio but for UHF) and help me with my questions, logs and testing.

Some PR about support to this radio stating here will no harm... (to attract supporting users, FB?, QRZ?)

All points that the family "80" radios are an upgrade to the family "60G" as more deep I go the more similarities I found. I'm downloading the service manuals now to get more insight about features, functions, models and versions of this radios, I noted they use the same model-version schema of Family 60G, the OEM software is on the queue also...

With the OEM soft I can ID the hole family of models-versions to keep detection in the driver to full capabilities, but, that is a time consuming task for other day (BTDT, believe me it's a very boring task...)

73 Pavel CO7WT.

Actions #5

Updated by Pavel Milanes almost 8 years ago

Still, we need a complete serial log for a download & upload of the radio data; users must follow the procedure described in http://chirp.danplanet.com/attachments/2257/how%20to%20portmon.doc to get a full log +with HEX data on it+.

The logs I have so far give good data but incomplete one.

Actions #6

Updated by Pavel Milanes almost 8 years ago

I have the logs now.

Attached is the portmon log with full hex support thanks to David KG7ZMX, I will process it on the coming days and will come up with a alpha driver to test.

73 Pavel CO7WT.

Actions #7

Updated by Pavel Milanes almost 8 years ago

  • File tk280.py added

First try to download a image for this radios.

Attached to this post is a developer driver, to try it you must follow this steps:

Save the file attached to this post to where you keep your chirp radio image files

Open Chirp (check that you have the most recent version)

Click "Help"

Click enable "Enable Developer Functions"

Click "File" in the menu

Click "Load Module"

Find and load the file that was saved in step 1

Note: This special test module only temporarily changes your CHIRP. You must load this module every time you load CHIRP to test it, otherwise you will wet the default installed chirp.

The task now is to connect a Kenwood TK-280 and try to read it to get a chirp .img file

This must be capable of read the radio... no matter if it complain about channels or other error, keep reading

If the download process works, you can be able to go to "File" and "Save" the content of the radio mem, please if success attach your saved image to this issue. (it will be ~30 Kbytes)

No working stories are also appreciated.

I repeat: the goal here is no download the contents of a radio, not to interpret the channel data or other details, in fact the channel data will no work in the present state, and uploading back to the radio is disabled for obvious reasons.

If you see that someone has uploaded an image already, please do upload yours! The more data I get more easy will be to reverse the memory map.

I wait for your tests to keep the work on this driver.

73 Pavel CO7WT.

Actions #8

Updated by Pavel Milanes almost 8 years ago

Hi, report from users talks about the driver not putting the radios in program mode...

I will be back with a solution.

73 Pavel CO7WT.

Actions #9

Updated by Pavel Milanes almost 8 years ago

  • File tk280.py added
  • % Done changed from 0 to 10

Hi to all,

Modified version of the dev driver for download a Chirp image from one of this drivers is attached, all investigation points to a DTR/RTS dance before starting the upload/download process.

Please test it and report back.

Actions #10

Updated by Pavel Milanes almost 8 years ago

  • File deleted (tk280.py)
Actions #11

Updated by Pavel Milanes almost 8 years ago

  • File deleted (tk280.py)
Actions #12

Updated by Pavel Milanes almost 8 years ago

Update the dev driver, last one has an error in the code, sorry.

Actions #13

Updated by Thomas P over 3 years ago

I tried the tk280.py from post 12 with my tk-981 since they are related but I got this error...
global name 'length' is not defined

It doesn't appear to have gotten to the point of communicating with the radio. I am attaching the debug log for details. Hope this helps the "80 series" along. I will do what I can if you need more info.

Actions #14

Updated by Jim Unroe over 3 years ago

Thomas P wrote:

I tried the tk280.py from post 12 with my tk-981 since they are related but I got this error...
global name 'length' is not defined

This particular error is due to an easy to make syntax error. Line 513 is...

        if length(ack) == 0 or ack != ACK_CMD:

and should be...

        if len(ack) == 0 or ack != ACK_CMD:

Jim KC9HI

Actions #15

Updated by Thomas P over 3 years ago

Thanks Jim! I updated line 513 and it got me past that error. Now it won't get past entering program mode.
The error is The radio doesn't accept program mode

Attaching debug log. I don't know if this is because I have a 981 but I thought it might be helpful.

Actions #16

Updated by Thomas P over 3 years ago

I tried this again on my tk-981, manually putting it into "Panel test mode" (A+Power On) as well as "Clone mode" (C+Power On), with the same result. The "Program mode" appears to only be activated via commands from the computer. At least that appears to be the case with the tk-981.

Has anyone had any luck or progress on this? I love my 981 and want to pick up more "80 series" radios but current programming is a PITA. I'm happy to test anything to contribute.

Actions #17

Updated by Jim Unroe over 3 years ago

Either there is a driver/connection with the programming cable, or the "magic" string sent by CHIRP to initiate cloning in the radio is not recognized by the radio.

Since the "magic" for all of these radios is the same ("PROGRAM"), I doubt that would be the problem. Since the radio does not reply to the request to start the cloning process, I would expect that the problem is with the programming cable (driver/connection/etc). And if you get past that, this driver is a work-in-progress, it appears to only currently support the TK-280.

Jim KC9HI

Actions #18

Updated by Adam Bartlett almost 3 years ago

Hi -

Using the tk280.py script to read from a tk-981 (with the fix from Jim for line 513), I get an exception. Full debug log attached.

[2022-01-02 14:09:44,043] chirp.ui.common - ERROR: -- Exception: --
[2022-01-02 14:09:44,045] chirp.ui.common - ERROR: Traceback (most recent call last):
File "chirp\ui\clone.pyo", line 255, in run
File "C:\Users\adam\Downloads\tk280.py", line 962, in sync_in
File "C:\Users\adam\Downloads\tk280.py", line 583, in do_download
File "C:\Users\adam\Downloads\tk280.py", line 499, in _open_radio
AttributeError: 'Serial' object has no attribute 'reset_input_buffer'

Updated by Thomas P almost 2 years ago

I was able to progress a little with my TK-981. My last 2 posts were caused by user error so ignore them.

Progress: I was able to connect to the radio and it went into PROGRAM mode. Here are the steps I had to take editing tk280.py.

  1. Fix the 'length' syntax error as Jim Unroe details above.
  2. Comment out the 'reset_input_buffer' and 'reset_output_buffer' lines to temporarily bypass those errors detailed by Adam Bartlett. I'm sure this will need a better permanent solution.
  3. The tk280.py file uses 'No' parity for the serial connection. This radio uses 'Even'. Changed that line from N to E.

The radio finally went into PROGRAM mode after step 3!!! BUT was obviously returning an unexpected radio "TYPE".

  1. Changed the TYPE = "P0280" to TYPE = "M0981" (obtained from Chirp error and debug.log)

As of now, Chirp attempts to "Clone" the radio but returns an error "The radio send 1 bytes, we need 258". Maybe someone with more experience can take the next steps or guide me how to proceed. I would be happy to contribute as much as possible to get these radios onboard.

My fully edited module file(TK-981 ONLY!) and debug.log files are attached. I have also included a Wireshark USB capture of a successful download/clone from the radio using the original KPG-49D software for reference.

Actions #20

Updated by Thomas P almost 2 years ago

FWIW: I'm not sure if the radio actually uses 'Even' parity on serial because 'Odd' returns similar results while 'None' won't even open the radio in PROGRAM mode.

Through experimenting I now have the radio sending Chirp it's memory but it fails at around 10 blocks in with a "Handshake failed after checksum" error. I have all the data dumping to the log to confirm my existing 981 programming is there. At least some of it anyway.

I am just struggling with the data manipulation or how Chirp deals with what the radio sends. Attaching my current module file. I hope this helps someone understand what's going on.

Actions #21

Updated by Thomas P almost 2 years ago

I think this debug.log related to my last post (#20) would be very helpful. It was ran with debug enabled so the output shows the interesting details of the data transfer.

Actions #22

Updated by Thomas P almost 2 years ago

Attaching the file would be smart....

Updated by Thomas P almost 2 years ago

UPDATE: After a lot of changes here is where things currently stand with the TK-981.

The radio is now sending all 128 blocks successfully without pop-up errors allowing Chirp to display the typical interface.
Unfortunately, the script doesn't handle the received data correctly and Chirp ends up unpopulated. See the .img file for reference.

The log ends with the following:

  • File "/home/me/Documents/TK-981/tk981.py", line 1278, in get_settings TOT.index(str(int(sett.tot)))])) ValueError: '1728' is not in list*

AND

  • File "/app/lib/python2.7/site-packages/chirp/ui/settingsedit.py", line 220, in _build_ui raise Exception("Invalid Radio Settings") Exception: Invalid Radio Settings*

I will still poke around but I am NOT a python programmer so I might have reached my limit. My hopes are that someone such as Pavel will see the progress and recognize the rest as trivial to complete. Again, I am happy to assist with any request. All related files are attached.

Actions #24

Updated by Pavel Milanes almost 2 years ago

Good work Thomas, thanks for your efforts!

I'm currently just relocated to Jamaica for work, I'm in the regularization process, rent, paper work, etc.

Once I finish that process I will be able to take a peek on this issues and work as far as I can, I estimate about 1 month or so [yes, thing here has it's own pace]

I'm yet to reach JARA [ARRL like] to start the process for a Jamaican license, and maybe borrow some new radios from locals to support in Chirp.

Cheers, Pavel CO7WT/6Y

Actions #25

Updated by Thomas P almost 2 years ago

Thanks Pavel! Happy to contribute. I'll be thrilled when Chirp finally supports these 8 more models.

UPDATE: I added the rest of the 80 series models and all? of their variants. The complete list is below. They just need their Ident strings populated and channels specified.
Although they are commented out until the class is fixed, I thought people might want to test their 80 series radios in the meantime. If anyone obtains Ident strings please let us know so we can fully populate the list.
TK-981
TK-980
TK-880
TK-780
TK-480
TK-481
TK-380
TK-280

Actions #26

Updated by Pavel Milanes almost 2 years ago

Hi Thomas, do you have a KPG49D app at hand (http://www.k9rod.net/Commercial/KPG-49D_v6.30.rar).

I would like to try to match the chirp produced image and a KPG49D codeplug, I have did that on the past.

I need a KPG49D codeplug and the matching chirp image to match it, if I manage to match them closely, that will boost the development a lot.

Can you please upload them here or send me that files to my email?

Actions #27

Updated by Thomas P over 1 year ago

Hi again, I hope that codeplug has helped.
UPDATE: I mapped a good portion of the Chirp version. It is not complete however. The Key Assignment, DTMF and FleetSync sections are yet to be mapped.

Hope this helps!

Actions #28

Updated by Benjamin Root over 1 year ago

Hello all,

Just joined the forum here since I picked up a Kenwood TK 981 and am interested in programming the radio with CHIRP. Not sure if I can be of any assistance in the development (no coding background) but let me know if there's anything I can do. Thanks.

Benjamin - KE0IZE

Updated by Thomas P 9 months ago

SUCCESS: Working Kenwood 80 Series driver(TK-280, TK-380, TK-780, TK-880)

TLDR: This driver is for radios formatted ONLY with Conventional mode, NOT Trunked mode. This means no TK-480, tk-481, tk-980 or tk-981(Trunk only radios). Still experimental, use at your own risk.

I finally got the 80 series to work... partially. When I started I only had the TK-981 and didn't understand why it was so different than the Kenwood 60 series. Once I realized the formatting was the problem it all started to come together. I obtained more radios and finished (most of) the mapping for these radios. I'm NO expert on python so I couldn't make everything appear in the GUI but the map is there for anyone more experienced than me. Having said that, there ARE many options I was able to put in the GUI. I have tested them within reason but there may be bugs. The one major known bug is a checksum error writing block '50' to the radios which is after the majority of the settings and all channels/groups so 90% of people can use this as-is. The block in question is the DTMF memories 1 through 8 and the write stops after that error. The only KNOWN settings after that mem location are FleetSync settings. Maybe the checksum is related to a mem read-only area? Hopefully someone can take a look because FleetSync is kinda cool.

A word about TRUNKING: Most of the mem map is identical in radios formatted as trunked... except the channels(groups)/banks(systems) which change mem location AND format so an entirely different driver needs to be written. I have already started on this but it might be a compromise/limited driver based on what I've seen. We'll see what I can do. I started this just to make my TK-981 easier to program so I'm determined to finish at least a rudimentary driver for the trunked radios.

NOTE: I have a handful of these radios but not every variant/version so not all identifiers are included. If you attempt to read your radio and it gives a model match error or similar PLEASE click ok and save the file anyway. Upload it and the debug.log to this thread so your version can be added to the driver. The modification is trivial, I just don't have the identifiers to do it myself.

Please use at your own risk. I have read and written to all of my radios without damaging anything but I can't guarantee those results. Make a backup of your radio with OEM software first!

I have provided the driver and a dump of my TK-380 that you can test this driver with if you don't have an appropriate radio. You should ignore all previous drivers in this thread.

Thanks to everyone that has contributed so far, I couldn't have gotten this far without you. Let me know if you find bugs or have questions.

Actions #30

Updated by Thomas P 9 months ago

BTW, this driver was developed in legacy Chirp so I have no idea if it will work in Next. It was hard enough when I started this and all my reference material was from legacy versions so I stuck with it. Sorry if that's inconvenient but it wouldn't have been possible otherwise.

Actions #31

Updated by Dan Smith 9 months ago

  • I read the instructions above set to Yes

In order for a driver to be accepted into mainline chirp, it has to be submitted via github and pass tests (on the -next) code. Unless you developed it with python3 in mind, it will likely require changes in order to work (and from a quick glance I can tell it won't function at all in python3/next). It sounds like you're not interested in doing that work, so someone will have to pick it up, make the required changes, and submit. Just FYI, in case you were expecting it to go from an attachment here to present in a chirp build.

Actions #32

Updated by Thomas P 9 months ago

Thanks Dan. I fully understand and that's pretty much what I expected. I just wanted to break the barriers that have been up for years on this radio series with the limited knowledge I have. At the very least this is one step closer for anyone interested. If I was knowledgeable enough I would do the conversion myself. Maybe in the future; I'm always trying to learn.

Actions #33

Updated by Darryl Pogue 5 months ago

I was trying to program a TK-780 this weekend, and thought I'd take a stab at updating the latest patch here to use python3 and work with chirp-next. I was able to successfully program the radio, but I'll echo all the caveats about this being experimental. In particular, there was some DTMF and button control stuff that was giving me issues, and I kept getting invalid channels added at the bottom of the table.

I've attached my (rudimentary) port of the patch to Python 3 in case it's useful to anyone else, or as a starting point for future revisions.

Actions

Also available in: Atom PDF