Skip to content
/ wifi Public

ESP_IDF simple component for working by WIFI.

Notifications You must be signed in to change notification settings

Farzinkh/wifi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP_IDF WIFI

This is very simple component for working with WIFI base on ESP_IDF V4.3.

Installation

In your project root directory run:

git submodule add https://github.com/Farzinkh/wifi.git components/wifi

now import it in your main.c by #include "wifi.h" and choice beetwen STA , AP , SMART modes.

OTA config

move anything inside config & server folder to root of your project then create server_certs folder and run

openssl req -x509 -newkey rsa:2048 -keyout server_certs/ca_key.pem -out server_certs/ca_cert.pem -days 365 -nodes

enter server ip as common name then install server requirements once by

pip install -r requirments.txt

finally run server

python server.py

and you are done whenever you change app version in menuconfig and recompile your code by idf.py build and restart esp32 it will update constantly.

API

wifi_init_sta() station mode.

wifi_init_softap() AP mode.

wifi_init() smart mode.

get_rssi() get rssi value.

initialise_mdns() init mdns.

check_time() update time if internet is available.

get_ip() get ip address and wait for connection if disconnected.

wifi_scan() scan for APs.

start_ota() update code by ota.

ota_verify() to verify your ota app.

ota_discredit() to flag your ota app as invalid.

save_key_value() save data in nvs.

load_key_value() load data from nvs.

Example

Sending sensor data by udp protocol using this component can be found here.

Enjoy :)

You can find me on Twitter or on LinkedIn

About

ESP_IDF simple component for working by WIFI.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages