Re: Bluetooth blues

2015-10-23 Thread Claudiu Olteanu
> I was under the impression that the Petrel 2 and the Uemis were your test > devices when coding the Bluetooth interface and that access to the Petrel 2 > has more or less been sorted out?? Am I mistaken? I have only two devices: OSTCs and OSTC 2. Rick helped me to test the connectivity with a Pe

Re: Bluetooth blues

2015-10-23 Thread Claudiu Olteanu
, Oct 23, 2015 at 2:50 PM, Anton Lundin wrote: > I took a look at qt parring interfaces, shouldn't there be a way to test a > couple of standard parring codes? > > //Anton > > On October 23, 2015 12:02:19 PM GMT+02:00, Claudiu Olteanu > wrote: >>Hi there, >>

Bluetooth blues

2015-10-23 Thread Claudiu Olteanu
Hi there, If your remote device requests a custom PIN code for the pairing process, your should pair the devices using a different tool. Currently QtBluetooth doesn't have support for custom PIN codes. A workaround could be to use bluetoothctl, register an agent using the following commands, init

Re: ostc BT download failure

2015-10-01 Thread Claudiu Olteanu
Please try to unpair - pair the devices and then repeat the steps. There are moments when the device gets stuck and doesn't work properly. If this doesn't work try to get some logs using the hcidump tool. Claudiu ___ subsurface mailing list subsurface@s

Re: ostc BT download failure

2015-09-30 Thread Claudiu Olteanu
It should work with qt 5.4.1 too. From your logs it seems that the devices exchanged some data but there was something wrong with the communication protocol. If there is something wrong with your qt version I believe that it would fail on the connection step. Claudiu _

Re: [PATCH 2/2] qtserialbluetooth: use QIODevice::Unbuffered io

2015-09-29 Thread Claudiu Olteanu
Hi there, I just tested the patches and all seems good. Thanks for making time to resolve this issue. I managed to update the firmware on my OSTC Sport device using our BTH implementation (from 10.18 to 10.20). I also have an OSTC 2 device with an old firmware (1.81) but it doesn't detect that th

Re: ostc BT download failure

2015-09-29 Thread Claudiu Olteanu
Hi, Anton is right. It seems that after it sends a command to the device, the received response is not a valid one (your device doesn't recognize the command sent). Therefore it could be a problem with the version of your firmware. Claudiu ___ subsurfac

Re: Bluetooth issue on Mac

2015-09-27 Thread Claudiu Olteanu
Hello, Unfortunately I have no idea why it cannot find QBluetoothServiceInfo meta type at run time. I looked over the qtconnectivity implementation for OS X platforms and over our sources but I couldn't see anything obvious. Maybe Thiago has a better idea. Claudiu __

Re: User manual: Bluetooth UI description

2015-09-23 Thread Claudiu Olteanu
Hi there, Steve is right. You should keep the documentation for the old native implementation because it still works. Also there are some misleading information. On Windows platforms the pairing status is done automatically on the connection step, while on the other platforms it should be done man

Re: Almost beta: bluetooth & Petrel 2 issues

2015-09-21 Thread Claudiu Olteanu
Hi there, First of all sorry for the late response. I can see in your logs that it tries to connect to RFCOMM port number 1 and it waits to receive an answer. Because it doesn't receive any answer it ends with an "Unsupported operation". Usually the Petrel devices are listening on port number 5.

[PATCH] Fix Bluetooth address truncation

2015-09-19 Thread Claudiu Olteanu
Hi there, There was an issue reported by Steve regarding the Bluetooth address on Windows 10 platforms. The first patch should fix the problem. Claudiu 0001-Fix-Bluetooth-address-truncation-issues-on-Windows.patch Description: Binary data 0002-Rename-BTH_ADDR_STR_LEN-macro.patch Description:

Re: Bluetooth Issues and Fixes

2015-09-18 Thread Claudiu Olteanu
Hi there, Sorry for the late response. Unfortunately today I am a little busy but I will try this weekend to reproduce your problem and to find a solution. > General notes and questions: > > I potentially may have caused the issue with the native Bluetooth by trying > to trouble-shoot the Window

Re: Bluetooth interface questions and a UI suggestion

2015-09-10 Thread Claudiu Olteanu
Hi there > I have a question about the Bluetooth download interface. > > When selecting import -> Import from dive computer, there are two > possibilities: > > 1) In the MountPoint textbox of the Download panel, the address of the > Bluetooth device is shown. It looks like this happens automatica

