This is an UNIQUID SDK for ESP32 based on ESP-IDF SDK using PlatformIO IDE.
git clone --recurse-submodules https://github.com/uniquid/esp32-sdk.git
platformio.exe run --target upload
there are some define in platformio.ini
thant can/must be change.
-DLOG_LOCAL_LEVEL=ESP_LOG_ERROR
: to choose the level of the ESP-IDF logger-DNAME_PREFIX=\"ESP32_\"
: prefix of the name of the identity-DMQTT_HOST=\"IP_MQTT\"
: mqtt broker host (MUST)-DMQTT_PORT=1883
: mqtt port-DREGISTRY_URL=\"http://xxx.xxx.xxx.xxx:xxxx/registry\"
: registry url with ip:port (MUST)-DMY_SSID=\"SSID\"
: wifi ssid (MUST)-DMY_PASSWORD=\"PASSWORD\"
: wifi password (MUST)-DTIMEOUT_READER=5
: interaction timeout with the serial terminal from the system start, in seconds x2, if you enter 5, you have 10 seconds after starting to send commands.The Uniquid identity is saved in the NV-SRAM of the ESP32, using the Non-volatile storage library (NVS).
At the system start, you have TIMEOUT_READER x2 seconds to send this commands:
e
: to erase the Uniquid identityr
: to restart the boardif you send e
, remember to send r
after or the board will not have an identity
All rpc methods are setted like ECHO method.
if the user sends
{"sender":"user-address", "body":{"method":35, "params":"Hello World!", "id":65656} }
the provider (board) responds with
{"sender":"provider-address","body":{"result":"Hello World!","error":0,"id":65656} }
Capability feature is available, but it is the responsibility of the user for how the capability message arrives and how to set the system time.