Waterlinked DVL A50 Serial communication

Hi!

TL;DR at the bottom.

I notice that the current version of Ardusub and companion don’t yet fully support transmission of all data from the A50-DVL from Waterlinked. We depend on obtaining all the data from all beams in our algorithm design. While it is possible to achieve this using TCP, it seemed easier to solve it using the USB and serial communication, so this is how we would like to proceed. In an attempt to obtain all the data I connect the DVL to the RPi through USB (the DVL board we have, rev4(?), has a mini USB connector), where I would like to process the data.

Sending to and reading data from the DVL as a USB device can be achieved using serial communication (waterlinked serial communication documentation). In Python, I can read data using the serial.read() functionality (Waterlinked github: python ) , but I am unable to write correct messages using serial.write(). I have tried several types of combinations for, e.g., writing to change the protocol version to version 3 (currently I have software version: 2.0.8, serial protocol version: 2.2.0), alas without luck. Has anyone here achieved this? For instance, it should be possible to change the protocol version by the following commands

import serial
ser = serial.Serial('/dev/ttyUSB0', baudrate=115200, timeout=0.2)
write_msg = 'wcp,3\n\r'.encode('utf-8')
ser.write(write_msg)
response = ser.readline()
print(response)
ser.close()

My return message is "wr?*44", which indicates “Malformed request: packet cannot be understood”. This is obviously not what I want, so it seems I am sending an incorrect message to the board.

TL;DR and question: Does anyone know the correct way to do serial writes to the A50-DVL when connected through USB?

Hi @benth, welcome to the Blue Robotics forum :slight_smile:

I’m not familiar with Water Linked’s serial protocol, but from the links you provided a few things stand out:

  • The Python library you’ve linked to is archived, and not being maintained
  • The protocol documentation you’ve linked to is for a more recent version than the one on your device, so it’s possible some of the documented messages / options are not available for your device
  • The command you’re attempting to write uses \n\r as the end, which is not one of the three specified options
    • if a carriage return (\r) is used, it should be alone, or should come before the new line (\n) character as \r\n

I would suggest fixing the message end (\n by itself is the most conventional for Python, so maybe try that first), and if the command still doesn’t work then try some other ones - the version history overview seems to specify that your version should be able to do velocity, position, and IMU messages.

Feel free to follow up if that doesn’t help - perhaps @wlkh can jump in with some other pointers :slight_smile: