09-26-2014 11:28 AM
Hello,
I am working on a TCP/IP connection between an Arduino with WIFI Shield controlling several sensors and a LabVIEW program. Using a router, I set up a wireless network without internet that allows me to transmit sensor readings from the MCU and send control commands from the LabVIEW program.Currently, the Arduino acts as the server with the LabVIEW program connecting to it as a client and I would like the ability to add other clients such as a smartphone app at the same time. I am not able to connect multiple clients to my Arduino based server and am wondering if and how this would be possible if the server was created on my computer using LabVIEW instead.
I sought out help on the Arduino forums (http://forum.arduino.cc/index.php?topic=268578) and the feedback ranged from "Arduino can't support multiple clients" to "Arduino can support multiple clients but it's full of errors". While it would be easier to achieve my goals by having the server be on the MCU, especially since data would be sent directly to each client polling it, I am considering shifting to a computer based server using LabVIEW. My question is whether it would be possible to have multiple clients accessing my new server and if so, how difficult would it be to relay the sensor data? The old setup required sending the same string of data to each client that connected to my server. The new setup seems like it would require the server to treat clients differently; sending commands to the MCU client and the MCU client's sensor data to everyone else. Another layer of complexity is that I would need to similarly relay control commands from the other clients, like the smart phone app sending a stop test command, to the Arduino via the LabVIEW program.
Would very much appreciate the community's input.
Best,
Yusif Nurizade
Solved! Go to Solution.
09-26-2014 04:11 PM
You can create a server in LabVIEW that accepts connections from multiple clients. There are examples of different approaches to this in the LabVIEW shipping examples and on this forum. As for the challenge of sorting out where to send data and how to relay commands, that's up to you - there's nothing that would make it either easier or more difficult in LabVIEW than in any other environment.
10-02-2014 03:22 PM
nathand,
Thanks for the reply, I guess I'll have to root around in the examples.
It seems like LabVIEW will be easier than Arduino bc the WIFI Shield is known not to support multiple sockets. I started a thread on the Arduino Forums and the answers have ranged from "can't be done" to "can be done but poorly".
http://forum.arduino.cc/index.php?topic=268578
Thanks again,
Yusif Nurizade