Petrel 2 Download
rickmwalsh at gmail.com
Sat May 16 01:41:37 PDT 2015
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
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
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
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
[2.300331] ERROR: Failed to connect. [in shearwater_common.c:53
[2.300353] universal.c:753: Error opening device.
[2.300359] Result: Input/output error
I also tried the universal tool on Windows
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
[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
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
More information about the subsurface