Hi group,
I think I finally have a handle on what is causing the CHIRP 'Unsupported Model" problem with the UV-B5 and UV-B6 radios. Under certain conditions, one confirmed as receive CTCSS tones selections, things change that cause CHIRP to stop working with radio.
Here is the radio 'ident' check.
ident = radio.pipe.read(8) print util.hexprint(ident) if ident != "HKT511\x00\x04": raise errors.RadioError("Unsupported model")
The HKT511\x00\x04 ident is what is returned from a factory radio or a radio that has been reset. When you program certain receive CTCSS frequencies (and some other settings will cause this, too), the 'ident' changes to the following.
HKT511\x00\x00
This can be easily fixed by checking for both ident strings or by shorting the string to just 7 characters.
When this is done, CHIRP starts the download process, but then the clone process is ended with 'Unexpected respose'.
Here is where the process fails.
ecks = radio.pipe.read(1) if ecks != "x": raise errors.RadioError("Unexpected response")
What happens is when the 'ident' changes, the 'ecks' value changes too. I have seen as many as three different responses (including the original 'x').
The easiest 'fix' would be to just remove the check. Either Baofeng doesn't check or they know what to check for.
Another 'fix' would be to grab the first 'ack' and then use it to check the rest. Maybe something like this?
ack = radio.pipe.read(1) if i == 0 ack0 == ack if ack != ack0: raise errors.RadioError("Unexpected response")
Does anyone have any better ideas to work around this UV-B5/B6 quirk?
Thanks, Jim KC9HI