download logbook over Bluetooth

OSTC's running hwOS sport or tech
varaktor
Posts: 1
Joined: Tuesday 28. July 2015, 17:57

download logbook over Bluetooth

Post by varaktor »

Hi,

I do have the new OSTC2 and was trying to download the logbook data over BT. I tried it on a Windows7 PC with BT dongle and on a Samsung Smartphone running Android 4.4.2

With the new OSTC companion (1.200) I can connect to it on the PC without a problem (and set eg. time and date)

With Diving Log 6.0 or Subsurface it doesn't work on the PC and with Divemate on the Smartphone:

Subsurface error message:
Unzureichende Privilegien zum Öffnen von Gerät COM16 Heinrichs Weikamp (OSTC2)

doesn't show download mode enabled on OSTC

Diving Log 6.0 Error Message:
OSTC 2 nicht gefunden, bitte überprüfen ob er angeschlossen oder eingeschalltet ist (DC_STATUS_TIMEOUT)

download mode enabled is shown on the OSTC

Divemate on Android phone:
Download mode enabled is shown on OSTC
progressbar goes to 81% and stops than until it goes into timeout

What am I doing wrong?

Thanks for your help
Uli
heinrichsweikamp
Posts: 4446
Joined: Sunday 13. May 2007, 18:07

Re: download logbook over Bluetooth

Post by heinrichsweikamp »

Hallo Uli,

Make sure to select the "OSTC 2", not OSTC 2N/2C or Mk.2. Bluetooth must be enabled manually in the OSTC in order to download.

regards,
Matthias
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

I've also got problems downloading. I'm using a Bluetooth dongle, have upgraded to Dive Log 6, have downloaded FTDI driver, have selected OSTC 2. I appear to have a bluetooth connection to the computer, and the OSTC 2 seems to connect briefly to Dive Log 6 via COM port 6 but then disconnects and reports that it has timed out.

Any thoughts?

Mike R
heinrichsweikamp
Posts: 4446
Joined: Sunday 13. May 2007, 18:07

Re: download logbook over Bluetooth

Post by heinrichsweikamp »

Hi Mike,

