Hi.
I'm having problems downloading dives from my Shearwater Predator, so I decided to try dctool:
dctool -l predator-download.log -f predator download -f raw -o predator-download.raw /dev/tty.Predator
This worked fine! But when I try again, all subsequent tries gives me an error:
DATETIME 2022-12-05T08:31:28Z (1670229088) VERSION 0.7.0 Opening the I/O stream (serial, /dev/tty.Predator). Opening the device (Shearwater Predator). Registering the event handler. Registering the cancellation handler. Downloading the dives. Event: progress 0.00% (0/10000) ERROR: Failed to receive the packet. [in shearwater_common.c:239 (shearwater_common_slip_read)] ERROR: Failed to receive the response packet. [in shearwater_common.c:358 (shearwater_common_transfer)] ERROR: Error downloading the dives. [in dctool_download.c:228 (download)] ERROR: Timeout
I've also tried xml output and dump, with the same results. I've used these commands:
dctool -l predator-download-xml.log -f predator download -o predator-download.xml /dev/tty.Predator
dctool -l predator-dump.log -f predator dump -o predator-dump /dev/tty.Predator
What can be the issue here?
I'm on macOS 12.6.1. Predator has latest firmware (v63). I can send the one working raw download if needed.
Thanks, Henrik
On 5/12/2022 09:42, Henrik B A wrote:
I'm having problems downloading dives from my Shearwater Predator, so I decided to try dctool:
dctool -l predator-download.log -f predator download -f raw -o predator-download.raw /dev/tty.Predator
This worked fine! But when I try again, all subsequent tries gives me an error:
DATETIME 2022-12-05T08:31:28Z (1670229088) VERSION 0.7.0 Opening the I/O stream (serial, /dev/tty.Predator). Opening the device (Shearwater Predator). Registering the event handler. Registering the cancellation handler. Downloading the dives. Event: progress 0.00% (0/10000) ERROR: Failed to receive the packet. [in shearwater_common.c:239 (shearwater_common_slip_read)] ERROR: Failed to receive the response packet. [in shearwater_common.c:358 (shearwater_common_transfer)] ERROR: Error downloading the dives. [in dctool_download.c:228 (download)] ERROR: Timeout
You didn't enable verbose mode (-v), so I can't see the communication in the above log. I looks like you're experiencing a timeout on the very first request that gets send to the dive computer. That means there is no response from the dive computer.
I've also tried xml output and dump, with the same results. I've used these commands:
dctool -l predator-download-xml.log -f predator download -o predator-download.xml /dev/tty.Predator
dctool -l predator-dump.log -f predator dump -o predator-dump /dev/tty.Predator
For the Predator, under the hood downloading a memory dump or dives are exactly the same operations. So it's expected that if downloading a memory dump fails, downloading dives will fail too.
What can be the issue here?
I'm on macOS 12.6.1. Predator has latest firmware (v63). I can send the one working raw download if needed.
After a successful download, we send a disconnect command to the dive computer. That causes the bluetooth mode to terminate. Did you re-enabled the bluetooth connection on your Predator before re-trying? I don't really know when and how the /dev/tty.Predator device node appears on Mac, but maybe you also have to re-connect at the OS level, to re-create the device node as well?
Jef
On Mon, Dec 5, 2022 at 10:26 AM Jef Driesen jef@libdivecomputer.org wrote:
You didn't enable verbose mode (-v), so I can't see the communication in the above log. I looks like you're experiencing a timeout on the very first request that gets send to the dive computer. That means there is no response from the dive computer.
Here's a verbose retry. I have rebooted the computer & DC, but nothing has changed:
$ dctool -v -l predator-download.log -f predator download -f raw -o predator-download.raw /dev/tty.Predator DATETIME 2022-12-05T10:19:03Z (1670235543) VERSION 0.7.0 Opening the I/O stream (serial, /dev/tty.Predator). INFO: Open: name=/dev/tty.Predator Opening the device (Shearwater Predator). INFO: Configure: baudrate=115200, databits=8, parity=0, stopbits=0, flowcontrol=0 INFO: Timeout: value=3000 INFO: Sleep: value=300 INFO: Purge: direction=3 Registering the event handler. Registering the cancellation handler. Downloading the dives. Event: progress 0.00% (0/10000) INFO: Write: size=15, data=FF010B00350034DD000000020080C0 INFO: Read: size=0, data= ERROR: Failed to receive the packet. [in shearwater_common.c:239 (shearwater_common_slip_read)] ERROR: Failed to receive the response packet. [in shearwater_common.c:358 (shearwater_common_transfer)] ERROR: Error downloading the dives. [in dctool_download.c:228 (download)] ERROR: Timeout
For the Predator, under the hood downloading a memory dump or dives are exactly the same operations. So it's expected that if downloading a memory dump fails, downloading dives will fail too.
OK, thanks for the clarification.
After a successful download, we send a disconnect command to the dive computer. That causes the bluetooth mode to terminate. Did you re-enabled the bluetooth connection on your Predator before re-trying? I don't really know when and how the /dev/tty.Predator device node appears on Mac, but maybe you also have to re-connect at the OS level, to re-create the device node as well?
On the macOS I have to manually select the Predator in the Bluetooth settings, only then /dev/tty.Predator is created.
Anything more I should try? Really can't understand what I did the first time it succeeded. Random timing issue?
Henrik
Hi Henrik, I have a Shearwater Teric. On Windows I have to remove the device from the “Paired” list in the OS and then discover and add it again every time I want to download. Perhaps you need to do the same in MacOs.. Regards Peter
On 5 Dec 2022, at 11:27, Henrik B A henrik@synth.no wrote:
On Mon, Dec 5, 2022 at 10:26 AM Jef Driesen jef@libdivecomputer.org wrote:
You didn't enable verbose mode (-v), so I can't see the communication in the above log. I looks like you're experiencing a timeout on the very first request that gets send to the dive computer. That means there is no response from the dive computer.
Here's a verbose retry. I have rebooted the computer & DC, but nothing has changed:
$ dctool -v -l predator-download.log -f predator download -f raw -o predator-download.raw /dev/tty.Predator DATETIME 2022-12-05T10:19:03Z (1670235543) VERSION 0.7.0 Opening the I/O stream (serial, /dev/tty.Predator). INFO: Open: name=/dev/tty.Predator Opening the device (Shearwater Predator). INFO: Configure: baudrate=115200, databits=8, parity=0, stopbits=0, flowcontrol=0 INFO: Timeout: value=3000 INFO: Sleep: value=300 INFO: Purge: direction=3 Registering the event handler. Registering the cancellation handler. Downloading the dives. Event: progress 0.00% (0/10000) INFO: Write: size=15, data=FF010B00350034DD000000020080C0 INFO: Read: size=0, data= ERROR: Failed to receive the packet. [in shearwater_common.c:239 (shearwater_common_slip_read)] ERROR: Failed to receive the response packet. [in shearwater_common.c:358 (shearwater_common_transfer)] ERROR: Error downloading the dives. [in dctool_download.c:228 (download)] ERROR: Timeout
For the Predator, under the hood downloading a memory dump or dives are exactly the same operations. So it's expected that if downloading a memory dump fails, downloading dives will fail too.
OK, thanks for the clarification.
After a successful download, we send a disconnect command to the dive computer. That causes the bluetooth mode to terminate. Did you re-enabled the bluetooth connection on your Predator before re-trying? I don't really know when and how the /dev/tty.Predator device node appears on Mac, but maybe you also have to re-connect at the OS level, to re-create the device node as well?
On the macOS I have to manually select the Predator in the Bluetooth settings, only then /dev/tty.Predator is created.
Anything more I should try? Really can't understand what I did the first time it succeeded. Random timing issue?
Henrik _______________________________________________ devel mailing list devel@libdivecomputer.org https://libdivecomputer.org/cgi-bin/mailman/listinfo/devel
On Mon, Dec 5, 2022 at 12:04 PM Peter B pbalck@gmail.com wrote:
Hi Henrik, I have a Shearwater Teric. On Windows I have to remove the device from the “Paired” list in the OS and then discover and add it again every time I want to download. Perhaps you need to do the same in MacOs..
Hi Peter.
Thanks, that *could* have been it, because I had experimented on removing that device and re-adding it. But alas, no success when I try that now :(
Henrik
On Mon, Dec 5, 2022 at 12:14 PM Henrik B A henrik@synth.no wrote:
Thanks, that *could* have been it, because I had experimented on removing that device and re-adding it. But alas, no success when I try that now :(
Experimenting some more, this seems to work kinda reliably:
1) Select Upload Dives on the Predator 2) macos bluetooth menubar icon --> select Predator (turns blue). This creates /dev/tty.Predator 3) select Predator again (turns grey) 4) Predator displays SLIP RX error 5) Select Upload Dives on the Predator again 6) dctool is now able to download the dives. Well, most of the time. I can even re-download without more fuzz.
I have yet to make this work on MacDive, which I believe use libdivecomputer under the hood. Maybe an older version?
Henrik