Serial-ftdi Issues

Salvador Cuñat salvador.cunat at gmail.com
Sun Sep 3 01:29:26 PDT 2017


Good morning.

Back in middle july we were looking at similar issue with my OSTC 2N.

On Wed, Aug 30, 2017 at 08:11:02AM +0200, Anton Lundin wrote:
> On 29 August, 2017 - John Van Ostrand wrote:
> 
> > 1. In serial_ftdi_read() a failed read exponentially backs off when there's a
> > short read. This is causing Cochran reads to timeout about 95% of the time.
> > It's as if reading too late causes lost data. Having a fixed backoff of 10ms
> > works. Are there any issues if I alter this backoff tactic? It could be
> > shortened to 1ms if 10ms is too long.
> >               ........
> >                         slept += backoff;
> > -                       backoff *= 2;
> >                         if (backoff + slept > timeout)
> >                                 backoff = timeout - slept;
> >               ........
> This is probably related to the issue Jocke sees on android:
> https://github.com/Subsurface-divelog/subsurface/pull/421
> 
> I don't mind another back off algorithm, just update the comment that
> says "Exponential backoff" to.
> 
For me Jhon's solution works just removing the exponential line, even
with backoff set to 1.
So I think the patch (or modifyed one) should be pushed, proved it
doesn't breaks other DCs ftdi download, of course.

Best regards.

Salva.


More information about the subsurface mailing list