{"id":17041660,"url":"https://github.com/xlab/at","last_synced_at":"2025-05-09T00:04:16.153Z","repository":{"id":20485712,"uuid":"23763813","full_name":"xlab/at","owner":"xlab","description":"AT is a framework written in Go for communication with AT-compatible devices like Huawei modems via serial port.","archived":false,"fork":false,"pushed_at":"2024-08-04T19:07:32.000Z","size":77,"stargazers_count":121,"open_issues_count":5,"forks_count":56,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-09T00:04:10.064Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xlab.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-07T15:54:26.000Z","updated_at":"2025-03-08T13:43:26.000Z","dependencies_parsed_at":"2024-12-28T17:11:55.079Z","dependency_job_id":"886bb88d-300c-46f3-81fc-345d577de06b","html_url":"https://github.com/xlab/at","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Fat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Fat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Fat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlab%2Fat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xlab","download_url":"https://codeload.github.com/xlab/at/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166514,"owners_count":21864475,"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":"2024-10-14T09:13:06.662Z","updated_at":"2025-05-09T00:04:16.131Z","avatar_url":"https://github.com/xlab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"AT\n===\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/xlab/at.svg)](https://pkg.go.dev/github.com/xlab/at)\n[![Build Status](https://github.com/xlab/at/workflows/tests/badge.svg?branch=master)](https://github.com/xlab/at/actions)\n[![Coverage](https://codecov.io/gh/xlab/at/branch/master/graph/badge.svg)](https://codecov.io/gh/xlab/at)\n\n\nPackage at is a framework for communication with AT-compatible devices like Huawei modems via serial port. Currently this package is well-suited for Huawei devices and since AT-commands set may vary from device to device, sometimes you'll be forced to implement some logic by yourself.\n\n### Installation\n\n```\ngo get github.com/xlab/at\n```\n\nFull documentation: [godoc](https://godoc.org/github.com/xlab/at).\n\n### Features\n\nThis framework includes facilities for device monitoring, sending and receiving AT-commands, encoding and decoding SMS messages from or to PDU octet representation (as specified in [3GPP TS 23.040]). An example of incoming SMS monitor application is given in [example/daemon].\n\n[example/daemon]: https://github.com/xlab/at/blob/master/example/daemon\n[3GPP TS 23.040]: http://www.etsi.org/deliver/etsi_ts/123000_123099/123040/11.05.00_60/ts_123040v110500p.pdf\n\n### Examples\n\nTo get an SMS in a PDU octet representation:\n```go\nsmsSubmitGsm7 := Message{\n\tText:                 \"hello world\",\n\tEncoding:             Encodings.Gsm7Bit,\n\tType:                 MessageTypes.Submit,\n\tAddress:              \"+79261234567\",\n\tServiceCenterAddress: \"+79262000331\",\n\tVP:                   ValidityPeriod(time.Hour * 24 * 4),\n\tVPFormat:             ValidityPeriodFormats.Relative,\n}\nn, octets, err := smsSubmitGsm7.PDU()\n```\n\nTo open a modem device:\n```go\ndev = \u0026Device{\n\tCommandPort: CommandPortPath,\n\tNotifyPort:  NotifyPortPath,\n}\nif err = dev.Open(); err != nil {\n\treturn\n}\n```\n\nIf you're going to use this framework and its methods instead of plain R/W you should initialize the modem beforehand:\n```\nif err = dev.Init(DeviceE173()); err != nil {\n\treturn\n}\n```\n\nTo use the wrapped version of a command:\n```go\nerr = dev.Commands.CUSD(UssdResultReporting.Enable, pdu.Encode7Bit(`*100#`), Encodings.Gsm7Bit)\n```\n\nOr to send a completely generic command:\n```go\nstr, err := dev.Send(`AT+GMM`)\nlog.Println(str, err)\n```\n\n### Device-specific config\n\nIn order to introduce your own logic (i.e. custom modem Init function), you should derive your profile from the default DeviceProfile and override its methods.\n\n### License\n\n[MIT](http://xlab.mit-license.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlab%2Fat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxlab%2Fat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlab%2Fat/lists"}