Send data from clients to sever Mkr 1010 wifi boards

Dear all,

I am new to Arduino and building a sensor network that including 9 mkr1010 boards as sensor nodes and another one as a server to receive data from nodes and send it to PC for data logging. There are several issues that I cannot find the answer through google and hope you guys can clear my mind.

  • In this forum, I searched about communication between a server and multiple clients, however, these answers for only 1 server and 1 client communicated with each other. So how a server sends a request to a specific client in the network and that client sends back the sensor data to the server using the Wifinina library?
  • Can the server read all the data from clients at one time or one by one (connect and then disconnect the client)?

In brief, could you suggest a data workflow for a sensor network using Mkr 1010 wifi boards?

Best,

In this forum, I searched about communication between a server and multiple clients, however, these answers for only 1 server and 1 client communicated with each other. So how a server sends a request to a specific client in the network and that client sends back the sensor data to the server using the Wifinina library?

You misunderstood the concept of client and server. A server doesn't send requests to a client it's the other way around.

Can the server read all the data from clients at one time or one by one (connect and then disconnect the client)?

That depends on the first question. To answer your question I swap the client and server in your question.
It has to be done one by one. But actually you don't need the collecting Arduino. As the sensor nodes are already connected by WiFi, why don't you use the PC to collect all the data?

pylon:
You misunderstood the concept of client and server. A server doesn't send requests to a client it's the other way around.

That depends on the first question. To answer your question I swap the client and server in your question.
It has to be done one by one. But actually you don't need the collecting Arduino. As the sensor nodes are already connected by WiFi, why don't you use the PC to collect all the data?

pylon:
You misunderstood the concept of client and server. A server doesn't send requests to a client it's the other way around.

That depends on the first question. To answer your question I swap the client and server in your question.
It has to be done one by one. But actually you don't need the collecting Arduino. As the sensor nodes are already connected by WiFi, why don't you use the PC to collect all the data?

Dear pylon,
Thank you for your reply. So in your opinion, what is the suitable concept in term of communication for a sensor network using mkr 1010 wifi?
"But actually you don't need the collecting Arduino. As the sensor nodes are already connected by WiFi, why don't you use the PC to collect all the data?" : actually I need the collecting Arduino board because this board is a sink, transfer the data in longer range than a normal wifi (may be I'll use Lora).

actually I need the collecting Arduino board because this board is a sink, transfer the data in longer range than a normal wifi (may be I’ll use Lora).

In that case I would suggest to make the sink Arduino the client which ask the sensor Arduinos (which are the servers), one after the other for their values which it then sends to the analyzing station by other means. You can use a simple TCP connection for that but if you use the HTTP protocol it’s much simpler to debug.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.