Failing to connect to shearwater perdix on linux with subsurface

Rick Walsh rickmwalsh at gmail.com
Mon Apr 17 19:40:37 PDT 2017


Hi Robert,

On 18 Apr. 2017 11:59 am, "Robert Sevat" <robert at indylix.nl> wrote:

Hello,

I am unable to setup a bluetooth connection with subsurface to my
shearwater perdix on linux. I've run out of troubleshooting ideas. Maybe
you guys have some pointers/ideas.
---------------------
System information:
Arch linux 4.10.3-1-ARCH

Bluetooth package information:
bluez 5.44-1
bluez-utils-compat 5.44-1

Subsurface version: 4.6.3.235

Shearwater Perdix system info:
Features: 20080
Firmware: v44/BT04

Using the USB hardware bluetooth dongle that I got with the dive
computer. It's recognized correctly: [31281.452921] usb 3-1.6: new
full-speed USB device number 32 using ehci-pci

bluetooth service is running:
[robert at dt-rs ~]$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; disabled;
vendor preset: disabled)
   Active: active (running) since Tue 2017-04-18 00:04:20 CEST; 20min ago
     Docs: man:bluetoothd(8)
 Main PID: 24599 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/bluetooth.service
           └─24599 /usr/lib/bluetooth/bluetoothd
---------------------

I followed the guide in the faq (https://subsurface-divelog.org/faq/)
'How do I download dives from my Shearwater Petrel 2 (or other Bluetooth
dive computer) on Linux?'


We should update the faq. Can you please try the "native bluetooth" method
in the user manual? It is much easier. The rfcomm method was necessary for
earlier versions of subsurface but is not very user friendly.

Now, hopefully that works. But it may not. My understanding is that it
should work with the original Perdix but more recent units and the Perdix
ai do not support ordinary bluetooth, only Bluetooth LE. Work is underway
to support BLE in subsurface but it's not there yet.


All steps below are done while the dive computer is in it's 3 minute
countdown in which you can connect to it.

[robert at dt-rs]$ bluetoothctl -a
[NEW] Controller 00:1A:7D:DA:71:14 DT-RS [default]
[NEW] Device E2:70:EE:3B:89:1E Perdix
Agent registered
[bluetooth]# agent on
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:14 Discovering: yes
[CHG] Device E2:70:EE:3B:89:1E RSSI: -66
[CHG] Device E2:70:EE:3B:89:1E RSSI: -75
[CHG] Device E2:70:EE:3B:89:1E RSSI: -67
[CHG] Device E2:70:EE:3B:89:1E RSSI: -77
[bluetooth]# trust E2:70:EE:3B:89:1E
[CHG] Device E2:70:EE:3B:89:1E Trusted: yes
Changing E2:70:EE:3B:89:1E trust succeeded
[CHG] Device E2:70:EE:3B:89:1E RSSI: -68
[bluetooth]# pair E2:70:EE:3B:89:1E
Attempting to pair with E2:70:EE:3B:89:1E
[CHG] Device E2:70:EE:3B:89:1E Connected: yes
[NEW] Primary Service
    /org/bluez/hci0/dev_E2_70_EE_3B_89_1E/service000a
    00001801-0000-1000-8000-00805f9b34fb
    Generic Attribute Profile
[NEW] Primary Service
    /org/bluez/hci0/dev_E2_70_EE_3B_89_1E/service000b
    fe25c237-0ece-443c-b0aa-e02033e7029d
    Vendor specific
[NEW] Characteristic
    /org/bluez/hci0/dev_E2_70_EE_3B_89_1E/service000b/char000c
    27b7570b-359e-45a3-91bb-cf7e70049bd2
    Vendor specific
[NEW] Descriptor
    /org/bluez/hci0/dev_E2_70_EE_3B_89_1E/service000b/char000c/desc000e
    00002902-0000-1000-8000-00805f9b34fb
    Client Characteristic Configuration
[NEW] Descriptor
    /org/bluez/hci0/dev_E2_70_EE_3B_89_1E/service000b/char000c/desc000f
    00002901-0000-1000-8000-00805f9b34fb
    Characteristic User Description
