How to send data between nodes in an iot network?

5 visualizaciones (últimos 30 días)
Zara
Zara el 27 de Abr. de 2023
Respondida: Samhitha el 26 de Abr. de 2025
I have created a simulation environment for IoT network which consist of 10 nodes 1 edge node and 1 control center. I want to send data from nodes to the edge node.

Respuestas (1)

Samhitha
Samhitha el 26 de Abr. de 2025
Hi @Zara,
To send data from 10 IoT nodes to the edge node in MATLAB simulation, configure each node to transmit its data to the edge node’s IP address and port using UDP communication. The edge node listens on that port to receive data from all nodes.
You can understand by following example code:
%On each IoT node
u = udpport;
write(u, data, "string", "EdgeNode_IP", EdgeNode_Port);
%On each edge node
u = udpport("LocalPort", EdgeNode_Port);
data = read(u, u.NumBytesAvailable, "string");
For more details look into the following documentation:
Hope this helps!

Categorías

Más información sobre External Language Interfaces en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by