Giter VIP home page Giter VIP logo

rainmaker-rs's Introduction

Rust Implementation of ESP Rainmaker

A cross-platform implementation of ESP Rainmaker for ESP32 products and Linux using Rust.

Build Prerequisites

  • Follow the Prerequisites section in the esp-idf-template crate.
  • Install Protobuf compiler on your system.
  • Install ESP-Rainmaker app on your phone.

Get rainmaker-rs

Please clone this repository using the below command:

  git clone https://github.com/shreyash-b/rainmaker-rs.git

Running on ESP devices

  1. Erase flash contents:
espflash erase-flash
  1. Use rainmaker cli to perform manual claiming on ESP devices
./rainmaker.py claim /dev/ttyUSB0 --addr 0x3FA000
  1. Navigate to rainmaker-rs directory
cd rainmaker-rs
  1. Build the project
cargo build
  1. Run
cargo run --target <mcu-target>
MCU Target
ESP32 xtensa-esp32-espidf
ESP32-S2 xtensa-esp32-espidf
ESP32-S3 xtensa-esp32-espidf
ESP32-C2 riscv32imc-esp-espidf
ESP32-C3 riscv32imc-esp-espidf
ESP32-C6 riscv32imc-esp-espidf
  1. Monitor
espflash monitor

Running on Linux

  1. Create directories for storing persistent data
mkdir -p ~/.config/rmaker/fctry
mkdir -p ~/.config/rmaker/nvs
  1. Fetch claim data using rainmaker cli
./rainmaker.py login
./rainmaker.py claim --mac <MAC addr> /dev/null 
  1. Run
cargo run --target x86_64-unknown-linux-gnu
OR
cargo run_linux

Once the example is running, open the rainmaker mobile application and follow on-screen instructions for adding device

When running for the first time, you'll need to set RMAKER_CLAIMDATA_PATH environment variable to the folder containing your claimdata(mentioned in before running section)


Note

  • When running on ESP32 for first time, on initial boot it will start wifi provisioning and user node mapping.
  • After performing wifi provisioning using Rainmaker Android application restart the ESP32 for normal functioning

rainmaker-rs's People

Contributors

shreyash-b avatar chinmaydixit23 avatar

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.