FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
88 views 0 comments
by anonymous

Good day,

I am using the pyserial package in python to do RS232 serial communication on my RUT956 device. In the previous firmware versions I had to "switch-off" the RS232 port on the webui in order to access the serial port using my python script. On the new firmware I am stuck with not being able to close the port that is for some reason currently being used or allocated by the RS232. When I run: ls /dev from the commandline I can see that the rs232 is there, but when I run my pythonscript, I keep on getting a port connection error syaing that the port is already open. Is there any way that I can close the rs232 serial port from the commandline?

1 Answer

0 votes
by anonymous

Hello,

  

Using the default configuration, none of the applications are using the RS232 connection. Please make sure you have all of the utilities, that are using RS232 disabled (Modbus RTU, Modbus Gateway, Modem Control, Console, etc.). If you still cannot find what is occupying the connection, please log into the CLI, and run this command:

ps | grep rs232

The output should look something like this:

The first number is the PID of the process occupying the port. You can kill it using the command

kill <PID>

And then you should be able to access the RS232 interface.

Let me know if any additional help is needed.

  

Best regards,
DaumantasG