Discussion:
Bluetooth fails on mobile
Davide DB
2018-04-09 19:09:59 UTC
Permalink
Still trying the latest APK on my phones.

No way to download dives from my Petrel 2 on my 4 different phones.

On a Google Nexus 5 only I don't get the BT FAIL error on my Petrel.
IMHO On Subsurface the UI error message is fake: "no new dives were found
on this device" but I don't think there was a real data transfer because I
get the same error while downloading dives from my Samsung TV.

What can I do to get the dives on my phone?

I attached a screenshot of the app log.

PS
Why don't you use a text control hence text can be selected and copy pasted
here?

Thank you as always

***@mobile
Davide DB
2018-04-09 20:21:13 UTC
Permalink
Post by Davide DB
Still trying the latest APK on my phones.
No way to download dives from my Petrel 2 on my 4 different phones.
On a Google Nexus 5 only I don't get the BT FAIL error on my Petrel.
IMHO On Subsurface the UI error message is fake: "no new dives were found
on this device" but I don't think there was a real data transfer because I
get the same error while downloading dives from my Samsung TV.
What can I do to get the dives on my phone?
I attached a screenshot of the app log.
PS
Why don't you use a text control hence text can be selected and copy
pasted here?
Thank you as always
Finally I got a partial download from my fifth device. An ancient nexus 7
tablet running Android 4.4.
Unfortunately it fails randomly and my Petrel shows "bt sending packet
error".
No way to complete the download.
Subsurface download thread loops endlessly while the Petrel already quit.

Why I have to download all the dives from my Petrel while I miss only the
last three?

Would be nice if you could add a timeout during the transfer. I switched
off my petrel and tablet BT 30 minutes ago and Subsurface is still
waiting...

Would be nice if complete dives of a partial download could be saved so I
could download some of them at the time.
Davide DB
2018-04-09 20:46:10 UTC
Permalink
Post by Davide DB
Post by Davide DB
Still trying the latest APK on my phones.
No way to download dives from my Petrel 2 on my 4 different phones.
On a Google Nexus 5 only I don't get the BT FAIL error on my Petrel.
IMHO On Subsurface the UI error message is fake: "no new dives were found
on this device" but I don't think there was a real data transfer because I
get the same error while downloading dives from my Samsung TV.
What can I do to get the dives on my phone?
I attached a screenshot of the app log.
PS
Why don't you use a text control hence text can be selected and copy
pasted here?
Thank you as always
Finally I got a partial download from my fifth device. An ancient nexus 7
tablet running Android 4.4.
Unfortunately it fails randomly and my Petrel shows "bt sending packet
error".
No way to complete the download.
Subsurface download thread loops endlessly while the Petrel already quit.
Why I have to download all the dives from my Petrel while I miss only the
last three?
Would be nice if you could add a timeout during the transfer. I switched
off my petrel and tablet BT 30 minutes ago and Subsurface is still
waiting...
Would be nice if complete dives of a partial download could be saved so I
could download some of them at the time.
Adding other info to my telenovela....

Looking to the app log it seems that successfully downloaded dives were
saved on a local cache but I don't see them on my list.
From the log it seems that the download thread has been stopped but the UI
is still showing endlessly the ongoing download.
See the attached log.
Davide DB
2018-04-11 08:36:44 UTC
Permalink
Hi all,

Could I have a feedback on this?

I would eventually open a bug report.

