Project

General

Profile

Actions

Bug #4819

open

Chirp can't identify model when opening Jetstream JT220M image

Added by Don Dorward almost 7 years ago. Updated almost 7 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
05/13/2017
Due date:
% Done:

0%

Estimated time:
Chirp Version:
0.4.0
Model affected:
(All models)
Platform:
Windows
Debug Log:
I read the instructions above:

Description

Chirp can't identify model when opening Jetstream JT220M image file.
Was using version 20170501, but same happens with 20170510.
When I select the model from the drop-down list the file opens with no problem.
Am using XT


Files

Jetstream_JT220M_20170309.img (8 KB) Jetstream_JT220M_20170309.img Don Dorward, 05/13/2017 12:51 PM
23.png (87.4 KB) 23.png compare Don's JT220 image to image in repository Jim Unroe, 05/15/2017 03:44 AM
alinco_2011.py (23.9 KB) alinco_2011.py changed check from "2009" to "2011" Jim Unroe, 05/15/2017 03:44 AM
Jetstream_JT220M_20170309(2009).img (8 KB) Jetstream_JT220M_20170309(2009).img changed from "2011" to "2009" Jim Unroe, 05/15/2017 03:44 AM
Actions #1

Updated by Jim Unroe almost 7 years ago

  • Status changed from New to Feedback

The failure is because CHIRP is looking for "2009" to identify the image is from a JT220. Your image has "2011" where CHIRP expects the "2009" to be.

Jim KC9HI

Actions #2

Updated by Don Dorward almost 7 years ago

Sorry I really don't understand what you mean.
Why is Chip looking for "2009"? Where is it looking for this? Where did the "2011" come from?
What do I do to correct it?

I have noticed on this computer that WinZip has assigned itself as default program to open.img files.
I have changed that back to Chirp, but it still acts the same.

Actions #3

Updated by Jim Unroe almost 7 years ago

When an image is loaded from a file, CHIRP has to somehow identify which radio this image came from. Usually a file length match is done first. Many radio models have an image of the same length so usually an additional check is made to check for something unique to that radio model in the image. The check for the Jetstream JT220 is shown below.


    @classmethod
    def match_model(cls, filedata, filename):
        return len(filedata) == cls._memsize and \
            filedata[0x60:0x64] == "2009"

The check is for the string in the image a position 0x60:0x64. CHIRP is looking for "2009" (which is the year part of a date -- 2009-4-10 or April 10, 2009). Your image has 2011 in this position (which is the year part of the date 2011-11-3 or November 3, 2011. See the attached screen capture from my hex editor.

Unfortunately the choice of this string to check for a JT220 didn't turn out to be a good one.

Possible workarounds are...

1 the "Jetstream JT220 image":http://chirp.danplanet.com/projects/chirp/repository/changes/tests/images/Jetstream_JT220M.img from the repository could be used.

2 the "2011" in your original image could be changed to "2009" so it passes the current check. (attached)

3 the alinco.py driver could be edited/hacked to look for "2011" which would allow you to enable "Enable Developer Functions" so you could load it to work with your JT220 image. (attached)

4 a developer might get away with patching the driver to only check for "20". This would match both "2009" and "2011" and shouldn't be an issue again until the year "2100". ;-)

5 a developer might determine another way to identify the image.

Jim

Actions

Also available in: Atom PDF