Uwatec Smart Z data download takes 1.5 hours for only 4 dives

Jef Driesen jefdriesen at telenet.be
Mon Dec 30 15:23:26 UTC 2013


On 30-12-13 20:22, Linus Torvalds wrote:
> On Sun, Dec 29, 2013 at 10:43 PM, Jef Driesen <jefdriesen at telenet.be> wrote:
>>
>> It used to be possible to attach the irda subsystem to a pty. I successfully
>> used this setup for testing libdivecomputer (see bottom) without needing any
>> irda hardware:
>>
>> http://www.libdivecomputer.org/simulator.html
>
> Ok, I'll try this. The documentation is a bit out of date and lacking,
> though. I can do the setup (socat, ./configure --enable-pty=yes,
> irattach etc), but:

Yeah I know, the documentation was written long before the --enable-pty option 
existed.

>   - for the irattach, modern binaries don't like doing
>
>          irattach /tmp/ttyS0
>
>     because apparently it will not recognize that name, try to do a
> "modprobe /tmp/ttyS0", and that will fail. But I can work around that
> by just directly doing something like "irattach /dev/pts/1" instead.

That's something I forgot to mention in the docs too. irattach doesn't like 
symlinks, so you must use the target name directly, as you already discovered.

>   - where is, and how do you actually *use* the simulator after doing
> the setup? I guess I need an example dump from a Uwatek device too..

The pre-compiled binaries are available here:

http://www.libdivecomputer.org/tmp/

I uploaded the source as well. It's based on a very old and heavily modified 
libdivecomputer version. I'm not sure it will even compile outside of my setup. 
But it's there if you want to have a look (although it's pretty ugly) :-)

Running the simulator is very easy:

./simulator -l <logfile> -p <serialport> -b <backend> <memorydump>

The <serialport> parameter is one end of the socat pair, and the application 
connects to the other one. But for irda it isn't needed at all.

I have attached the memory dump from Sape's Uwatec. Make sure the *.header and 
*.systime are in the same directory as the main memory dump. They contain extra 
metadata and are automatically read by the simulator. Without these files, 
libdivecomputer won't be able to detect the correct model.

So this should work for the Uwatec:

./simulator -l simulator.log -b smart smartz.sapesikkema.bin

Jef
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smartz.sapesikkema.bin
Type: application/octet-stream
Size: 259727 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131231/9dba03b3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smartz.sapesikkema.bin.header
Type: application/octet-stream
Size: 9 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131231/9dba03b3/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smartz.sapesikkema.bin.systime
Type: application/octet-stream
Size: 8 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131231/9dba03b3/attachment-0003.obj>


More information about the subsurface mailing list