Issues accessing /dev/ttySer0 on Epic

I seem to be having an issue accessing "/dev/ttySer0" as the Epic says it is located. We can get it fine in NodeRed, but are trying to script it in Ignition.

Does anyone have ideas where i might be off?

Do you have the Ignition serial module?

What you have tried so far?

That's an unusual device name. Are you sure it isn't /dev/ttyS0 ?

We are running Edge license which shows to have access to the serial functions. currently I am trying a basic in the script window

system.serial.configureSerialPort(port="/dev/ttySer0", bitRate=system.serial.BIT_RATE_9600, dataBits=system.serial.DATA_BITS_8, handshake=system.serial.HANDSHAKE_NONE, hardwareFlowControl=False, parity=system.serial.PARITY_NONE, stopBits=system.serial.STOP_BITS_2)
system.serial.openSerialPort("/dev/ttySer0")

Epis its as

and?

"Traceback (most recent call last):
File "", line 2, in
at com.inductiveautomation.ignition.modules.serial.scripting.SerialScriptModule.openSerialPort(SerialScriptModule.java:258)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
java.io.IOException: java.io.IOException: failed to open port: /dev/ttySer0
"

OK.

Those functions will run in the designer, not in the gateway, if you are using the designer's script console. Use an actual gateway event to test.

Right, what Phil is saying is true: you need to execute the script in a scope that actually runs on the Gateway, since you can't be running your Designer on the device itself.

Yes, i started on a gateway script. It was the same issue. I am thinking now that Opto Epic only allows access to the two USB ports to very select things running on the epic, and Ignition may not be one of them. I move the comms to the serial device on the back plane. testing that now

oh,i get what you are saying. I will try that

Same issue

Caused by: org.python.core.PyException: java.io.IOException: java.io.IOException: failed to open port: /dev/ttySerSys64

Is the user running the Ignition service a member of the dialout group? That is generally the owner of those device nodes. You may want to shell into the Epic and examine the ownership and the Ignition service permissions.

1 Like

I've got Opto looking into it. Seems like there is an issue. See what they say