Shearwater Tern

498 views
Skip to first unread message

Jean-Baptiste Martin

unread,
Jan 13, 2024, 3:49:30 PM1/13/24
to Subsurface Divelog
Hello to all Subsurface users.

I just purchased the Shearwater Tern.

My next dive is plan next week. I would like to know if this computer will be supported.

I can help to contribute on this task.

Regards.

Jean-Baptiste.

Jef Driesen

unread,
Jan 13, 2024, 4:13:13 PM1/13/24
to subsurfac...@googlegroups.com, Jean-Baptiste Martin
On 13/01/2024 21:49, Jean-Baptiste Martin wrote:
> I just purchased the Shearwater Tern.
>
> My next dive is plan next week. I would like to know if this computer will be
> supported.
>
> I can help to contribute on this task.

I suspect the protocol hasn't changed, and in that case downloading should
already work and it's just a matter of adding the new model numbers. To do that,
you need to download with the libdivecomputer logging enabled, as explained here:

https://libdivecomputer.org/subsurface.html#desktop-dives

And afterwards send me the generated log file.

Note that you can already try without any dives on the dive computer. Most of
the information we need is already available without any dives, and usually
there will be a factory dive present.

Jef

Jean-Baptiste Martin

unread,
Jan 13, 2024, 5:34:42 PM1/13/24
to Subsurface Divelog
Hello Jef.

I first sync my PC with Tern Tx thru Blutooth manager.

But download didn't start.

Error message : Impossible to open LE:D5:8F:62:39:6A:32.

Jean-Baptiste Martin

unread,
Jan 13, 2024, 5:35:21 PM1/13/24
to Subsurface Divelog
I chose Teric, and tried also with Peregrine.

Jean-Baptiste Martin

unread,
Jan 13, 2024, 5:39:17 PM1/13/24
to Subsurface Divelog
Here the content of the LOG : 
Subsurface: v6.0.5054.0, built with libdivecomputer v0.8.0-devel-Subsurface-NG (577b6940874c76cfc9b1adb0b0e51e26349b5a8f)


Jef Driesen

unread,
Jan 14, 2024, 2:35:27 AM1/14/24
to subsurfac...@googlegroups.com, Jean-Baptiste Martin
On 13/01/2024 23:34, Jean-Baptiste Martin wrote:
> I first sync my PC with Tern Tx thru Blutooth manager.
>
> But download didn't start.
>
> Error message : Impossible to open LE:D5:8F:62:39:6A:32.

This indicates a problem setting up the bluetooth connection, and thus we don't
even get a chance to communicate with the dive computer. The bluetooth
connection info should be in the subsurface log files:

https://subsurface.github.io/faq/#where-do-i-find-the-log-files-on-windows

Can you send those subsurface_out.log and subsurface_err.log files?

Jef
Message has been deleted
Message has been deleted
Message has been deleted

Jean-Baptiste Martin

unread,
Jan 14, 2024, 3:10:16 PM1/14/24
to Subsurface Divelog
Hello,

I'm not able to post here. My posts are deleted. I sent the files by email.

Jef Driesen

unread,
Jan 15, 2024, 2:52:31 AM1/15/24
to subsurfac...@googlegroups.com, Jean-Baptiste Martin
From your logs:

> Found service "{fe25c237-0ece-443c-b0aa-e02033e7029d}"
> .. recognized service Shearwater (Perdix/Teric/Peregrine)
> starting service characteristics discovery
> .. service state changed to QLowEnergyService::DiscoveringServices
> .. service state changed to QLowEnergyService::ServiceDiscovered
> .. done discovering services
> Found service "{fe25c237-0ece-443c-b0aa-e02033e7029d}" "Unknown Service"
> c: "{27b7570b-359e-45a3-91bb-cf7e70049bd2}"
> d: "{00002902-0000-1000-8000-00805f9b34fb}"
> d: "{00002901-0000-1000-8000-00805f9b34fb}"
> Using service "{fe25c237-0ece-443c-b0aa-e02033e7029d}" as preferred service
> .. enabling notifications
> Using read characteristic "{27b7570b-359e-45a3-91bb-cf7e70049bd2}"
> now writing "0x0100" to the descriptor "{00002902-0000-1000-8000-00805f9b34fb}"
> Bluetooth: Failed to enable notifications for characteristic "{27b7570b-359e-45a3-91bb-cf7e70049bd2}"
> Deleting BLE object
> QLowEnergyControllerPrivate setting state to QLowEnergyController::ClosingState
> QLowEnergyControllerPrivate setting state to QLowEnergyController::UnconnectedState
> Finishing download thread: "Impossible d'ouvrir LE:D5:8F:62:39:6A:32 Shearwater (Perdix 2)"

