Using GRV-CSERI ports from a program

I found a few things out and from that have inferred the answer is ‘should be possible’.

Here you can see the shell program ‘minicom’ receiving data from a GPS receiver sitting on my desk (it was the only serial device I could quickly put my hands on).

You can see I have set the baud rate to 9600, 8 data bits, No parity and 1 stop bit.
I did this from within Minicom. Since I can do it there, I am inferring that you should be able to set the comm port parameters from the Linux program.
Note that I still used groov Manage to set the serial port type (in my GPS case, RS-232).

Note also that /dev/ttySerModx.x is symbolically linked to ttyUSBx
If you do an ‘ls -la’ on the /dev directory, you can see that link. (This took me a hot minute to figure out why the ‘SerMod’ device was not working as expected. EDIT-Found out it was a typo, it works as expected using either the module or the mapped device).

(Note that my groov Serial I/O module is in position 3 on the rack).

EDIT. Found the ‘stty’ command.
http://man7.org/linux/man-pages/man1/stty.1.html
This would be the way to change via a program the serial port settings.

IMPORTANT EDIT. I have found that if you run Node-RED and PAC Control with serial commands addressing the same serial port, you get undesired results. I would expect the same would happen if you tried to use another program to access the serial port at the same time as either of these two methods… In short, pick one method and use it exclusively.

1 Like