{"id":20130311,"url":"https://github.com/pavelrevak/ser2tcp","last_synced_at":"2025-08-08T14:19:46.261Z","repository":{"id":9859959,"uuid":"61988695","full_name":"pavelrevak/ser2tcp","owner":"pavelrevak","description":"serial to tcp or telnet server, ser2net python alternative","archived":false,"fork":false,"pushed_at":"2024-01-23T09:13:23.000Z","size":38,"stargazers_count":57,"open_issues_count":4,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T16:13:56.430Z","etag":null,"topics":["network","python","serial","tcp","telnet"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pavelrevak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-26T12:47:15.000Z","updated_at":"2025-04-04T10:39:06.000Z","dependencies_parsed_at":"2022-09-04T07:53:19.658Z","dependency_job_id":null,"html_url":"https://github.com/pavelrevak/ser2tcp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelrevak%2Fser2tcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelrevak%2Fser2tcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelrevak%2Fser2tcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pavelrevak%2Fser2tcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pavelrevak","download_url":"https://codeload.github.com/pavelrevak/ser2tcp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065282,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["network","python","serial","tcp","telnet"],"created_at":"2024-11-13T20:38:09.475Z","updated_at":"2025-04-09T16:14:02.143Z","avatar_url":"https://github.com/pavelrevak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ser2tcp\nSimple proxy for connecting over TCP or telnet to serial port\n\n## Version\n**ser2tcp v3.0** https://github.com/pavelrevak/ser2tcp\n\n## Features\n- can serve multiple serial ports using pyserial library\n- each serial port can have multiple servers\n- server can use TCP or TELNET protocol\n  - TCP protocol just bridge whole RAW serial stream to TCP\n  - TELNET protocol will send every character immediately and not wait for ENTER, it is useful to use standard `telnet` as serial terminal\n- servers accepts multiple connections at one time\n    - each connected client can sent to serial port\n    - serial port send received data to all connected clients\n\n## Instalation\n```\npip3 install .\n```\n\n### Uninstal\n```\npip3 uninstall ser2tcp\n```\n\n## command line options\n```\n  -h, --help            show this help message and exit\n  -V, --version         show program's version number and exit\n  -v, --verbose         Increase verbosity\n  -c CONFIG, --config CONFIG\n                        configuration in json format\n```\n\n### Verbose\n- By default print only ERROR and WARNING messages\n- `-v`: will print INFO messages\n- `-vv`: print also DEBUG messages\n\n## Configuration file example\n```json\n[\n    {\n        \"serial\": {\n            \"port\": \"/dev/tty.usbserial-01BB6216\",\n            \"baudrate\": 115200,\n            \"parity\": \"NONE\",\n            \"stopbits\": \"ONE\"\n        },\n        \"servers\": [\n            {\n                \"address\": \"127.0.0.1\",\n                \"port\": 10001,\n                \"protocol\": \"TCP\"\n            },\n            {\n                \"address\": \"0.0.0.0\",\n                \"port\": 10002,\n                \"protocol\": \"TELNET\"\n            }\n        ]\n    },\n    {\n        \"serial\": {\n            \"port\": \"/dev/tty.usbserial-A6005CNx\",\n            \"baudrate\": 115200,\n            \"parity\": \"NONE\",\n            \"stopbits\": \"ONE\"\n        },\n        \"servers\": [\n            {\n                \"address\": \"0.0.0.0\",\n                \"port\": 10011,\n                \"protocol\": \"TCP\"\n            },\n            {\n                \"address\": \"192.168.1.123\",\n                \"port\": 10012,\n                \"protocol\": \"TELNET\"\n            }\n        ]\n    }\n]\n```\n`serial` structure pass all parameters to [serial.Serial](https://pythonhosted.org/pyserial/pyserial_api.html#classes) constructor from pyserial library,\nthis allow full control of the serial port\n\n## Usage examples\nFor installed version:\n```\nser2tcp -c ser2tcp.conf\n```\nDirect running from repository:\n```\npython3 run.py -c ser2tcp.conf\n```\n\n### Connecting using telnet\n```\ntelnet 0 10012\n```\n(to exit telnet press `CTRL + ]` and type `quit`)\n\n## Installation as server\n### Linux - systemd local user service\n1. edit configuration file `~/.config/ser2tcp.conf`\n1. reload user systemd services:\n    ```\n    systemctl --user daemon-reload\n    ```\n1. start service:\n    ```\n    systemctl --user start ser2tcp\n    ```\n1. auto-start service:\n    ```\n    systemctl --user enable ser2tcp\n    ```\n1. to allow user services running after boot you need to enable linger as root (if this is not configured, then service will start after user login and stop after logout):\n    ```\n    sudo loginctl enable-linger $USER\n    ```\n\n#### Other useful commands\n* check if service is running:\n    ```\n    systemctl --user status ser2tcp\n    ```\n* stop service:\n    ```\n    systemctl --user stop ser2tcp\n    ```\n* stop restart:\n    ```\n    systemctl --user restart ser2tcp\n    ```\n* see logs from service:\n    ```\n    journalctl --user-unit ser2tcp -e\n    ```\n## Requirements\n- python v3.5+\n- pyserial v3.0+\n\n### Running on:\n- Linux\n- MacOS\n- Windows\n\n## Credits\n(c) 2016-2021 by Pavel Revak\n\n### Support\n- Basic support is free over GitHub issues.\n- Professional support is available over email: [Pavel Revak](mailto:pavel.revak@gmail.com?subject=[GitHub]%20ser2tcp).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpavelrevak%2Fser2tcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpavelrevak%2Fser2tcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpavelrevak%2Fser2tcp/lists"}