[chirp_devel] TH7800 Support

Dan Smith
Sat Jun 11 18:16:00 PDT 2016


(adding the list back in)

> The model detection code for TH-9800 is overly simplistic to start with:
> 
>     def match_model(cls, filedata, filename):
>         return len(filedata) == cls._memsize and filename.endswith('.dat')

Yeah, that filename check is probably not a good call either because
chirp doesn't enforce that, and defaults to .img.

But yeah, default for all radios is the size check.

> _Unfortunately_, the TH7800 I worked on is programmed with TH9800 as its
> model name.  Strange, right?  I'm guessing they use the same radio and
> change its mode with different firmware or a HW jumper or something. 
> Looks like they don't do a very thorough job of switching the model name.

Are the sizes the same too? Maybe size + model would do it?

> I can think of two things to possibly do at this point:
>   1)  Try switching off something that is unique between the two.  I can
> compare a TH-9800 file to see if I can figure something out.  Off-hand,
> I think the band limits might be a good way to do it.  I got that
> working on the TH-7800 and I'm pretty sure it differs from the TH-9800.
>   2)  Require TH-7800 users to change the model name in their radio.  I
> think this can be done with the OEM software.  The OEM software _sucks_
> in so many ways, though.  I don't really like this idea.

Yeah, #2 is not really a solution I think. Hopefully we can find
something to key off of though.

What if we change the model in the image when we save it? If they are
cloning from the radio they have already picked one of the models, which
means we can save the known model in the image at that point. Then we
will change the model string in the radio I guess, but maybe that's not
so bad. Anyway, this should be the last resort if we can't find anything
else, because people with existing images get screwed too.

> Thoughts?  I'm going to pursue #1 above and update the TH-7800
> model_match() code.

Yep, thanks, I think we should try #1 until we run out of ideas. We
haven't had any other cases where we failed to find something to
distinguish models, so I'm hopeful.

--Dan



More information about the chirp_devel mailing list