LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicating by TCP/IP with ESP32 as client and PC with LabVIEW as Server/Listener

Solved!
Go to solution

Hello, everyone. I'll get straight to the point: for the past 2 days I'm trying, without success, to connect my ESP32 to my router and send data through TCP/IP to my PC which runs LabVIEW with a TCP/IP Listener. What bothers me the most is that when the ESP32 acts as a server my PC can connect to it and send data from LabVIEW with a simple TCP/IP connection VI. But vice-versa the listener doesn't even accept the client. And if I try to send/receive data between 2 VIs (one as a listener, one as a client), it works without a problem. I'll attach here the 2 .ino files (client and server respectively) and the 2 .vi files (send and receive data to/from ESP). If you want to test these make sure to correctly insert your correct ssid, password and IP host of the PC which runs LabVIEW. Thank you in advance!

0 Kudos
Message 1 of 9
(9,691 Views)

I'd first check my IP range. It's usually a lot easier if both devices are in the same range.

 

I'd turn my firewall off. Temporarily, of course.

 

I'd start with a simple connection. E.g. no passwords etc.. If possible.

 

Does the ESP give an error code?

 

Checking with 2 VIs on the same computer isn't really a test. Can you test on 2 PCs?

Message 2 of 9
(9,643 Views)

I turned off my firewall and now it looks like the ESP successfully sends data to labview 😄
but how can I keep myself safe, tho? What should I disable from firewall and keep the communication going at the same time?

0 Kudos
Message 3 of 9
(9,624 Views)
Solution
Accepted by topic author RimaDelta

@RimaDelta wrote:

I turned off my firewall and now it looks like the ESP successfully sends data to labview 😄
but how can I keep myself safe, tho? What should I disable from firewall and keep the communication going at the same time?


You will have to add an exception to the firewall. The trick is to find what exception to add, and to which application.

 

I think the exception should be added to LabVIEW.exe. Of course, also to your exe if\when you build one.

 

The firewall is probably blocking incoming TCP\IP connections. But without being able to test, I'm not too confident to advice on details.

 

Details also depend on the firewall you're using.

0 Kudos
Message 4 of 9
(9,619 Views)

Once I figure out I'll respond here. Thank you a lot for your time and help!

Message 5 of 9
(9,611 Views)

Alright, I enabled firewall both for private and public domains and ONLY added exceptions/allowed (private and public) for all LabVIEW iterations that appear in the firewall apps list. I hope this will help all those who encounter the same problem I did.

0 Kudos
Message 6 of 9
(9,604 Views)

Hai Rimadelta , 

I am gobi , now i am using esp32 programmer module , I need to communicate ESP32 with LabVIEW . Could you please tell me producer to communicate , I need to program esp32 module through the LabVIEW . Could you please guide me ? 

0 Kudos
Message 7 of 9
(8,496 Views)

@Gobi1230 wrote:

Hai Rimadelta , 

I am gobi , now i am using esp32 programmer module , I need to communicate ESP32 with LabVIEW . Could you please tell me producer to communicate , I need to program esp32 module through the LabVIEW . Could you please guide me ? 


Programming an esp32 is a completely different topic (this one is about communicating with a ESP32)...

 

Start a new topic.

0 Kudos
Message 8 of 9
(8,491 Views)

Anyone please can send a file in Labview 17..

0 Kudos
Message 9 of 9
(4,424 Views)