subsurface 4.9.3: BT LE download from Shearwater Perdix does not work

54 views
Skip to first unread message

Marc MERLIN

unread,
Oct 28, 2019, 1:54:29 AM10/28/19
to Subsurface Divelog
I'm using debian with linux 5.1.21. I downloaded the apt package from the subsurface repo.
It loads properly, I was able to pair my dive computer using blueman-manager

In subsurface's discovered devices, I see:
Perdix xxxx [State: AUTHORIZED_PAIRED]
log shows:
Bluez 5 detected.
Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.
Creating QtBluezDiscoveryManager
Discovered:  "D6:CD:3C:A4:43:28" "Perdix" Num UUIDs 3 total device 5 cached RSSI 0 Class 0
void QBluetoothDeviceDiscoveryAgentPrivate::stop()

When I click save, and download, it fails:
unable to open LE:xxxxxx Shearwater (Perdix)
Starting download from  BT
downloading only new dives
Finishing download thread: "Unable to open LE:D6:CD:3C:A4:43:28 Shearwater (Perdix)"

If I pair it with my android phone, it does work and bluetooth downloading works.

Any idea what I can do to debug linux further?

Thank you,
Marc

Linus Torvalds

unread,
Oct 28, 2019, 7:45:11 AM10/28/19
to Subsurface Divelog
Hi Marc,
 This sounds like the traditional problem with older Qt libraries not playing particularly well with bluez. 

It can be made to work, but generally only if you about using the system pairing entirely, and if you have the right Qt library versions.

Things are much better with Qt-5.12.x (and probably Qt-5.13, I haven't tested)

I'm not sure what version your Debian system has..

      Linus

Marc MERLIN

unread,
Oct 28, 2019, 1:46:30 PM10/28/19
to Subsurface Divelog
On Monday, October 28, 2019 at 4:45:11 AM UTC-7, Linus Torvalds wrote:
Hi Marc,

Hi Linus. Thanks for the recommendation on the Perdrix AI, I do like it so far (going to Palau to try it out in 10 days :) ).
 
 This sounds like the traditional problem with older Qt libraries not playing particularly well with bluez. 
