<div dir="ltr"><div><div>&gt; Yeah, although then you create a whole cottage industry of people on the</div><div>&gt; mailing list arguing about which value they feel is best for completely</div><div>&gt; ignorant reasons.</div><div><br></div><div>LOL.  You&#39;re probably right.  Sounds like the voice of experience.</div><div><br></div><div><br></div><div>&gt; What we&#39;re talking about here is (apparently) some buggy serial hardware or</div><div>&gt; drivers that bring their own characteristics.</div><div><br></div><div>A buggy dongle that sends characters too fast?  Hmm.  Maybe the serial dongle</div><div>isn&#39;t preserving application timing because of buffering?  Now we&#39;re back to</div><div>lowering the latency timer.  For example: the application sends a record, waits</div><div>for processing, and then sends another record.  If the dongle/driver buffers</div><div>across two records, and then blasts out the entire block it could nullify the</div><div>record processing timeout.  Lowering the latency timer might help with this as</div><div>it reduces buffering.</div><div><br></div><div>My experience was FTDI chipsets were most reliable in many ways.  They responded</div><div>well to a change in the latency parameter I mentioned earlier.  Prolific USB</div><div>dongles come in second to FTDI in my experience.</div><div><br></div><div>I&#39;m fairly sure some of the USB dongle experience is its OS driver as much as</div><div>anything.  The Linux Prolific driver has a quirk or two.  I&#39;ve had a lot of</div><div>problems with the generic Windows usbserial driver.  It seemed to do a lot of</div><div>internal buffering that I couldn&#39;t tune out the usual way.</div><div><br></div><div><br></div><div>&gt; The thing I want us to avoid is forcing all users of the driver to send one</div><div>&gt; byte at a time with a lengthy delay just because some people have broken</div><div>&gt; serial hardware.</div><div><br></div><div>I agree completely.  That&#39;s one of the things I was trying to stress.</div></div><div><br></div><div><br></div><div>-Nathan</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 16, 2017 at 3:26 PM, Dan Smith <span dir="ltr">&lt;<a href="mailto:dsmith@danplanet.com" target="_blank">dsmith@danplanet.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">&gt; I do like your idea of creating a throttled serial driver so long as<br>
&gt; users can still opt out of it.  Maybe they could even tune the<br>
&gt; throttling with a parameter?  This might help some HW without strewing<br>
&gt; sleep() calls all over the place.  I want the max speed I can use,<br>
&gt; though.  It takes too long to read/write some radios as it is.  Don&#39;t<br>
&gt; throttle everyone.<br>
<br>
</span>Yeah, although then you create a whole cottage industry of people on the<br>
mailing list arguing about which value they feel is best for completely<br>
ignorant reasons. Seems better to have the driver expose a value that<br>
should be used in compatibility mode, and if one isn&#39;t exposed,<br>
calculate a default based on the baudrate.<br>
<span class="gmail-"><br>
&gt; Throttling baudrate completely might be a bad idea in some cases.  What<br>
&gt; if a radio needs a relatively high amount of time to &quot;digest&quot; a<br>
&gt; packet/block/line of information?  Maybe it reads an entire block, and<br>
&gt; then commits it to EEPROM, for example.  Or maybe it decrypts the block<br>
&gt; (slowly).  If the time needed to process a block is high compared to the<br>
&gt; time between symbols, you wouldn&#39;t want to impose the block timeout on<br>
&gt; each symbol, or the throughput would be much lower than needed; maybe<br>
&gt; painfully so.<br>
<br>
</span>Right, but those are things we _should_ bake into the driver as they&#39;re<br>
characteristics of the radio itself. Indeed several drivers have this<br>
sort of thing and it&#39;s fine.<br>
<br>
What we&#39;re talking about here is (apparently) some buggy serial hardware<br>
or drivers that bring their own characteristics.<br>
<span class="gmail-"><br>
&gt; My experience is most embedded devices don&#39;t use XON/XOFF.  Even the<br>
&gt; simplest microcontrollers can usually keep up with 9600 baud until they<br>
&gt; try to do something like decryption or writing to EEPROM.  Maybe I&#39;m<br>
&gt; wrong here - I&#39;ve never written firmware for a radio.<br>
<br>
</span>Yeah, I don&#39;t think I&#39;ve seen any that do software flow either, but with<br>
only two or three serial lines, it&#39;s the only way to provide back<br>
pressure. Clearly anything should be able to keep up with 9600 baud, but<br>
we do have some that can&#39;t although it&#39;s mostly at the record level and<br>
not just straight line speed. The thing I want us to avoid is forcing<br>
all users of the driver to send one byte at a time with a lengthy delay<br>
just because some people have broken serial hardware.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
--Dan<br>
</font></span></blockquote></div><br></div></div>