[PATCH] Exit with failure if dc_open method fails

2015-09-09 Thread Claudiu Olteanu
00:00 2001 From: Claudiu Olteanu Date: Wed, 9 Sep 2015 19:39:12 +0300 Subject: [PATCH] Exit with failure if the first dc_open method fails If the dc_serial_*_open method fails then we should exit with an error and don't try to open the device using the native implementation. Signed-off-by:

Re: Bluetooth blues

2015-09-09 Thread Claudiu Olteanu
I looked again over your logs and I noticed that when it tries to connect it ends with an UnknownSocketError error. Apparently there is a bug in libdivecomputer.c source (line 944). If it fails to open the device using our custom implementation, it tries to open it with the old implementation. And

Re: Bluetooth blues

2015-09-09 Thread Claudiu Olteanu
Hi there, It seems that it doesn't use our custom implementation for the open method. It should use *shearwater_common_custom_open *to open the device. This means that your libdivecomputer version is incorrect or the SSRF_CUSTOM_SERIAL wasn't cached correctly. After commit [1] it shouldn't show t

[Bluetooth support] Macros

2015-09-08 Thread Claudiu Olteanu
much experience with cmake and I don't know how to do that. Claudiu From 87c860fa35109c0b03ee9dabc102d1667fd33195 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Tue, 8 Sep 2015 19:29:36 +0300 Subject: [PATCH] Disable Bth option from GUI if the SSRF_CUSTOM_SERIAL is undefined The

Re: Bluetooth download - segfault when Choose Bluetooth download mode isn't selected

2015-09-06 Thread Claudiu Olteanu
> > Thanks for the quick response Claudiu. I'll test this tonight my time. > Just out of curiosity, could you reproduce/test it by selecting Shearwater, > Petrel, and any MAC address? I think the crash happened before it > connected with my dive computer. > I don't know why I didn't think about th

Re: Bluetooth download - segfault when Choose Bluetooth download mode isn't selected

2015-09-06 Thread Claudiu Olteanu
e computer download session. In this way, the user doesn't need to open the Bth selection dialog to choose a dive computer device if it is the same as the one from his last session. Claudiu From 5f8ff48325b598ec0fea1cf341611ea2072398c3 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Mon, 7 Se

Re: Bluetooth download - segfault when Choose Bluetooth download mode isn't selected

2015-09-06 Thread Claudiu Olteanu
> Interesting. > Claudiu, is this something you can look into? Yes, sure. I will start looking over it tonight when I will get home. > It seems to me we either shouldn't keep those settings or we need to make > sure that if we have these settings things are correctly set up... > > If I select 'C

[PATCH] Add translation for Bluetooth download mode

2015-09-02 Thread Claudiu Olteanu
Hi there, This patch should translate the strings used for the implementation of Bluetooth support. I am not sure if I should also update the .ts files. Claudiu 0001-Translate-strings-for-Bluetooth-download-mode.patch Description: Binary data ___ sub

Re: Issue using QT Bt functionality on Fedora

2015-09-02 Thread Claudiu Olteanu
Hi there, In order to use our custom Bluetooth implementation you should define SSRF_CUSTOM_SERIAL variable. By default the project is compiled without Bluetooth support and uses the native serial communication from libdivecomputer. I know that it is confusing because the "Bluetooth download mode"

Re: at some point we need to release Subsurface 4.5

2015-08-27 Thread Claudiu Olteanu
Oh :). I thought about it but I don't know why I forgot to ask you. So it is also my mistake. Let me know if it works or if you encounter other problems. Claudiu ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divel

Re: at some point we need to release Subsurface 4.5

2015-08-27 Thread Claudiu Olteanu
> OK, deleting the plist file, shutting the system down and restarting > worked. BT is alive and well again. Here's what Subsurface reports: > > "The local Bluetooth adapter cannot be accessed." > > So this indicated that in > BtDeviceSelectionDialog::updateLocalDeviceInformation() > localDevice->i

Re: at some point we need to release Subsurface 4.5

2015-08-26 Thread Claudiu Olteanu
>> Bluetooth support >> = >> >> BT support is looking fairly good on Linux and making progress on Windows, >> I think, but I'm sure there are tons of small issues lurking here and >> there. Has anyone gotten it to work on Mac, yet? > Also ready for Beta 1, except for OS X where it

Re: [PATCH] Add native Bluetooth support for Windows platforms

2015-08-24 Thread Claudiu Olteanu
Sorry for the late response but I didn't have access to Internet for the last three days. Thiago, thanks again for the review. I saw that the patches are now in the upstream. Dirk, if you think that it is necessary I can send you another patch using the WSAStringToAddressW (like Thiago suggested)

[PATCH] Add native Bluetooth support for Windows platforms

2015-08-18 Thread Claudiu Olteanu
ion (from const char* to wchar_t*) the compiler couldn't find the declaration to the method (even though I included the stdlib header). After some failed attempts I gave up :). Cheers, Claudiu From ca22cc110c07284499be9aab4e0230dbc13932e2 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date:

Re: [PATH] Add native Bluetooth support for Windows platforms

2015-08-18 Thread Claudiu Olteanu
Hi Thiago, Thanks for making time to look over the patches! > Subject: [PATCH 03/17] Use only the BTH address to check if the device was > > already added > > > > There are moments when the name of the device cannot be obtained. > > Therefore we should use only the Bluetooth address to identify

Re: at some point we need to release Subsurface 4.5

2015-08-17 Thread Claudiu Olteanu
> > Bluetooth support > = > > BT support is looking fairly good on Linux and making progress on Windows, > I think, but I'm sure there are tons of small issues lurking here and > there. Has anyone gotten it to work on Mac, yet? > > Claudiu / Thiago - do you have a TODO list? > The

Re: [PATH] Add native Bluetooth support for Windows platforms

2015-08-16 Thread Claudiu Olteanu
://github.com/claudiuolteanu/subsurface/tree/bth_windows From b5225ce0a5d94e70253d0a97b3f894234c7f93df Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Sun, 16 Aug 2015 15:51:32 +0300 Subject: [PATCH 01/19] Cleanup Bluetooth local device and the discovery agent on exit Do some extra cleanup when the

Re: [PATH] Add native Bluetooth support for Windows platforms

2015-08-15 Thread Claudiu Olteanu
No I didn't do any copy and paste. I will send you tomorrow the patches with the modification discussed (I will clear the discovered devices list after each update) and I will update the commit message for the patch with the implementation of a device discovery agent. Claudiu

Re: [PATH] Add native Bluetooth support for Windows platforms

2015-08-15 Thread Claudiu Olteanu
> > Can you explain this a bit more? Should we not prefer the deviceLabel IF > we can get it? > When I created that patch I thought that it would be better to use only the device address to identify if the device is already in the list. This is due the fact that currently the pattern of the device

[PATH] Add native Bluetooth support for Windows platforms

2015-08-13 Thread Claudiu Olteanu
QtBluetoothDeviceDiscoveryAgent class. I am not sure if this is the best idea or the most elegant one but it works. Claudiu From 3d2e55d597aed27515650792f8bd77bf742f6576 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Wed, 12 Aug 2015 22:46:31 +0300 Subject: [PATCH 01/17] Cleanup Bluetooth local device and

[PATCH] libdivecomputer: Subsurface-testing branch

2015-08-13 Thread Claudiu Olteanu
Hi there, You can find attached some patches which will add a set_timeout callback for our custom implementation. This callback will be needed for Windows platforms. Cheers, Claudiu 0001-Add-set_timeout-callback-for-serial-custom-implement.patch Description: Binary data 0002-Use-the-custom-se

Re: Testing Native Bluetooth support on Windows platforms

2015-08-12 Thread Claudiu Olteanu
Ok, thanks a lot for your help! As I said, the download mode is supposed to work only if the devices are paired. If the devices are not paired then Windows will ask for your permissions to pair them and you should allow it. If you have any questions or suggestions, please let me know. Have a nic

Re: Testing Native Bluetooth support on Windows platforms

2015-08-12 Thread Claudiu Olteanu
Hi Benjamin, Can you please give me more details? Are your devices paired? When you say that the application crashes you mean that your receive a SEGV error and it is forcibly closed? It would be useful if you can take a look in the Event Viewer (open Run/Command terminal and write *eventvwr *com

Re: Testing Native Bluetooth support on Windows platforms

2015-08-12 Thread Claudiu Olteanu
> > Windows 10 puts a message on the right side of the screen: Add a device, > Tap to setup your OSTC3 (see win10-ostc3+bluetooth01.jpg). > > Then it fails with the message: Error, Unable to open 00: etc, No device > found (see win10-ostc3+bluetooth02.jpg). > That message is prompt when your devic

Re: Testing Native Bluetooth support on Windows platforms

2015-08-11 Thread Claudiu Olteanu
Steve, did you use the installer I sent? If you created your own installer, be aware that my changes are not in the upstream. I ask these because in the screenshot in seems that your application is using the implementation with the Qt Bluetooth framework. Currently the Qt Bluetooth library is avai

Re: Testing Native Bluetooth support on Windows platforms

2015-08-11 Thread Claudiu Olteanu
> > On the Vista machine, the device name was displayed, even before I had > paired. > I totally forgot about the existence of Windows Vista :). I will create a virtual machine to see if I can reproduce your problem. > > I like that pairing is now 'invisible' to the user. But it would be good >

[GSoC] Week 11 - Native Bluetooth support

2015-08-10 Thread Claudiu Olteanu
Hello, Here is a short report about the last week: - finished the implementation of data transfer for Windows platforms - created 3 new environments for testing the solution (Windows Xp SP2, Windows 7, Windows 10) - tested the solution with my HW OSTC devices on 7 different environments: - Lenovo

Re: Testing Native Bluetooth support on Windows platforms

2015-08-10 Thread Claudiu Olteanu
> > Tested from the OSTC3+ and Petrel 2 and both worked as expected. > I'm glad that it worked. Thanks for the feedback! Claudiu ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/s

Re: Testing Native Bluetooth support on Windows platforms

2015-08-09 Thread Claudiu Olteanu
I decided to create a virtual machine with Windows 10 (x64) and to run some tests there too. I didn't encounter any problems regarding the data transfer. The only thing that I saw is that on my all virtual machines (Windows XP SP2, Windows 7, Windows 10) the first time you start to lookup for devi

Re: Testing Native Bluetooth support on Windows platforms

2015-08-09 Thread Claudiu Olteanu
Hello, Yes this is a 32 bit build. The installer fails because probably you don't have *Microsoft Visual C++ 2013 Redistributable (x86)* package installed on your laptop. You can download it from here [1]. Currently I don't have an environment to create the 64 bit installer so please install the

Testing Native Bluetooth support on Windows platforms

2015-08-08 Thread Claudiu Olteanu
Hi there, I wanted to let you know that I finished the implementation of the native Bluetooth support on Windows platforms. If you have a dive computer with Bluetooth support from HW_OSTC3 or Shearwater family it would be very useful if you will help me to do some tests. You can download the inst

Re: Petrel 2 bluetooth link

2015-08-06 Thread Claudiu Olteanu
> andrej@antares:~$ subsurface > Map theme file does not exist: "" > Ignoring to load the following file since it doesn't look like a valid > Marble plugin: "/boot/initrd.img-3.19.0-25-generic" > Reason: "'/boot/initrd.img-3.19.0-25-generic' is not an ELF object" > Ignoring to load the following fi

Re: Petrel 2 bluetooth link

2015-08-06 Thread Claudiu Olteanu
Hi there, Note that the testing version is just that. It works for me, and your help > in testing is much appreciated, but there's a reason why it isn't called > stable. You might come across bugs. This development cycle includes more > new features than normal, including native bluetooth suppo

Re: [GSoC] Week 9 - Native Bluetooth support

2015-07-29 Thread Claudiu Olteanu
Hello Rick, Unfortunately I will go on a trip and I didn't have time to finish the integration of my sample with the project. Tuesday I will come back and I will have access again to my laptop. I will let you know when I will have a prototype ready for test. Thanks again for your continuous invo

[GSoC] Week 9 - Native Bluetooth support

2015-07-27 Thread Claudiu Olteanu
Hi there, This week I managed to implement a sample which connects to remote a Bluetooth device and exchanges some bits using the Windows API. For the beginning I wanted to see if I can make my HW OSTC2 and OSTCs devices enter in download mode. I didn't encounter too many problems so I decided to

[GSoC] Week 8 (Native Bluetooth support)

2015-07-20 Thread Claudiu Olteanu
Hello, Here is a summary about what I did last week: - tested and fixed some issues for Android platform - implemented a combobox which can be used to choose the local Bluetooth adapter - continue the documentation and developing the sample for Windows platform - created a new environment with Win

Re: [PATCH] Bluetooth improvements

2015-07-20 Thread Claudiu Olteanu
> > In general the mentor is not necessarily the clean up person... > I know, Thiago offered, but just to put this out here. > When I said that he should do some investigations I didn't mean to start hunting memory leaks on my code. I can do that by myself using their best friend - Valgring :). I

