Petrel 2 Download

Rick Walsh rickmwalsh at gmail.com
Sat May 16 16:42:53 PDT 2015


Anton,

Thanks for your advice.

On 16 May 2015 at 22:23, Anton Lundin <glance at acc.umu.se> wrote:
> I'm on a diving boat in the middle of the Baltic sea right now, and on my cell

Jealous.  But it's ok - I had a nice wall dive yesterday, and I'm
about to head down to a pier for a splash - last time I there I got
footage of a swimming blue-ringed octopus and saw a few seahorses.

, but to me it sounds like a pairing issue.
>
> Try bt-device yada connect something and re-pair the computer with your dongle.
>
> Link keys are kept by the os so if you paired that device with that dongle under a different os you need to re-pair the devices.
>

I don't have (on Fedora 22 beta-ish) bt-device, but I think
bluetoothctl is the equivalent command.  This is what it does for me.
I have the Petrel upload load countdown going the whole time, or start
again when it times out. **are my comments

[bluetooth]# scan on
Discovery started
[CHG] Controller 00:15:83:3D:0A:57 Discovering: yes
[NEW] Device 00:13:43:0E:6B:D0 Petrel
[CHG] Device 00:13:43:0E:6B:D0 RSSI: -70              **I've deleted
further similar rows - noise telling me signal strength
[bluetooth]# remove 00:13:43:0E:6B:D0
[DEL] Device 00:13:43:0E:6B:D0 Petrel
Device has been removed
[NEW] Device 00:13:43:0E:6B:D0 Petrel
[bluetooth]# pair 00:13:43:0E:6B:D0
Attempting to pair with 00:13:43:0E:6B:D0
Failed to pair: org.bluez.Error.AuthenticationFailed
**BT INIT FAIL on Petrel screen, restart upload log timer
[bluetooth]# trust 00:13:43:0E:6B:D0
[CHG] Device 00:13:43:0E:6B:D0 Trusted: yes          **It appears I
need to trust the device
Changing 00:13:43:0E:6B:D0 trust succeeded
[bluetooth]# remove 00:13:43:0E:6B:D0
[DEL] Device 00:13:43:0E:6B:D0 Petrel
Device has been removed
[bluetooth]# agent on         **I don't know what this actually means,
but I manage to get further with agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# remove 00:13:43:0E:6B:D0
[DEL] Device 00:13:43:0E:6B:D0 Petrel
Device has been removed
[NEW] Device 00:13:43:0E:6B:D0 Petrel
[bluetooth]# trust 00:13:43:0E:6B:D0
[CHG] Device 00:13:43:0E:6B:D0 Trusted: yes
Changing 00:13:43:0E:6B:D0 trust succeeded
[bluetooth]# pair 00:13:43:0E:6B:D0
Attempting to pair with 00:13:43:0E:6B:D0
Request PIN code
[agent] Enter PIN code: 0000        *Trying any other PIN gives BT
INIT FAIL on Petrel screen
[CHG] Device 00:13:43:0E:6B:D0 Connected: yes
[CHG] Device 00:13:43:0E:6B:D0 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device 00:13:43:0E:6B:D0 Paired: yes
Pairing successful
[CHG] Device 00:13:43:0E:6B:D0 Connected: no     **Countdown on Petrel
screen keeps going
[bluetooth]# connect 00:13:43:0E:6B:D0
Attempting to connect to 00:13:43:0E:6B:D0
[CHG] Device 00:13:43:0E:6B:D0 Connected: yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device 00:13:43:0E:6B:D0 Connected: no    **I can't connect for
more than a second or so

Does this mean anything to anyone?  This example was using the Petrel
supplied dongle - turned on with hcitools, and hci0 (onboard
bluetooth) turned off.

