This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:iot-open:practical:hardware:sut:esp32:iot_6 [2024/05/07 12:50] – [Start] pczekalski | en:iot-open:practical:hardware:sut:esp32:iot_6 [2024/05/07 12:58] (current) – [Start] pczekalski | ||
---|---|---|---|
Line 56: | Line 56: | ||
Declare an IP address of the CoAP server endpoint. Adjust '' | Declare an IP address of the CoAP server endpoint. Adjust '' | ||
<code c> | <code c> | ||
+ | #define CoAPport 5683 | ||
+ | #define CoAPpath "< | ||
IPAddress coapExtSeviceIP(a, | IPAddress coapExtSeviceIP(a, | ||
</ | </ | ||
+ | <note tip>The '' | ||
+ | < | ||
+ | coap:// | ||
+ | </ | ||
+ | then your '' | ||
+ | <code c> | ||
+ | #define CoAPpath " | ||
+ | </ | ||
=== Step 4 === | === Step 4 === | ||
Declate communication objects: | Declate communication objects: | ||
Line 91: | Line 100: | ||
=== Step 7 === | === Step 7 === | ||
+ | Make a call (GET) request to the service. Remember to provide the correct URI part.\\ | ||
+ | Mind that the last argument of the function is a " | ||
+ | The laboratory technical documentation provides a list of the services, their URIs (including paths), methods, and IP ports. | ||
+ | <code c> | ||
+ | int msgid = coap.get(coapExtSeviceIP, | ||
+ | </ | ||
+ | |||
+ | === Step 8 === | ||
Process CoAP services in the '' | Process CoAP services in the '' | ||
<code c> | <code c> |