Dives are downloaded using bulk transfers with an 8K buffer. Normally the 2 second timeout is more than sufficient, and the timeout should never expire, unless there is some serious communcation problem. But nevertheless, users are reporting timeouts for dives having a length that is an exact multiple of the USB packet size (64 bytes). In that case, libusb reports a timeout with an non-zero amount of bytes received. Despite the timeout, the received data contains a complete dive. I suspect libusb is somehow unable to determine whether the transfer is complete and therefore waits until the timeout expires. For transfers that are not a multiple of the USB packet size, the end of the transfer is indicated by the last incomplete packet. This is not the case if the length is an exact multiple of the USB packet size. This problem is usually solved by sending a zero-length packet. Maybe the USB stack of the Cobalt is not sending such a zero-length packet? Atomics will address the problem with a Coblat 2 firmware upgrade, that will simply append two zero bytes if the length is a multiple of 64 bytes. As a workaround for older firmware versions, we ignore the timeout and process all received data. This shouldn't have any disadvantages. An incomplete dive, for example due to a real timeout, will now be detected by means of the minimum length and/or the checksum.
Overview ======== Libdivecomputer is a cross-platform and open source library for communication with dive computers from various manufacturers. The official web site is: http://www.libdivecomputer.org/ The sourceforge project page is: http://sourceforge.net/projects/libdivecomputer/ Installation ============ On UNIX-like systems (including Linux, Mac OS X, MinGW), use the autotools based build system. Run the following commands from the top directory (containing this file) to configure, build and install the library and utilities: $ ./configure $ make $ make install If you downloaded the libdivecomputer source code directly from the git source code repository, then you need to create the configure script as the first step: $ autoreconf --install To uninstall libdivecomputer again, run: $ make uninstall Support ======= Please send bug reports, feedback or questions to the mailing list: http://libdivecomputer.org/cgi-bin/mailman/listinfo/devel or contact me directly: jef@libdivecomputer.org License ======= Libdivecomputer is free software, released under the terms of the GNU Lesser General Public License (LGPL). You can find a copy of the license in the file COPYING.
Description
Languages
C
98.3%
M4
1.2%
Makefile
0.5%