Problems with libdivecomputer under OSX
Henrik
libdivecomputer at henrik.synth.no
Fri Jul 6 21:13:17 UTC 2012
On 06.07.12 22:34, Pascal Manchon wrote:
> Hi,
>
> I stumbled on that error previously, and I think it might come from a casting issue.
>
> In the file serial_posix.c, can you try replacing the first line of the function serial_set_status, which is :
> int action = (level ? TIOCMBIS : TIOCMBIC);
> by :
> unsigned long action = (level ? TIOCMBIS : TIOCMBIC);
>
> I think it should not break the function for other OS, but it might be worth some more thorough testing...
My HelO2 has one of its "I don't want to show Data Transfer in the
display" issues right now and has to rest a bit. So can't test a working
connection right now.
But your fix has indeed done something anyway, it seems to actually try
to contact the computer now:
$ examples/vyper2 /dev/tty.usbserial-ST000001 ## Before the fix
DEVICE=/dev/tty.usbserial-ST000001
suunto_vyper2_device_open
TRACE (serial_posix.c:684, ioctl): Inappropriate ioctl for device (25)
suunto_vyper2.c:123: Failed to set the DTR line.
suunto_vyper2_test.c:77: Error opening serial port.
suunto_vyper2_device_open
TRACE (serial_posix.c:684, ioctl): Inappropriate ioctl for device (25)
suunto_vyper2.c:123: Failed to set the DTR line.
suunto_vyper2_test.c:37: Error opening serial port.
SUMMARY
-------
test_dump_memory: Input/output error
test_dump_sdm: Input/output error
$ vim src/serial_posix.c ## replacing int with unsigned long
$ make
make all-recursive
[...]
$ examples/vyper2 /dev/tty.usbserial-ST000001
DEVICE=/dev/tty.usbserial-ST000001
suunto_vyper2_device_open
dc_device_version
suunto_vyper2.c:194: Failed to receive the answer.
suunto_vyper2.c:194: Failed to receive the answer.
suunto_vyper2.c:194: Failed to receive the answer.
suunto_vyper2_test.c:85: Cannot identify computer.
suunto_vyper2_device_open
dc_device_version
suunto_vyper2.c:194: Failed to receive the answer.
suunto_vyper2.c:194: Failed to receive the answer.
suunto_vyper2.c:194: Failed to receive the answer.
suunto_vyper2_test.c:45: Cannot identify computer.
SUMMARY
-------
test_dump_memory: Timeout
test_dump_sdm: Timeout
Henrik
More information about the Devel
mailing list