Re: [PATCH] Bluetooth improvements

2015-07-20 Thread Claudiu Olteanu
Hi, I agree with Thiago. Probably it is a good idea to keep the Bluetooth download feature only for versions >= 5.4. This is due the fact that in version 5.4 they added support for BlueZ 5.X stack and probably most of the users have this stack. To be honest I didn't take into account to test the

Re: Ctrl-+ and Qt5.5

2015-07-20 Thread Claudiu Olteanu
Yes, when I tested the shortcut I used the "+" key without shift. ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Re: [PATCH] Bluetooth improvements

2015-07-19 Thread Claudiu Olteanu
> > Child QObjects don't need to be cleaned. But I'm not seeing any > parent-child > relationship here. > > I'm deferring to you here. I'm just pointing out, I haven't done any > investigation. > > Would you like me to? I don't have too much experience with C++ and Qt framework. If you have time,

Re: [PATCH] Bluetooth improvements

2015-07-19 Thread Claudiu Olteanu
(defined(Q_OS_IOS) || defined(Q_OS_OSX))) > > Hint: Q_OS_DARWIN and Q_OS_MAC also mean Q_OS_IOS || Q_OS_OSX. > I saw that Q_OS_MAC doesn't include the open source version and I didn't know which is that :). Thanks for the hints, Claudiu From 3608bc8431449aff26f0f0563337d136d

Re: Ctrl-+ and Qt5.5

2015-07-19 Thread Claudiu Olteanu
Hi there, I have a Fedora 22 with Qt 5.5.0 and the shortcut is working. Subsurface version: 4.4.2-1040-g5cbbff008411c322. Claudiu ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/

Re: [PATCH] Bluetooth improvements

2015-07-19 Thread Claudiu Olteanu
> > I didn't think to try that before. But I just tried and it worked. > Great to hear that :). That's annoying. Thankfully, most systems have a reasonably friendly way > to pair bluetooth devices, and it only needs to be done once. Can you > detect if pairing fails, and ask the user to pair t

Re: [PATCH] Bluetooth improvements

2015-07-19 Thread Claudiu Olteanu
Thanks for the info, Rick! Did you tried to download the dives after you paired the devices manually (using bluetoothctl)? Currently the QtBluetooth library doesn't have an agent which can be used to set a custom PIN code on pairing step [1]. I don't know when they will implement it. The pairing

Re: [PATCH] Bluetooth improvements

2015-07-19 Thread Claudiu Olteanu
Hi Rick, I can select my usb bluetooth dongle (using the one that came with my > petrel), and power it up or down, but I was not able to pair or unpair > (when previously paired using the onboard bluetooth). Downloading fails > with the usb dongle, even when it had already been paired. It didn't

[PATCH] Bluetooth improvements

2015-07-18 Thread Claudiu Olteanu
e the Bluetooth connectivity for iOS/OSx platforms with Qt version > 5.5.0. Claudiu From 039085972fbb4f59b4ab1c349a34c32d7538774e Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Sat, 18 Jul 2015 23:14:00 +0300 Subject: [PATCH 8/8] Use SPP's uuid to connect to a device on iOS/OSx platforms

Re: [PATCH] Bluetooth support for Android

2015-07-16 Thread Claudiu Olteanu
> > It works fine if it's still in scanning mode. The only thing delaying me > is that it's really difficult to double click a little item in a list on a > phone screen. Or I have fat fingers. > Hmm..then I have to figure out if there is a problem with Android 5.1.1 or with my HW dive computers.

Re: [PATCH] Bluetooth support for Android

2015-07-16 Thread Claudiu Olteanu
> That's brilliant. It works! Screenshot attached. > > Well nearly. The ok button is off the screen so I can't save them. > Great :-). It works when you wait for the scanning process to end or it doesn't matter? And yes, currently not all buttons are on the screen. I changed the UI only for the d

Re: [PATCH] Bluetooth support for Android

2015-07-16 Thread Claudiu Olteanu
> > The scan works, and scrolling across tells me that it knows the Petrel is > paired. But the save button is greyed out so quit is the only way I can > leave this dialog. > I observed that when you select an item the signal is not always raised (QListWidget::itemActivated). Probably on Android

Re: [PATCH] Bluetooth support for Android

