

I want to log the received data in a liteSQL database but failing as any attempt to copy the data to a glob. I have been playing with the tcp_serial_redirect.py example in the pyserial gitHub repo. Python -m _portswill print a list of available ports. Options: -version show program’s version number and exit -h, -help show this help message and exit -p SERIAL, -port= SERIAL Serial port, a number, defualt = ‘/dev/tty0’ -b BAUDRATE, -baud= BAUDRATE Baudrate, default 115200 -r, -rtscts Enable RTS/CTS flow control (default off) -x, -xonxoff Enable software flow control (default off) -P PORT, -localport= PORT TCP/IP port on which to run the server (default 9100) -l LISTEN, -listen= LISTEN Listen address on which to run the server (default ‘127.0.0.1’) -access-list= ACL List of IP addresses e.g ‘127.0.0.1, 192.168.0.2’.Ħ.4 Multi-port TCP/IP - serial bridge. WARNING: You have to allow connections only from the addresses in the “–allow-list” option. Rosrun rosserial_python serial_node.Help Usage: serial2tcp Simple Serial to Network (TCP/IP) redirector. To run the node with a different port and baud rate, for example on /dev/ttyACM1, you must specify the ~port and ~baud parameters on the command line:

Parameters ~port ( str, default: /dev/ttyUSB0) This node automatically spins up subscribers and publishers based on the configuration information stored in the device.

Serial_node.py Interface to a rosserial-enabled device. Thing is, if you want to send stuff to a TCP-connected client in your serial-connected protocol, just pass to the protocol a reference to the factory, so you can use that reference to make the bridge. Note that you need to install pyserial for this to work (try pip install pyserial). It automatically handles setup, publishing, and subscribing for a connected rosserial-enabled device. The rosserial_python package contains a Python implementation of the host-side rosserial connection.
