<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Dan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Jim sent an image… <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">It does look a bit like the ICOM protocol (I started there) – but uses its own subcommand just for doing a memory dump and upload.&nbsp; So unfortunately no overlap.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I hope that it will work with other TYT radios though because the programmer seems to be written with multiple radios in mind (I decompiled it to get some of the checksum info calculation and memory
 layout).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Jim did the topping and tailing (I don’t have a lot of time for testing now), the timeout as is was as it was in the driver that I cribbed from – I’m sure it could be almost anything.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Best wishes<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">James<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">chirp_devel-bounces@intrepid.danplanet.com &lt;chirp_devel-bounces@intrepid.danplanet.com&gt;<br>
<b>Date: </b>Thursday, 19 November 2020 at 20:58<br>
<b>To: </b>chirp_devel@intrepid.danplanet.com &lt;chirp_devel@intrepid.danplanet.com&gt;<br>
<b>Subject: </b>Re: [chirp_devel] [PATCH] [TH-UV88] New Model: TYT TH-UV88 (replacement for previous patch)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">&gt; # HG changeset patch<br>
&gt; # User Jim Unroe &lt;rock.unroe@gmail.com&gt;<br>
&gt; # Date 1605729943 18000<br>
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wed Nov 18 15:05:43 2020 -0500<br>
&gt; # Node ID 9379757e3946f6da034d96093ad188c9b93dd622<br>
&gt; # Parent&nbsp; d5e496f563fdfc9ea89dea5f119357235b82db6f<br>
&gt; [TH-UV88] New Model: TYT TH-UV88 (replacement for previous patch)<br>
&gt; <br>
&gt; This patch adds support for the TYT TH-UV88<br>
&gt; <br>
&gt; Initial radio protocol decode, channels and memory layout<br>
&gt; by James Berry &lt;james@coppermoth.com&gt;, Summer 2020<br>
&gt; <br>
&gt; Related to #7817<br>
<br>
Can we get an image for testing this?<br>
<br>
&gt; +def _clean_buffer(radio):<br>
&gt; +&nbsp;&nbsp;&nbsp; radio.pipe.timeout = 0.005<br>
<br>
This is 5ms, too low to be meaningful on most systems I think, and it looks like this is just for the serial purge. I think something like 100ms is a lot better. I'm not sure how long it takes to read 256 bytes at 57600 but it wouldn't surprise me if this is
 too short to even clear most buffers.<br>
&gt; <br>
&gt; +def _make_read_frame(addr, length):<br>
&gt; +&nbsp;&nbsp;&nbsp; frame = &quot;\xFE\xFE\xEE\xEF\xEB&quot;<br>
<br>
This isn't going to be py3 compatible, but I'm so behind on processing this stuff I guess maybe I shouldn't be too picky.<br>
<br>
&gt; +&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;Pack the info in the header format&quot;&quot;&quot;<br>
&gt; +&nbsp;&nbsp;&nbsp; frame += struct.pack(&quot;&gt;ih&quot;, addr, length)<br>
&gt; +<br>
&gt; +&nbsp;&nbsp;&nbsp; frame += &quot;\xFD&quot;<br>
&gt; +&nbsp;&nbsp;&nbsp; # Return the data<br>
&gt; +&nbsp;&nbsp;&nbsp; return frame<br>
<br>
Also, this does look a *lot* like the icon protocol. Have you tried seeing if the icom radio base will talk to this?<br>
<br>
--Dan<br>
_______________________________________________<br>
chirp_devel mailing list<br>
chirp_devel@intrepid.danplanet.com<br>
<a href="http://intrepid.danplanet.com/mailman/listinfo/chirp_devel">http://intrepid.danplanet.com/mailman/listinfo/chirp_devel</a><br>
Developer docs: <a href="http://chirp.danplanet.com/projects/chirp/wiki/Developers">
http://chirp.danplanet.com/projects/chirp/wiki/Developers</a><o:p></o:p></p>
</div>
</div>
</body>
</html>