[PATCH] Bluetooth support for Android
Claudiu Olteanu
olteanu.vasilica.claudiu at gmail.com
Mon Jul 13 13:53:56 PDT 2015
Hi there,
I attached some patches which can be used to fix the issues
related to Bluetooth connectivity on Android platforms.
On Android, a connection to a service cannot be established
using a port. The first patch should fix this issue using the uuid
of the SPP service on the connection step.
On my device with a Android 5.1.1 I observed that if I start the
download process without waiting for the scanning process to
end, then the devices gets stuck after downloading a few
packages. I did over 20 tests for both my dive computers
(HW OSTC2 and HW OSTCs) and I got the same results.
I looked over the Android logs using the logcat tool and I saw
that the download mode always gets stuck when the scanning
process is stopped. I am not sure if this is a bug on the Android
platform, or on the Qt framework.
You can find some logs below.
For the moment I created a patch which blocks the save
button until the scanning process is finished.
Best wishes,
Claudiu
[ 07-13 21:24:09.687 11588:11772 D/Subsurface ]
(null):0 ((null)): [SUBSURFACE] read 1024
[ 07-13 21:24:09.837 11588:11772 D/Subsurface ]
(null):0 ((null)): [SUBSURFACE] successfully read 1024
[ 07-13 21:24:09.837 11588:11772 D/Subsurface ]
(null):0 ((null)): [SUBSURFACE] read 1024
[ 07-13 21:24:10.064 11588:11772 D/Subsurface ]
(null):0 ((null)): [SUBSURFACE] successfully read 1024
[ 07-13 21:24:10.064 11588:11772 D/Subsurface ]
(null):0 ((null)): [SUBSURFACE] read 1024
[ 07-13 21:24:10.359 11588:11772 D/Subsurface ]
(null):0 ((null)): [SUBSURFACE] successfully read 1024
[ 07-13 21:24:10.359 11588:11772 D/Subsurface ]
(null):0 ((null)): [SUBSURFACE] read 1024
[ 07-13 21:24:10.567 11588:11630 D/BluetoothAdapter ]
stopLeScan()
[ 07-13 21:24:10.577 2427: 2489 D/BtGatt.GattService ]
stopScan() - queue size =1
[ 07-13 21:24:10.578 2427: 2501 D/BtGatt.ScanManager ]
stop scan
[ 07-13 21:24:10.582 2427: 2501 D/BtGatt.ScanManager ]
configureRegularScanParams() - queue=0
[ 07-13 21:24:10.582 2427: 2501 D/BtGatt.ScanManager ]
configureRegularScanParams() - ScanSetting Scan mode=-2147483648
mLastConfiguredScanSetting=2
[ 07-13 21:24:10.582 2427: 2501 D/BtGatt.ScanManager ]
configureRegularScanParams() - queue emtpy, scan stopped
[ 07-13 21:24:10.593 2427: 2443 D/BtGatt.GattService ]
unregisterClient() - clientIf=5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150713/de37b0f6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-SPP-s-uuid-to-connect-to-a-device-on-Android-pla.patch
Type: text/x-patch
Size: 2297 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150713/de37b0f6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Wait-until-the-BT-scanning-process-is-done-on-Androi.patch
Type: text/x-patch
Size: 2495 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150713/de37b0f6/attachment-0001.bin>
More information about the subsurface
mailing list