2015-07-16 Thread Claudiu Olteanu
> > I'm sure it's possible, but I couldn't work it out in the 3 minutes I > tried while brushing my teeth before I left late for work (a little bike > race is keeping me up late, so getting up in the morning is a bit harder). > I'll try again this evening, and if that fails I'll check I can pair my

Re: [PATCH] Bluetooth support for Android

2015-07-16 Thread Claudiu Olteanu
> > And that's where it went wrong. They wouldn't pair. The Petrel says "bt > init fail". I'm off to work now. Might get a chance this evening to work > out pairing. > This is strange. Do you have other smart device (with Android/iOS) where you can try the pairing step? It could be a problem with

Re: [PATCH] Bluetooth support for Android

2015-07-15 Thread Claudiu Olteanu
> > I can test on my Galaxy s6, which apparently run on Android 5.02. Well I > could test it if I knew how. > It will be a great help. First you should pair the devices manually. Then you can download and install the application from here [1] (this is the version which doesn't wait for scanning p

Re: [PATCH] Bluetooth support for Android

2015-07-15 Thread Claudiu Olteanu
> > It's July. Alex may be on his 4-week vacation. > > Ping him again next week to see if he's back. Ok, thanks for the info! Then I will wait for Alex to finish his vacation and I will welcome him with some potential bugs on QtBluetooth library:-). __

Re: [PATCH] Bluetooth support for Android

2015-07-15 Thread Claudiu Olteanu
Hi Thiago, > Is this method supposed to work elsewhere too? Is there a reason not to > use it > everywhere? > This method should work on every supported platforms but I cannot obtain the correct result using it on Linux. I mentioned before that I believe there is a bug on the QtBluetooth library

[PATCH] Bluetooth support for Android

2015-07-13 Thread Claudiu Olteanu
: Claudiu Olteanu Date: Mon, 13 Jul 2015 23:37:49 +0300 Subject: [PATCH 1/2] Use SPP's uuid to connect to a device on Android platform On Android, a Bluetooth connection to a service cannot be established using a port. Therefore we use the uuid of the Serial Port Profile service to connect t

[GSoC] Week 7 (Native Bluetooth support)

2015-07-12 Thread Claudiu Olteanu
Hello, Here is a resume about the things I did this week: - successfully downloaded the dives from 3 different environments (ArchLinux, Fedora 22, OpenSuse 13.2) - compiled and tested our custom BT serial implementation with the new Qt 5.5.0 - compiled and tested our custom BT serial implementati

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-07-09 Thread Claudiu Olteanu
> > In my mind, a error message that says: "This should never happen" and it > happens in a number of cases isn't a great message =) I know that the message is ambiguous. It appears when the QtBluetooth library cannot communicate with your local Bluetooth device. The reason why it cannot communic

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-07-08 Thread Claudiu Olteanu
> > Due to that broken device i got a: > "This should never happen, please contact the Subsurface developers" ... By the way, this error is usually generated when the Bluetooth service is not started or when the Qt framework cannot communicate with your local BT device (the library is not install

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-07-08 Thread Claudiu Olteanu
> > W/Subsurface(17379): (null):0 ((null)): qt.bluetooth: Connecting to port > is not supported > D/Subsurface(17379): (null):0 ((null)): Connection on channel 1 failed. > Trying on channel number 5. > W/Subsurface(17379): (null):0 ((null)): qt.bluetooth: Connecting to port > is not supported > D/S

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-07-08 Thread Claudiu Olteanu
> > It would be great if there was a way to switch to using another bt > device on your host. > I started working on it but I haven't had the chance to finish it. > > Another thing i thought about was (re)using your bt-libdc thingie in the > Configure Dive computers dialog there. It would be gre

Re: [GSoC] Week 6 (Native Bluetooth support)

2015-07-08 Thread Claudiu Olteanu
> > The only way you're allowed to run OS X in a VM is if you have genuine > Apple > hardware, which usually implies you've already got access to OS X in real > hardware anyway... I didn't know that. Thanks for the info! Is it ok with you if I start the documentation for the second stage of the

Re: [GSoC] Week 6 (Native Bluetooth support)

2015-07-08 Thread Claudiu Olteanu
> > I managed to compile the project with Qt5.5.0. I saw that Bluetooth > connectivity > doesn't work for the moment with this version. I will investigate it > tomorrow. > I just wanted to let you know that I managed to successfully download the dives from both devices using our custom BT serial

Re: [GSoC] Week 6 (Native Bluetooth support)

2015-07-08 Thread Claudiu Olteanu
> > Thanks, Claudiu... this is looking promising. > Thanks for the great news, Dirk. > Now we need to figure out what's going on on Mac. I am not sure how I can help you with this. I don't have a Mac device. I could try to install OSx on a virtual machine. Or I could start to investigate the

Re: [PULL REQUEST] Subsurface branch - QtBluetooth serial implementation

2015-07-06 Thread Claudiu Olteanu
Oh yeah :). I don't know what was in my mind when I did that :)). On Tue, Jul 7, 2015 at 12:02 AM, Thiago Macieira wrote: > On Monday 06 July 2015 23:19:58 Claudiu Olteanu wrote: > > > + bool on = !(mode == QBluetoothLocalDevice::HostPoweredOff); > > &g

