Socket tcp/udp server on App Inventor app

Is possible to build a socket tcp/udp server for receive requests and send responses on App Inventor app?
What we would like to realize is a smartphone gateway for sensor on field
When smartphone can read bt sensor signal, then must be query from a desktop office station

extensions which might help

see also the extensions directory here https://puravidaapps.com/extensions.php

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Thank you for fast reply
Then, actually, there isn’t a ‘tcp server’ extension for App Inventor ?

The extension available on

http://bienonline.magix.net/public/android-AI2-UDP-en.html

builds an udp server capable of listening and receiving information from any udp client within the same lan, so as long as the phone address is of the type 192.160.1.100 everything works correctly, the commands sent are received and displayed in the lower textbox
But by turning off the phone’s wifi, and using only the data connection provided by the telephone network, the commands sent to the address provided by the test program, of the type 10.90.200.150, are no longer received by the program that is running on the phone
Why do the lan commands work, don’t they work anymore in wan?

Because they are not on the same network. 192... and 10... are on 2 different networks. The 192.168 segment is reserved to private networks so you can not access directly from the internet a node with that address. You need a static IP address in the public network address segment(s).

1 Like