simple coap client-server communication of two posix applications #coap

Stefan Hristozov

I want to set up a simple setup of two posix projects -- one running a simple coap server and other running a simple coap client.

What I did so far:

1) I build both  /zephyrproject/zephyr/samples/net/sockets/coap_client and zephyrproject/zephyr/samples/net/sockets/coap_server without any changes.

2) I executed ./ With sudo ifconfig I can see the new zeth interface:
zeth: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 2001:db8::2  prefixlen 128  scopeid 0x0<global>
        ether 00:00:5e:00:53:ff  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

3) I started the coap server posix program and tested it by sending a get request to the core1 resource (I used the coap-cli tool

coap get coap://[2001:db8::1]/core1

to which the server replied with:

(2.05)    Just a test

So the server works as expected. In addition I used wireshark sniffing on the zeth interface --> The CoAP get request and the response was there.

4)I started the client -- on the consol I see:

 ***** Booting Zephyr OS build v2.0.0-rc2 *****

CoAP client GET

but I cannot see any packets send in wireshark. I think something is not properly configured probably the zeth interface?

How to test the coap_client sample when running it as a posix application?

Best regards,

Join to automatically receive all group messages.