libcoap icon indicating copy to clipboard operation
libcoap copied to clipboard

libcoap with Contiki OS

Open MarCast opened this issue 7 years ago • 4 comments

Hi men, I have a problem with libcoap on my Contiki OS 3.0. My goal is to forward the values of my device to a cloud via the Coap protocol. That's why I'm using LibCoap. My Contiki is 3.0 and I followed the installation on the main site by following these steps:

  1. Download of the git

  2. Copy the folder in the APPS of contiki

  3. Make ./autogen.sh

  4. Make ./configure --with-contiki   At step 4 I get an error of a2x that is not there and then I disabled it and I redid the command

  5. Make ./configure --with-contiki --disable-a2x

Now I tried to give an example, adding to the Makefile APPS + = libcoap, but going to compile tells me that there are no declared libraries. Because? I hope you can give me a hand!

MarCast avatar Feb 14 '18 09:02 MarCast

The major problem is that step 4 and step 5 fail:

$ ./configure --with-contiki --disable-a2x |& head -1
configure: WARNING: unrecognized options: --with-contiki, --disable-a2x

After cloning the libcoap master branch, you can check out the Makefile.contiki and coap_config.h (which points to coap_config.h.contiki in the top directory) in examples/contiki how to manually build with Contiki 3. The improved develop branch unfortunately does not support Contiki.

obgm avatar Feb 15 '18 19:02 obgm

Then it's support Contiki 3? If it use the Contiki 2.7, I can't use this version for problem of my chip.

MarCast avatar Feb 19 '18 11:02 MarCast

I implement the libcoap on Contiki Apps, but I have the error when adding the APPS += libcoap in Makefile on my example. When I compile the file, I see fatal error: arpa/inet.h no such file or directory.

MarCast avatar Feb 21 '18 10:02 MarCast

You need to make sure that your coap_config.h does not define HAVE_ARPA_INET_H if your toolchain does not have arpa/inet.h.

obgm avatar Feb 22 '18 11:02 obgm