Thanks
Post by Davide DB
Post by Davide DB
Post by Davide DB
Still trying the latest APK on my phones.
No way to download dives from my Petrel 2 on my 4 different phones.
On a Google Nexus 5 only I don't get the BT FAIL error on my Petrel.
IMHO On Subsurface the UI error message is fake: "no new dives were found
on this device" but I don't think there was a real data transfer because I
get the same error while downloading dives from my Samsung TV.
What can I do to get the dives on my phone?
I attached a screenshot of the app log.
PS
Why don't you use a text control hence text can be selected and copy
pasted here?
Thank you as always
Finally I got a partial download from my fifth device. An ancient nexus 7
tablet running Android 4.4.
Unfortunately it fails randomly and my Petrel shows "bt sending packet
error".
No way to complete the download.
Subsurface download thread loops endlessly while the Petrel already quit.
Why I have to download all the dives from my Petrel while I miss only the
last three?
Would be nice if you could add a timeout during the transfer. I switched
off my petrel and tablet BT 30 minutes ago and Subsurface is still
waiting...
Would be nice if complete dives of a partial download could be saved so I
could download some of them at the time.
Adding other info to my telenovela....
Looking to the app log it seems that successfully downloaded dives were
saved on a local cache but I don't see them on my list.
From the log it seems that the download thread has been stopped but the UI
is still showing endlessly the ongoing download.
See the attached log.
--
Davide
https://vimeo.com/bocio/videos
Willem Ferguson
2018-04-10 14:10:35 UTC
Permalink
Post by Davide DB
Still trying the latest APK on my phones.
No way to download dives from my Petrel 2 on my 4 different phones.
On a Google Nexus 5 only I don't get the BT FAIL error on my Petrel.
IMHO On Subsurface the UI error message is fake: "no new dives
were found on this device" but I don't think there was a real data
transfer because I get the same error while downloading dives from
my Samsung TV.
What can I do to get the dives on my phone?
I attached a screenshot of the app log.
PS
Why don't you use a text control hence text can be selected and
copy pasted here?
Thank you as always
On a Samsung S6 (Android 7.0)  the phone sees my Petrel 2 and pairs to
it. However, when downloading dives, the phone only sees a BTLE device
and apparently cannot handle the BTLE mode (error 133). Have no idea why
it doesn't  also see an ordinary BT device. Therefore no downloads.
Kind regards,
willem
--
This message and attachments are subject to a disclaimer.

Please refer to 
http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf
<http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf> for
full
details.
Davide DB
2018-04-10 14:42:13 UTC
Permalink
On 10 April 2018 at 16:10, Willem Ferguson
On a Samsung S6 (Android 7.0) the phone sees my Petrel 2 and pairs to it.
However, when downloading dives, the phone only sees a BTLE device and
apparently cannot handle the BTLE mode (error 133). Have no idea why it
doesn't also see an ordinary BT device. Therefore no downloads.
Kind regards,
willem
Yes but how to save partial downloads?
If my Petrel has 100 dives on it and I miss just the last three of
them on my logbook why I have to download 100 dives.
Even the plain libdivecomputer utility has a lot of problem downloading them.

Bye
--
Davide
https://vimeo.com/bocio/videos
Jef Driesen
2018-04-12 13:11:45 UTC
Permalink
Post by Davide DB
On 10 April 2018 at 16:10, Willem Ferguson
On a Samsung S6 (Android 7.0) the phone sees my Petrel 2 and pairs to it.
However, when downloading dives, the phone only sees a BTLE device and
apparently cannot handle the BTLE mode (error 133). Have no idea why it
doesn't also see an ordinary BT device. Therefore no downloads.
Yes but how to save partial downloads?
If my Petrel has 100 dives on it and I miss just the last three of
them on my logbook why I have to download 100 dives.
Recovering from a partial download is tricky!

To be able to download only the new dives (which is the most common
use-case), libdivecomputer downloads the dives in reverse order (e.g.
newest first). Thus after a partial download, you have the newest dives,
but not the oldest dives. But if you try to download again, in an
attempt to get those old dives as well, there are two problems:

(1) When the download only new dives logic sees the newest dive again,
it will abort the download. So you need to disable it and force it to
download all dives.

(2) There is no way to skip dives you already have. So you'll be
downloading those dives again before reaching the old dives you're
interested in. This is inefficient, but the worse part is that if you
encounter again an error before reaching those old dives, then you're
still stuck. If the error is due to some unreliable connection, then you
may need many attempts, which is of course very annoying.


Note that subsurface also has another related problem. When there is an
error during the parsing of a dive, the download is aborted. And thus
you won't be able to download any of the older dives before the
problematic dive!
Post by Davide DB
Even the plain libdivecomputer utility has a lot of problem downloading them.
Have you already tried with the new bluetooth transport? The native
bluetooth transport appears to be a lot more reliable than the serial
port emulation. I'm not sure what is going on, but it's certainly not
something specific to the Shearwater dive computers, because I've seen
similar reports with other brands.

You can download a pre-build binary here:

https://libdivecomputer.org/builds/stable/windows/dctool.exe

Instead of specifying the name of the virtual serial port, you pass the
bluetooth mac address, along with the '-t bluetooth' option to enable
the bluetooth transport:

dctool -v -l petrel.log -f petrel download -o petrel.xml -t bluetooth
00:11:22:33:44:55

