Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.
/ esp32-EaaS Public archive

πŸ“ Library For ESP32 Equipment as a Service(EaaS)

Notifications You must be signed in to change notification settings

111KNUIM-EaaS/esp32-EaaS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

KNU Equipment as a Service(EaaS) for ESP32 EaaS Library

API List

Include Library

platformIO

lib_deps = 
    https://github.com/111KNUIM-EaaS/esp32-EaaS

main.cpp

#include <Arduino.h>
#include <EaaS.h>

void setup() {
    init_EaaS();
}

void loop() {
    loop_eaas();
}

API (User can not used)

πŸ“„ EaaS

void init_EaaS(void);

πŸ“„ call this function in setup()

void loop_eaas(void *parameter);

πŸ“„ When OTA is running, this function is ready to Get OTA data.

void EaaS_OTA();

πŸ“„ When OTA is running, loop_eaas will call to this function.

πŸ’« EaaS_OTA

void init_EaaS_OTA(char *user, char *passwd);

πŸ’« This function is save user and password for EaaS_OTA file.

int flash_EaaS_firmware();

πŸ’« This function is flash EaaS_OTA firmware.
return 0 is susses, other is fail.

πŸ—ƒοΈ EaaS_nvs

esp_err_t init_Eaas_nvs     (void);

πŸ—ƒοΈ This function is init nvs.

esp_err_t open_Eaas_nvs     (nvs_handle_t *handle, const char* name);

πŸ—ƒοΈ This function is open nvs.

esp_err_t get_sta_ssid      (nvs_handle_t *handle, char** ssid);
esp_err_t get_sta_password  (nvs_handle_t *handle, char** password);
esp_err_t get_user_password (nvs_handle_t *handle, char** password);
esp_err_t get_nvs_str       (nvs_handle_t *handle, const char* name, char** value);

esp_err_t get_mac           (nvs_handle_t *handle, uint8_t* mac, char** user_name);

πŸ—ƒοΈ This function is get nvs data.

esp_err_t close_Eaas_nvs    (nvs_handle_t *handle);

πŸ—ƒοΈ This function is close nvs.

πŸš€ EaaS_network

void init_EaaS_network(const char* ssid, const char* password, const uint8_t* mac);

πŸš€ This function is init network.

🌐 EaaS_client

void init_client(char* user, char* passwd);

🌐 This function is init client and save user and password.

void set_machine_status(const uint8_t status);

🌐 This function is set machine status.
0: offline, 1: booting, 2: boot, 3: pausing, 4: pause, 5: otaing, 6: ota

uint8_t loop_eaas_status();

🌐 This function is loop eaas, Get status from server.

About

πŸ“ Library For ESP32 Equipment as a Service(EaaS)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published