<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 2, 2013 at 9:46 PM, Jim Unroe <span dir="ltr"><<a href="mailto:rock.unroe@gmail.com" target="_blank">rock.unroe@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><font face="courier new,monospace">Hi Group,<br><br></font></div><div><font face="courier new,monospace">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.<br>
</font></div></div></blockquote><div><br></div><div>Still trying... <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><font face="courier new,monospace">
<br></font></div><div><font face="courier new,monospace">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.<br>
</font></div><div><br><font face="courier new,monospace"> rf.valid_bands = [(136000000, 174000000), (400000000, 520000000)] # VHF/UHF<br><br> rf.valid_bands = [(136000000, 174000000), (220000000, 260000000)] # VHF/VHF220<br>
<br></font></div><div><font face="courier new,monospace">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.<br>
</font></div><div><font face="courier new,monospace"><br>BFB231 (136-174/400-520)<br></font><font face="courier new,monospace"><font face="courier new,monospace">00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F<br></font>AA <a href="tel:42%2046%5B42%5D32%2033" value="+14246423233" target="_blank">42 46[42]32 33</a> 31 DD 00 25 60 13 00 25 60 13 ªBFB231Ý.%`..%`.<br>
<br></font></div><div><font face="courier new,monospace">The BFB291 is representative of firmware versions BFB291 and later. The format was revised to contain the lower and upper limits of each band. <br></font></div><div>
<font face="courier new,monospace"><br>BFB291 (136-174/400-520)<br></font></div><font face="courier new,monospace">00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F<br></font><div><font face="courier new,monospace">AA 36 <a href="tel:74%5B04%5D00%2005%2020" value="+17404000520" target="_blank">74[04]00 05 20</a> DD 00 25 60 13 00 25 60 13 ª6t... Ý.%`..%`.<br>
<br></font></div><div><font face="courier new,monospace">The BFB296 is representative of firmware versions from a VHF/220 radio.<br></font></div><div><font face="courier new,monospace"><br></font></div><div><font face="courier new,monospace">BFB296 (136-174/220-260)<br>
</font><font face="courier new,monospace"><font face="courier new,monospace">00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F<br></font>AA 36 <a href="tel:74%5B02%5D20%2002%2060" value="+17402200260" target="_blank">74[02]20 02 60</a> DD FF FF FF FF FF FF FF FF ª6t. .`Ýÿÿÿÿÿÿÿÿ<br>
<br></font></div>
<div><font face="courier new,monospace">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'.<br>
</font></div></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><font face="courier new,monospace">
<br></font></div><div><font face="courier new,monospace">So if some way byte 0x0003 could be read so that rf.valid_bands can be set to<br></font></div><div><font face="courier new,monospace"><br> rf.valid_bands = [(136000000, 174000000), (400000000, 520000000)]<br>
<br></font></div><div><font face="courier new,monospace">except when 0x0003=02 then it would be set to<br></font></div><div><font face="courier new,monospace"><br> rf.valid_bands = [(136000000, 174000000), (220000000, 260000000)]<br>
<br></font></div><div><font face="courier new,monospace">Does this make sense? How would I go about it? is there a better way?<br></font></div></div></blockquote><div><br></div><div>No. This makes no sense because it won't work. Once an image is uploaded from another model, these first bytes will be replaced. :(<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><font face="courier new,monospace"><br></font></div><div><font face="courier new,monospace">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?<br>
<br></font></div><div><font face="courier new,monospace">Thanks in advance.<br></font></div><div><font face="courier new,monospace"><br></font></div><div><font face="courier new,monospace">Jim KC9HI<br></font></div><div>
<font face="courier new,monospace"><br>
<br></font><br><br></div></div>
</blockquote></div>Jim<br></div></div>