The problem is that enabling notifications failed, and those are required for
receiving data from the dive computer.

If you know how to run a command-line application, can you try the following.
Download this build of the libdivecomputer command-line client:

https://libdivecomputer.org/builds/experimental/windows/tern.exe

Enable bluetooth on your dive computer and run the application with these options:

tern.exe -vv -l tern.log -f petrel download -o dive.%n.bin -f raw -t ble

And send me back the tern.log file. That should hopefully contain some more
detail on why enabling the notifications failed.

Jef

Jean-Baptiste Martin

unread,
Jan 15, 2024, 3:05:58 AM1/15/24
to Subsurface Divelog
Hello.

I will try !!! 

Jean-Baptiste Martin

unread,
Jan 15, 2024, 4:00:01 AM1/15/24
to Subsurface Divelog
FYI : before running the app, i firstly pair the Tern thru Windows bluetooth manager.

 Here's the Log :

[0.001340] DATETIME 2024-01-15T08:57:47Z (1705309067)
[0.003991] VERSION 0.9.0-devel (9b685a4b5610fd8e84ade0658899d9bfdc09f8aa)
[0.006765] Opening the I/O stream (ble, null).
[0.008835] INFO: Discover: address=D58F62396A32, name=Tern
[0.012603] INFO: Open: address=D58F62396A32
[0.019610] INFO: Service: handle=0001, uuid=00001800-0000-1000-8000-00805f9b34fb
[0.024240] INFO: Characteristic: handle=0002, uuid=00002a00-0000-1000-8000-00805f9b34fb, flags=RW
[0.029349] INFO: Characteristic: handle=0004, uuid=00002a01-0000-1000-8000-00805f9b34fb, flags=R
[0.035198] INFO: Characteristic: handle=0006, uuid=00002a04-0000-1000-8000-00805f9b34fb, flags=R
[0.040369] INFO: Characteristic: handle=0008, uuid=00002aa6-0000-1000-8000-00805f9b34fb, flags=R
[0.045853] INFO: Service: handle=000a, uuid=00001801-0000-1000-8000-00805f9b34fb
[0.049210] INFO: Service: handle=000b, uuid=fe25c237-0ece-443c-b0aa-e02033e7029d
[0.053302] INFO: Characteristic: handle=000c, uuid=27b7570b-359e-45a3-91bb-cf7e70049bd2, flags=W(WWR)N
[0.057897] INFO: Descriptor: handle=000e, uuid=00002902-0000-1000-8000-00805f9b34fb, type=2
[0.061600] INFO: Descriptor: handle=000f, uuid=00002901-0000-1000-8000-00805f9b34fb, type=1
[0.065985] DEBUG: RX: 27b7570b-359e-45a3-91bb-cf7e70049bd2
[0.068313] DEBUG: TX: 27b7570b-359e-45a3-91bb-cf7e70049bd2
[7.789630] ERROR: Le délai de temporisation de sémaphore a expiré (-2147024775) [in src/ble-win32.c:504 (win32_ble_notify)]
[7.794699] ERROR: Failed to enable notifications for the Tx characteristic. [in src/ble.c:756 (dc_ble_open)]
[7.803006] ERROR: Failed to open the ble device. [in examples/common.c:607 (dctool_ble_open)]
[7.806570] ERROR: Error opening the I/O stream. [in examples/dctool_download.c:162 (download)]
[7.810545] ERROR: Input/output error


Martin Swanston

unread,
Jan 15, 2024, 7:04:35 AM1/15/24
to Subsurface Divelog
[quote]FYI : before running the app, i firstly pair the Tern thru Windows bluetooth manager.[/quote]
Could this be the issue? You don't need to connect via bluetooth first, that is handled within subsurface when you connect with bluetooth started on your Tern.
Thanks
Martin

Jean-Baptiste Martin

unread,
Jan 15, 2024, 7:52:21 AM1/15/24
to Subsurface Divelog
Ok. Will try again after unpairing the Tern.

Jean-Baptiste Martin

unread,
Jan 15, 2024, 8:08:40 AM1/15/24
to Subsurface Divelog
Worse !!!

[0.000011] DATETIME 2024-01-15T13:08:00Z (1705324080)
[0.005798] VERSION 0.9.0-devel (9b685a4b5610fd8e84ade0658899d9bfdc09f8aa)
[0.010081] Opening the I/O stream (ble, null).
[0.013119] ERROR: No dive computer found. [in examples/common.c:598 (dctool_ble_open)]
[0.016871] ERROR: Error opening the I/O stream. [in examples/dctool_download.c:162 (download)]
[0.020916] ERROR: No device found

