简体   繁体   中英

ESP32 smart wifi configuration via esp32 wifi AP(Access Point)

I want to make a React-Native application to provide wifi-credentials to esp32 module via esp32 wifi access point. I see there are some library of npm that we use to provisioning wifi config to esp32. For ex.

  1. react-native-esp32-idf
  2. react-native-esp-idf-ble-provisioning-rn

But i'm confuse how to use them and may be these are provide credentials via BLE or Bluetooth but I want to provide SSID and PASS via wifi.

Means, I have a esp32 module and at begining i use it as a wifi-access-point then my application would be connected to esp32 by wifi automatiically then by communition through wifi-hotspot b/w app and device i provide cred. to device-esp32.

Thats it!

So how i make this application in react-native?

A simple approach would be like the following:

  1. ESP32 is powered up
  2. ESP32 opens a Wi-Fi access point
  3. ESP32 starts an HTTP server acting as REST API
  4. Any HTTP/REST client (including the react native app) can set the Wi-Fi password and SSID using via the REST API
  5. Once the Wi-Fi password and SSID are set, ESP32 restarts as a Wi-Fi station and tries to connect to the configured Wi-Fi password and SSID.

This way on your react native app you'll only need to use a simple HTTP/REST client

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM