automote / ESP-CoAP

This repo contains CoAP protocol for ESP-12E
http://thingtronics.com
GNU General Public License v3.0
71 stars 28 forks source link

How to add options in the packet? #9

Closed amila-uk-92 closed 6 years ago

amila-uk-92 commented 6 years ago

I'm trying to use options in the standard packet format and the server that I'm using, need resource path as options. I couldn't figure out how to set it in the client programme.

lovelesh commented 6 years ago

@Anjeldethwings to add a new option as header in CoAP packet. you can edit this function uint16_t coapClient::sendPacket(coapPacket &packet, IPAddress ip, int port). it contains // make option header where you can add your given option provided in coap.h or even add your own option.

amila-uk-92 commented 6 years ago

thank you. I'm on it.