SubsurfacePi report

Robert Helling helling at lmu.de
Mon Apr 18 07:16:55 PDT 2016


Hi,

this is a progress (or rather less progress) report on what I have done with my Raspberry Pi as a connection device between dive computer and Phone.

I send this not because I consider it done but rather since after spending three evenings on this and now holding the freshly arrive CHIP’s in my hands, I thought I share this before moving on to a different target.

As I said earlier (and in divergence with Dirk’s goals regarding bluetooth, but please consider this as part of a brain storming effort), I wanted to do the following (as this seemed like the lowest hanging fruit for me):

Set up the Pi (or any other linux device) such that it boots into a Wifi access point mode (“0 conf”) in which it will respond to a HTTP request which triggers a download from the dive computer to a (device local) git repository and then act as a git server to be synched from the phone (pretty much like the cloud server).

If that would work the user would have to make the phone connect to that access point (although http://doc.qt.io/QtForDeviceCreation/qtfordevicecreation-wifi-wifi-cpp-example.html <http://doc.qt.io/QtForDeviceCreation/qtfordevicecreation-wifi-wifi-cpp-example.html> sounds as if that could be done from within subsurface) and then go to the app, select a dive computer and initiate download and sync.

Note that at this point I did not attempt to connect the RPi to the internet via wifi or cable (but for development, I have of course connected the RPi to my laptop with a patch cable but the user would not do that).

That was the plan, here is what works and what doesn’t:

I have the RPi acting as an access point and my iPhone connects to it (and for example I can access the RPi’s web server with safari). It does not yet boot into that state for unknown reasons, I still have to ifconfig manually, but that sounds solvable. I run a dhcp server that gives the IPhone a local IP address but so far (I have not really tried), there is no DNS. Also, the connection does take very long to set up (as I understand, but I have not investigated this further so far), upon receiving data from DHCP, the iPhone tries to reach a page on the apple.com <http://apple.com/> web server to test if it really has internet connectivity. That of course does not work, but with DNS, I should be able to tell the phone that I am apple.com <http://apple.com/> (no SSL here) and that should hopefully satisfy it.

I also have patched a headless version of subsurface that runs on the RPi. It uses default settings for dive computer and git repository (so far, that means I have to run the full version before, but configuring dive computer and repository is of course straight forward) and just downloads the recent dives from the dive computer into the repository. I can also pull that repository from the laptop. Hooking up this headless subsurface to a cgi-script should also be easy.

What I have not succeeded so far is to patch subsurface mobile on my phone that instead of Dirk’s cloud server it talks to the repository on the RPi. This might be the next thing to try.

And of course I will play with the CHIP. Their restriction to composite video makes it slightly harder to get started, since I need some display for that (will probably use the projector at home) to make it connect to wifi so I can access it form a different computer.

Any comments and suggestions welcome.

Dirk, where can I learn about your efforts with BT?

Best
Robert

--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                      Scientific Coordinator
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339
                      http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and
DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160418/1feb7379/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160418/1feb7379/attachment-0001.sig>


More information about the subsurface mailing list