Dive data import error with Hollis DG03

Hamish Moffatt hamish at cloud.net.au
Wed Mar 26 03:35:20 PDT 2014


On 26/03/14 21:31, Hamish Moffatt wrote:
> On 26/03/14 19:17, Jef Driesen wrote:
>> On 2014-03-26 07:17, Hamish Moffatt wrote:
>>>
>>> It works for me, although the first read times out (3 seconds) with no
>>> reply at all. I don't remember it before but I just tried your regular
>>> "universal" build and it does it too. Hmm. It could be the dive
>>> computer though, which I would have to say is pretty dumb.
>>
>> I've noticed in the past that many dive computers require some delay 
>> between open the serial port and sending the first request. That's 
>> why in most libdivecomputer backends, you'll find a 100ms delay, 
>> followed by a flush of the input buffer (that's another oddity, 
>> because I have no idea how there can already be any data in the 
>> buffer immediately after opening the serial port). Anyway, without 
>> that 100ms delay the communication just fails. Maybe the dive 
>> computer needs some time to notice the usb connection? I really don't 
>> know.
>
> I think the data already in the buffer is caused by the act of 
> plugging the cable into the dive computer, while it's already plugged 
> into the USB. You'll get a whole lot of garbage into the buffer as the 
> pins make contact, and probably bounce a fair bit. I don't think the 
> VT3 connection is particularly sound mechanically either.
>
> On the other hand if you plug it into the dc and then the USB port you 
> shouldn't get any data.
>
Just tested that and confirmed, I get input=0 on the flush if I connect 
the dc end first, input=17 or less on the flush if I connect the USB 
first. (Tested on the Mac, not that it's important.)

Hamish


More information about the subsurface mailing list