Android Question Embed an Http Server - behind a firewall static IP

Rusty

Well-Known Member
Licensed User
Longtime User
I have hundreds of 10" tablets installed at client locations who are using VPN's and static IP's.
All tablets have the same static IP address internal to their VPN/firewall.
I'd like to be able to use the HTTP Server (nice work Erel!) to be able to control/load/upload files to individual tablets.
I currently communicate real-time with TCP/IP (all on the same port 7890) and could send, for example, a port number that the tablet might use to identify itself when it instantiates the HTTP Server...
Since they all appear with the same IP Address (i.e. 11.222.333.444), how might I target a specific tablet/device?
Thanks in advance,
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
Hi Tigrot,
I don't understand your last question (Post #4)...
I didn't think I could use the same port number, it's used for TCP/IP and is the same for all tablets.
However, I was thinking of sending/assigning a port number using the TCP/IP comms to send a "request" with a port number assigned, such as 5555 (in Erel's example).
So to do that, I'd have to allow the TCP server to select the MAC address of the tablet desired; send a request with port assignment and then supposedly waiting until the port comes up on the individual tablet.
After comms with that tablet, I'd have to release the port so it (might) could be used by another tablet in subsequent comms.
That's about all I can come up with at this point and looking for a better idea...
Regards,
Rusty
 
Upvote 0

nwhitfield

Active Member
Licensed User
Longtime User
I'm not 100% clear on how you're communicating with them at the moment - they're all on different sites, and reached via a VPN, and at each site, every tablet has the same, fixed, internal address? Is that right?

So when you communicate with them at the moment, what do you do - it sounds to me as if either
a) you have to connect to the VPN of the specific tablet you want to control or
b) at present the tablets are all connecting to your local port 7890, and receiving their instructions

Are you constantly connected to all the VPNs (which would be a routing nightmare), or are they connecting from behind their firewall to you?

This is one of those things where a network diagram would be helpful
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
All devices use the IP same address to the server, which exists within the firewall. The tablets are distributed anywhere in the world and connect via VPN.
Their IP address all are the same. i.e. 111.222.333.444; They all connect to port 7890.
My server application establishes a socket with each one individually and manages the communications between each uniquely depending upon what the tablet is doing.
We control the unique attributes by the socket and the MAC ID. So when they send or receive messages they do so on their own "channel".
With the HTTP comms, since the IP Address is identical over all the tablets and the TCP Port 7890 is used, it will not allow a "unique" connection.
So I was thinking that my server can send an assigned port number to the tablet to which it wishes to communicate; the tablet would then "start" the HTTP server with that port and then the server can start a web page to view and handle the results...
This doesn't sound like the BEST solution, but I don't know for sure.
Ideas?...
Thanks,
Rusty
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…