Re: [GSoC] Week 6 (Native Bluetooth support)

2015-07-06 Thread Claudiu Olteanu
Sorry, my mistake! Somehow I deleted the qtserialbluetooth.cpp source from SUBSURFACE_CORE_LIB_SRCS list :-). I managed to compile the project with Qt5.5.0. I saw that Bluetooth connectivity doesn't work for the moment with this version. I will investigate it tomorrow.

Re: [PULL REQUEST] Subsurface branch - QtBluetooth serial implementation

2015-07-06 Thread Claudiu Olteanu
Hi Thiago, > + bool on = !(mode == QBluetoothLocalDevice::HostPoweredOff); > > That's slightly weird :-) I know that this is weird but there is no HostPoweredOn enum :-). It can be either off, connectable, discoverable or discoverable limited inquiry. Therefore I choose to use !(mode == QB

Re: [GSoC] Week 6 (Native Bluetooth support)

2015-07-06 Thread Claudiu Olteanu
Hi, I wanted to let you know that after I did the firmware upgrade everything works fine. I tested both devices on all three environments (OpenSuse, Fedora, ArchLinux) and I didn't encounter any problem. Now we just have to figure out why Dirk's devices don't work. Dirk, do you have other environ

Re: [GSoC] Week 6 (Native Bluetooth support)

2015-07-06 Thread Claudiu Olteanu
Sorry for the late response but I decided to try again to compile the Subsurface project with Qt 5.5.0. After I read carefully the log messages I find out what caused the problem. Apparently the headers from two libraries were missing (mesa-libGL-devel and libdrm-devel). Now I receive an undefin

Re: [PULL REQUEST] Subsurface branch - QtBluetooth serial implementation

2015-07-06 Thread Claudiu Olteanu
> > Actually, here's one. The fake open function for the OSTC 2N. That could > have been its own commit, added before the next commit that adds all the > qtserialbluetooth stuff. That's a simple example, but maybe it illustrates > what I mean. > It is funny that in the beginning I did an isolated

Re: [PULL REQUEST] libdivecomputer - Subsurface-testing branch

2015-07-06 Thread Claudiu Olteanu
Hi Lubomir, Thanks for the info! Yeah, probably I shouldn't named the thread "PULL REQUEST". Since these are the differences between my repository and the Subsurface' one, I thought that the process is similar with a pull request. Also I knew that Dirk prefers patches instead of pull requests.

[PULL REQUEST] Subsurface branch - QtBluetooth serial implementation

2015-07-06 Thread Claudiu Olteanu
ich can be useful for debugging. Claudiu From 031f1ffaff034b725253994bf0fe5b4c3c296c08 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Mon, 6 Jul 2015 16:18:06 +0300 Subject: [PATCH 1/4] Add a checkbox and a button for Bluetooth download mode The checkbox will be used to enable the Bluetooth d

[PULL REQUEST] libdivecomputer - Subsurface-testing branch

2015-07-06 Thread Claudiu Olteanu
Hi, These patches create a generic way to represent any type of serial communication. They are used to create a custom serial implementation for HW_OSTC3 and SHEARWATER families. Claudiu From 05d830371f2bce35820bebb7419ed27946b3a658 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Sat, 27

Re: [GSoC] Week 6 (Native Bluetooth support)

2015-07-05 Thread Claudiu Olteanu
> Might be worth following up, copying Thiago. If we are chasing a library > bug I'd prefer to know that early. > Out of curiosity, have you tried compiling Qt5.5 from source and trying > with that? That is high on my personal todo list. I created a SDP discovery sample and I compiled it with Qt5.

Re: [GSoC] Week 6 (Native Bluetooth support)

