Git Product home page Git Product logo

Comments (7)

bugadani avatar bugadani commented on July 20, 2024 2

All the check boxes are ticked in the opening message. I there some reason this issue is still open?

from esp-wifi-sys.

bjoernQ avatar bjoernQ commented on July 20, 2024 1

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.

stevefan1999-personal avatar stevefan1999-personal commented on July 20, 2024 1

@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.

stevefan1999-personal avatar stevefan1999-personal commented on July 20, 2024

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.

stevefan1999-personal avatar stevefan1999-personal commented on July 20, 2024

@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.

bjoernQ avatar bjoernQ commented on July 20, 2024

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 and phy_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.

bjoernQ avatar bjoernQ commented on July 20, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.