Apex DSX current status? Can I help get this done?

104 views
Skip to first unread message

Ralf Mengwasser

unread,
May 3, 2024, 10:47:32 AMMay 3
to Subsurface Divelog
Hi guys,

I am trying to get my Apex DSX Data into Subsurface to calc SAC rate, but it isnt really working.

I read through all the DSX posts and I also checked out the "Diving Log 6.0" app which is supposed to work but that as well doesnt import all the data from the Apex DSX.

What I want to do is just connect via Bluetooth, hit download and then see my SAC rate for the dives, and while I do get the basic data imported into "Diving Log 6.0" which I can then export again, this doesnt work for the gas start and end values that would then calculate the SAC rate.

So now I had to manually go through every dive and then copy the gas start and end values by hand. And I suspect other data isnt copying as well?

Now where is Subsurface standing as far as integration of the Apex DSX? Will this ever work? Can I do something to make it work?

I am a programmer and yes, I can also hack a little bit. So as I see that the Apex DSX seems to be supported "basicly" for Diving Log 6.0, it should be possible to make this work here?

Can I help on adding those gas values into the import?

Thx for info!

Ralf

miika....@gmail.com

unread,
May 3, 2024, 12:49:06 PMMay 3
to Subsurface Divelog
You will first need to check if the gas values are included in the Diving Log export. Our DivingLog conversion is written in xslt/DivingLog.xslt, and it does include cylinder information. The question now is whether the problem is in our import or if the data is missing altogether. Can also be that something has been changed in the format Divng Log is using when saving the log.

The XSLT format used for converting the XML from DivingLog to our format is a bit weird language.. Feel free to give it a go, if the problem is on our side, or send a sample log so I can take a look on what is wrong. (Assuming the cylinder pressure values are in the origin XML.)

Michael Keller

unread,
May 4, 2024, 6:27:49 PMMay 4
to subsurfac...@googlegroups.com
Hi Ralf.


First of all it has to be said that the Apeks DSX, together with a lot
of other dive computers distributed by Oceanic, Aeris, Genesis,
Sherwood, Tusa, and others, is  designed and made by a company called
'Pelagic Pressure Systems'. They are well known for obfuscating their
protocols and actively trying to prevent the products they make from
interacting with third party applications, and instead bind the
customers who have paid for the hardware that they produce into their
own non-free / freemium dive log software.

So even if we get this to work it is entirely possible that this will be
breaking again when device firmware updates introduce new layers of
obfuscation - unfortunately this has happened before.


On 4/05/24 02:32, Ralf Mengwasser wrote:
> Now where is Subsurface standing as far as integration of the Apex
> DSX? Will this ever work? Can I do something to make it work?


Like many other dive log programs (AFAIK including Diving Log),
Subsurface uses the libdivecomputer
(https://github.com/libdivecomputer/libdivecomputer) library to
interface with dive computers. We run our own branch of it that has some
improvements over, and supports some dive computer models / transports
that are not supported in the 'vanilla' version of the library.

Our last update to the latest version of libdivecomputer was in February
(https://github.com/subsurface/subsurface/pull/4106) - and I had not
planned to do another one of these for another 3 months or so as they
are quite a bit of work to make our custom changes work around the
changes in libdivecomputer.

But if you have a look into the code in libdivecomputer you'll see that
the Apeks DSX is really just a variation of the Oceanic i330R, so for
now, and until the next libdivecomputer update in Subsurface, you might
be able to create a custom branch of Subsurface with the changes in the
respective files (`src/pelagic_i330r.c`, `src/oceanic_atom2_parser.c`)
to make importing work natively in Subsurface.


Cheers

  Michael Keller

Ralf Mengwasser

unread,
May 5, 2024, 10:53:39 AMMay 5
to Subsurface Divelog
Hey thx a lot...

well I have made some progress. I was able to compile my own version of the lib from git and then plug n play it into DivingLog 6, because they use the standard lib.

I wasnt able to do the same for Subsurface as the DLL is not compatible, but thats ok for now.

Anyway, using the new version of the lib I was able to import data into DivingLog6 in OC mode.

When I did that, it had the correct start and end gas and everything seemed to be working.

But then I switched my dive computer to sidemount mode and it stopped working. Not just that, but every imported dive suddenly was a deco dive and all the data fields were mixed up.

So It looks to me like the newest version of libdivecomputer from Git is NOT currently compatible with SM mode on the Apex DSX.

But yeah, pretty sure we will get there eventually.

Ralf

Michael Keller

unread,
May 5, 2024, 5:30:02 PMMay 5
to subsurfac...@googlegroups.com
Hi Ralf.


On 6/05/24 00:15, Ralf Mengwasser wrote:
> Hey thx a lot...
>
> well I have made some progress. I was able to compile my own version
> of the lib from git and then plug n play it into DivingLog 6, because
> they use the standard lib.
>
> I wasnt able to do the same for Subsurface as the DLL is not
> compatible, but thats ok for now.


The branch of libdivecomputer with the custom extensions that we are
using is in https://github.com/subsurface/libdc. Not sure if this can be
built and consumed stand-alone as a dll, but building the entire
Subsurface package is actually quite easy.


Cheers

  Michael Keller

Jef Driesen

unread,
May 6, 2024, 10:37:06 AMMay 6
to subsurfac...@googlegroups.com, Ralf Mengwasser
On 2024-05-05 14:15, Ralf Mengwasser wrote:
> But then I switched my dive computer to sidemount mode and it stopped
> working. Not just that, but every imported dive suddenly was a deco
> dive and all the data fields were mixed up.
>
> So It looks to me like the newest version of libdivecomputer from Git
> is NOT currently compatible with SM mode on the Apex DSX.
>
> But yeah, pretty sure we will get there eventually.

The sidemount mode should be detected correctly, but there might be
other changes in the data format for the sidemount mode that we are not
aware off. Can you download a full memory dump with Diving Log 6 (under
the advanced settings in the download dialog) and send me the generated
zip file?

Jef

Ralf Mengwasser

unread,
May 7, 2024, 6:04:16 PMMay 7
to Subsurface Divelog
Hey, I tried to get a full download, but the download took like 3 hours on every try and it crashed Diving Log quite a few times at the end.

I finally was able to get a file, but I had to enable "last dives" option... not sure what exactly is in the file now.

Anyway, here it is:


I hope its useful, I wasnt able to check if its still corrupt as Diving Log did not process the download after saving the file.

Anyway... thx.

Ralf

actionjaksnm

unread,
Jun 14, 2024, 10:05:22 PMJun 14
to Subsurface Divelog
Hi,

I also have an Apex DSX and am new to diving but have some coding experience. Let me know if there's anything I could do to help with getting this device added to Subsurface as I would love to use an open-source program for tracking my dives.

I did try to compile my own local version of the Windows executable and the Android APK, by adding/updating all of the files from the following commit in my local libdc submodule: https://github.com/libdivecomputer/libdivecomputer/commit/9070da357088bdb431c25dd51cc14e4fd62eba1f

The compilation went through fine (though I did have to update the ble.h file with the latest version & fix a few inconsistencies), and I could see Apeks DSX on the device list, but was unable to connect via Bluetooth. On Windows the device never showed up on the BT scan list within Subsurface; and on Android I was able to find it and start the connection, which resulted in the Apeks DSX to show the BT PIN on the device screen, but the Subsurface Android app never prompted me to enter a PIN and was just stuck in "Connecting" mode.

At this point I may have reached the limits of my debugging abilities, but if there are some steps I could take to continue troubleshooting please let me know.

Thanks :)

Reply all
Reply to author
Forward
0 new messages