Martin Swanston

unread,
Jan 15, 2024, 8:13:02 AM1/15/24
to subsurfac...@googlegroups.com
Did you try adding the computer within subsurface?
image0.jpeg

On 15 Jan 2024, at 13:08, Jean-Baptiste Martin <jb.mart...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/24720466-e8f3-45ff-b04e-7da19c3af57fn%40googlegroups.com.

Jef Driesen

unread,
Jan 15, 2024, 8:44:10 AM1/15/24
to subsurfac...@googlegroups.com, Martin Swanston
On 15/01/2024 13:04, Martin Swanston wrote:
> [quote]FYI : before running the app, i firstly pair the Tern thru Windows
> bluetooth manager.[/quote]
> Could this be the issue? You don't need to connect via bluetooth first, that is
> handled within subsurface when you connect with bluetooth started on your Tern.

On Windows, you need to pair BLE devices using the Windows bluetooth manager.
Otherwise subsurface won't even be able to find the bluetooth device at all.
This is a limitation of the win32 bluetooth api used by subsurface and the
dctool command-line application.

On other operating systems it's different and you can pair directly in the
application.

Jef

Jean-Baptiste Martin

unread,
Jan 15, 2024, 8:52:35 AM1/15/24
to Subsurface Divelog
Thanks to Martin Swanston, i tried another time from Subsurface Mobile Android.

By selecting Teric in dive computer list, and by associating Tern thru bluetooth, i finaly download the test dive :
Screenshot_20240115-144831.jpgScreenshot_20240115-144853.jpgScreenshot_20240115-144831.jpg


Jean-Baptiste Martin

unread,
Jan 15, 2024, 8:54:18 AM1/15/24
to Subsurface Divelog
Is there a way to export log file in subsurface mobile ?

Jef Driesen

unread,
Jan 15, 2024, 8:58:02 AM1/15/24
to subsurfac...@googlegroups.com, Jean-Baptiste Martin
On 15/01/2024 14:54, Jean-Baptiste Martin wrote:
> Is there a way to export log file in subsurface mobile ?

Yes, it's explained here:

https://libdivecomputer.org/subsurface.html#mobile

Don't forget to replace the default email address with mine
(j...@libdivecomputer.org).

Jef

Jean-Baptiste Martin

unread,
Jan 15, 2024, 9:11:47 AM1/15/24
to Subsurface Divelog
Email Sent.

Jean-Baptiste Martin

unread,
Jan 15, 2024, 9:13:25 AM1/15/24
to Subsurface Divelog
Procedure to be able to download is not simple : first go to Android Bluetooth manager, then activate Bluetooth on Tern, then go to Subsurface Mobile, Select Teric, and then select Tern in bluetooth list.

Callum Yeomans

unread,
Jan 21, 2024, 10:23:38 AM1/21/24
to Subsurface Divelog
I've also been having problems downloading log files using Subsurface with my Tern TX on Windows.
I pair it using the Windows Bluetooth manager, and then can access the info from Shearwater Cloud.

However when I use Subsurface I get the error "Dive data import error" with the following log file as per below;

Subsurface: v5.0.10, built with libdivecomputer v0.8.0-devel-Subsurface-NG (565bb2af027011101e9c4e840a8f49162ea4a752)
[0.000000] INFO: Open: transport=32
[0.003649] INFO: Configure: baudrate=115200, databits=8, parity=0, stopbits=0, flowcontrol=0
[0.003656] INFO: Timeout: value=3000
[0.003657] INFO: Sleep: value=300
[0.314163] INFO: Purge: direction=3
[0.325492] INFO: Write: size=10, data=0100FF010400228010C0
[3.339937] INFO: Read: size=0, data=
[3.339948] ERROR: Failed to receive the packet. [in src/shearwater_common.c:239 (shearwater_common_slip_read)]
[3.339956] ERROR: Failed to receive the response packet. [in src/shearwater_common.c:358 (shearwater_common_transfer)]
[3.339966] ERROR: Failed to read the serial number. [in src/shearwater_petrel.c:173 (shearwater_petrel_device_foreach)]
[3.340232] INFO: Write: size=11, data=0100FF0105002E902000C0

Martin Swanston

unread,
Jan 21, 2024, 12:05:00 PM1/21/24
to subsurfac...@googlegroups.com
Can I suggest you forget the connection in Bluetooth manager and add the dive computer directly in subsurface (middle button on the dive list screen)
image0.jpeg

