{"id":24302802,"url":"https://github.com/taigrr/xmodem","last_synced_at":"2025-07-11T23:34:17.474Z","repository":{"id":210113398,"uuid":"725732809","full_name":"taigrr/xmodem","owner":"taigrr","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-02T03:08:01.000Z","size":1949,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T23:49:53.338Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taigrr.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":"2023-11-30T19:00:30.000Z","updated_at":"2025-05-02T03:08:04.000Z","dependencies_parsed_at":"2025-01-17T00:29:53.784Z","dependency_job_id":null,"html_url":"https://github.com/taigrr/xmodem","commit_stats":null,"previous_names":["taigrr/xmodem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/taigrr/xmodem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fxmodem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fxmodem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fxmodem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fxmodem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taigrr","download_url":"https://codeload.github.com/taigrr/xmodem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Fxmodem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264913761,"owners_count":23682702,"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":[],"created_at":"2025-01-17T00:19:26.501Z","updated_at":"2025-07-11T23:34:17.467Z","avatar_url":"https://github.com/taigrr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XMODEM\n\nA robust XMODEM implementation in Go that supports XMODEM-CRC and XMODEM-1K protocols.\nThis library was created to address limitations in existing Go XMODEM implementations, particularly around XMODEM-CRC support.\n\n## Features\n\n- Supports XMODEM-CRC and XMODEM-1K protocols\n- Configurable retries and timeouts\n- Automatic protocol detection\n- Simple API for file transfers\n\n## Usage\n\n### Basic Example\n\n```go\npackage main\n\nimport (\n    \"bytes\"\n    \"github.com/taigrr/xmodem\"\n    \"github.com/tarm/serial\"\n)\n\nfunc main() {\n    // Create a new XMODEM instance with a serial port\n    x, err := xmodem.New(\"/dev/ttyUSB0\", 115200)\n    if err != nil {\n        panic(err)\n    }\n    defer x.port.Close()\n\n    // Prepare your data\n    data := []byte(\"Hello, XMODEM!\")\n    buffer := bytes.NewBuffer(data)\n\n    // Send the data\n    err = x.Send(*buffer)\n    if err != nil {\n        panic(err)\n    }\n}\n```\n\n### Advanced Configuration\n\n```go\n// Create with existing serial port\nport, _ := serial.OpenPort(\u0026serial.Config{\n    Name: \"/dev/ttyUSB0\",\n    Baud: 115200,\n})\nx := xmodem.NewWithPort(port)\n\n// Configure settings\nx.Mode = xmodem.XMode1K  // Use XMODEM-1K\nx.Padding = 0x1A         // Set padding character\nx.retries = 5            // Set retry count\nx.Timeout = time.Second * 10  // Set timeout\n```\n\n## Protocol Support\n\n- XMODEM-CRC (default)\n- XMODEM-1K\n- XMODEM-128 (checksum mode not implemented)\n\n## References\n\n- [tarm](https://github.com/tarm/serial/blob/master/serial_linux.go)\n- [c implementation](https://github.com/kelvinlawson/xmodem-1k/blob/master/xmodem.c#L133)\n- [protocol writeup](https://www.adontec.com/xmodem-protocol.htm)\n- [nindepedia](https://www.ninerpedia.org/wiki/Protocols)\n- [wikipedia](https://en.wikipedia.org/wiki/XMODEM#XMODEM-1K)\n- [testing fork](https://github.com/taigrr/go-xmodem)\n\n## Disclaimer\n\nThe CRC table implementation in this library is not 0BSD licensed. It is used under fair use for educational and compatibility purposes.\nPlease refer to the original source for licensing details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaigrr%2Fxmodem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaigrr%2Fxmodem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaigrr%2Fxmodem/lists"}