It can be made to work, but generally only if you about using the system pairing entirely, and if you have the right Qt library versions.
Things are much better with Qt-5.12.x (and probably Qt-5.13, I haven't tested)

I indeed have 5.11:
saruman:~$ ldd /usr/bin/subsurface |grep -i blue
libQt5Bluetooth.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Bluetooth.so.5 (0x00007fe45266c000)
saruman:~$ l /usr/lib/x86_64-linux-gnu/libQt5Bluetooth.so.5
lrwxrwxrwx 1 root root 25 Dec 26  2018 /usr/lib/x86_64-linux-gnu/libQt5Bluetooth.so.5 -> libQt5Bluetooth.so.5.11.3

I'm not sure what version your Debian system has..

Unfortunately, it's the latest version in debian/testing:
saruman:~$ sudo apt-get install -t testing libqt5bluetooth5:amd64
libqt5bluetooth5 is already the newest version (5.11.3-2).

Looks like 5.12 is available in debian/unstable, but upgrading to that upgrades and removes a lot of packages and may put me in a state that won't be too good.

So, I just tried the 4.9.1 appimage since someone said BT worked there, but it crashes on start:
Auto configuration failed
140737115392448:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
140737115392448:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
140737115392448:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
140737115392448:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf
QMutex: destroying locked mutex
[Thread 0x7fffd9cbf700 (LWP 19886) exited]
[Thread 0x7fffda69b700 (LWP 19885) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2b8d420 in QAbstractEventDispatcherPrivate::allocateTimerId() ()
   from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
(gdb) bt
#0  0x00007ffff2b8d420 in QAbstractEventDispatcherPrivate::allocateTimerId() ()
   from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#1  0x00007ffff2b8d959 in QAbstractEventDispatcher::registerTimer(int, Qt::TimerType, QObject*) ()
   from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#2  0x00007ffff2b8e0e8 in QBasicTimer::start(int, QObject*) () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#3  0x00007ffff424a85d in ?? () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Widgets.so.5
#4  0x00007ffff2bba2af in QMetaObject::activate(QObject*, int, int, void**) ()
   from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#5  0x00007ffff2bbaf3f in QObject::destroyed(QObject*) () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#6  0x00007ffff2bc2b56 in QObject::~QObject() () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#7  0x00007ffff2474e4c in __run_exit_handlers (status=1, listp=0x7ffff25f6718 <__exit_funcs>, 
    run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#8  0x00007ffff2474f7a in __GI_exit (status=<optimized out>) at exit.c:139
#9  0x00007ffff186bcf9 in OPENSSL_config () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libcrypto.so.1.0.0
#10 0x00007ffff308782a in ?? () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Network.so.5
#11 0x00007ffff3089589 in ?? () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Network.so.5
#12 0x00007ffff306b6d7 in QSslCertificate::QSslCertificate(QByteArray const&, QSsl::EncodingFormat) ()
   from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Network.so.5
#13 0x00007ffff306e509 in QSslConfiguration::QSslConfiguration() () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Network.so.5
#14 0x00007ffff2fe7de8 in ?? () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Network.so.5
#15 0x00007ffff2ff0f75 in ?? () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Network.so.5
#16 0x00007ffff2fcc374 in QNetworkAccessManager::createRequest(QNetworkAccessManager::Operation, QNetworkRequest const&, QIODevice*)
    () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Network.so.5
#17 0x00007ffff2fc8904 in QNetworkAccessManager::get(QNetworkRequest const&) ()
   from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Network.so.5
#18 0x00007fffd8c88df3 in QGeoTileFetcherGooglemaps::getTileImage(QGeoTileSpec const&) ()
   from /tmp/.mount_subsurhFrzdo/usr/plugins/geoservices/libqtgeoservices_googlemaps.so
#19 0x00007fffd8d3cc6b in QGeoTileFetcher::requestNextTile() ()
   from /tmp/.mount_subsurhFrzdo/usr/qml/QtLocation/../../lib/libQt5Location.so.5
#20 0x00007ffff2bbb9c4 in QObject::event(QEvent*) () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#21 0x00007ffff401888c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Widgets.so.5
#22 0x00007ffff401f970 in QApplication::notify(QObject*, QEvent*) () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Widgets.so.5
#23 0x00007ffff2b90ca5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#24 0x00007ffff2be17ee in QTimerInfoList::activateTimers() () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#25 0x00007ffff2be1e31 in ?? () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#26 0x00007fffeffcde0e in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007fffeffce0a8 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007fffeffce13c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ffff2be215c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#30 0x00007ffff2b8ee0b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#31 0x00007ffff2b97594 in QCoreApplication::exec() () from /tmp/.mount_subsurhFrzdo/usr/bin/../lib/libQt5Core.so.5
#32 0x00000000004ff75f in main (argc=1, argv=<optimized out>)
    at /home/travis/build/Subsurface-divelog/subsurface/subsurface-desktop-main.cpp:116


What would be the next best step to try?

Thanks,
Marc

Marc MERLIN

unread,
Oct 28, 2019, 10:32:48 PM10/28/19
to Subsurface Divelog
On Monday, October 28, 2019 at 10:46:30 AM UTC-7, Marc MERLIN wrote:
So, I just tried the 4.9.1 appimage since someone said BT worked there, but it crashes on start:
Auto configuration failed

Just to confirm, the 4.9.3 appimage does not crash, but indeed when I try to select the bluetooth menu, nothing pops up, so BT is likely not working in that build.

Marc 
 

Marc MERLIN

unread,
Nov 3, 2019, 4:30:48 PM11/3/19
to Subsurface Divelog
Ok, I got it working through a not great but working workaround:
1) docker run -t -i --privileged --net=host --env="DISPLAY" -v "$HOME/.Xauthority:/root/.Xauthority:rw" ubuntu
2) apt-get install a bunch of things, including  software-properties-common
3) add-apt-repository ppa:subsurface/subsurface
4) apt-get install bluez bluez-hcidump bluez-obexd subsurface dbus
5) on the host /etc/init.d/bluetooth stop
6) /etc/init.d/dbus start
7) /usr/sbin/bluetoothd --debug &
8) subsurface  --allow_run_as_root 
Reply all
Reply to author
Forward
0 new messages