On 21 Jan 2024, at 15:23, Callum Yeomans <callum....@gmail.com> wrote:

I've also been having problems downloading log files using Subsurface with my Tern TX on Windows.
--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

Callum Yeomans

unread,
Jan 22, 2024, 6:47:32 AM1/22/24
to Subsurface Divelog
For the record I tried using the mobile app on Android but had issues with it allowing me to select the connection type (no dropdown appeared after selecting Teric), so couldn't even attempt to connect.

After much trial and error I managed to connect the Tern once to Subsurface, after following a sequence of ensuring it connected to the Shearwater mobile app, then the Shearwater program on Windows and finally Subsurface.

What that says to me is there is nothing fundamentally incompatible, but now I have to hope it is actually usable when I want to download dives.
Much (if not all) of that appears to be on the Shearwater end..

Jean-Baptiste Martin

unread,
Jan 22, 2024, 7:46:55 AM1/22/24
to Subsurface Divelog
Screenshot_20240122-134334.jpgHello Callum,

Something i forgot to mention in my post. In order to download dive from mobile app (i never succeed on Win App), i first pair the Tern with the phone, and forced Subsurface Mobile to show all bluetooth devices in the Parameters. See picture :

Screenshot_20240122-134334.jpg

Callum Yeomans

unread,
Jan 23, 2024, 7:02:41 AM1/23/24
to subsurfac...@googlegroups.com
Thanks, that did the trick!
Looks like that'll be the most reliable method then, use the Subsurface app and sync to the cloud.

Appreciate the assistance.

You received this message because you are subscribed to a topic in the Google Groups "Subsurface Divelog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/subsurface-divelog/12yMpk3MGcA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/00e018f8-2b20-45e8-bd23-a119088e5718n%40googlegroups.com.

Jean-Baptiste Martin

unread,
Jan 23, 2024, 8:25:32 AM1/23/24
to Subsurface Divelog
You're welcome. 
We had to wait until the computer list being updated !!!

JB.

Jean-Baptiste Martin

unread,
Mar 22, 2024, 1:17:29 PM3/22/24
to Subsurface Divelog
Dear dev Team.

I would like to thank you ! I rencently update my android app, and i discovered that Tern is "natively" supported !!! No more need to use Teric profile !!!

Good job and many thanks !!!

vinsan...@gmail.com

unread,
May 7, 2024, 11:06:09 AM5/7/24
to Subsurface Divelog
You say an update in the last couple months? Do you know what your version subsurface-mobile is that has native support?

I just got a Tern and am also having trouble getting subsurface-mobile connected. Both my phones & Google Play website all believe the latest version of subsurface is 3.4.7(5.0.9.35) updated on Sep 19, 2022. It does not have Tern in the list of Shearwater computers, and does not detect my Tern properly. Is there a newer version I'm not seeing somehow?

My version is:
"0.004: Starting Subsurface-mobile:3.4.7(5.0.9.35):Android  (14.0):arm64:en-US"
"0.004: built with libdivecomputer v0.8.0-devel-Subsurface-NG (a17e466bd1d2e675666e20862182d618cf6d7190)"
"0.005: Running on Android  (14.0)"
"0.005: Pixel 7 Pro/google/cheetah"
...
Device found:  "Tern" "DD:CB:48:C7:67:AE" isLeScanResult: true Manufacturer data size: 0
"{fe25c237-0ece-443c-b0aa-e02033e7029d}"
"Discovered new device: 'Tern' [LE:DD:CB:48:C7:67:AE]: " not recognized as dive computer

If I turn on the "temporarily show all bluetooth devices.." then I can connect to it using the Teric profile.

Thanks all for the great work,
-Vinnie

Dirk Hohndel

