How can I do CoAP communication between openmote-b and PC?

I have openmote-b’s. I want to use these to connect with my PC (VMware>ubuntuos). I want to exchange packets using CoAP between openmote-b and PC. What should I refer to and what procedures should I take for this?

I had libcoap running on my PC and gcoap running on openmote-b. I wanted the two to be connected, but it failed.

Someone advised me to use a border router, I failed to use it and I’m not sure how I can use it for openmote-b.

I’m a beginner who just came into the IoT field. Is there anyone who can kindly explain it to me?

There are two major possibilities.

  1. run IPv6 over USB connector.
  2. connect IPv6 via 802.15.4. To do this, you either need an 802.15.4 interface on your “PC”, or you need a gateway machine of some kind. One way tot get a gateway machine is by using 1.

Your Windows(I guess) PC probably will cause you endless headaches and hassles. PCs capable of running ubuntu on bare hardware cost $50 used at a local shop. USB hassles often require hard reboots to clear, so you really might never want to toast your desktop. VMware does not do USB sharing as well as VirtualBox. If you insist on doing a VM, then use VirtualBox. Native network connections over USB work very well on MacOS and Ubuntu, I don’t know about Windows (Windows for Linux won’t likely help you).

1 Like

How many OpenMote-Bs do you have? If you have two and want to communicate wireless, you can use one of them as the border router. Just flash the examples/gnrc_border_router application on it, the make BOARD=openmote-b term will take care of the network setup.

Then your second OpenMote-B can operate wireless and should get a prefix from the border router.

If you only have a single OpenMote-B (and don’t have a 802.15.4 interface on your PC) you can use ethos or SLIP to use the UART as a network interface.

Here you can either use the stdio_ethos or slipdev_stdio module in combination with the host tools found in dist/tools/ethos or dist/tools/slip.

2 Likes

Benjamin Valentin via RIOT notifications@riot-os.org wrote: > How many OpenMote-Bs do you have? If you have two and want to > communicate wireless, you can use one of them as the border > router. Just flash the examples/gnrc_border_router application on it, > the make BOARD=openmote-b term will take care of the network setup.

I think that essentially any device that runs RIOT-OS and has a serial/USB interface to it can be used this way. So, an nRF and a OpenMote (A or B) will all work, right? Are there exceptions? I will make a list… I guess it needs to go into markdown in the source tree somewhere.

1 Like

Yes any serial UART port can be used for ethos or SLIP. If you have a native USB port you can also use CDC ECM (Ethernet over USB).