Functions | |
| IPAddress | deviceIp (192, 168, 0, 99) |
| void | callbackResponse (Coap::Message &message, IPAddress ip, uint16_t port) |
| void | setup () |
| void | loop () |
Variables | |
| byte | mac [] = {0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02} |
| IPAddress | destinationIp = IPAddress(192, 168, 0, 100) |
| EthernetUDP | Udp |
| Coap::Node | coapNode (Udp) |
| void callbackResponse | ( | Coap::Message & | message, |
| IPAddress | ip, | ||
| uint16_t | port ) |
| IPAddress deviceIp | ( | 192 | , |
| 168 | , | ||
| 0 | , | ||
| 99 | ) |
| void loop | ( | ) |
| void setup | ( | ) |
| Coap::Node coapNode(Udp) | ( | Udp | ) |
| IPAddress destinationIp = IPAddress(192, 168, 0, 100) |
| byte mac[] = {0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02} |
Example CoAP Client.
This example sends a confirmable GET request to a CoAP server and handles any response.
To test this example, you can use a CoAP server such as libcoap or microcoap. You may also test with:
Note that coap-server-notls exposes a "time" endpoint that returns the current timestamp as payload.
| EthernetUDP Udp |