<div dir="auto"><div>Hi Robert,<br><div class="gmail_extra"><br><div class="gmail_quote">On 18 Apr. 2017 11:59 am, "Robert Sevat" <<a href="mailto:robert@indylix.nl">robert@indylix.nl</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I am unable to setup a bluetooth connection with subsurface to my<br>
shearwater perdix on linux. I've run out of troubleshooting ideas. Maybe<br>
you guys have some pointers/ideas.<br>
---------------------<br>
System information:<br>
Arch linux 4.10.3-1-ARCH<br>
<br>
Bluetooth package information:<br>
bluez 5.44-1<br>
bluez-utils-compat 5.44-1<br>
<br>
Subsurface version: 4.6.3.235<br>
<br>
Shearwater Perdix system info:<br>
Features: 20080<br>
Firmware: v44/BT04<br>
<br>
Using the USB hardware bluetooth dongle that I got with the dive<br>
computer. It's recognized correctly: [31281.452921] usb 3-1.6: new<br>
full-speed USB device number 32 using ehci-pci<br>
<br>
bluetooth service is running:<br>
[robert@dt-rs ~]$ systemctl status bluetooth<br>
● bluetooth.service - Bluetooth service<br>
   Loaded: loaded (/usr/lib/systemd/system/<wbr>bluetooth.service; disabled;<br>
vendor preset: disabled)<br>
   Active: active (running) since Tue 2017-04-18 00:04:20 CEST; 20min ago<br>
     Docs: man:bluetoothd(8)<br>
 Main PID: 24599 (bluetoothd)<br>
   Status: "Running"<br>
    Tasks: 1 (limit: 4915)<br>
   CGroup: /system.slice/bluetooth.<wbr>service<br>
           └─24599 /usr/lib/bluetooth/bluetoothd<br>
---------------------<br>
<br>
I followed the guide in the faq (<a href="https://subsurface-divelog.org/faq/" rel="noreferrer" target="_blank">https://subsurface-divelog.<wbr>org/faq/</a>)<br>
'How do I download dives from my Shearwater Petrel 2 (or other Bluetooth<br>
dive computer) on Linux?'<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
All steps below are done while the dive computer is in it's 3 minute<br>
countdown in which you can connect to it.<br>
<br>
[robert@dt-rs]$ bluetoothctl -a<br>
[NEW] Controller 00:1A:7D:DA:71:14 DT-RS [default]<br>
[NEW] Device E2:70:EE:3B:89:1E Perdix<br>
Agent registered<br>
[bluetooth]# agent on<br>
Agent is already registered<br>
[bluetooth]# default-agent<br>
Default agent request successful<br>
[bluetooth]# scan on<br>
Discovery started<br>
[CHG] Controller 00:1A:7D:DA:71:14 Discovering: yes<br>
[CHG] Device E2:70:EE:3B:89:1E RSSI: -66<br>
[CHG] Device E2:70:EE:3B:89:1E RSSI: -75<br>
[CHG] Device E2:70:EE:3B:89:1E RSSI: -67<br>
[CHG] Device E2:70:EE:3B:89:1E RSSI: -77<br>
[bluetooth]# trust E2:70:EE:3B:89:1E<br>
[CHG] Device E2:70:EE:3B:89:1E Trusted: yes<br>
Changing E2:70:EE:3B:89:1E trust succeeded<br>
[CHG] Device E2:70:EE:3B:89:1E RSSI: -68<br>
[bluetooth]# pair E2:70:EE:3B:89:1E<br>
Attempting to pair with E2:70:EE:3B:89:1E<br>
[CHG] Device E2:70:EE:3B:89:1E Connected: yes<br>
[NEW] Primary Service<br>
    /org/bluez/hci0/dev_E2_70_EE_<wbr>3B_89_1E/service000a<br>
    00001801-0000-1000-8000-<wbr>00805f9b34fb<br>
    Generic Attribute Profile<br>
[NEW] Primary Service<br>
    /org/bluez/hci0/dev_E2_70_EE_<wbr>3B_89_1E/service000b<br>
    fe25c237-0ece-443c-b0aa-<wbr>e02033e7029d<br>
    Vendor specific<br>
[NEW] Characteristic<br>
    /org/bluez/hci0/dev_E2_70_EE_<wbr>3B_89_1E/service000b/char000c<br>
    27b7570b-359e-45a3-91bb-<wbr>cf7e70049bd2<br>
    Vendor specific<br>
[NEW] Descriptor<br>
    /org/bluez/hci0/dev_E2_70_EE_<wbr>3B_89_1E/service000b/char000c/<wbr>desc000e<br>
    00002902-0000-1000-8000-<wbr>00805f9b34fb<br>
    Client Characteristic Configuration<br>
[NEW] Descriptor<br>
    /org/bluez/hci0/dev_E2_70_EE_<wbr>3B_89_1E/service000b/char000c/<wbr>desc000f<br>
    00002901-0000-1000-8000-<wbr>00805f9b34fb<br>
    Characteristic User Description<br>
