Dive Computer Support¶
Overview¶
Kenozooid allows to fetch data from dive computers produced by different manufacturers. Also, it is possible to use some unique features of specific dive computers like performing simulation (or in the future changing dive computer configuration).
For each dive computer supported by Kenozooid, there is a driver implemented with appropriate capabilities.
The supported dive computers and their drivers are listed in the table below.
Dive computer |
Driver |
---|---|
OSTC, OSTC Mk.1, OSTC 2N |
ostc |
OSTC 2, OSTC Plus, OSTC Sport, OSTC 3 |
hwos |
Sensus Ultra |
su |
To list the capabilities of dive computers (see below for description)
execute drivers
command:
kz drivers
which gives the following output:
Available drivers:
dummy (Dummy Device Driver): simulation
hwos (hwOS Driver): backup
ostc (OSTC Driver): simulation, backup
su (Sensus Ultra Driver): backup
The device driver ids (dummy
, ostc
, su
above) should be used
with Kenozooid dive computer related commands like backup
, convert
or simulation commands, for example:
kz backup ostc /dev/ttyUSB0 backup-ostc-20090214.uddf
kz convert ostc ostc-20090214.dump backup-ostc-20090214.uddf
kz sim replay ostc /dev/ttyUSB0 1 backup-ostc-20090214.uddf
Driver Capabilities¶
The list of possible dive computer driver capabilities is as follows
- backup
Dive computer data backup to fetch configuration and all stored dive data with dive profiles, see Data Backup.
- simulation
Switch dive computer into dive mode and perform real time dive simulation, see Dive Simulation.
Troubleshooting¶
A dive computer related command can result with an error message like:
kz: Driver "ostc" cannot communicate with a device at port "/dev/ttyUSB0"
The possible reasons for above message can be
Is a dive computer connected to your personal computer? Execute the command:
dmesg -a | less
and look for output similar to the following:
usb 2-1.1: new full speed USB device number 4 using ehci_hcd usb 2-1.1: New USB device found, idVendor=0403, idProduct=6001 usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 2-1.1: Product: HeinrichsWeikamp OSTC usb 2-1.1: Manufacturer: FTDI usb 2-1.1: SerialNumber: A4RTV8TO USB Serial support registered for FTDI USB Serial Device ftdi_sio 2-1.1:1.0: FTDI USB Serial Device converter detected usb 2-1.1: Detected FT232RL usb 2-1.1: Number of endpoints 2 usb 2-1.1: Endpoint 1 MaxPacketSize 64 usb 2-1.1: Endpoint 2 MaxPacketSize 64 usb 2-1.1: Setting MaxPacketSize 64 usb 2-1.1: FTDI USB Serial Device converter now attached to ttyUSB1
At the end of the last line above it is indicated that a dive computer is connected to
/dev/ttyUSB1
device (not usual/dev/ttyUSB0
used across this document).Is the dive computer switched on? Some dive computers will not switch automatically on when connected to a personal computer.
Are the device file (i.e.
/dev/ttyUSB0
,/dev/ttyUSB1
) permissions correct? Execute the command:ls -l /dev/ttyUSB0
The output can be:
crw-rw---- 1 root dialout 4, 23 Aug 25 01:30 /dev/ttyUSB0
Above means, that only user
root
and users belonging to groupdialout
have read-write access to dive computer (for more about Unix file permissions notation, see the wikipedia article).Use command
id
to check groups your system user belongs to:$ id uid=1000(ttrav) gid=1000(users) groups=1000(users),10(wheel),16(dialout),17(proc)
Data Backup¶
The data in a dive computer memory, like configuration settings or dive profiles, is usually kept in some binary format specific to a dive computer model or manufacturer.
Kenozooid backup
command provides functionality to fetch and store such
dive computer memory data in a backup file.
The backup files are useful in several situations
snapshot of dive computer data is preserved - if data processing software uses universal data format independent from dive computer model or manufacturer (i.e. UDDF), then, when new software features or bug fixes are implemented, the data in universal format can be extracted from a snapshot
the binary data from a backup can be sent to developers of data parsing software to investigate software related problems
or it can be sent to dive computer manufacturer to investigate dive computer related problems
To create a backup file of OSTC dive computer data:
$ kz backup ostc /dev/ttyUSB0 backup-ostc-20090214.uddf
or to backup Sensus Ultra data:
$ kz backup su /dev/ttyUSB0 backup-su-20090214.uddf
During the backup, Kenozooid extracts dive data from binary data and stores both binary and dive data in a backup file. This allows to access the dive computer data with other Kenozooid commands immediately. For example, to list the dives (see Listing and Searching) from a backup file:
$ kz dive list backup-su-20090214.uddf
Dive Data Extraction¶
Kenozooid provides a command to extract dive data from a backup file containing dive computer binary data stored. As mentioned above, the command can be very useful when Kenozooid new functionality or bug fixes are implemented.
To extract dives from a backup file run dive extract
command:
$ kz dive extract backup-su-20090214.uddf backup-su-20090214-01.uddf
The dive extract
command behaves in similar way to backup command - the
dive data is stored along with binary data, which was used as source of
extraction. Therefore, the new file (backup-su-20090214-01.uddf
in
above example) can be used as dive extraction source once again and old
file can be removed.
Binary Data Import¶
The Kenozooid backup command produces files compliant with UDDF. This allows to describe stored binary data, i.e. with date and time of fetching the data and dive computer model information.
There are applications, which dump dive computer memory as binary, raw
file. Such files can be converted (imported) by Kenozooid into UDDF file
with convert
command.
To convert OSTC dive computer binary data into UDDF format:
$ kz convert ostc ostc-20090214.dump backup-ostc-20090214.uddf
As in case of backup
and dive extract
commands, the UDDF file
contains both dive data and binary data
the dive data in UDDF file can be accessed with other Kenozooid commands
or the UDDF file can be reprocessed with
dive extract
command when necessarythe source of conversion can be safely removed
Dive Simulation¶
Ability to perform dive simulation implemented in some of dive computers can be great tool to familiarize yourself with computer screens and features present during diving.
Kenozooid supports switching dive computers into simulation mode using
sim plan
and sim replay
commands. The commands supply dive
computer with depth values in intervals of time. The depths and time
intervals can be generated from a dive plan (sim plan
) or taken from an
existing dive profile (sim replay
).
It is worth noting that real time dive simulation is described in this section, therefore real life rules may apply to some of dive computers, for example
when dive is started, then computer switches into dive mode at appropriate depth; it depends on dive computer configuration
when you reach surface, then computer may wait some time before exiting dive mode, if another simulation is started too fast, then it is counted as one dive
Please, read about dive simulation capabilities in your dive computer manual before starting to use Kenozooid to simulate dives.
Dive Replay¶
Existing dive profile can be replayed with a dive computer having dive
simulation capabilities, i.e. OSTC. Kenozooid supports such functionality
with sim replay
command.
To replay first dive from a backup file:
kz sim replay ostc /dev/ttyUSB0 -k 1 backup-ostc-20090214.uddf
Dive Plan Simulation¶
Simulation of a dive plan is performed using sim plan
command.
Sample dive plan could be as follows
Run Time |
Depth |
---|---|
0:30 |
10 |
3:30 |
10 |
13:30 |
0 |
which can be described as
dive starts at zero meters
within 30 seconds diver reaches 10m
diver stays at 10m for 3 minutes (leaves 10m at 3:30)
then goes to the surface with 10m/min speed
finally reaches surface at 13:30
To perform simulation of above dive plan with OSTC dive computer:
kz sim plan ostc /dev/ttyUSB0 '0:30,10 3:30,10 13:30,0'
Dive specification is space separated list of dive run times and depth values.
Time can be specified in seconds (i.e. 15, 20, 3600) or in minutes (i.e. 12:20, 14:00, 67:13). Depth is always specified in meters.
Partial Automatic Simulation¶
Kenozooid allows not only to execute end-to-end simulation (start from surface, perform dive, finish at surface) but as well part of simulation, i.e. start simulation, dive to some depth starting from surface and exit Kenozooid leaving dive computer in simulation mode to allow a diver to continue simulation using dive computer buttons.
To support such flexiblity, two options are provided
no start option allows to start Kenozooid without restarting dive simulation
no stop option leaves dive simulation running on Kenozooid exit
For example, to leave dive computer at 10m depth and then continue simulation with dive computer buttons:
kz --no-stop sim plan ostc /dev/ttyUSB0 '0:30,10'
Above simulation can be continued manually or it can be stopped using Kenozooid:
kz --no-start sim plan ostc /dev/ttyUSB0 '0,10 1:00,0'
To execute part of dive plan, no start and no stop options can be used at once. For example, to ascend from 30m to 20m within 2 minutes:
kz --no-start --no-stop sim plan ostc /dev/ttyUSB0 '0,30 120,20'
All times are run times from the moment, when Kenozooid is started.