I’m trying to use the serial.client module to read data in from a barcode scanner. I’m running Ignition 7.7.5 on an ubuntu variant linux system.
I’ve used
cat /dev/ttyS0
to verify the electrical connections and that I am using the right port. Scanning a barcode throws the data on the terminal screen.
I end the cat command, close the terminal, and launch my Ignition client. In the startup script I call a scripting function that does the configuration, then calls:
system.serial.openSerialPort("/dev/ttyS0")
I get a Java error from java.io.ioException stating that SerOpenPort failed: Permission denied.
I know I am addressing the port correctly, because when I forgot the leading / I was getting “No such device”.
What do I have to do to get the permissions correct to access /dev/ttyS0?