Create file ca-cert.pem
and add the certificate to the same folder as the app binary.
$ cd examples/linux
$ cargo run
# Release mode
$ cargo run --release
Create the file src/secrets.rs
and add the following code, according to your WiFi network, Scurid server IP address and certificate. It is really important that the CA_CERT
constant ends in \0
.
pub const WIFI_SSID : &str = "ssid";
pub const WIFI_PASSWORD : &str = "password";
pub const SCURID_SERVER : &str = "192.168.20.25";
pub const CA_CERT: &str = "-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----\0";
Tested with the Adafruit ESP32-S3 TFT Feather board.
$ cd examples/esp32s3
$ cargo build
$ espflash flash --flash-size 4mb --monitor target/xtensa-esp32s3-espidf/debug/microscurid-rust-esp32s3