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?