Opening a custom serial port connection

Hi everyone,

I would like to open a custom serial port to send custom data to my computer.
I tried to run the module examples/matlab_csv_serial however I am not able to run it successfully.

From the NSH console, I typed
maltab_csv_serial start /dev/ttyS1/

First question: I am assuming ttyS1 corresponds to Serial1, is that correct ? (there is a ttyS0, but no Serial0 on my hardware, I am using the AUAV-X2.1)

Connecting a uart to USB cable on the autopilot Serial1, I then open gtkterm, ensuring the same Bauds rate and configuration (8N1). But nothing is read in the desktop terminal.

Has anybody been able to run matlab_csv_serial ? Your comments are welcome.



another point, my board is configured in HIL, are the uart connections enabled or disabled in HIL mode ? (because I expect the GPIO to be disabled)

[partial solution]

I am able to send data to the uart using the code in matlab_csv_serial, but only on /dev/ttyS5/ which correspond to the debug port on the auav_x21. The problem is that other modules are writing to the debug port.

If I try to send data to /dev/ttyS2/ which correspond to TELEM2 (I also disable TELEM2 by putting SYS_COMPANION to 0), only few messages are sent (like 4 messages). Is there another application closing this serial port ?

Can anybody redirect me to some documentation ?