Open jvermillard opened 10 years ago
Yes correct. I was facing this problem. So i had reduced the buffer size and by doing so the program compiled and was up and running. I had also forked this version. Please do check that out.
works fine on a Mega, maybe it would be nice to fix the README because it's claiming it's working out-of-the-box on a Uno?
README changed. Thanks.
Hi all, I'm trying to compile on Arduino Uno. With code of cache91 it's OK, but is this code merged here? Also I can connect and receive data but the commands PUT (0/1) seem not to be executed. The led is always ON. Thanks
The biggest memory usage is in the endpoints.c
file which dynamically constructs the /.well-known/core
response. The response should be built at compile time! No reason to keep it in dynamic memory at all.
I am considering forking microcoap to avoid the dependency on the Arduino sockets library. I've had success with writing network code from scratch to work with the Ethernet Shield via the SPI bus. The W5100 chip has 16KB of embedded RAM, so that longer UDP packets are not a problem. I've also been able to work this way with binary encoded JSON over TCP and multicast based discovery. A similar lightweight library could be used with the ESP8266 with its embedded WiFi transceiver.
@draggett, sounds great. I'm also trying to provide something similar (and also looking forward to add json-ld and msgpack support). Right now I'm trying to implement c++ version of microcoap: https://github.com/semiotproject/minicoap to simplify the library API while working with Arduino and provide option to build it for Arduino (also for ESP8266 Arduino firmware), Raspberry Pi (with the Wiring Pi library) and general POSIX-based systems. I'm also implementing observe option support (right now I have enough memory to support about 50 observations with ESP8266 Arduino firmware but need much more tests). Please, feel free to criticize me, cause my solution is far from ideal and not stable at all.
Thanks for the pointer. I look forward to looking at it when I get the time. Right now, I am focusing on a C++ web of things server and looking to include CoAP as one of the protocols.
plz, could anyone help me? I have the same problem with compiling my code. it shows this message Sketch uses 231733 bytes (22%) of program storage space. Maximum is 1044464 bytes. Global variables use 32548 bytes (39%) of dynamic memory, leaving 49372 bytes for local variables. Maximum is 81920 bytes. I did not understand your solution!
plz, could anyone help me? I have the same problem with compiling my code. it shows this message
Result of compiling microcoap.ino with Arduino IDE: 1.5.6-R2
The sketch uses 14,560 bytes (45%) of storage space programs. The maximum is 32,256 bytes. Global variables use 2348 bytes (114%) dynamic memory, leaving -300 bytes for local variables. The maximum is 2048 bytes.