MySSI QR Code

339 views
Skip to first unread message

Michael Kew

unread,
Nov 20, 2019, 5:00:31 PM11/20/19
to Subsurface Divelog
Here's a quick one, since the new SSI divelog uses QR Codes to share data between users, how difficult would it be to enable subsurface to generate these QR codes so that those of us who use subsurface can easily share dive info to their SSI accounts, and also to their buddies? Seems like all the data is held in the QR code itself so shouldn't this be easy?


Thanks!

Linus Torvalds

unread,
Nov 20, 2019, 6:29:14 PM11/20/19
to Subsurface Divelog
On Wed, Nov 20, 2019 at 2:00 PM Michael Kew <neom...@gmail.com> wrote:
>
> Here's a quick one, since the new SSI divelog uses QR Codes to share data between users

It's almost certainly just a pointer to a web address (or a hash that
they then turn into a "look up cloud data". There generally simply
isn't enough space in the QR code itself to hold more than the bare
minimum dive data.

The most common QR code formats are just 50 bytes of data, although
the bigger 174-byte QR codes are still quite manageable. Enough to
have some very basic dive data, but not really a profile, for example.

Yeah, yeah, in theory you can do up to 1.2kB in a QR code, but I've
never seen one that does that.

You can use any of the barcode readers on Android to decode the QR
code and check what data it is. But it's likely just a web address or
similar, and then the real data transfer is from downloading it from
there.

> how difficult would it be to enable subsurface to generate these QR codes so that those of us who use subsurface can easily share dive info to their SSI accounts, and also to their buddies? Seems like all the data is held in the QR code itself so shouldn't this be easy?

See above: it's likely not the real dive data, just a pointer into the
SSI website.

Linus

Paul Buxton

unread,
Nov 20, 2019, 11:59:46 PM11/20/19
to subsurfac...@googlegroups.com
Surprisingly they are not doing a url but the actual dive data!

It is not a detailed dive log , so weighs about 500 bytes, but looks
like something that could be parsed easily enough.
I plugged the screenshot from here
http://www.eagle-divers.com/scuba-news/item/digital-dive-logging into
an online reader https://online-barcode-reader.inliteresearch.com/
and the output data looks like this


dive;noid;dive_type:0;datetime:201811281233;divetime:53;depth_m:
18;site:3314;var_weather_id:1;var_entry_id:21;var_water_body_id:
13;var_watertype_id:5;var_current_id:6;var_surface_id:10;var_div
etype_id:24;user_master_id:1419265;user_firstname:Hannah;user_la
stname:Brown;user_leader_id:85539;watertemp_c:26;airtemp_c:26;vi
s_m:20

So we could certainly be able to parse this and extract most of the
interesting data, generating one might be a different matter as it
looks like they have an online database of users and dive sites amd we
would likely need to be able to fill those in with something valid for
the SSI app to accept them.
> --
> 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/CAHk-%3DwgY0-eV3UyxGqyBoanLkO44Hiy865B_On3x_Bpubc9w8g%40mail.gmail.com.

Robert Helling

unread,
Nov 21, 2019, 7:29:30 AM11/21/19
to 'Robert C. Helling' via Subsurface Divelog
Hi,

> On 21. Nov 2019, at 05:59, 'Paul Buxton' via Subsurface Divelog <subsurfac...@googlegroups.com> wrote:
>
> Surprisingly they are not doing a url but the actual dive data!
>
> It is not a detailed dive log , so weighs about 500 bytes, but looks
> like something that could be parsed easily enough.
> I plugged the screenshot from here
> http://www.eagle-divers.com/scuba-news/item/digital-dive-logging into
> an online reader https://online-barcode-reader.inliteresearch.com/
> and the output data looks like this
>
>
> dive;noid;dive_type:0;datetime:201811281233;divetime:53;depth_m:
> 18;site:3314;var_weather_id:1;var_entry_id:21;var_water_body_id:
> 13;var_watertype_id:5;var_current_id:6;var_surface_id:10;var_div
> etype_id:24;user_master_id:1419265;user_firstname:Hannah;user_la
> stname:Brown;user_leader_id:85539;watertemp_c:26;airtemp_c:26;vi
> s_m:20
>
> So we could certainly be able to parse this and extract most of the
> interesting data, generating one might be a different matter as it
> looks like they have an online database of users and dive sites amd we
> would likely need to be able to fill those in with something valid for
> the SSI app to accept them.
>

I installed the SSI app and manually created some dives and their QR codes. Indeed, most of this would be very easy to do (at least at the text string level and with some library also for creating QR codes, less so for parsing them). Only three keys appear to be somewhat problematic: site, user_master_id and user_leader_id: Those seem to be indices into some SSI database. The two user id’s probably don’t change, so we could obtain them for every user, but the dive site we can’t directly get right.

I poked a bit with wireshark into the application calling home but this data ist not obvious from the captures and I was to lazy to run mitmproxy.

Robert
signature.asc

Paul Buxton

unread,
Nov 21, 2019, 10:02:54 AM11/21/19
to subsurfac...@googlegroups.com
Will it let you create a dive without specifying a dive site? If so we could simply leave it out or use whatever null identifier they use.

--
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.

Ben Doherty

unread,
Aug 29, 2023, 2:06:39 PM8/29/23
to Subsurface Divelog
This is a bit of an old thread, but I did a bit of playing around, I thought I'd share the (tiny) progress I made. 

I am trying to convert an old, and quite crusty, log, so that I can put it into the SSI app. (I don't actually want it to live in there, I just wanted it in there to keep them happy if I'm doing courses.)
I made a spreadsheet that can generate the package for the QR code. It works, but for some reason doesn't show in the spreadsheet cell.

As far as I can tell, there's a tonne of enums in here that if SSI documented them, would make it pretty easy to make into an export function.
The ones that are tricky are location and person IDs, but this works to scaffold the dive, and you can go back and edit it to make it perfect

Gabriele Profita

unread,
Sep 10, 2023, 4:24:25 PM9/10/23
to Subsurface Divelog
This seems extremely interesting and useful, how did you export all that?
I've recently discovered you can also show QR codes directly into Google Sheets using the IMAGE function and encoding the URL,
that might be better than having the URL pointing to the QR code.

What I did was replace the formula in your first row with this one:
=IMAGE("https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl="&ENCODEURL(AD4)&"&choe=UTF-8")

This way you can get direct QR codes, ready to be scanned, now if Subsurface could create those automatically it would be awesome!
QR_google_sheets.png
Reply all
Reply to author
Forward
0 new messages