Git Product home page Git Product logo

esp32-wifi's Introduction

esp32-wifi

NOTE: Superceded by esp-wifi.

A experimental wifi driver for the esp32 written in Rust.

Contributions are welcome :)

Join in on the discussion: https://matrix.to/#/#esp-rs:matrix.org!

Building

This crate uses the esp-idf binary blobs for wifi functionality. The C foreign function interface is generated with bindgen. This is done using the generate/bindgen.sh script, but only needs to be done again when the version of the binary blobs is changed.

The generate/bindgen.sh can be called from the root directory to create the various files in src/binary. The version of esp-idf used should match the version of the binary blobs in the esp32-wifi-lib sub-repository. (Currently version v4.1 of the esp-idf is used.)

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

esp32-wifi's People

Contributors

arjanmels avatar mabezdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp32-wifi's Issues

Describe build requirements

Hi, I know this project is very early-days, but I was hoping to help work on it, but it's really hard to get building. First I tried rust 1.48.0, but changes to the unstable bits of the alloc and core crates failed the build. For some reason (in hindsight, doesn't makes sense now) I thought using 1.49.0 would work better, but there's an LLVM issue with that which prevents it from working properly. So I just tried rust 1.47.0 (and esp-idf 4.2; I re-ran the bindings generation and fixed up differences), but I'm still having one last issue:

error[E0277]: the trait bound `esp32::TIMG0: esp32_hal::timer::TimerGroup` is not satisfied
  --> examples/test.rs:35:23
   |
35 | static TIMER_HANDLER: TimerInterruptHandler<Timer<esp32::TIMG0, esp32_hal::timer::TimerLact>> =
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `esp32_hal::timer::TimerGroup` is not implemented for `esp32::TIMG0`
   | 
  ::: /home/brian/src/esp32-rust/esp32-hal/src/timer/mod.rs:40:24
   |
40 | pub struct Timer<TIMG: TimerGroup, INST: TimerInst> {
   |                        ---------- required by this bound in `esp32_hal::timer::Timer`

I've tried rolling the esp32-hal crate back to mid September of last year, but still hitting this issue. If I go any earlier, I run back into problems with the unstable alloc stuff.

Essentially I'm just trying to figure out what versions of rust and esp32-hal I should be using to be able to successfully compile this. From there I'm happy to work on upgrading to esp-idf 4.2 and getting things like wifi scan results to work, and then eventually see about getting things to work with the latest rust and esp32-hal version.

Thanks for getting started on this project! I'm really excited to be able to build wifi-enabled stuff using rust on esp32!

[Compiling]: inline assembly is unsupported on this target

Hi, ESP-RS team,
I try to compile the project with the installed tooltain.
When I build the project with the command, cargo build -Zbuild-std=core, it generates the error as below:

error[E0472]: inline assembly is unsupported on this target
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/xtensa-lx-rt-0.7.0/src/exception/assembly_lx6.rs:1:1
|
1 | / global_asm!(
2 | | "
3 | | .set XT_STK_PC, 0
4 | | .set XT_STK_PS, 4
... |
70 | | "
71 | | );
| |__^
|
= note: this error originates in the macro global_asm (in Nightly builds, run with -Z macro-backtrace for more info)

Please help have a check and give some hints.

Wi-Fi/BLE bindings to binary blobs, without IDF.

Currently (and most likely always), the WiFi/BLE binaries require a threaded environment to operate.

In this repo (based on the esp32 atm), we use the PRO core as a different thread of execution. This is not feasible long term for a few reasons; it relies on there only ever being one task spawned by the blobs; Most Espressif chips do not have more than one core.

We will need a simple scheduler, there is cortex-m-threads, and even a working example of a similar wifi chip using this approach.

the trait bound `esp32::TIMG0: TimerGroup` is not satisfied

Hi everyone!
I'm trying to build the example but I getting this error:

error[E0277]: the trait bound `esp32::TIMG0: TimerGroup` is not satisfied
  --> examples/test.rs:35:23
   |
35 | static TIMER_HANDLER: TimerInterruptHandler<Timer<esp32::TIMG0, esp32_hal::timer::TimerLact>> =
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TimerGroup` is not implemented for `esp32::TIMG0`
   |
  ::: /Users/jaz/esp-rs/esp32-hal/src/timer/mod.rs:40:24
   |
40 | pub struct Timer<TIMG: TimerGroup, INST: TimerInst> {
   |                        ---------- required by this bound in `Timer`

Do you have any idea why?
thank-you :)

no `AllocError` in `alloc`

Hey, I really just stumbled upon this and it's quite likely I'm doing something wrong. I tried building the test like this:

cargo espflash --chip esp32 --example test --speed 460800 /dev/ttyUSB0

and I'm getting

   Compiling linked_list_allocator v0.8.8
   Compiling proc-macro2 v1.0.24
   Compiling syn v1.0.55
   Compiling semver v0.9.0
   Compiling xtensa-lx v0.3.0
   Compiling xtensa-lx6 v0.2.0
   Compiling xtensa-lx-rt v0.5.0
   Compiling xtensa-lx6-rt v0.3.0
   Compiling memchr v2.3.4
   Compiling nb v0.1.3
   Compiling num-traits v0.2.14
   Compiling esp32 v0.10.0
   Compiling esp32-hal v0.2.0 (/home/svenstaro/src/esp32-hal)
   Compiling esp32 v0.6.0
   Compiling esp32-wifi v0.1.0 (/home/svenstaro/src/esp32-wifi)
error[E0432]: unresolved imports `core::alloc::AllocError`, `core::alloc::Allocator`
  --> /home/svenstaro/.cargo/registry/src/github.com-1ecc6299db9ec823/linked_list_allocator-0.8.8/src/lib.rs:19:19
   |
19 | use core::alloc::{AllocError, Allocator};
   |                   ^^^^^^^^^^  ^^^^^^^^^ no `Allocator` in `alloc`
   |                   |
   |                   no `AllocError` in `alloc`
   |
help: a similar name exists in the module
   |
19 | use core::alloc::{AllocErr, Allocator};
   |                   ^^^^^^^^
help: a similar name exists in the module
   |
19 | use core::alloc::{AllocError, AllocErr};
   |                               ^^^^^^^^

   Compiling embedded-hal v0.2.4
error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `linked_list_allocator`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Any idea?

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.