{"id":21465180,"url":"https://github.com/tamcore/ser2sock","last_synced_at":"2026-04-17T12:30:53.684Z","repository":{"id":264290945,"uuid":"892761762","full_name":"tamcore/ser2sock","owner":"tamcore","description":"Serial to Socket - Proxy and multiplex a serial port over TCP/IP. Minimal footprint. Docker image and DEB/RPM/APK packages included.","archived":false,"fork":false,"pushed_at":"2024-11-23T13:15:00.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T05:44:59.307Z","etag":null,"topics":["docker","docker-image","home-assistant","homeassistant","rs232","rs232-to-ethernet","serial-over-ethernet","zigbee","zigbee-coordinator","zigbee-gateway","zigbee2mqtt"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tamcore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-22T18:18:41.000Z","updated_at":"2025-02-22T14:01:11.000Z","dependencies_parsed_at":"2024-11-23T17:00:36.582Z","dependency_job_id":null,"html_url":"https://github.com/tamcore/ser2sock","commit_stats":null,"previous_names":["tamcore/ser2sock"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tamcore/ser2sock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamcore%2Fser2sock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamcore%2Fser2sock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamcore%2Fser2sock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamcore%2Fser2sock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tamcore","download_url":"https://codeload.github.com/tamcore/ser2sock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamcore%2Fser2sock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31929435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T10:35:34.458Z","status":"ssl_error","status_checked_at":"2026-04-17T10:35:09.472Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker","docker-image","home-assistant","homeassistant","rs232","rs232-to-ethernet","serial-over-ethernet","zigbee","zigbee-coordinator","zigbee-gateway","zigbee2mqtt"],"created_at":"2024-11-23T08:09:19.790Z","updated_at":"2026-04-17T12:30:53.678Z","avatar_url":"https://github.com/tamcore.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ser2sock\n\n**ser2sock** is a lightweight application written in Go to expose a serial device over TCP/IP. It enables bidirectional communication between a serial device and a TCP client, with options for verbose logging and decoding traffic.\n\n## Features\n- Forward data between a serial port and a TCP connection.\n- Configurable serial device, baud rate, and TCP listening address.\n- Filter connections by allowed IP addresses.\n- Optional verbose logging of incoming and outgoing data.\n- Decode data into human-readable text (UTF-8) or display raw hexadecimal.\n\n## Installation\n\n### Pre-built packages\n#### Debian / Ubuntu\n```bash\narch=$(uname -m | sed -e \"s/aarch64/arm64/\" -e \"s/x86_64/amd64/\")\nwget -O ser2sock.deb https://github.com/tamcore/ser2sock/releases/latest/download/ser2sock_linux_${arch}.deb\ndpkg -i ser2sock.deb\n```\n#### RockyLinux / AlmaLinux / CentOS / RHEL\n```bash\narch=$(uname -m | sed -e \"s/aarch64/arm64/\" -e \"s/x86_64/amd64/\")\nrpm -Uvh https://github.com/tamcore/ser2sock/releases/latest/download/ser2sock_linux_${arch}.rpm\n```\n#### Alpine\n```bash\narch=$(uname -m | sed -e \"s/aarch64/arm64/\" -e \"s/x86_64/amd64/\")\nwget -O ser2sock.apk https://github.com/tamcore/ser2sock/releases/latest/download/ser2sock_linux_${arch}.apk\napk add --allow-untrusted ser2sock.apk\n```\n\n### Build from Source\n\n#### Prerequisites\n- [Go](https://golang.org/) version 1.16 or later installed on your system.\n#### Build\n1. Clone\n   ```bash\n   git clone https://github.com/tamcore/ser2sock.git\n   cd ser2sock\n   ```\n2. Build\n   ```bash\n   go build -o ser2sock\n   ```\n\n## Usage\n```bash\n./ser2sock -device \u003cserial_device\u003e -listen \u003caddress:port\u003e -baud \u003cbaud_rate\u003e [options]\n```\n\n## Options\n| Option | Description | Example |\n| ------ | ----------- | -------\n| `-device` | Path to the serial device. Required. | `/dev/ttyUSB0`, `COM3`, `/dev/zigbee1` |\n| `-listen` | TCP address and port to listen on. | `0.0.0.0:5000` |\n| `-baud` | Baud rate for the serial device. Default: `9600`. | `115200` |\n| `-allowed` | Comma-separated list of allowed client IPs. Leave empty to allow all IPs. | `192.168.1.100,192.168.1.101` |\n| `-verbose` | Enable verbose logging for incoming and outgoing data.  (no value, just add the flag) |\n| `-decode` | Attempt to decode data into human-readable UTF-8 text. Defaults to raw hexadecimal format. (no value, just add the flag) |\n\n## Example Commands\n### Basic Usage\nExpose the serial device `/dev/ttyUSB0` on TCP port `5000` with a baud rate of `9600`:\n\n```\n./ser2sock -device /dev/ttyUSB0 -listen 0.0.0.0:5000 -baud 9600\n```\n\n### Restricting Access\nAllow only clients from specific IPs:\n\n```\n./ser2sock -device /dev/ttyUSB0 -listen 0.0.0.0:5000 -baud 9600 -allowed \"192.168.1.100,192.168.1.101\"\n```\n\n### Verbose Logging\nEnable detailed logging of IN/OUT traffic:\n\n```\n./ser2sock -device /dev/ttyUSB0 -listen 0.0.0.0:5000 -baud 9600 -verbose\n```\n\n### Decoding Data\nAttempt to decode data into human-readable text when possible:\n\n```\n./ser2sock -device /dev/ttyUSB0 -listen 0.0.0.0:5000 -baud 9600 -verbose -decode\n```\n\n## Example Output\n### Without Decoding (`-decode not used):\n```\nAccepted connection from 192.168.1.100:54832\nIN  (TCP-\u003eSerial): 48656c6c6f\nOUT (Serial-\u003eTCP): fe00\n```\n\n### With Decoding (`-decode enabled):\n```\n\nAccepted connection from 192.168.1.100:54832\nIN  (TCP-\u003eSerial): \"Hello\"\nOUT (Serial-\u003eTCP): (binary: fe00)\n```\n\n## Development\n### Dependencies\n* [go-serial](https://github.com/bugst/go-serial): For interacting with the serial device.\n\n### Install dependencies:\n\n```bash\ngo get ./...\n```\n\n### Testing\nRun the application locally and connect using a TCP client like telnet or netcat:\n\n```bash\ntelnet \u003cserver_ip\u003e \u003cport\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamcore%2Fser2sock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftamcore%2Fser2sock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamcore%2Fser2sock/lists"}