Jef
Davide DB
2018-04-12 14:09:59 UTC
Permalink
Post by Jef Driesen
Post by Davide DB
Yes but how to save partial downloads?
If my Petrel has 100 dives on it and I miss just the last three of
them on my logbook why I have to download 100 dives.
Recovering from a partial download is tricky!
To be able to download only the new dives (which is the most common
use-case), libdivecomputer downloads the dives in reverse order (e.g. newest
first). Thus after a partial download, you have the newest dives, but not
the oldest dives. But if you try to download again, in an attempt to get
(1) When the download only new dives logic sees the newest dive again, it
will abort the download. So you need to disable it and force it to download
all dives.
(2) There is no way to skip dives you already have. So you'll be downloading
those dives again before reaching the old dives you're interested in. This
is inefficient, but the worse part is that if you encounter again an error
before reaching those old dives, then you're still stuck. If the error is
due to some unreliable connection, then you may need many attempts, which is
of course very annoying.
I do not get you. I'm sorry.
Anyway I miss form my logbook only the last newest dives. So I do not
understand why it's not possible to save them to a temp location and
then parsing what's good from the partial download.
My download stops after the newest 10 dives and I need only the first three.
Post by Jef Driesen
Note that subsurface also has another related problem. When there is an
error during the parsing of a dive, the download is aborted. And thus you
won't be able to download any of the older dives before the problematic
dive!
Post by Davide DB
Even the plain libdivecomputer utility has a lot of problem downloading them.
Have you already tried with the new bluetooth transport? The native
bluetooth transport appears to be a lot more reliable than the serial port
emulation. I'm not sure what is going on, but it's certainly not something
specific to the Shearwater dive computers, because I've seen similar reports
with other brands.
https://libdivecomputer.org/builds/stable/windows/dctool.exe
Instead of specifying the name of the virtual serial port, you pass the
bluetooth mac address, along with the '-t bluetooth' option to enable the
dctool -v -l petrel.log -f petrel download -o petrel.xml -t bluetooth
00:11:22:33:44:55
Jef
No I did not try it because on my PC with the Shearwater BT dongle I
have no problem ATM.
I had problem in the past trying to download dives from several
rebreather with ctool no matter the OS I was using. I spent 50€ of
saft batteries to download them.

Now the problem is downloading dives from my petrel via Subsurface mobile.
--
Davide
https://vimeo.com/bocio/videos
Davide DB
2018-04-12 14:12:39 UTC
Permalink
I will file a bug report for the UI problem.

Thank you guys
Dirk Hohndel
2018-04-12 14:14:52 UTC
Permalink
Post by Davide DB
I do not get you. I'm sorry.
Anyway I miss form my logbook only the last newest dives. So I do not
understand why it's not possible to save them to a temp location and
then parsing what's good from the partial download.
My download stops after the newest 10 dives and I need only the first three.
That's strange because Subsurface-mobile should already handle this correctly.
If the download fails, it SHOULD parse the dives downloaded up to that point.
Which version, which OS, do you have a log / libdivecomputer.log?
It sounds like you can reproduce the problem, so this should be something
that we can fix

/D
Davide DB
2018-04-12 14:42:52 UTC
Permalink
Post by Dirk Hohndel
Post by Davide DB
I do not get you. I'm sorry.
Anyway I miss form my logbook only the last newest dives. So I do not
understand why it's not possible to save them to a temp location and
then parsing what's good from the partial download.
My download stops after the newest 10 dives and I need only the first three.
That's strange because Subsurface-mobile should already handle this correctly.
If the download fails, it SHOULD parse the dives downloaded up to that point.
Which version, which OS, do you have a log / libdivecomputer.log?
It sounds like you can reproduce the problem, so this should be something
that we can fix
The latest Subsurface mobile (I'm a beta tester) on a nexus 7 (first
version) tablet running Android 4.something.
It's the only device I was able to successfully start the download
from my BLE Petrel controller. On all my other Andorid devices I get a
BT INIT FAIL when trying to download.

I'll try to resume everything here because IMHO there are two
different problem mixing together: BLE download and UI loop.

I pair the device. On Android BT UI I see something like LE:bt address
I start the download
Subsurface start counting downloaded dives...
On Petrel I see SENDING PACKET messages
At some point on my Petrel I get ERROR SENDING PACKET and the Petrel UI quits.
On Subsurface mobile the UI is stuck on something like downloading
dive #[dive number]
The UI loops indefinitely with this message. Whatever I do when I go
back on the download from dive computer screen its' always in the
download state. Buttons don't work.
Looking to the app logs via developer's options I see something like
this: (English translation between parenthesis are mine)