[CHG] Device E2:70:EE:3B:89:1E UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device E2:70:EE:3B:89:1E UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device E2:70:EE:3B:89:1E UUIDs: fe25c237-0ece-443c-b0aa-e02033e7029d
[CHG] Device E2:70:EE:3B:89:1E ServicesResolved: yes
[CHG] Device E2:70:EE:3B:89:1E Paired: yes
Pairing successful
[Perdix]# info E2:70:EE:3B:89:1E
Device E2:70:EE:3B:89:1E
    Name: Perdix
    Alias: Perdix
    Paired: yes
    Trusted: yes
    Blocked: no
    Connected: yes
    LegacyPairing: no
    UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
    UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
    UUID: Vendor specific           (fe25c237-0ece-443c-b0aa-e02033e7029d)
    RSSI: -68



So after successfully pairing I try to setup the RFCOMM connection.
(note it did not ask for a pin: 0000, even though it's in 'AUTH' mode as
can be seen below in the hciconfig output)

[robert at dt-rs ~]$ sudo hciconfig
hci0:    Type: Primary  Bus: USB
    BD Address: 00:1A:7D:DA:71:14  ACL MTU: 310:10  SCO MTU: 64:8
    UP RUNNING INQUIRY AUTH
    RX bytes:41250 acl:48 sco:0 events:2165 errors:0
    TX bytes:10476 acl:40 sco:0 commands:883 errors:0

[robert at dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0
E2:70:EE:3B:89:1E
Can't connect RFCOMM socket: Host is down
[robert at dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0
E2:70:EE:3B:89:1E 2
Can't connect RFCOMM socket: Host is down
[robert at dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0
E2:70:EE:3B:89:1E 3
Can't connect RFCOMM socket: Host is down
[robert at dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0
E2:70:EE:3B:89:1E 4
Can't connect RFCOMM socket: Host is down
[robert at dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0
E2:70:EE:3B:89:1E 5
Can't connect RFCOMM socket: Host is down
[robert at dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0
E2:70:EE:3B:89:1E 6
Can't connect RFCOMM socket: Host is down
[robert at dt-rs ~]$ sudo sdptool -i hci0 records E2:70:EE:3B:89:1E
Failed to connect to SDP server on E2:70:EE:3B:89:1E: Host is down

It fails to setup the RFCOMM connection on channels 1-6, nor is it able
to lookup what channel it should be. It gets 'host is down'.

Any ideas how I can setup a RFCOMM connection successfully? My user is a
member of the 'uucp' group (equivalent to 'dialout') and is able to
successfully download dives from my Suunto Zoop computer. But my new
Shearwater Perdix via bluetooth fails.

I've also tried the graphical application 'blueman' which fails the same
way.

What's weird is that after pairing if I disable the bluetooth controller
and enable it again I can no longer 'connect' to the perdix. As seen in
the output below:

[bluetooth]# info E2:70:EE:3B:89:1E
Device E2:70:EE:3B:89:1E
    Name: Perdix
    Alias: Perdix
    Paired: yes
    Trusted: yes
    Blocked: no
    Connected: no
    LegacyPairing: no
    UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
    UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
    UUID: Vendor specific           (fe25c237-0ece-443c-b0aa-e02033e7029d)
[bluetooth]# connect E2:70:EE:3B:89:1E
Attempting to connect to E2:70:EE:3B:89:1E
[CHG] Device E2:70:EE:3B:89:1E Connected: yes
[CHG] Device E2:70:EE:3B:89:1E Connected: no
Connection successful

It does say 'connection successful' but the 'connected: no' stays on no
after that. While in the very initial pairing that did go to 'yes'.

Any pointers/help is appreciated. I am willing to run subsurface
development versions. I'd rather not have to boot my windows install to
use my new dive computer :p

Kind Regards,
Robert Sevat



_______________________________________________
subsurface mailing list
subsurface at subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170418/ca3a31ce/attachment-0001.html>


More information about the subsurface mailing list