This shows you the differences between two versions of the page.
iothings:laboratoare:lab7 [2022/04/20 20:02] cosmin.chenaru [Exerciții] |
iothings:laboratoare:lab7 [2024/07/15 22:03] (current) cosmin.chenaru Change IP hardcoding |
||
---|---|---|---|
Line 9: | Line 9: | ||
Există o sumedenie de implementări software a protocolului CoAP ([[https://en.wikipedia.org/wiki/Constrained_Application_Protocol#Implementations|Implementations]]), dar în acest laborator vom folosi biblioteca "[[https://github.com/hirotakaster/CoAP-simple-library|CoAP simple library]]" pentru Arduino IDE pentru a rula un server CoAP, și implementarea [[https://github.com/Tanganelli/CoAPthon|CoAPthon]] din Python pentru a rula un client CoAP. | Există o sumedenie de implementări software a protocolului CoAP ([[https://en.wikipedia.org/wiki/Constrained_Application_Protocol#Implementations|Implementations]]), dar în acest laborator vom folosi biblioteca "[[https://github.com/hirotakaster/CoAP-simple-library|CoAP simple library]]" pentru Arduino IDE pentru a rula un server CoAP, și implementarea [[https://github.com/Tanganelli/CoAPthon|CoAPthon]] din Python pentru a rula un client CoAP. | ||
+ | O captură Wireshark arată cum protocolul CoAP rulează peste protocolul UDP: | ||
+ | |||
+ | {{:iothings:laboratoare:lab7-coap-capture.png?600|}} | ||
==== MQTT ==== | ==== MQTT ==== | ||
Line 43: | Line 46: | ||
<code> | <code> | ||
- | /usr/local/bin/coapclient.py -o PUT -p "coap://192.168.1.151/light" -P "1" | + | /usr/local/bin/coapclient.py -o PUT -p "coap://$ESP32_BOARD_IP/light" -P "1" |
</code> | </code> | ||