You do not need to install the FTDI driver (Only required for USB OSTC's). Are the OSTC2 and the system paired? "I appear to have a bluetooth connection" - check system settings -> Devices. Is the OSTC2 visible there and which com-port has been assigned (Right-Click -> Preferences)?

Regards,
Matthias
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

Thanks Matthias,
I have attached some screen prints. As far as I can see the OSTC and the computer are paired and COM port 6 has been assigned.
Mike
heinrichsweikamp
Posts: 4446
Joined: Sunday 13. May 2007, 18:07

Re: download logbook over Bluetooth

Post by heinrichsweikamp »

Do you have the bluetooth mode enabled (In the OSTC 2) when trying to downlaod?

Your configuration and settings look ok.

regards,
Matthias
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

I believe so - I hit the Bluetooth option and it responds - then it times out after a few minutes. While it seems to be enabled I can see an indication on the Bluetooth screen on the laptop that there is a connection.

I tried to download like that numerous times. Then I tried on the OSTC 2 coming out of its Bluetooth screen to go to the Logbook menu, in case that is necessary - but that just seems to close the connection.
Mike
heinrichsweikamp
Posts: 4446
Joined: Sunday 13. May 2007, 18:07

Re: download logbook over Bluetooth

Post by heinrichsweikamp »

Hi Mike,

The OSTC enables Bluetooth in the Bluetooth mode only. Try the following: make sure to start the apps with Administrator mode. Keep the distance quite short. Do one step after the other (Pair the device, start the App, start downloading).

Regards,
Matthias
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

OK - have tried the order you suggested and opened the app (Dive Log 6) in administrator mode. I am getting the attached error report on the laptop computer. Everything else checks out ok - COM6 / OSTC 2 etc.

On the OSTC there is now a line under the Bluetooth button that says "Download mode enabled". That looks promising, but after that it still sends the attached error report and then the OSTC disconnects. It's as if there's a connection established but nothing is heard back from the OSTC and therefore something times out.

I note that the serial port connection (COM6) is defined on the laptop as Outgoing whereas COM4 and COM5 are defined as Incoming - not sure if that makes a difference. I've tried removing the COM6 connection and then re-establishing it - no difference!

I appreciate this is difficult to solve remotely, but I do appreciate your continuing support and advice.

Regards
Mike
Henrik S
Posts: 10
Joined: Saturday 30. May 2015, 15:15

Re: download logbook over Bluetooth

Post by Henrik S »

Hi!

I am so pissed off now of the problem of getting the OSTC2 to speak with my PC Win10 that I am close to throwing the computer right at the wall...

My Dell laptop identifies the OSTC2 in Bluetooth settings. It adresses a COM-port.
This both with the built in and external Bluetooth adapter.

None of the programs OSTC Companion, OSTC Tools, Subsurface or Divelog will connect and download from the OSTC2. Tried several COM-ports

Had the same problem with Win7. Worked with Win8.1 and now it's fucked up with Win10

:X
heinrichsweikamp
Posts: 4446
Joined: Sunday 13. May 2007, 18:07

Re: download logbook over Bluetooth

Post by heinrichsweikamp »

Mike R Wrote:
> still sends the attached error report and then the
> OSTC disconnects. It's as if there's a connection

There is the option: Log Errors behind "Advanced Settings". That would help a lot.

regards,
Matthias
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

Matthias,
I have successfully upgraded the firmware of the OSTC2 via OSTC Companion - and using the Bluetooth connection, obviously. So I guess that confirms the connection is good. However, the download of dive data to Diving Log 6 is showing the same error as before!

Does that give any more clues?

Cheers
Mike
heinrichsweikamp
Posts: 4446
Joined: Sunday 13. May 2007, 18:07

Re: download logbook over Bluetooth

Post by heinrichsweikamp »

Mike R Wrote:
-------------------------------------------------------
> Does that give any more clues?

Please enable the error log and post it here. No screenshot please, the whole log file which will be created if you enable the option: "Log Errors" behind "Advanced Settings"...

regards,
Matthias
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

Error Log

System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details.

at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at Divinglog.Download.Libdivecomputer.BWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

System.InvalidOperationException: Internal error in newly produced path figures.

at System.Windows.Media.PathGeometry.FigureList.AddFigureToList(Boolean isFilled, Boolean isClosed, MilPoint2F* pPoints, UInt32 pointCount, Byte* pSegTypes, UInt32 segmentCount)
at Divinglog.Download.Libdivecomputer.dc_device_open(IntPtr& device, IntPtr context, IntPtr descriptor, String name)
at Divinglog.Download.Libdivecomputer.DLUniversal(LibdivecomputerDescriptor Desc)
at Divinglog.Download.Libdivecomputer.BWorker_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

Just did it again and got this

INFO: Open: name=COM6
INFO: Configure: baudrate=115200, databits=8, parity=0, stopbits=1, flowcontrol=0
INFO: Timeout: value=3000
INFO: Sleep: value=300
INFO: Flush: queue=3, input=0, output=0
INFO: Write: size=1, data=BB
INFO: Read: size=1, data=BB
INFO: Read: size=1, data=4D
INFO: Write: size=1, data=69
INFO: Read: size=1, data=69
INFO: Read: size=64, data=9A2701564D696B652052204F53544332203200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
INFO: Read: size=1, data=4D
INFO: Write: size=1, data=6A
INFO: Read: size=1, data=6A
INFO: Read: size=1, data=11
INFO: Read: size=1, data=4D
INFO: Write: size=1, data=61
INFO: Read: size=1, data=61
INFO: Read: size=306, data=FAFA000000EA160023E716000F06040515781A1F002A9E00E0038D081500000115000000150000001500000015000000015101100200007FD60000FF46005A00640078008C00001E0044189A081E5501010000BCCBCDCBC7C2BBB3ABA39D969089827B02EE1240614256403CA9644067955A40A66143408F2A2940AF630F40225CF13FB742CC3FD34CB33FAA2BA23F8C54943F5C34893FE131803FA212723FAAB8663F5050505050505050505050505050505000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030A000000AE5384030000FBFBFAFA8D1700F4260023640F000F07080C0471071400117200F0032B0115000001150000001500000015000000150000000151
ERROR: Failed to receive the answer. [in hw_ostc3.c:218 (hw_ostc3_transfer)]
ERROR: Failed to read the header. [in hw_ostc3.c:550 (hw_ostc3_device_foreach)]


INFO: libdivecomputer-0.dll version: 0.5.0-develINFO: Write: size=1, data=FF
INFO: Read: size=1, data=B0
ERROR: Unexpected echo. [in hw_ostc3.c:186 (hw_ostc3_transfer)]
ERROR: Failed to send the command. [in hw_ostc3.c:410 (hw_ostc3_device_close)]
Henrik S
Posts: 10
Joined: Saturday 30. May 2015, 15:15

Re: download logbook over Bluetooth

Post by Henrik S »

INFO: Open: name=COM19
ERROR: Det gick inte att hitta elementet (1168) [in serial_win32.c:152 (serial_open)]
ERROR: Failed to open the serial port. [in hw_ostc3.c:275 (hw_ostc3_device_open)]


INFO: libdivecomputer-0.dll version: 0.5.0-devel
TnT
Posts: 62
Joined: Friday 24. June 2011, 14:05

Re: download logbook over Bluetooth

Post by TnT »

Mike R Wrote:
-------------------------------------------------------
> Just did it again and got this
>
> INFO: Write: size=1, data=61
> INFO: Read: size=1, data=61
> INFO: Read: size=306,
> data=FAFA000000EA160023E716000F06040515781A1F002A9
> E00E0038D08150000011500000015000000150000001500000
> 0015101100200007FD60000FF46005A00640078008C00001E0
> 044189A081E5501010000BCCBCDCBC7C2BBB3ABA39D9690898
> 27B02EE1240614256403CA9644067955A40A66143408F2A294
> 0AF630F40225CF13FB742CC3FD34CB33FAA2BA23F8C54943F5
> C34893FE131803FA212723FAAB8663F5050505050505050505
> 05050505050500000000000000000000000000000000000000
> 00000000000000000000000000000000000000000000000000
> 00000000000000000000000000000000000000000030A00000
> 0AE5384030000FBFBFAFA8D1700F4260023640F000F07080C0
> 471071400117200F0032B01150000011500000015000000150
> 00000150000000151
> ERROR: Failed to receive the answer. [in
> hw_ostc3.c:218 (hw_ostc3_transfer)]
> ERROR: Failed to read the header. [in
> hw_ostc3.c:550 (hw_ostc3_device_foreach)]

A timeout while reading the dive headers. Maybe the bluetooth connection got disconnected? Can you retry to check whether this was just an occasional error or not?

Jef
--
libdivecomputer developer
http://www.libdivecomputer.org/
TnT
Posts: 62
Joined: Friday 24. June 2011, 14:05

Re: download logbook over Bluetooth

Post by TnT »

Henrik S Wrote:
-------------------------------------------------------
> INFO: Open: name=COM19
> ERROR: Det gick inte att hitta elementet (1168)
> [in serial_win32.c:152 (serial_open)]
> ERROR: Failed to open the serial port. [in
> hw_ostc3.c:275 (hw_ostc3_device_open)]

The windows error code 1168 is ERROR_NOT_FOUND. So I guess you're trying to use a serial port which does not exist.

Jef
--
libdivecomputer developer
http://www.libdivecomputer.org/
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

Will do - I've tried it scores of times of course but just now have copied the error log a couple of times. Hope this helps!

INFO: Open: name=COM6
INFO: Configure: baudrate=115200, databits=8, parity=0, stopbits=1, flowcontrol=0
INFO: Timeout: value=3000
INFO: Sleep: value=300
INFO: Flush: queue=3, input=0, output=0
INFO: Write: size=1, data=BB
INFO: Read: size=1, data=BB
INFO: Read: size=1, data=4D
INFO: Write: size=1, data=69
INFO: Read: size=1, data=69
INFO: Read: size=64, data=9A2701564D696B652052204F53544332203200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
INFO: Read: size=1, data=4D
INFO: Write: size=1, data=6A
INFO: Read: size=1, data=6A
INFO: Read: size=1, data=11
INFO: Read: size=1, data=4D
INFO: Write: size=1, data=61
INFO: Read: size=1, data=61
INFO: Read: size=328, data=FAFA000000EA160023E716000F06040515781A1F002A9E00E0038D081500000115000000150000001500000015000000015101100200007FD60000FF46005A00640078008C00001E0044189A081E5501010000BCCBCDCBC7C2BBB3ABA39D969089827B02EE1240614256403CA9644067955A40A66143408F2A2940AF630F40225CF13FB742CC3FD34CB33FAA2BA23F8C54943F5C34893FE131803FA212723FAAB8663F5050505050505050505050505050505000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030A000000AE5384030000FBFBFAFA8D1700F4260023640F000F07080C0471071400117200F0032B0115000001150000001500000015000000150000000151B00F02000000000000FF46005A00640078008C000001
ERROR: Failed to receive the answer. [in hw_ostc3.c:218 (hw_ostc3_transfer)]
ERROR: Failed to read the header. [in hw_ostc3.c:550 (hw_ostc3_device_foreach)]


INFO: libdivecomputer-0.dll version: 0.5.0-develINFO: Write: size=1, data=FF
INFO: Read: size=1, data=00
ERROR: Unexpected echo. [in hw_ostc3.c:186 (hw_ostc3_transfer)]
ERROR: Failed to send the command. [in hw_ostc3.c:410 (hw_ostc3_device_close)]


AND AGAIN:
System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details.

at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at Divinglog.Download.Libdivecomputer.BWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

System.NullReferenceException: Object reference not set to an instance of an object.

at Divinglog.Download.Libdivecomputer.dc_device_foreach(IntPtr device, dive_callback callback, IntPtr userdata)
at Divinglog.Download.Libdivecomputer.DLUniversal(LibdivecomputerDescriptor Desc)
at Divinglog.Download.Libdivecomputer.BWorker_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Diving Log Version: 6.0.0.1
Windows Version: Windows 8.1

AND AGAIN:

System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details.

at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at Divinglog.Download.Libdivecomputer.BWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

System.NullReferenceException: Object reference not set to an instance of an object.

at Divinglog.Download.Libdivecomputer.dc_device_open(IntPtr& device, IntPtr context, IntPtr descriptor, String name)
at Divinglog.Download.Libdivecomputer.DLUniversal(LibdivecomputerDescriptor Desc)
at Divinglog.Download.Libdivecomputer.BWorker_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Diving Log Version: 6.0.0.1
Windows Version: Windows 8.1


Did something a bit different the last two times - not seen that before - a different error report window.

That's what I've got.

Mike
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

And again:

INFO: Open: name=COM6
INFO: Configure: baudrate=115200, databits=8, parity=0, stopbits=1, flowcontrol=0
INFO: Timeout: value=3000
INFO: Sleep: value=300
INFO: Flush: queue=3, input=0, output=0
INFO: Write: size=1, data=BB
INFO: Read: size=0, data=
ERROR: Failed to receive the echo. [in hw_ostc3.c:176 (hw_ostc3_transfer)]
ERROR: Failed to send the command. [in hw_ostc3.c:318 (hw_ostc3_device_init_download)]


INFO: libdivecomputer-0.dll version: 0.5.0-devel

Mike
divinglog
Posts: 181
Joined: Tuesday 15. January 2008, 00:14

Re: download logbook over Bluetooth

Post by divinglog »

Hi Mike

The 2 errors:

System.Reflection.TargetInvocationException
System.NullReferenceException

are a problem within Diving Log, not libdivecomputer. I'm currently looking into this issue.

But I don't think they are causing the download interruption:

ERROR: Failed to receive the answer. [in hw_ostc3.c:218 (hw_ostc3_transfer)]
ERROR: Failed to read the header. [in hw_ostc3.c:550 (hw_ostc3_device_foreach)]

So there are acutually 2 different issues.
Diving Log 6.0 - https://www.divinglog.de/
heinrichsweikamp
Posts: 4446
Joined: Sunday 13. May 2007, 18:07

Re: download logbook over Bluetooth

Post by heinrichsweikamp »

As for the timeouts: Increasing the thread priority (Windows Task Manager) for the OSTCCompanion.exe should also help. Especially on older PCs. This was just reported via mail from one of the forum users here.

regards,
Matthias
TnT
Posts: 62
Joined: Friday 24. June 2011, 14:05

Re: download logbook over Bluetooth

Post by TnT »

divinglog Wrote:
-------------------------------------------------------
> ERROR: Failed to receive the answer. [in
> hw_ostc3.c:218 (hw_ostc3_transfer)]
> ERROR: Failed to read the header. [in
> hw_ostc3.c:550 (hw_ostc3_device_foreach)]

For this problem, I would like to test a build with a longer timeout. But that will have to wait until tomorrow. I'm too busy right now.

Jef
--
libdivecomputer developer
http://www.libdivecomputer.org/
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

Many thanks guys - tell me when you need me to try anything - otherwise I'll leave it with you experts.
Mike
Mike R
Posts: 14
Joined: Monday 3. August 2015, 17:47

Re: download logbook over Bluetooth

Post by Mike R »

By the way - the laptop I'm using is an HP Ultrabook just over a year old.

Mike
Post Reply