"143.271: dive #18 dom 24 set 2017 11:29"
"LocalDeviceBroadcastReceiver::onReceive() - event:
andorid.bluetooth.device.action.ACL_DISCONNECTED"
QMutex: destroying locked mutex
Executing queued closeSocket()
AppState changed to inactive with no save ongoing and unsaved changes
"Save changes to local cache"
Sincronizzazione dei dati in corso (ongoing data sinc)
preparazione al salvataggio dei dati (preparing to save data)
Inizio salvataggio dei dati (starting saving data)
Inizio salvataggio delle immersioni (starting saving dives)
AppState changed to active with save ongoing and unsaved changes
AppState changed to suspended with save ongoing and unsaved changes
Creazione della cache locale riuscita
QEGLPlatformContext: eglSwapBuffers failed: 300d
done saving to git local / remote

I'm not a developer but from logs I see that 18 dives where
downloaded (I need only the newest three of them)
it's like the downloading thread has successfully stopped and some of
the dives are being saved
somewhere... But even restarting Subsurface nothing has changed into
my dive list.

I attached a screenshot of the whole log.
I know that I could get the log file connecting via USB but given that
we already have a text canvas (or something like that) wich shows me
the log why don't you enable the copy paste or use another kind of
widget so a user can easily forward it directly from Subsurface UI?

Thank you
--
Davide
https://vimeo.com/bocio/videos
Dirk Hohndel
2018-04-12 15:01:10 UTC
Permalink
Post by Davide DB
Post by Dirk Hohndel
Post by Davide DB
I do not get you. I'm sorry.
Anyway I miss form my logbook only the last newest dives. So I do not
understand why it's not possible to save them to a temp location and
then parsing what's good from the partial download.
My download stops after the newest 10 dives and I need only the first three.
That's strange because Subsurface-mobile should already handle this correctly.
If the download fails, it SHOULD parse the dives downloaded up to that point.
Which version, which OS, do you have a log / libdivecomputer.log?
It sounds like you can reproduce the problem, so this should be something
that we can fix
The latest Subsurface mobile (I'm a beta tester) on a nexus 7 (first
version) tablet running Android 4.something.
It's the only device I was able to successfully start the download
from my BLE Petrel controller. On all my other Andorid devices I get a
BT INIT FAIL when trying to download.
You must have a dual stack Petrel since the first Version Nexus 7
was BT only (no BLE support). Which points to one of my frustrations
with the current version of our code - we mess up when talking to dual
stack Petrels on dual stack devices - so if your Petrel supports BT
classic and BLE and your phone supports BT classic and BLE, we
somehow manage to crash the BT/BLE stack on the Petrel.
Post by Davide DB
I'll try to resume everything here because IMHO there are two
different problem mixing together: BLE download and UI loop.
I pair the device. On Android BT UI I see something like LE:bt address
Oops. On the first version Nexus 7? That should be impossible.
I own several first version Nexus 7 and they didn't support BLE, I'm
quite certain about that.
https://en.wikipedia.org/wiki/Nexus_7_(2012) <https://en.wikipedia.org/wiki/Nexus_7_(2012)>
https://en.wikipedia.org/wiki/Nexus_7_(2013) <https://en.wikipedia.org/wiki/Nexus_7_(2013)>
You will see that the 2012 version only support BT 3.0, it's the 2013
version that adds BT 4.0 (and therefore BLE).
Post by Davide DB
I start the download
Subsurface start counting downloaded dives...
On Petrel I see SENDING PACKET messages
At some point on my Petrel I get ERROR SENDING PACKET and the Petrel UI quits.
OK so far.
Post by Davide DB
On Subsurface mobile the UI is stuck on something like downloading
dive #[dive number]
The UI loops indefinitely with this message. Whatever I do when I go
back on the download from dive computer screen its' always in the
download state. Buttons don't work.
It should time out.
Can you try this? After you've seen about 5 dives downloaded (why is it
re-downloading dives you already have? you said only 3 were missing)
please tap the Cancel button on the UI. That should cancel the BT download
and show you the partial download which you can then save.
Post by Davide DB
Looking to the app logs via developer's options I see something like
this: (English translation between parenthesis are mine)
"143.271: dive #18 dom 24 set 2017 11:29"
andorid.bluetooth.device.action.ACL_DISCONNECTED"
QMutex: destroying locked mutex
Executing queued closeSocket()
AppState changed to inactive with no save ongoing and unsaved changes
"Save changes to local cache"
Sincronizzazione dei dati in corso (ongoing data sinc)
preparazione al salvataggio dei dati (preparing to save data)
Inizio salvataggio dei dati (starting saving data)
Inizio salvataggio delle immersioni (starting saving dives)
AppState changed to active with save ongoing and unsaved changes
AppState changed to suspended with save ongoing and unsaved changes
Creazione della cache locale riuscita
QEGLPlatformContext: eglSwapBuffers failed: 300d
done saving to git local / remote
I'm not a developer but from logs I see that 18 dives where
downloaded (I need only the newest three of them)
it's like the downloading thread has successfully stopped and some of
the dives are being saved
somewhere... But even restarting Subsurface nothing has changed into
my dive list.
I attached a screenshot of the whole log.
I know that I could get the log file connecting via USB but given that
we already have a text canvas (or something like that) wich shows me
the log why don't you enable the copy paste or use another kind of
widget so a user can easily forward it directly from Subsurface UI?
That's a QML problem (the UI toolkit that we use). I need to ping
the QML developers to find out when that will be possible.