unread,
May 7, 2024, 11:09:45 AM5/7/24
to Subsurface Divelog
late last year Subsurface changed its release model. For Google Playstore administrative (and some technical) reasons, we can no longer update the app in the Play Store (and since Google has been threatening to delete the app for six months now, one of these days I'm sure instead of just pushing out the deadline they will in fact simply remove it). You can find the current version (which you can install via side loading on your Android device) here: https://subsurface-divelog.org/current-release/

/D

Martin Swanston

unread,
May 7, 2024, 11:15:22 AM5/7/24
to subsurfac...@googlegroups.com
You need to try the new releases page and upgrade to the latest version for your device 

On 7 May 2024, at 16:09, 'Dirk Hohndel' via Subsurface Divelog <subsurfac...@googlegroups.com> wrote:

late last year Subsurface changed its release model. For Google Playstore administrative (and some technical) reasons, we can no longer update the app in the Play Store (and since Google has been threatening to delete the app for six months now, one of these days I'm sure instead of just pushing out the deadline they will in fact simply remove it). You can find the current version (which you can install via side loading on your Android device) here: https://subsurface-divelog.org/current-release/
--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

vinsan...@gmail.com

unread,
May 7, 2024, 12:06:37 PM5/7/24
to Subsurface Divelog
Well that sucks, because due to unrelated complications, I cannot side load SW on my phone. :( Sad to see Google getting in the way of SW distribution on Android. Guess that means I'm stuck in 2022, but since the old version supports my Perdix, I guess it's not the end of the world.

I did successfully side load the latest subsurface onto my wife's phone and it connects to her new Tern perfectly. So all is good there!

Thanks all!
-Vinnie

Dirk Hohndel

unread,
May 7, 2024, 12:35:26 PM5/7/24
to Subsurface Divelog
I'm curious about that. Even the harshest enterprise lock down on Android these days usually allows side loading in the 'other' profile. Most enterprises take over the work profile and you can do it in the regular one - I've now seen a couple that take over the whole phone, but then you usually can set up a work profile for additional stuff.

If your phone is so locked down that you can't do that either, then it is not your phone and I'd suggest not installing any software on it that isn't provided by the company that is obviously paying for that phone (because why else would you allow them to lock it down). Case in point, my employer makes employee phones essentially useless with their policies, so I carry two phones...

/D

vinsan...@gmail.com

unread,
May 7, 2024, 1:23:44 PM5/7/24
to Subsurface Divelog
Oh, hey Dirk! Just got done reading the thread where you described why the side loading is necessary. I had no idea so much of the maintenance of subsurface-mobile landed on one person. I think I speak for everyone by saying thank you so very much for all your hard work!!! Maybe something good come of qt6.6 having what's needed, but I completely understand if that's an indefinite future discussion because of the low ROI of porting. Wish I had the skill set to offer, but I have no experience on mobile devices.

My phone's response was actually a surprise to me, because as far as I can tell, it's not "the harshest enterprise lock down." Outside the "minimum pin length" I've actually never been prevented from doing anything at all on it. But it is what it is. Now that my wife's Tern is working on her phone (thank you all), I can live with the old SW for my Perdix on my phone. If Google does finally kick it out of the Play store, I'll have to get more serious about hard choices, but until then, my employeer takes plenty good care of me not to kick them off my phone.

Thank you again,
-Vinnie

Dirk Hohndel

unread,
May 7, 2024, 4:16:53 PM5/7/24
to Subsurface Divelog
In my experience most current Android phones with "light touch" enterprise lock down will refuse to side load an app.
Then you need to go into the Settings app and search for "Install unknown apps". On a Google device this is under Apps->Special app access, I believe Samsung devices hide it somewhere else. But usually a search will find it.
In the Install unknown apps settings you need to allow the tool that will trigger the install to do so. E.g., in my usual workflow I use Firefox to download the apk (friends don't let friends use Chrome), then I open the downloaded apk with a file manager, and THAT asks me if I want to install the apk. so IT needs to be listed as allowed to install apps.
Having the browser directly allowed to install apks is less ideal because that makes it easier for malware to come in - and that, for example, is prohibited in many security profiles.

So if you try these steps on your device, what do you get?
And what device is it? Which version of Android?

/D

vinsan...@gmail.com

unread,
May 7, 2024, 5:05:53 PM5/7/24
to Subsurface Divelog
When I properly set the access permissions on my app (in my case Astro) to install unknown SW, I get an Unknown apps can't be installed by this user."  This sounded very enterprise policy like, but when I complained to them, and they said that it wasn't them. So you are right, there is something else going on.

After some diffing. This article claims this is a bug introduced in December. https://piunikaweb.com/2023/12/26/fix-unknown-apps-cant-be-installed-issue-on-google-pixel/

Can't find any way to make this go away, however, side loading using ADB over USB does not appear to be impacted by whatever this is. So, Woohoo!! I have the newest subsurface-mobile build.

Thanks so much!
-Vinnie (Pixel 7, Android 14, subsurface-mobile 6.0.5112)

Dirk Hohndel

unread,
May 7, 2024, 5:31:53 PM5/7/24
to Subsurface Divelog
NICE!
Thanks for sharing this. Both the news about the weird bug, and the fact that you found a way around it for now.

Enjoy the current Subsurface!

/D
Reply all
Reply to author
Forward
0 new messages