{"id":29826953,"url":"https://github.com/usagi-flow/serial-to-tcp","last_synced_at":"2025-07-29T05:36:41.715Z","repository":{"id":114097173,"uuid":"486328294","full_name":"usagi-flow/serial-to-tcp","owner":"usagi-flow","description":"An app which reads data from a serial port and serves it on a TCP port.","archived":false,"fork":false,"pushed_at":"2023-10-07T10:15:52.000Z","size":54,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-10-08T10:29:23.821Z","etag":null,"topics":["iot","rust","serial","serial-communication","serial-port","tcp","usb"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usagi-flow.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,"governance":null}},"created_at":"2022-04-27T19:40:04.000Z","updated_at":"2023-10-07T11:03:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"28261f91-7ea4-4fe5-9d17-988b25189e8e","html_url":"https://github.com/usagi-flow/serial-to-tcp","commit_stats":null,"previous_names":["usagi-flow/serial-to-tcp"],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/usagi-flow/serial-to-tcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi-flow%2Fserial-to-tcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi-flow%2Fserial-to-tcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi-flow%2Fserial-to-tcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi-flow%2Fserial-to-tcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usagi-flow","download_url":"https://codeload.github.com/usagi-flow/serial-to-tcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi-flow%2Fserial-to-tcp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267633767,"owners_count":24118800,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["iot","rust","serial","serial-communication","serial-port","tcp","usb"],"created_at":"2025-07-29T05:35:53.281Z","updated_at":"2025-07-29T05:36:41.707Z","avatar_url":"https://github.com/usagi-flow.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eserial-to-tcp\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/etienne-k/serial-to-tcp\"\u003e\n\u003cimg alt=\"repository\" src=\"https://img.shields.io/badge/repository-serial--to--tcp-8da0cb?style=for-the-badge\u0026logo=github\" height=\"20\"/\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/etienne-k/serial-to-tcp/actions\"\u003e\n\u003cimg alt=\"build\" src=\"https://img.shields.io/github/actions/workflow/status/etienne-k/serial-to-tcp/rust.yml?style=for-the-badge\u0026logo=github\" height=\"20\"/\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/etienne-k/serial-to-tcp/blob/main/LICENSE\"\u003e\n\u003cimg alt=\"license\" src=\"https://img.shields.io/github/license/etienne-k/serial-to-tcp?style=for-the-badge\u0026logo=github\u0026color=blue\" height=\"20\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\nAn app which reads data from a serial port and serves it on a TCP port.\n\n## How to use\n\n[Download a binary](https://github.com/etienne-k/serial-to-tcp/releases) for your architecture or build the app as outlined below.\n\nThe app takes its configuration from the command line. Multiple instances of the app can be executed at once. The app can serve multiple clients at once.\n\nRoot privileges are most likely needed to open the serial device (and to open a port under \u003c 1024, if applicable).\n\n### Example\n\nRead from USB device `ttyUSB0` with a baud rate of 115200, and serve the data on TCP port 2022:\n\n```bash\nserial-to-tcp -s /dev/ttyUSB0 -b 115200 -p 2022\n```\n\nOn another client in the network, assuming the server has the IP address `192.168.0.123`, test reading from the TCP port, e.g. using [socat](http://www.dest-unreach.org/socat/):\n\n```bash\nsocat - TCP4:192.168.0.123:2022\n```\n\n### Usage\n\n```\nUSAGE:\n    serial-to-tcp [OPTIONS] --serial-device \u003cpath\u003e --baud-rate \u003cnumber\u003e --port \u003cnumber\u003e\n\nOPTIONS:\n    -n                            (optional) If set, do not poll the serial device: If the device\n                                  is/becomes unavailable, terminate immediately.\n    -s, --serial-device \u003cpath\u003e    The serial device to read from, e.g. /dev/ttyUSB0\n    -b, --baud-rate \u003cnumber\u003e      The serial baud rate to use, e.g. 115200\n    -a, --address \u003cip\u003e            The IP (v4 or v6) address to bind to [default: 0.0.0.0]\n    -p, --port \u003cnumber\u003e           The port to listen on\n    -h, --help                    Print help information\n    -V, --version                 Print version information\n```\n\n### Autostart\n\nAn [OpenRC script](https://github.com/etienne-k/serial-to-tcp/tree/main/etc/init.d) is available.\n\n## Building\n\nYou'll need a [rust toolchain](https://rustup.rs), a recent stable version is recommended.\n\nIn the cloned repository:\n\n```bash\ncargo build --release\n```\n\n### Cross-building\n\nFor targetting another platform, you could manually install the required toolchain and build respectively, e.g.:\n\n```bash\ncargo build --target=arm-unknown-linux-musleabihf\n```\n\nAn easier way, if you have Podman or Docker installed, may be using [cross](https://github.com/cross-rs/cross), e.g.:\n\n```bash\ncargo install cross\ncross build --target=arm-unknown-linux-musleabihf\n```\n\n### With Nix\n\nWith [nix flakes enabled](https://nixos.wiki/wiki/Flakes#Enable_flakes):\n\n```bash\nnix build\n```\n\nAfter execution, the resulting executable lies in `result/bin/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusagi-flow%2Fserial-to-tcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusagi-flow%2Fserial-to-tcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusagi-flow%2Fserial-to-tcp/lists"}