But if you have an email app on the Nexus 7, you should be able
to simply attach the subsurface.log from the root of your storage
device to an email...

/D
Davide DB
2018-04-12 15:07:54 UTC
Permalink
Post by Dirk Hohndel
Oops. On the first version Nexus 7? That should be impossible.
I own several first version Nexus 7 and they didn't support BLE, I'm
quite certain about that.
https://en.wikipedia.org/wiki/Nexus_7_(2012)
https://en.wikipedia.org/wiki/Nexus_7_(2013)
You will see that the 2012 version only support BT 3.0, it's the 2013
version that adds BT 4.0 (and therefore BLE).
I will try again this evening (CET) at home.
IIRC On the Nexus 5x once paired on the bluetooth info I see LE:address
On the Nexus 7 once paired I see only the address (the same as the
other phone) so I selected that address form Subsurface download drop
down.
This evening I will try to install a screen recorder on that ancient
tablet so i will post a video.
Post by Dirk Hohndel
I start the download
Subsurface start counting downloaded dives...
On Petrel I see SENDING PACKET messages
At some point on my Petrel I get ERROR SENDING PACKET and the Petrel UI quits.
OK so far.
On Subsurface mobile the UI is stuck on something like downloading
dive #[dive number]
The UI loops indefinitely with this message. Whatever I do when I go
back on the download from dive computer screen its' always in the
download state. Buttons don't work.
It should time out.
Can you try this? After you've seen about 5 dives downloaded (why is it
re-downloading dives you already have? you said only 3 were missing)
please tap the Cancel button on the UI. That should cancel the BT download
and show you the partial download which you can then save.
Looking to the app logs via developer's options I see something like
this: (English translation between parenthesis are mine)
"143.271: dive #18 dom 24 set 2017 11:29"
andorid.bluetooth.device.action.ACL_DISCONNECTED"
QMutex: destroying locked mutex
Executing queued closeSocket()
AppState changed to inactive with no save ongoing and unsaved changes
"Save changes to local cache"
Sincronizzazione dei dati in corso (ongoing data sinc)
preparazione al salvataggio dei dati (preparing to save data)
Inizio salvataggio dei dati (starting saving data)
Inizio salvataggio delle immersioni (starting saving dives)
AppState changed to active with save ongoing and unsaved changes
AppState changed to suspended with save ongoing and unsaved changes
Creazione della cache locale riuscita
QEGLPlatformContext: eglSwapBuffers failed: 300d
done saving to git local / remote
I'm not a developer but from logs I see that 18 dives where
downloaded (I need only the newest three of them)
it's like the downloading thread has successfully stopped and some of
the dives are being saved
somewhere... But even restarting Subsurface nothing has changed into
my dive list.
I attached a screenshot of the whole log.
I know that I could get the log file connecting via USB but given that
we already have a text canvas (or something like that) wich shows me
the log why don't you enable the copy paste or use another kind of
widget so a user can easily forward it directly from Subsurface UI?
That's a QML problem (the UI toolkit that we use). I need to ping
the QML developers to find out when that will be possible.
But if you have an email app on the Nexus 7, you should be able
to simply attach the subsurface.log from the root of your storage
device to an email...
/D
I could not find that file. i have to install some file manager app.
Anyway I will test everything this evening.

