{"id":21837218,"url":"https://github.com/1zun4/zte-cpe-rs","last_synced_at":"2025-04-14T09:50:44.190Z","repository":{"id":263615335,"uuid":"874049839","full_name":"1zun4/zte-cpe-rs","owner":"1zun4","description":"A Rust library for interacting with ZTE devices, such as the GigaCube ZTE MF289F.","archived":false,"fork":false,"pushed_at":"2024-11-24T21:45:43.000Z","size":65,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T23:06:19.182Z","etag":null,"topics":["gigacube","lte-router","mf289f","zte"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/zte-cpe-rs","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/1zun4.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":"2024-10-17T07:04:37.000Z","updated_at":"2025-01-14T20:31:22.000Z","dependencies_parsed_at":"2024-11-19T14:37:03.923Z","dependency_job_id":"c5c04047-6322-45a6-a3f1-446c1edee455","html_url":"https://github.com/1zun4/zte-cpe-rs","commit_stats":null,"previous_names":["1zun4/zte-cpe-rs"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1zun4%2Fzte-cpe-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1zun4%2Fzte-cpe-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1zun4%2Fzte-cpe-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1zun4%2Fzte-cpe-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1zun4","download_url":"https://codeload.github.com/1zun4/zte-cpe-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248859455,"owners_count":21173336,"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":["gigacube","lte-router","mf289f","zte"],"created_at":"2024-11-27T20:46:52.151Z","updated_at":"2025-04-14T09:50:44.165Z","avatar_url":"https://github.com/1zun4.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zte-cpe-rs\n\n🚀 A Rust library for interacting with ZTE devices, such as the GigaCube ZTE MF289F.\n\n## Supported Devices\n\n- GigaCube ZTE MF289F\n\n## Features\n- 🔄 Device Reboot\n- 📊 Device Status Information / Monitoring\n- 📡 Connect and Disconnect Network\n- 🔀 Set Connection Mode\n- 🛡️ Set Bearer Preference\n- 🔒 Set LTE Band Lock\n- 🌐 Set DNS mode configuration\n- 📶 Set WiFi Coverage\n- 🔌 Configure UPnP\n- 🌐 Configure DMZ\n- ♻️ Manage Auto Update\n\nMore features coming soon...\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nzte-cpe-rs = \"0.2.0\"\n```\n\n## Usage\n\nHere's a basic example of how to use `zte-cpe-rs`:\n\n```rust\nuse std::collections::HashSet;\n\nuse anyhow::{Context, Result};\nuse zte_cpe_rs::{bands::LteBand, ZteClient};\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n    let mut zte_client = ZteClient::new(\"giga.cube\")\n        .context(\"Failed to create ZteClient\")?;\n\n    // Login\n    zte_client.login(\"YOURPASSWORD\".to_string())\n        .await\n        .context(\"Failed to login\")?;\n\n    // Disconnect network\n    zte_client.disconnect_network().await?;\n\n    // Connect network\n    zte_client.connect_network().await?;\n\n    // Get status\n    println!(\"{}\", zte_client.get_status().await?);\n\n    // Set LTE band\n    let mut bands = HashSet::new();\n    bands.insert(LteBand::Band1);\n    bands.insert(LteBand::Band3);\n    bands.insert(LteBand::Band7);\n    \n    zte_client.select_lte_band(Some(bands))\n        .await?;\n\n    // Logout\n    zte_client.logout().await?;\n\n    Ok(())\n}\n```\n\n## Contributing\n\nWe welcome contributions! To get started, follow these steps:\n\n1. **Fork the repository**: Click the \"Fork\" button at the top right of this page.\n2. **Clone your fork**: \n    ```sh\n    git clone https://github.com/yourusername/zte-cpe-rs.git\n    cd zte-cpe-rs\n    ```\n3. **Create a new branch**: \n    ```sh\n    git checkout -b feature/your-feature-name\n    ```\n4. **Make your changes**: Implement your feature or fix the bug.\n5. **Commit your changes**: \n    ```sh\n    git commit -am 'Add a meaningful commit message'\n    ```\n6. **Push to your branch**: \n    ```sh\n    git push origin feature/your-feature-name\n    ```\n7. **Open a Pull Request**: Go to the original repository and click the \"New Pull Request\" button.\n\nPlease ensure your code adheres to the project's coding standards and includes appropriate tests.\n\nThank you for your contributions!\n\n## Setup\n\nClone the repository:\n\n```sh\ngit clone https://github.com/1zun4/zte-cpe-rs.git\ncd zte-cpe-rs\n```\n\nBuild the project:\n\n```sh\ncargo build\n```\n\nRun tests:\n\n```sh\ncargo test\n```\n\n## Acknowledgements\n\nThis project was inspired by and uses code from:\n\n- [ZTE-MC-Home-assistant](https://github.com/Kajkac/ZTE-MC-Home-assistant/blob/master/python_scripts/zte_tool.py)\n- [zte-cpe](https://github.com/SpeckyYT/zte-cpe)\n- [zte-v3.0b.min.txt](https://miononno.it/files/zte-v3.0b.min.txt)\n\n## License\n\nThis project is licensed under the GNU GENERAL PUBLIC LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1zun4%2Fzte-cpe-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1zun4%2Fzte-cpe-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1zun4%2Fzte-cpe-rs/lists"}