{"id":27598569,"url":"https://github.com/bjoernq/bl602-wifi-rs","last_synced_at":"2025-04-22T14:15:03.752Z","repository":{"id":43222156,"uuid":"370108863","full_name":"bjoernQ/bl602-wifi-rs","owner":"bjoernQ","description":"WIP / POC for using the BL602 wifi blob from Rust for wifi and BLE connectivity","archived":false,"fork":false,"pushed_at":"2022-03-12T10:44:03.000Z","size":10733,"stargazers_count":24,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-22T14:14:57.106Z","etag":null,"topics":["bl602","ble","bluetooth","rust","wifi"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/bjoernQ.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}},"created_at":"2021-05-23T16:59:37.000Z","updated_at":"2023-09-27T20:48:11.000Z","dependencies_parsed_at":"2022-09-13T10:00:33.275Z","dependency_job_id":null,"html_url":"https://github.com/bjoernQ/bl602-wifi-rs","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/bjoernQ%2Fbl602-wifi-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoernQ%2Fbl602-wifi-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoernQ%2Fbl602-wifi-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoernQ%2Fbl602-wifi-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjoernQ","download_url":"https://codeload.github.com/bjoernQ/bl602-wifi-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250255773,"owners_count":21400410,"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":["bl602","ble","bluetooth","rust","wifi"],"created_at":"2025-04-22T14:15:03.247Z","updated_at":"2025-04-22T14:15:03.747Z","avatar_url":"https://github.com/bjoernQ.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BL602 Wifi Rust\n\nThis is work in progress and currently more a proof of concept.\nThe code is awfully hacked together - just enough to make it work. However it seems to work so far for me.\n\nIt uses the NuttX wifi blob from https://github.com/bouffalolab/bl_blob\n\n## Status\n\n|What|Status|\n|---|---|\n|Wifi Connect to Access Point|Works|\n|Wifi Scan|Works|\n|Wifi Start Access Point|Doesn't work|\n|Wifi Automatic Reconnect|Not implemented yet|\n|BLE|HCI Communication works and there is a minimal BLE stack|\n\n## Examples\n\nSee the `examples` folder.\n\n### Example: _simple_\n\nThis connects to an access point and provides a minimal TCP server on port 4321.\nYou can ping the BL602 and telnet to port 4321.\n\nSometimes it fails to connect (there is no retry currently).\n\nIn `examples/simple/wifi_config.rs` change the SSID and PSK for your access point. \n\nMaybe you need to change the IP address (currently 192.168.2.191) and the IP of the default gateway (192.168.2.1) in `examples/simple/main.rs`.\n\nCompile with `cargo build -Z build-std --target riscv32imfc-unknown-none-elf.json --example simple` and flash the resulting binary.\n\n### Example: _scan_\n\nThis scans for wifi networks.\n\n### Example: _dhcp_\n\nSimilar to _simple_ but uses DHCP - so no need to configure an IP address or gateway.\n\n### Example: _ble_advertising_\n\nThis starts BLE advertising. It should show up as _BL-602 BLE_ when scanning for Bluetooth devices.\nIt's possible to connect to it and discover two services. One is read and writeable and one is just writeable. Read and write should also work.\n\n## Implementation Notes\n\nThis needs some modifications to the following crates (done in my forks referenced in `Cargo.toml`)\n- _riscv-rt_ - needs support for ILP32F and initialization of the FPU\n\nAlso it needs a very special linker script.\n\nIt uses one of the timers which can't be used for other things.\n\nYou'll need nightly Rust. (I use `rustc 1.57.0-nightly (9bb77da74 2021-09-13)` currently)\n\n## Things to change / improve\n\n- [ ] especially the code in `compat` can be improved\n- [ ] make it more stable\n- [ ] use a queue for tx for improved performance\n- [ ] implement more BLE stack functionality\n\nand many more ...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjoernq%2Fbl602-wifi-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjoernq%2Fbl602-wifi-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjoernq%2Fbl602-wifi-rs/lists"}