[CHG] Device E2:70:EE:3B:89:1E UUIDs: 00001800-0000-1000-8000-<wbr>00805f9b34fb<br>
[CHG] Device E2:70:EE:3B:89:1E UUIDs: 00001801-0000-1000-8000-<wbr>00805f9b34fb<br>
[CHG] Device E2:70:EE:3B:89:1E UUIDs: fe25c237-0ece-443c-b0aa-<wbr>e02033e7029d<br>
[CHG] Device E2:70:EE:3B:89:1E ServicesResolved: yes<br>
[CHG] Device E2:70:EE:3B:89:1E Paired: yes<br>
Pairing successful<br>
[Perdix]# info E2:70:EE:3B:89:1E<br>
Device E2:70:EE:3B:89:1E<br>
    Name: Perdix<br>
    Alias: Perdix<br>
    Paired: yes<br>
    Trusted: yes<br>
    Blocked: no<br>
    Connected: yes<br>
    LegacyPairing: no<br>
    UUID: Generic Access Profile    (00001800-0000-1000-8000-<wbr>00805f9b34fb)<br>
    UUID: Generic Attribute Profile (00001801-0000-1000-8000-<wbr>00805f9b34fb)<br>
    UUID: Vendor specific           (fe25c237-0ece-443c-b0aa-<wbr>e02033e7029d)<br>
    RSSI: -68<br>
<br>
<br>
<br>
So after successfully pairing I try to setup the RFCOMM connection.<br>
(note it did not ask for a pin: 0000, even though it's in 'AUTH' mode as<br>
can be seen below in the hciconfig output)<br>
<br>
[robert@dt-rs ~]$ sudo hciconfig<br>
hci0:    Type: Primary  Bus: USB<br>
    BD Address: 00:1A:7D:DA:71:14  ACL MTU: 310:10  SCO MTU: 64:8<br>
    UP RUNNING INQUIRY AUTH<br>
    RX bytes:41250 acl:48 sco:0 events:2165 errors:0<br>
    TX bytes:10476 acl:40 sco:0 commands:883 errors:0<br>
<br>
[robert@dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0<br>
E2:70:EE:3B:89:1E<br>
Can't connect RFCOMM socket: Host is down<br>
[robert@dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0<br>
E2:70:EE:3B:89:1E 2<br>
Can't connect RFCOMM socket: Host is down<br>
[robert@dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0<br>
E2:70:EE:3B:89:1E 3<br>
Can't connect RFCOMM socket: Host is down<br>
[robert@dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0<br>
E2:70:EE:3B:89:1E 4<br>
Can't connect RFCOMM socket: Host is down<br>
[robert@dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0<br>
E2:70:EE:3B:89:1E 5<br>
Can't connect RFCOMM socket: Host is down<br>
[robert@dt-rs ~]$ sudo rfcomm -i hci0 connect /dev/rfcomm0<br>
E2:70:EE:3B:89:1E 6<br>
Can't connect RFCOMM socket: Host is down<br>
[robert@dt-rs ~]$ sudo sdptool -i hci0 records E2:70:EE:3B:89:1E<br>
Failed to connect to SDP server on E2:70:EE:3B:89:1E: Host is down<br>
<br>
It fails to setup the RFCOMM connection on channels 1-6, nor is it able<br>
to lookup what channel it should be. It gets 'host is down'.<br>
<br>
Any ideas how I can setup a RFCOMM connection successfully? My user is a<br>
member of the 'uucp' group (equivalent to 'dialout') and is able to<br>
successfully download dives from my Suunto Zoop computer. But my new<br>
Shearwater Perdix via bluetooth fails.<br>
<br>
I've also tried the graphical application 'blueman' which fails the same<br>
way.<br>
<br>
What's weird is that after pairing if I disable the bluetooth controller<br>
and enable it again I can no longer 'connect' to the perdix. As seen in<br>
the output below:<br>
<br>
[bluetooth]# info E2:70:EE:3B:89:1E<br>
Device E2:70:EE:3B:89:1E<br>
    Name: Perdix<br>
    Alias: Perdix<br>
    Paired: yes<br>
    Trusted: yes<br>
    Blocked: no<br>
    Connected: no<br>
    LegacyPairing: no<br>
    UUID: Generic Access Profile    (00001800-0000-1000-8000-<wbr>00805f9b34fb)<br>
    UUID: Generic Attribute Profile (00001801-0000-1000-8000-<wbr>00805f9b34fb)<br>
    UUID: Vendor specific           (fe25c237-0ece-443c-b0aa-<wbr>e02033e7029d)<br>
[bluetooth]# connect E2:70:EE:3B:89:1E<br>
Attempting to connect to E2:70:EE:3B:89:1E<br>
[CHG] Device E2:70:EE:3B:89:1E Connected: yes<br>
[CHG] Device E2:70:EE:3B:89:1E Connected: no<br>
Connection successful<br>
<br>
It does say 'connection successful' but the 'connected: no' stays on no<br>
after that. While in the very initial pairing that did go to 'yes'.<br>
<br>
Any pointers/help is appreciated. I am willing to run subsurface<br>
development versions. I'd rather not have to boot my windows install to<br>
use my new dive computer :p<br>
<br>
Kind Regards,<br>
Robert Sevat<br>
<br>
<br>
<br>______________________________<wbr>_________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.<wbr>org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer" target="_blank">http://lists.subsurface-<wbr>divelog.org/cgi-bin/mailman/<wbr>listinfo/subsurface</a><br>
<br></blockquote></div><br></div></div></div>