{"id":38553089,"url":"https://github.com/jonamat/sim-modem","last_synced_at":"2026-01-17T07:38:13.977Z","repository":{"id":65115767,"uuid":"582162282","full_name":"jonamat/sim-modem","owner":"jonamat","description":"Easy library for interfacing with mobile modems","archived":false,"fork":false,"pushed_at":"2024-05-26T16:36:09.000Z","size":12,"stargazers_count":10,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-08T23:22:25.273Z","etag":null,"topics":["atcommands","gps","modem","phone","simcard","simcom","sms"],"latest_commit_sha":null,"homepage":"","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/jonamat.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":"2022-12-25T23:39:59.000Z","updated_at":"2025-05-25T12:04:21.000Z","dependencies_parsed_at":"2023-01-31T05:31:09.727Z","dependency_job_id":null,"html_url":"https://github.com/jonamat/sim-modem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonamat/sim-modem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonamat%2Fsim-modem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonamat%2Fsim-modem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonamat%2Fsim-modem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonamat%2Fsim-modem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonamat","download_url":"https://codeload.github.com/jonamat/sim-modem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonamat%2Fsim-modem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: 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":["atcommands","gps","modem","phone","simcard","simcom","sms"],"created_at":"2026-01-17T07:38:13.453Z","updated_at":"2026-01-17T07:38:13.946Z","avatar_url":"https://github.com/jonamat.png","language":"Python","readme":"# sim-modem\n\nEasy library for interfacing with mobile modems. Tested with Simcom SIM7600G-H on Raspberry PI Zero W. The commands could be different for other modems.\n\n## Installation\n\n```bash\npip install sim-modem\n```\n\n## Usage\n    \n```python\nfrom sim_modem import Modem\n\nmodem = Modem('/dev/ttyUSB2')\n\nsignal_quality = modem.get_signal_quality()\nprint(signal_quality)\n\nmodem.send_sms('+393383928434', 'Hello World!')\n\n```\n\n\n## API\n\n### Modem (Class)\n\nMain class for interfacing with the modem. Each method raise an exception if the modem returns an error. If the command is successful, the function returns the response from the modem.\n\n\n```python\nModem(        \n    address, # Address of the device tty (e.g. \"/dev/ttyUSB2\")\n    baudrate=460800, # Baudrate of the device. Default: 460800\n    timeout=5, # Timeout for the serial connection. Default: 5\n    at_cmd_delay=0.1, # Delay between AT commands. Default: 0.1\n    debug=False # Log commands and responses from modem, test command support before executing them. Default: False\n)\n```\n\n\n| Method                                        | Description                                                             |\n| --------------------------------------------- | ----------------------------------------------------------------------- |\n| reconnect() -\u003e str                          | Reconnect to serial                                                     |\n| close() -\u003e str                              | Close the serial connection                                             |\n| ***Hardware related methods***                    |                                                                         |\n| get_model_identification() -\u003e str           | Get the model identification                                            |\n| get_manufacturer_identification() -\u003e str    | Get the manufacturer identification                                     |\n| get_serial_number() -\u003e str                  | Get the serial number                                                   |\n| get_firmware_version() -\u003e str               | Get the firmware version                                                |\n| get_volume() -\u003e str                         | Get the volume. The volume range is between 0 and 5                     |\n| set_volume(index: int) # 0-5                | Set the volume. The volume must be between 0 and 5                      |\n| improve_tdd() -\u003e str                        | Decrease TDD Noise effect                                               |\n| enable_echo_suppression() -\u003e str            | Enable echo suppression                                                 |\n| disable_echo_suppression() -\u003e str           | Disable echo suppression                                                |\n| ***Network related methods***                     |                                                                         |\n| get_network_registration_status() -\u003e str    | Get the network registration status                                     |\n| get_network_mode() -\u003e NetworkMode           | Get the network mode                                                    |\n| get_network_name() -\u003e str                   | Get the network name                                                    |\n| get_network_operator() -\u003e str               | Get the network operator                                                |\n| get_signal_quality() -\u003e str                 | Get the signal quality                                                  |\n| get_signal_quality_db() -\u003e int              | Get the signal quality in dB                                            |\n| get_signal_quality_range() -\u003e SignalQuality | Get the signal quality as a range (see [SignalQuality](#SignalQuality)) |\n| get_phone_number() -\u003e str                   | Get the phone number                                                    |\n| get_sim_status() -\u003e str                     | Get the SIM status                                                      |\n| set_network_mode(mode: NetworkMode) -\u003e str  | Set the network mode                                                    |\n| ***Calls related methods***                       |                                                                         |\n| call(number: str) -\u003e str                    | Call a number                                                           |\n| answer() -\u003e str                             | Answer a call                                                           |\n| hangup() -\u003e str                             | Hangup a call                                                           |\n| ***SMS related methods***                         |                                                                         |\n| get_sms_list() -\u003e list                      | Get the list of SMS                                                     |\n| empty_sms() -\u003e str                          | Empty the SMS storage                                                   |\n| send_sms(number: str, message: str) -\u003e str  | Send an SMS                                                             |\n| get_sms(index: int) -\u003e dict                 | Get an SMS by ID                                                        |\n| delete_sms(index: int) -\u003e str               | Delete an SMS by ID                                                     |\n| ***GPS related methods***                         |                                                                         |\n| get_gps_status() -\u003e str                     | Get the GPS status                                                      |\n| start_gps() -\u003e str                          | Start the GPS                                                           |\n| stop_gps() -\u003e str                           | Stop the GPS                                                            |\n| get_gps_coordinates() -\u003e dict               | Get the GPS coordinates                                                 |\n\n\n### SignalQuality (enum)\n\nSignal quality expressed as ranges \n\n| Key                       | Description                 |\n| ------------------------- | --------------------------- |\n| `SignalQuality.LOW`       | Signal is under 7           |\n| `SignalQuality.FAIR`      | Signal is between 7 and 15  |\n| `SignalQuality.GOOD`      | Signal is between 15 and 20 |\n| `SignalQuality.EXCELLENT` | Signal is over 20           |\n\n### NetworkMode (enum)\n\nNetwork mode of the modem (get/set)\n\n| Key                       | Description |\n| ------------------------- | ----------- |\n| `NetworkMode.AUTOMATIC`   | Automatic   |\n| `NetworkMode.GSM_ONLY`    | GSM only    |\n| `NetworkMode.LTE_ONLY`    | LTE only    |\n| `NetworkMode.ANY_BUT_LTE` | Any but LTE |\n\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonamat%2Fsim-modem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonamat%2Fsim-modem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonamat%2Fsim-modem/lists"}