All this is done in the Cooja simulation.
I need to develop a project in which I have a mote (or many) that acts like a sensor and sends data to a server which does computations and publishes the results on a topic using MQTT.
In both cases I assign IPs to motes using the rpl-border-router example provided by Contiki-NG.
I can publish fake data created by the server and publish it through the border router via MQTT; I can create a tree to send the values from the sensor motes to the server using UDP and compute what The problem is that I can't connect the two.
I don't attach the code because I want to understand the structure that I should use to accomplish this and the general idea behind the solution you propose, if possible
I tried two configurations but none works, because I think I don't have the right structure.
These are the two settings:
- one mote per functionality: 1 sensor (1) sending data via UDP to a server (2), this server is set as root using
NETSTACK_ROUTING.root_start()
, which should publish data through MQTT via the rpl-border-router (3).
I think the error here is that the server is set as root, while the rpl-border-router should, but then how can I send data to the server for computations? - use the rpl-border-router (1) as server also, so it computes the outcomes and publishes through MQTT, receiving the values via UDP from sensor mote (2).
The problem here is the synchronization between MQTT broker assignment and IPv6 assignments, since both require IP
Thank you