Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a detailed tutorial creating a non-trivial application #11

Open
2 tasks
jessebraham opened this issue Nov 23, 2021 · 4 comments
Open
2 tasks

Add a detailed tutorial creating a non-trivial application #11

jessebraham opened this issue Nov 23, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@jessebraham
Copy link
Member

jessebraham commented Nov 23, 2021

Walking people through implementing a real-world project using Rust would likely help jumpstart many people's progress. One suggestion was a camera web server, or we could do a Wi-Fi lightbulb project or something similar.

  • std
  • no_std
@jessebraham jessebraham added the enhancement New feature or request label Nov 23, 2021
@ivmarkov
Copy link
Contributor

ivmarkov commented Dec 8, 2021

I'm working on something similar that is not on github yet, and which I informally call the "mega-demo".

My idea for the mega-demo is to just be a WiFi Routing/Repeater, as that does not require any additional hardware, so any board would work:

  • Basically, the WiFi will work simultaneously in WiFi AccessPoint mode, as well as in WiFi STA mode and would serve as a wireless extender of sorts, but on layer 3 instead of layer 2, due to restrictions in the WiFi ESP-IDF implementation. More or less a Rust-ified copy of https://github.com/martin-ger/esp32_nat_router
  • Might extend it with optional Ethernet support as well, now that all Ethernet drivers are also supported by esp-idf-svc

Now, the concrete use case of the demo is not that important, as I want to demo the other details. The stuff that basically transforms a "proof of concept" into an actual, working firmware that can be upgraded and integrated with smart home software:

  • It should have a WiFi ssid/password provisioning mechanism. The initial one should be based on the WIP captive portal, we might extend later with other provisioning capabilities
  • It should have over-the-air update mechanism, based on the WIP OTA Rust wrappers as well as the WIP GitHub-based OTA server implementation
  • Needless to say, it would need the (new) HTTP server Rust wrappers, the Wifi wrappers, the Eth wrappers and the NVS storage wrappers
  • The provisioning and management UI is planned to be based on Bulma and Yew and will be part of the firmware itself. If Yew turns out to be too heavy of a dependency I might switch to plain JavaScript. All of this to happen in the edge-frame project
  • The communication of the UI with the server should be based on these WIP APIs
  • Undecided yet: It might have an MQTT and/or mDNS+COAP story for sending statistics and controlling the router (to some extent) via smart home software like Home Assistant or OpenHAB

Once we have this, it should be easy to tailor this project into whatever specific hardware the user wants to support with it. I have the feeling, the hardware-specific stuff would be the minority of the code, the rest could just be re-used from this project. :)

But as you can imagine, lots of work, and lots of moving parts. Can easily take a few months.

Help greatly appreciated!

@thomas725
Copy link

Hey there!

I'd be an eager consumer of such a tutorial. Especially I'd like to learn how to use Rust with OTA on my ESP32, preferably in a way that I can build+deploy using a button in VS-Code.

@ivmarkov
Copy link
Contributor

ivmarkov commented Oct 27, 2022

Hey there!

I'd be an eager consumer of such a tutorial. Especially I'd like to learn how to use Rust with OTA on my ESP32, preferably in a way that I can build+deploy using a button in VS-Code.

One year later, we still don't have a detailed tutorial for a non-trivial application, but at least we do have the foundations of the application that should be the basis of the tutorial.

Given how much the design of the above application has deviated from the original "mega demo" plan from above, I think it needs its own book though - which can be referred from here of course.

@thomas725
Copy link

Hey there, I thought I'd share my success with esp-rs + OTA here, maybe somebody else stumbling over this ticket might appreciate the relatively simple sample (~340 loc at the moment) including documentation how to use the OTA implementation:
https://gitlab.com/thomas351/esp32-rust-playground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

3 participants