Hello, programming a python application as modbus Server.
The following error is displayed, when trying to open a socket
File “Server.py”, line 28, in _InitFrontEnd
serversocket.bind((‘127.0.0.1’, 502))
File “/usr/lib/python2.7/socket.py”, line 224, in meth
error: [Errno 13] Permission denied
/userfs/WEB/python $
I think they are permissions issues for the python user, but I do not have access to the root user.
try root / dbps … But it is not correct
The device is:XBee Gateway Wi-Fi
With python version: Python 2.7.1
Thank you for your attention
mvut
2
Would need to see what lines 6, 14, 28 are before I could say yes or no on that one.
Hi, thanks for answering
The problem seems to be in the lines:
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
serversocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
serversocket.bind((‘127.0.0.1’, 502))
serversocket.listen(5)
show
serversocket.bind((‘127.0.0.1’, 502))
File “/usr/lib/python2.7/socket.py”, line 224, in meth
error: [Errno 13] Permission denied
in this line show:
File “/usr/lib/python2.7/socket.py”, line 224, in meth
error: [Errno 13] Permission denied
mvut
4
That does not appear to be the standard XBee socket commands. What kind of socket are you tryng to open?
mvut
6
That code is for a Transport product and not an XBee Gateway.
I saw this code work on a product digi:
ConnectPort X2D
Is this different?
mvut
8
Yes they are different devices with different operating systems.