Page 2 of 2

Re: download logbook over Bluetooth

Posted: Thursday 20. August 2015, 08:34
by TnT
I have prepared a build of the libdivecomputer test application where I increased the timeout from 3 to 20 seconds. You can download it here. It's a command-line application, which you need to run with the following options:
[pre]
ostc3-timeout.exe -v -l ostc3.log -d ostc3.xml -b ostc3
[/pre]
Replace with the correct serial port (e.g. COM6). When done, send me the ostc3.log file. (If it's short you can also post in the forum.)

Re: download logbook over Bluetooth

Posted: Thursday 20. August 2015, 16:57
by divinglog
Hi Mike

For the Diving Log null reference exeption, please download this update and extract it into the Diving Log 6.0 program folder:

http://www.divinglog.com/download/DivelogTest.zip

Let me know if this error still happens.

Kind regards,
Sven

Re: download logbook over Bluetooth

Posted: Thursday 20. August 2015, 19:45
by Mike R
Sven,

Looks like the same error.

the error log says ...

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=209, data=FAFA000000EA160023E716000F06040515781A1F002A9E00E0038D081500000115000000150000001500000015000000015101100200007FD60000FF46005A00640078008C00001E0044189A081E5501010000BCCBCDCBC7C2BBB3ABA39D969089827B02EE1240614256403CA9644067955A40A66143408F2A2940AF630F40225CF13FB742CC3FD34CB33FAA2BA23F8C54943F5C34893FE131803FA212723FAAB8663F50505050505050505050505050505050000000000000000000000000000000000000000000000000000000000000
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: 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)]


INFO: libdivecomputer-0.dll version: 0.5.0-develERROR: The handle is invalid (6) [in serial_win32.c:437 (serial_write)]
ERROR: Failed to send the command. [in hw_ostc3.c:168 (hw_ostc3_transfer)]
ERROR: Failed to send the command. [in hw_ostc3.c:410 (hw_ostc3_device_close)]
ERROR: The handle is invalid (6) [in serial_win32.c:187 (serial_close)]

Cheers
Mike

Re: download logbook over Bluetooth

Posted: Thursday 20. August 2015, 19:48
by Henrik S
INFO: Open: name=COM18
ERROR: Ã…tkomst nekad (5) [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

Re: download logbook over Bluetooth

Posted: Thursday 20. August 2015, 21:04
by divinglog
Hi Mike

No, my update fixed only this error below (let me know if you still get this), not the libdivecomputer error. For the libdivecomputer error, you have to download Jef's (TnT) file.

[pre]
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)
[/pre]

Re: download logbook over Bluetooth

Posted: Thursday 20. August 2015, 22:43
by Mike R
Sven,

Yes - not every time but three out of the last four tries it gave this error (below).

Mike



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

Re: download logbook over Bluetooth

Posted: Friday 28. August 2015, 12:54
by Mike R
OK - finally solved the problem by buying a new and different Bluetooth dongle. Asus (Bluetooth 4) worked first time. So it looks like my problem was in not having an internal Bluetooth connection and choosing a Bluetooth dongle that didn't work with the OSTC / Dive Log 6.

The reference is Asus USB-BT400 Bluetooth 4.0 USB Dongle.