Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected payload size (11) with Cressi Donatello #67

Open
yannpub opened this issue Aug 14, 2024 · 17 comments
Open

Unexpected payload size (11) with Cressi Donatello #67

yannpub opened this issue Aug 14, 2024 · 17 comments

Comments

@yannpub
Copy link

yannpub commented Aug 14, 2024

When trying to connect the Donatello via an USB Modem-IrDA interface (MacOS 14.6.1 on Macbook Pro M1), I get the following error:

Subsurface: v6.0.5214.0, built with libdivecomputer v0.9.0-devel-Subsurface-NG (9641883)
[94.525817] INFO: Open: name=/dev/tty.usbmodem1101
[94.539488] INFO: Configure: baudrate=115200, databits=8, parity=0, stopbits=0, flowcontrol=0
[94.551308] INFO: Timeout: value=3000
[94.551311] INFO: RTS: value=0
[94.553296] INFO: DTR: value=0
[94.555302] INFO: Sleep: value=100
[94.660366] INFO: Purge: direction=3
[94.660471] INFO: Sleep: value=100
[94.765809] INFO: Write: size=8, data=AAAAAA0000000055
[94.767455] INFO: Read: size=4, data=AAAAAA0B
[94.767523] ERROR: Unexpected payload size (11). [in src/cressi_goa.c:139 (cressi_goa_device_receive)]
[94.767563] ERROR: Failed to read the version information. [in src/cressi_goa.c:396 (cressi_goa_device_foreach)]

Seems the Donatello answer is not the proper size/content.

Computer is a new Donatello, Firmware is 300.

@piezza
Copy link

piezza commented Sep 23, 2024

I have same issue with watch I bought on Amazon some months ago. Seems payload has now 1 byte extra in current models.

@jefdriesen
Copy link
Contributor

Can you test with this build of the libdivecomputer command-line client:

https://libdivecomputer.org/builds/experimental/windows/nepto.exe (windows)
https://libdivecomputer.org/builds/experimental/linux/nepto (linux)

And run it with these options:

nepto.exe -vv -l goa.log -f goa download -o dive.%n.bin -f raw COMx (Windows)
./nepto -vv -l goa.log -f goa download -o dive.%n.bin -f raw /dev/ttyX (Linux)

Replace COMx/ttyX with the correct serial port. When finished send me the goa.log and the *.bin files.

@piezza
Copy link

piezza commented Sep 23, 2024

I attached the zipped files.

donatello.zip

@jefdriesen
Copy link
Contributor

Your donatello seems to use the same new data format as the Leonardo 2.0. I'm already working on that.

@yannpub
Copy link
Author

yannpub commented Oct 4, 2024

Sorry, I wasn't much available the last 2 weeks.

Thanks @piezza for the files.

@jefdriesen do you need additional zip files, or did the ones provided enough? I saw in libdivecomputer/libdivecomputer#33 that you had no data on freediving. I have both air dives and freedives in the computer, let me know if that can help.

@jefdriesen
Copy link
Contributor

I still have no data from freedives, so I can still use such data.

@yannpub
Copy link
Author

yannpub commented Oct 4, 2024

Here are the files
Donatello_new.zip
I think there may be a scubadive that we recorded as freedive if you find one the dive profile inconsistent ;-)

@PAA-the-original
Copy link

Had the same issue with my recently purchased Donatello. After connecting to the IoS application from Cressi went through a firmware upgrade (now at x012d or 301).
And Subsurface could not connect with same above error message as Yann
logDonatellox301.zip
.
Did the nepto.exe capture as well with a few pool test dives... adding my log files in case it helps you !
Cheers!

@jefdriesen
Copy link
Contributor

@yannpub Can you export your freedives out of the cressi app in some human readable format (csv, XML, SQLite, etc), or if that's not possible make some screenshots. I would to see the expected profile and the basic values like max depth, dive time, temperature, etc so I can find those more easily in the data.

@yannpub
Copy link
Author

yannpub commented Oct 7, 2024

Unfortunately, I am not using the Cressi IR-BT adapter, but an infrared-to-USB transceiver (the one Daniel has created here: https://groups.google.com/g/subsurface-divelog/c/ku56SSlCtZU/m/kquwh2HKAQAJ).
Cressi software only works with the BT adapter, thus I can't use their software to import the dives and get a human readable format. But if you have any suggestions of a workaround, I would be happy to try.

@jefdriesen
Copy link
Contributor

You could make some photos of the dive computer, but let's try something different. I attached the output of the libdivecomputer parser: freedives.xml.gz. Can you check if the values are correct? For the profile graph, you can open the xml into subsurface, but for the other fields (max depth, dive time, etc) you need to check manually because subsurface calculates some of them from the profile.

@yannpub
Copy link
Author

yannpub commented Oct 8, 2024

Thank you for your help !

All the informations (depth, dive time) look correct. I couldn't find the water temperature, but may be it is not included in the payload, or not read by subsurface ?

@jefdriesen
Copy link
Contributor

Support for the new Cressi firmware is now available in libdivecomputer master: libdivecomputer/libdivecomputer@a318971

@paalbaret
Copy link

paalbaret commented Dec 4, 2024

Thanks for the update Jef!
Trying to test it, as the change does not seem to be merged to subsurface yet,
when I try to make fails every time on a MacOs environement at :

checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
./configure: line 14940: syntax error near unexpected token newline' ./configure: line 14940: yes:'
make: *** [config.status] Error 2

I tried to create a dll on a windows environment but could not build it either using make or cmake... any help appreciated...

@jefdriesen
Copy link
Contributor

Can you show the steps you did? Without more detailed information it's very difficult to help. Are you building from a git checkout or a tarball, which commands and options did you use, etc.

I have Mac and Windows CI builds in Github Actions and those are building without errors, so it's certainly possible:
https://github.com/libdivecomputer/libdivecomputer/blob/master/.github/workflows/build.yml#L38-L67

@paalbaret
Copy link

Thanks Jef for taking the time, I followed the https://www.libdivecomputer.org/documentation.html Compiling part of your doc, and the problem seems to be with the configure script:

Clone locally your github repo :
git clone https://github.com/libdivecomputer/libdivecomputer.git
Install dependency :
brew install autoconf automake libtool hidapi libusb

Then from the libdivecomputer root directory :
autoreconf --install
./configure
<This is where I get the error message :

./configure: line 15506: syntax error near unexpected token newline' ./configure: line 15506: yes:'

and indeed the configure script looks weird as if a ")" was missing after the "yes:" :

 if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;; 

make

make install

@jefdriesen
Copy link
Contributor

The configure script is autogenerated by the build system. Maybe try again after cleaning the work directory (git clean -fdx)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants