I didn't know that. Thanks for the heads up!

In the beginning try to see if it connects to the device using this version.
It attempts to make a connection to the Serial Port Profile. Therefore, if
the
service is listening on RFCOMM channel 5, then it should successfully
connect.

If not, please apply the attached patch. This is just a temporary solution
:).
From 664e67fb248dd8fded44ab27d2d0cadaa1a74749 Mon Sep 17 00:00:00 2001
From: Claudiu Olteanu <olteanu.clau...@ymail.com>
Date: Mon, 29 Jun 2015 01:25:13 +0300
Subject: [PATCH 5/5] Use channel 5 for Shearwater Petrel 2 devices

This is a temporary solution for Shearwater Petrel 2 devices.

Signed-off-by: Claudiu Olteanu <olteanu.clau...@ymail.com>
---
 qtserialbluetooth.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qtserialbluetooth.cpp b/qtserialbluetooth.cpp
index 329907b..f9fae3b 100644
--- a/qtserialbluetooth.cpp
+++ b/qtserialbluetooth.cpp
@@ -48,8 +48,8 @@ static int qt_serial_open(serial_t **out, dc_context_t *context, const char* dev
 	timer.setSingleShot(true);
 	loop.connect(&timer, SIGNAL(timeout()), SLOT(quit()));
 
-	// Try to connect to the Serial Port Profile service
-	serial_port->socket->connectToService(QBluetoothAddress(devaddr), QBluetoothUuid::SerialPort);
+	// Try to connect to connect on 5 RFCOMM channel (only for Shearwater Petrel 2 devices)
+	serial_port->socket->connectToService(QBluetoothAddress(devaddr), 5);
 	timer.start(5000);
 	loop.exec();
 
-- 
2.1.4

_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to