> //Anton - blending more gas.
>
> On May 16, 2015 10:41:37 AM GMT+02:00, Rick Walsh <rickmwalsh at gmail.com> wrote:
>>Hi,
>>
>>Has anyone has managed to download dives from a Shearwater Petrel 2 on
>>Linux?
>>
>>All my attempts have failed in one way or another, and I suspect there
>>might the a difference in the way the Petrel and Petrel 2 communicate.
>>They might look the same, and work the same (except for the compass),
>>but the Petrel 2 is advertised as Bluetooth Smart Ready (aka Bluetooth
>>Low Energy or BLE) and I wonder if this is significant.
>>
>>I posted about this previously, and Anton suggested
>>(http://lists.subsurface-divelog.org/pipermail/subsurface/2015-April/018859.html)
>>trying a different Bluetooth dongles to connect, and using the rfcomm
>>connect (as opposed to bind) command.  I went on a bit of a Bluetooth
>>dongle spree.
>>
>>I have tried 4 dongles/devices:
>>1. The onboard device on my laptop (does not support BLE according to
>>'hciconfig hci0 features')
>>2. The one that comes with the Petrel 2 (does not support BLE)
>>3. A cheap noname Bluetooth 2.0 dongle (does not support BLE)
>>4. A more expensive Targus Bluetooth 4.0 dongle (does support BLE)
>>
>>All devices will detect the Petrel with 'hcitool -i hci1 scan'.
>>
>>After activating the dongle (sudo hciconfig hci1 up auth), setting the
>>Petrel 2 to upload mode, and using the command 'sudo rfcomm -i hci1
>>connect /dev/rfcomm 00:13:43:0E:6B:D0', I get the the terminal
>>responses:
>>
>>For all devices except the Petrel 2 supplied dongle:
>>Can't connect RFCOMM socket: Connection refused
>>(the timer on the Petrel screen keeps counting down as if nothing has
>>happened)
>>
>>For the Petrel 2 supplied dongle:
>>Can't connect RFCOMM socket: Invalid exchange
>>(the Petrel displays BT INIT FAIL)
>>
>>I have also tried the libdivecomputer universal tool, built with Jef's
>>experimental native Bluetooth communication
>>(http://trac.libdivecomputer.org/ticket/14).  For all dongles, I get:
>>
>>[0.000028] DATETIME 2015-05-16T07:36:55Z (1431761815)
>>[0.000055] VERSION 0.5.0-devel
>>(4094f379aeb25d12fefd6b98d38f79ea6aeea634)
>>[0.000075] Opening the device (Shearwater Petrel, 00:13:43:0E:6B:D0).
>>[0.000107] INFO: Connect: address=00:13:43:0E:6B:D0, port=1
>>[2.300316] ERROR: Connection refused (111) [in bluetooth.c:320
>>(bluetooth_socket_connect)]
>>[2.300331] ERROR: Failed to connect. [in shearwater_common.c:53
>>(shearwater_common_open)]
>>[2.300353] universal.c:753: Error opening device.
>>[2.300359] Result: Input/output error
>>
>>I also tried the universal tool on Windows
>>(http://www.libdivecomputer.org/builds/experimental/windows/universal-bluetooth.exe),
>>but only using the onboard Bluetooth because I don't know how to
>>control which device is being used when I plug in a dongle.  I get a
>>slightly different log:
>>
>>[0.000008] DATETIME 2015-05-16T07:08:06Z (1431760086)
>>[0.000496] VERSION 0.5.0-devel
>>(fc7d2ca760c999b8917b2f83681f5c15f233096b)
>>[0.000823] Opening the device (Shearwater Petrel, 00:13:43:0e:6b:d0).
>>[0.013609] INFO: Connect: address=00:13:43:0e:6b:d0, port=1
>>[58.777923] ERROR: A connection attempt failed because the connected
>>party did not properly respond after a period of time, or established
>>connection failed because connected host has failed to respond (10060)
>>[in ../../source/src/bluetooth.c:265 (bluetooth_socket_connect)]
>>[58.779384] ERROR: Failed to connect. [in
>>../../source/src/shearwater_common.c:53 (shearwater_common_open)]
>>[58.780810] ../../source/examples/universal.c:681: Error opening
>>device.
>>[58.781196] Result: Input/output error
>>
>>On Windows, I can download with Subsurface fine (via COM5 serial
>>connection), and with the Shearwater Desktop application.  But I don't
>>like having to boot into Windows.
>>
>>As a side note, I managed to connect to the Petrel 2 using BLE with
>>the Targus dongle and the gatttool command, following a similar method
>>to
>>http://joost.damad.be/2013/08/experiments-with-bluetooth-low-energy.html.
>>Connect works, but I don't know what to do from there.
>>
>>Sorry for the long email, semi-repeating what I wrote previously, but
>>I'd really like to get this working, for me and hopefully help others.
>>Please let me know if there's anything I can do to get to the bottom
>>of this.
>>
>>Cheers,
>>
>>Rick
>


More information about the subsurface mailing list