Speaking from a user perspective, since this new and cool 2m/220 version (which I suddenly find myself wanting) looks absolutely identical to the V/U model I have, and since there's already so much confusion around these already, I'd say if it can be handled in software, all the better. As long as your're confident and you've got the research to back it up (like several examples from several radios) to tell the difference in software like you've outlined, my opinion would be to run with it.

/Ben KC9UUM


On Thu, May 2, 2013 at 8:46 PM, Jim Unroe <rock.unroe@gmail.com> wrote:
Hi Group,

I've been trying to figure out the best way to add CHIRP support for the Baofeng UV-5RAX dual-band radios that cover 136-174 MHz and 220-260 MHz.

I have been thinking that I just need a way to figure out a way to detect if the radio is a VHF/UHF model or a VHF/220 model and then use that to select between the following rf.valid_bands.

  rf.valid_bands = [(136000000, 174000000), (400000000, 520000000)] # VHF/UHF

  rf.valid_bands = [(136000000, 174000000), (220000000, 260000000)] # VHF/VHF220

I think I have a way to detect the difference. Below are the 1st 16 bytes of Baofeng UV-5R radios. The BFB231 is representative of firmware version BFB230 through BFB281 where the firmware verson was identified.

BFB231 (136-174/400-520)
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
AA 42 46[42]32 33 31 DD 00 25 60 13 00 25 60 13  ªBFB231Ý.%`..%`.

The BFB291 is representative of firmware versions BFB291 and later. The format was revised to contain the lower and upper limits of each band.

BFB291 (136-174/400-520)
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
AA 36 74[04]00 05 20 DD 00 25 60 13 00 25 60 13  ª6t... Ý.%`..%`.

The BFB296 is representative of firmware versions from a VHF/220 radio.

BFB296 (136-174/220-260)
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
AA 36 74[02]20 02 60 DD FF FF FF FF FF FF FF FF  ª6t. .`Ýÿÿÿÿÿÿÿÿ

Note the byte that I have surrounded with square brackets. On firmware BFB290 and lower, this will always be '42'. On firmware for a VHF/UHF radio, this will always be '04' or '05'. And finally on a VHF/220 radio this will always be '02'.

So if some way byte 0x0003 could be read so that rf.valid_bands can be set to

  rf.valid_bands = [(136000000, 174000000), (400000000, 520000000)]

except when 0x0003=02 then it would be set to

  rf.valid_bands = [(136000000, 174000000), (220000000, 260000000)]

Does this make sense? How would I go about it? is there a better way?

It was discussed that the VHF/220 radio could be handled as a different Baofeng model. I guess I'm not opposed to that if that is what the consensus is. How would that be done?

Thanks in advance.

Jim KC9HI





_______________________________________________
chirp_devel mailing list
chirp_devel@intrepid.danplanet.com
http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers