Can't send a text to another device on the same network

Hello!

I am trying to create an app that sends some data to a computer connected to the same WiFi network, but without success so far.

The computer is a Windows 10 PC that creates its own WiFi network as a Mobile Hotspot and the device running the app is the only other device connected to this network, so I have already disabled Windows Firewall so it won't get in the way.

The computer is running a LabVIEW program that I created that should listen to data sent to a TCP port and read the text sent from the Android device.
I am still unsure if this program is correct, so I am also asking a similar question on NI forums to try to check that part of this communication.

I cleaned up the MIT App Inventor program while preserving the behavior and got this:
image

When I click the button while my listener program is turned off I get this error message:
"Error 1103: Unable to complete the given request with the text TEXT with the specified URL: http://192.168.173.1:40001"

When I click the butto while my listener program is running I get this error message:
"Error 1117: Took longer then timeout perior to receive data from the URL: http://192.168.173.1:40001"

I am not very skilled regarding network communication and also this is my first MIT App Inventor program that uses any kind of communication with another device, so I may be missing something basic here.

Can anyone please help me figuring if my issue is with my app or maybe my network settings? I don't even have an idea of how I could test it receiving this data in another program on my PC.

Thank you in advance to the community for any help regarding this issue.

TCP is a different protocol than http.

Maybe you need a httpd web server on the PC?

Thank you @ABG for the quick reply!

I understand that HTTP is a set of messages that comply to certain rules and that are exchanged through TCP/IP.
Hopefully I am not too mistaken because since I wrote the first question I have managed to make my LabVIEW program read a message sent from my MIT app using TCP.
The message is a string composed of a HTML header and the text I am sending from the app.

However, I am still getting the same Error 1103.
I think the app may be missing the response message containing the "200 OK" success status.
Perhaps it is my LabVIEW code failing sending the message, but I am also concerned I am not assembling the correct expected response message.

Do we know exactly what the app would expect in a success HTTP response?
I think it should also contain a header. But what data should be present in this header?

I finally made it work!
I got a response message that works for me.

My current LabVIEW code now looks like this:

and my MIT App looks like this:

No errors on either side so far.

Thanks for telling us what worked!

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