2015-07-05 Thread Claudiu Olteanu
I forgot to specify that the Fedora 22 and ArchLinux environments are two virtual machines. I don't know if this could cause the problem. If it does, I expect that it shouldn't work with the HW OSTCs device as well. Claudiu ___ subsurface mailing list s

[GSoC] Week 6 (Native Bluetooth support)

2015-07-05 Thread Claudiu Olteanu
Hi there, I spent this week doing some tests to find out the possible reasons of some issues: - first the QtSocketBluetooth::connectToService(address, uuid, mode) doesn't work as expected. On some devices, the SPP profile is never found. - second on some environments the connection takes too long

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-07-02 Thread Claudiu Olteanu
> So it seems that all Petrel 2 use channel 5. At which stage do we need to > know the correct channel? Do we have the name of the device at that stage > already? No, we don't have the name of the device at that stage. The only information we have is its Bluetooth address. As I said, if the Qt SD

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-07-02 Thread Claudiu Olteanu
> I tried your patch, and it works. But it works by falling back (after a > delay) to channel 5. To confirm, I commented out the fallback conditions, > so it only tried the uuid method, and that fails. Thanks again! It is quite strange why the QBluetoothServiceDiscoveryAgent doesn't find the SPP

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-06-30 Thread Claudiu Olteanu
> Assuming it's similar to setting up a connection on the command line with > rfcomm, I think most devices use channel 0, not 1. I can't test this > because mine uses channel 5. Can you try both 0 and 1 with the OSTC, and > see if one works and the other doesn't? I could be wrong, but as far as

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-06-30 Thread Claudiu Olteanu
ion ends with a ServiceNotFoundError then try to force the connection on channel 1. If this doesn't work, try again on channel number 5. Signed-off-by: Claudiu Olteanu --- qtserialbluetooth.cpp | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/q

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-06-30 Thread Claudiu Olteanu
Hello, > > I can't claim to know how it works, but it appears that on my system at > least, QBluetoothUuid::SerialPort is being treated as the port number, > rather than the UUID. To test my theory, I tried using > QBluetoothUuid::TcsBin, and it worked. Clearly it shouldn't, except that > the va

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-06-30 Thread Claudiu Olteanu
Hi, The thing is that when I try to connect to a device I use the UUID of the serial port profile. It shouldn't matter if the service is listening on a different channel because in backgorund it should execute a sdp query. It could be a problem from the framework or maybe there is something that I

Re: [PATCH] libdivecomputer - custom implementation for serial communication

2015-06-29 Thread Claudiu Olteanu
Hello Jef, Thanks for making time to let us know what you have in mind for the next release. More or less it is similar with the changes I made, except that I tried to avoid to modify the native serial implementation. I will make you a short resume about the changes I did because I believe that t

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-06-29 Thread Claudiu Olteanu
s, Claudiu From 47c3787ac376c608737eb56e66601469e2c21bfe Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Mon, 29 Jun 2015 20:46:32 +0300 Subject: [PATCH 4/4] Increase the waiting time for Bluetooth LookUpSevice If the lookup for Serial Port profile took more than expected then wait another 30

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-06-28 Thread Claudiu Olteanu
lease apply the attached patch. This is just a temporary solution :). From 664e67fb248dd8fded44ab27d2d0cadaa1a74749 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu 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 solutio

Re: [QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-06-28 Thread Claudiu Olteanu
> > I'll try tonight (Australian time) on Fedora 22. What should the device > show up as in the download dialogue? > Thanks! I added a checkbox in the download dialogue which can be used to enable the Bluetooth downloading mode. When you activate it a new dialog will be created. You can use it t

[QtBluetooth] Help for testing HW_OSTC3 and SHEARWATER families

2015-06-28 Thread Claudiu Olteanu
t-the-Blue.patch - 0003-Implement-the-custom-Bluetooth-serial-communication-.patch - 0004-Enable-QtBluetooth-logging.patch From 05d830371f2bce35820bebb7419ed27946b3a658 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Sat, 27 Jun 2015 15:11:15 +0300 Subject: [PATCH 1/7] Extend the transport

Re: [GSoC] Week 5 (Native Bluetooth support)

2015-06-28 Thread Claudiu Olteanu
> I think the one other BT device that several of our testers have > (including me) is the Shearwater Petrel / Petrel2 Thanks! Then I will start to do the changes for that vendor and I will send you the patches. ___ subsurface mailing list subsurface@su

  1   2   >