- `idf.py flash`\r
- `idf.py monitor`\r
\r
+Examples for the ESP32 are in `esp32/esp_project/main`.\r
+There are currently two, SendEncrypted and Verify.\r
+The example can be set in `esp32/esp_project(_risc_v)/main/CMakeLists.txt` as the second argument after SRCS.\r
+\r
+Any code using the library should compile under ESP-IDF if the following code is added at the end of the file:\r
+```\r
+#include "wifi.h"\r
+\r
+void\r
+app_main(void)\r
+{\r
+ wifi_init(WIFI_SSID, WIFI_PASSWORD);\r
+\r
+ main();\r
+}\r
+\r
+```\r
+\r
To use the library in an ESP-IDF project:\r
- Add the matrix and olm components (can be found in `esp32/esp_project/components/`)\r
- Add `wifi.c/.h` (can be found in `esp32/esp_project/main/`)\r
MatrixClientSetUserId(client, USER_ID);\r
\r
MatrixClientLoginPassword(client,\r
- "pscho",\r
- "Wc23EbmB9G3faMq",\r
- "Test1");\r
+ USERNAME,\r
+ PASSWORD,\r
+ DEVICE_NAME);\r
\r
MatrixClientDeleteDevice(client);\r
\r
MatrixClientNewMegolmOutSession(&client,\r
ROOM_ID,\r
&megolmOutSession);\r
-printf("megolm session id: %.10s... key: %.10s...\n", megolmOutSession->id, megolmOutSession->key);\r
\r
MatrixClientShareMegolmOutSession(&client,\r
USER_ID,\r
- "ULZZOKJBYN",\r
+ DEVICE_ID2,\r
megolmOutSession);\r
\r
MatrixClientSendEventEncrypted(&client,\r