Thanks
--
Davide
https://vimeo.com/bocio/videos
Davide DB
2018-04-13 07:05:21 UTC
Permalink
Post by Davide DB
Post by Dirk Hohndel
Oops. On the first version Nexus 7? That should be impossible.
I own several first version Nexus 7 and they didn't support BLE, I'm
quite certain about that.
https://en.wikipedia.org/wiki/Nexus_7_(2012)
https://en.wikipedia.org/wiki/Nexus_7_(2013)
You will see that the 2012 version only support BT 3.0, it's the 2013
version that adds BT 4.0 (and therefore BLE).
I will try again this evening (CET) at home.
IIRC On the Nexus 5x once paired on the bluetooth info I see LE:address
On the Nexus 7 once paired I see only the address (the same as the
other phone) so I selected that address form Subsurface download drop
down.
This evening I will try to install a screen recorder on that ancient
tablet so i will post a video.
Post by Dirk Hohndel
I start the download
Subsurface start counting downloaded dives...
On Petrel I see SENDING PACKET messages
At some point on my Petrel I get ERROR SENDING PACKET and the Petrel UI quits.
OK so far.
On Subsurface mobile the UI is stuck on something like downloading
dive #[dive number]
The UI loops indefinitely with this message. Whatever I do when I go
back on the download from dive computer screen its' always in the
download state. Buttons don't work.
It should time out.
Can you try this? After you've seen about 5 dives downloaded (why is it
re-downloading dives you already have? you said only 3 were missing)
please tap the Cancel button on the UI. That should cancel the BT download
and show you the partial download which you can then save.
Looking to the app logs via developer's options I see something like
this: (English translation between parenthesis are mine)
"143.271: dive #18 dom 24 set 2017 11:29"
andorid.bluetooth.device.action.ACL_DISCONNECTED"
QMutex: destroying locked mutex
Executing queued closeSocket()
AppState changed to inactive with no save ongoing and unsaved changes
"Save changes to local cache"
Sincronizzazione dei dati in corso (ongoing data sinc)
preparazione al salvataggio dei dati (preparing to save data)
Inizio salvataggio dei dati (starting saving data)
Inizio salvataggio delle immersioni (starting saving dives)
AppState changed to active with save ongoing and unsaved changes
AppState changed to suspended with save ongoing and unsaved changes
Creazione della cache locale riuscita
QEGLPlatformContext: eglSwapBuffers failed: 300d
done saving to git local / remote
I'm not a developer but from logs I see that 18 dives where
downloaded (I need only the newest three of them)
it's like the downloading thread has successfully stopped and some of
the dives are being saved
somewhere... But even restarting Subsurface nothing has changed into
my dive list.
I attached a screenshot of the whole log.
I know that I could get the log file connecting via USB but given that
we already have a text canvas (or something like that) wich shows me
the log why don't you enable the copy paste or use another kind of
widget so a user can easily forward it directly from Subsurface UI?
That's a QML problem (the UI toolkit that we use). I need to ping
the QML developers to find out when that will be possible.
But if you have an email app on the Nexus 7, you should be able
to simply attach the subsurface.log from the root of your storage
device to an email...
/D
I could not find that file. i have to install some file manager app.
Anyway I will test everything this evening.
I tried again yesterday.

When on my Petrel I get ERROR SENDING PACKET the Subsurface mobile UI
remains waiting in download mode endlessly no matter which button I
press.

I tried again and, as Dirk suggested, after few dives were downloaded
I tried canceling the download from Subsurface mobile UI and it works.
It shows me the successfully downloaded dives and I can save them.
WOW!!!

I made another test:

- During the download I cancel it.
- Petrel immediately exit the download mode.
- Subsurface shows me successfully downloaded dives.
- Now I have the option to accept /refuse them but I have the option
to resume/try again the download too.
- I try again to download but the Petrel is not in download mode anymore.
- Subsurface tells me that cannot find the Petrel.
- I quit the download procedure.
- Subsurface crash.

I inspected the log file but I found no trace of the crash or error. I
forgot to save the file, sorry. I was very tired and I will try again
soon.

I'll write a separate email on a small quirkiness I found on the
mobile UI strings.

