Comments (7)
All the check boxes are ticked in the opening message. I there some reason this issue is still open?
from esp-wifi-sys.
As you already raised the issue for that, we first need esp-rs/esp-hal#287 in esp-hal to make esp-wifi work for ESP32-C2
The headers and the blobs should be copied / build via https://github.com/esp-rs/esp-wireless-drivers-3rdparty - the Makefile needs to be changed to support ESP32-C2 - not sure if the in mentioned revision of esp-idf there was already C2 support
Once the blobs and headers are copied over the mkbinding.bat
needs to get adapted (Sorry there is currently just a Windows batch file - mid-term we should replace that with an x-task like binary crate, make sure to use bindgen 0.59.2 for now)
As you already found out the phy-init-data needs to be taken from https://github.com/espressif/esp-idf/tree/master/components/esp_phy/esp32c2/include
Also, as you already found out the needed ROM functions can be found here: https://github.com/espressif/esp-idf/tree/master/components/esp_rom/esp32c2/ld
from esp-wifi-sys.
@bjoernQ hmm I'm somewhat busy with my life recently to get some company projects done first and so you can take over, I may come look over occasionally though
from esp-wifi-sys.
I'm not really into these kind of these mixed hardware-software engineering (and failed once to do so) but...any hint on implementing WiFi for ESP32-C2?
We can steal some headers from:
https://github.com/espressif/esp-idf/blob/master/components/bt/include/esp32c2/include/esp_bt.h
And the wireless communication blobs from:
https://github.com/espressif/esp32-wifi-lib/tree/master/esp32c2
And physical layout data from:
https://github.com/espressif/esp-idf/tree/master/components/esp_phy/esp32c2/include
The CSR can also be stolen here:
https://github.com/espressif/esp-idf/tree/master/components/esp_rom/esp32c2/ld
from esp-wifi-sys.
@bjoernQ seems like this will be a tad bit more complicated...On ESP32-C2 Espressif is using Nimble on it...that's why it is not a trivial task to port even if it is up for half a year already...
from esp-wifi-sys.
Nimble is just one of the BLE stacks supported by esp-idf - here we just expose HCI for BLE and let the user use their own stack. (Actually, I don't know of some real world BLE stacks in Rust so the example uses a toy-level implementation of a BLE stack).
Should be possible to add WiFi support even without considering BLE (like it's currently the case for ESP32-S3) - should be also much easier to just consider WiFi for the start since BLE support is much more complex to implement currently
Once you got the headers and bindgen things sorted out, it should just be a matter of
- providing the ROM functions linker script
- adding
common_adapter_esp32c2.rs
andphy_init_data_esp32c3.rs
- adding
timer_esp32c2.rs
- adapt
g_wifi_osi_funcs: wifi_osi_funcs_t
in./src/wifi/mod.rs
I'd expect it to be very similar to the ESP32-C3 which should help
from esp-wifi-sys.
@stevefan1999-personal Are you still interested in working on WiFi for ESP32-C2? If not or if you got stuck: I am considering updating the drivers in the next few days and I can take this over
from esp-wifi-sys.
Related Issues (20)
- Driver Update HOT 1
- BLE example is not work for esp32s3 HOT 13
- [ESP32] esp-wifi crash if used with embassy and any task on the second core HOT 10
- Start a CHANGELOG.md
- ESP8266 WIFI attempts HOT 2
- esp-wifi should be useable without depending on embedded-svc HOT 1
- esp-wifi 0.3.0 does not compile for ESP32-C3, it depends on portable-atomic, and that doesnt build for RiscV HOT 5
- How to depend on esp-wifi in an external example HOT 3
- example/embassy_ble does not compile HOT 2
- esp-wifi lockup on esp32c3 when using the embassy InterruptExecutor HOT 3
- [ESP32] esp-wifi crashes when trying to connect via BLE HOT 6
- NVS initialization error HOT 1
- compile error HOT 2
- W (42148) wifi:m f null Getting This warning and then wifi is never reconnected in the execution HOT 1
- Critical section feature conflict between esp-wifi and esp-idf-hal HOT 3
- #[interrupt] macro has been removed from esp-hal-procmacros HOT 6
- docs.rs failed to build HOT 3
- HTTPS support HOT 2
- [RISCV] Stable esp-wifi HOT 2
- Access point example with password can't connect (ESP32S3) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-wifi-sys.