ConnectPort X4 RS232

I’ve connected my ConnectPort x4 to computer terminal via RS232. After executing this script:

try:
serfd = os.open(‘/com/0’,os.O_RDWR)
except:
print “ERROR”

I have always an error. When using com/1 port is opened but nothing is transmitter to the terminal. Whats wrong and how can I communicate via RS232?

My guess is the serial port is in use by the X4 to run a serial login (the normal default).

Go to the Web UI and make sure the serial port profile is something like RealPort, not ‘Local Config’.

Serial 1 seems to be busy. Changing it to RealPort is not helping. I need telnet connection to run python scripts and aditional RS232 to controll external device, but don’t knoe how to open it.

What LynnL is suggesting is that another process on the ConnectPort X is holding open the serial port thus making it unavailable to Python. You will need to configure the serial port using the Web UI of the ConnectPort to be normally closed so that you may use it from Python.

In order to do this you must change the port profile for the serial port. Open the Web UI to your ConnectPort and click on “Serial Ports” under the “Configuration” heading. Click on “Port 1”. Select “RealPort” and click “Apply”

Reboot your ConnectPort X.

When you try your open() call from Python, it should succeed. Come back here if you have any trouble!

Jordan

Yes… I’ve done so, but the point was in rebooting, thanks.