Abstract Machines logoHardware
S0 GatewaySoftware

CoAP

Connecting S0 to Magistrala via CoAP

Connecting S0 to Magistrala via CoAP

Running Magistrala

Ensure that Magistrala is running.

Ensure also you are in the embedded/targets/zephyr/coap directory when executing the below steps.

Modify the configuration file in src/config.h.

Start with the WiFi credentials, as S0 in this case is in Station Mode:

#define WIFI_SSID "SSID"    // Replace `SSID` with WiFi ssid
#define WIFI_PSK "PASSWORD" // Replace `PASSWORD` with Router password

Configuring Magistrala Variables

#define MAGISTRALA_HOSTNAME "messaging.magistrala.absmach.eu" // Replace with your Magistrala instance hostname or IP
#define MAGISTRALA_COAP_PORT 5683
#define DOMAIN_ID "DOMAIN_ID"         // Replace with your Domain ID
#define CLIENT_ID "CLIENT_ID"         // Replace with your Client ID
#define CLIENT_SECRET "CLIENT_SECRET" // Replace with your Client secret
#define CHANNEL_ID "CHANNEL_ID"       // Replace with your Channel ID

Building and Flashing Code

Once you update the configuration file, build and run the code:

west build -p always -b esp32c6_devkitc
west flash
west espressif monitor

On this page