Bye
--
Davide
https://vimeo.com/bocio/videos
Davide DB
2018-04-13 07:09:03 UTC
Permalink
Just for info, this is the Nexus 7 first gen. log of the happy day
scenario (download aborted and partially downloaded dives successfully
saved)
Long, Martin
2018-04-16 14:37:32 UTC
Permalink
Is there any chance of adding back in the ability to select either the BT
or LE address for a dual stack device? Forcing it to use the legacy
bluetooth stack was the only way I could download dives successfully
without crashing the BLE stack on my phone and/or Shearwater.

Thanks

Martin
Post by Davide DB
Just for info, this is the Nexus 7 first gen. log of the happy day
scenario (download aborted and partially downloaded dives successfully
saved)
_______________________________________________
subsurface mailing list
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Dirk Hohndel
2018-04-16 14:47:58 UTC
Permalink
Is there any chance of adding back in the ability to select either the BT or LE address for a dual stack device? Forcing it to use the legacy bluetooth stack was the only way I could download dives successfully without crashing the BLE stack on my phone and/or Shearwater.
I don't think this was intentionally removed. But when I try to find both addresses of my dual stack Petrel 2 I only get the BLE one.
Let me stare at the code and see why we no longer add both of them.
(and in any case, if a device supports both BLE and BT, we should prefer BT because that's likely to be significantly faster)

/D

Davide DB
2018-04-12 15:01:21 UTC
Permalink
Hint: In one of my test I shutoff Bluetooth while downloading and the
result was the same: Subsurface mobile UI stuck in downloading.

So if you have a working BLE downloading device you could try to
reproduce my bug disabling BT during the download.
Peter Zaal
2018-04-11 08:53:46 UTC
Permalink
I have the same issue with downloading from my Petrel 2 on my Huawei P8
(Android 6.0). I can pair with my phone but Subsurface often sees only a
BLE device (an LE: address).
After a lot of times unpairing, pairing again, restarting subsurface,
sometimes disabling and reenabling BT on the phone, than suddenly it works
and I can download. I didn't find yet the sequence when and how it starts
working however.

On Tue, Apr 10, 2018 at 4:10 PM, Willem Ferguson <
Post by Davide DB
Still trying the latest APK on my phones.
No way to download dives from my Petrel 2 on my 4 different phones.
On a Google Nexus 5 only I don't get the BT FAIL error on my Petrel.
IMHO On Subsurface the UI error message is fake: "no new dives were found
on this device" but I don't think there was a real data transfer because I
get the same error while downloading dives from my Samsung TV.
What can I do to get the dives on my phone?
I attached a screenshot of the app log.
PS
Why don't you use a text control hence text can be selected and copy
pasted here?
Thank you as always
On a Samsung S6 (Android 7.0) the phone sees my Petrel 2 and pairs to it.
However, when downloading dives, the phone only sees a BTLE device and
apparently cannot handle the BTLE mode (error 133). Have no idea why it
doesn't also see an ordinary BT device. Therefore no downloads.
Kind regards,
willem
This message and attachments are subject to a disclaimer.
Please refer to http://upnet.up.ac.za/services/it/documentation/docs/
004167.pdf for full details.
_______________________________________________
subsurface mailing list
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
--
Met vriendelijke groeten,

Peter Zaal
Davide DB
2018-04-11 10:15:27 UTC
Permalink
Post by Peter Zaal
I have the same issue with downloading from my Petrel 2 on my Huawei P8
(Android 6.0). I can pair with my phone but Subsurface often sees only a BLE
device (an LE: address).
After a lot of times unpairing, pairing again, restarting subsurface,
sometimes disabling and reenabling BT on the phone, than suddenly it works
and I can download. I didn't find yet the sequence when and how it starts
working however.
Thanks Peter,

My question, among the others, was:

Once the download starts and an error occurs, Subsurface UI should
exit the download eventually signaling the error.
From what I can see from my logs (English translation between
parenthesis are mine) I get :

"143.271: dive #18 dom 24 set 2017 11:29"
"LocalDeviceBroadcastReceiver::onReceive() - event:
andorid.bluetooth.device.action.ACL_DISCONNECTED"
QMutex: destroying locked mutex
Executing queued closeSocket()
AppState changed to inactive with no save ongoing and unsaved changes
"Save changes to local cache"
Sincronizzazione dei dati in corso (ongoing data sinc)
preparazione al salvataggio dei dati (preparing to save data)
Inizio salvataggio dei dati (starting saving data)
Inizio salvataggio delle immersioni (starting saving dives)
AppState changed to active with save ongoing and unsaved changes
AppState changed to suspended with save ongoing and unsaved changes
Creazione della cache locale riuscita
QEGLPlatformContext: eglSwapBuffers failed: 300d
done saving to git local / remote

I'm not a developer but from logs it's like the downloading thread
has successfully stopped and some of the dives are being saved
somewhere... But even restarting Subsurface nothing has changed into
my dive list.
Willem Ferguson
2018-04-11 10:28:00 UTC
Permalink
Post by Davide DB
Post by Peter Zaal
I have the same issue with downloading from my Petrel 2 on my Huawei P8
(Android 6.0). I can pair with my phone but Subsurface often sees only a BLE
device (an LE: address).
After a lot of times unpairing, pairing again, restarting subsurface,
sometimes disabling and reenabling BT on the phone, than suddenly it works
and I can download. I didn't find yet the sequence when and how it starts
working however.
Thanks Peter,
Once the download starts and an error occurs, Subsurface UI should
exit the download eventually signaling the error.
Post by Peter Zaal
From what I can see from my logs (English translation between
I'm not a developer but from logs it's like the downloading thread
has successfully stopped and some of the dives are being saved
somewhere... But even restarting Subsurface nothing has changed into
my dive list.
Davide,

I think these are two separate issues. Peter and myself cannot make a
connection at all because an ordinary bluetooth transfer option is not
available (only BTLE). You, on the other hand, is making a bluetooth
connection but lose some dives in the download process. Is that correct?

Kind regards,

willem
--
This message and attachments are subject to a disclaimer.

Please refer to 
http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf
<http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf> for
full
details.
Davide DB
2018-04-11 10:36:28 UTC
Permalink
On 11 April 2018 at 12:28, Willem Ferguson
Post by Willem Ferguson
Davide,
I think these are two separate issues. Peter and myself cannot make a
connection at all because an ordinary bluetooth transfer option is not
available (only BTLE). You, on the other hand, is making a bluetooth
connection but lose some dives in the download process. Is that correct?
Kind regards,
willem
Yes

No dives at all actually :)
--
Davide
https://vimeo.com/bocio/videos
Davide DB
2018-04-11 10:42:53 UTC
Permalink
Post by Davide DB
On 11 April 2018 at 12:28, Willem Ferguson
Post by Willem Ferguson
Davide,
I think these are two separate issues. Peter and myself cannot make a
connection at all because an ordinary bluetooth transfer option is not
available (only BTLE). You, on the other hand, is making a bluetooth
connection but lose some dives in the download process. Is that correct?
Kind regards,
willem
Yes
No dives at all actually :)
Regardless of the BT failure (I'm resigned) actually my concern was
about Subsurface UI not managing correctly the error sequence.
--
Davide
https://vimeo.com/bocio/videos
Long, Martin
2018-04-11 12:18:31 UTC
Permalink
Post by Davide DB
Post by Davide DB
On 11 April 2018 at 12:28, Willem Ferguson
Post by Willem Ferguson
Davide,
I think these are two separate issues. Peter and myself cannot make a
connection at all because an ordinary bluetooth transfer option is not
available (only BTLE). You, on the other hand, is making a bluetooth
connection but lose some dives in the download process. Is that correct?
Kind regards,
willem
Yes
No dives at all actually :)
Regardless of the BT failure (I'm resigned) actually my concern was
about Subsurface UI not managing correctly the error sequence.
I'm having the same problems. I'm able to download successfully using my
single stack (LE) Perdix AI, although even that can be temperamental.
Normally a phone reboot is required, and then I have to start Bluetooth on
the Perdix AFTER I start the download in subsurface.

On my dual-stack Petrel 2, I can't get it to download at all. I used to be
able to do it when the Petrel showed up as both an LE device and a classic
BT device, but now it only shows up as LE, so it doesn't work. (Is this a
subsurface change? Can we make it show dual-stack devices as both again?)

This is on a Pixel 2, running the lastest patch release of Orio.

Perdix AI - Firmware v53/BT06 Hardware AI-02A
Petrel 2 (DiveCAN, JJ-CCR) - Firmware v53 Hardware 3.4.1

I suspect the BT stack in Android is still buggy. Once it has failed, it
doesn't let me do certain things, like switch BT on/off, and Forget
devices. However, it was possible to work around these issues when I could
choose either stack for the Petrel 2, Now I can't do that.

Martin
Loading...