I am trying to write some data to a serial port, that I will read from forexample screen
in the same computer.
I have tried looking at this answer how-to-send-data-to-a-serial-port-and-see-any-answer
I have added my user to group dialout
and ran chmod o+rw /dev/ttyS1
Then in python I do like this, and get following error:
>>> import serial
>>> ser = serial.Serial("/dev/ttyS1",4800)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/el3/Envs/serial/lib/python2.7/site-packages/serial/serialutil.py", line 236, in __init__
self.open()
File "/home/el3/Envs/serial/lib/python2.7/site-packages/serial/serialposix.py", line 272, in open
self._reconfigure_port(force_update=True)
File "/home/el3/Envs/serial/lib/python2.7/site-packages/serial/serialposix.py", line 315, in _reconfigure_port
raise SerialException("Could not configure port: {}".format(msg))
serial.serialutil.SerialException: Could not configure port: (5, 'Input/output error')
So the question is, what do I do wrong here?
Or should I look for a different approach.
The issue is, that I got some udp messages that I can receive in for example python, that I need to send to a software, that only sees serial ports.
Maybe there is a different approach?
In that case, what is a good way to do that?
ls -l /dev/ttyS*
and get a list of/dev/ttyS0
, 1 and to... I tought I could use these? – el3ien Jan 07 '17 at 21:57