Adding a DC for mobile download

Anton Lundin glance at acc.umu.se
Mon Aug 21 10:21:21 PDT 2017


On 21 August, 2017 - Dirk Hohndel wrote:

> 
> > On Aug 21, 2017, at 8:50 AM, John Van Ostrand <john at vanostrand.com> wrote:
> > 
> > I've been meaning to test the Cochran computers on  my android device for download but I can't see it on the list of vendors in the latest app.
> > 
> > It uses FTDI and has the same vid (1027) and pid (24577) as some other DCs. I've tried finding where it might be filtered in the code and it's not apparent. 
The vid / pid is the ftdi "standard" ones so they are already added to
the manifest. Android should suggest that you open Subsurface when you
plug in the device.

> > 
> > How do I add it?
> 
> Right now this is done by adding a comment in the src/descriptor.c file in libdivecomputer and then running a tool that creates our lists in core/downloadfromdcthread.cpp:
> scripts/dcTransport.pl
> 
> > Secondly, is it likely to work? All current models use two different baud rates.  They use 9600 for issuing commands and for small reads but after issuing a read command for dive data it switches to either 115200 (Commander) or ~800,000 (EMC) to receive data. It switches back to 9600 afterwards. 
> 
> That I don't know.

Yepp. It should work. You can compile the desktop with FTDISUPPORT=ON
and test it there. Just write the magic string ftdi in the "Device or
mount point" and click download. Its easier to debug there.


I've tested the ftdi serial code against a OSTC3 which runs 115200 baud
and a Suunto Vyper which runs at 9600 baud. There might be a issue with
the "extensive" switching but "regular" switching works.


//Anton


-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list