Question on Web based communication

rfsingh81

Member
Licensed User
Longtime User
I made one android app, very simple app which can send data to a server to a defined port.

I also attached one PIC with a wifi module which can do the same as the app i.e send data to a server IP at specified port. I want to be able to send data from my app to my PIC from outside my home network.

What I have learned upto now is that I need a fixed IP (as my routers IP keep changing) for this, app and PIC can both communicate to this fixed IP and exchange messages with each other.

Can someone please explain in some detail what exactly is required to make this possible? I read about fixed IP, but no one mentions more than this like providers, what to look for in a provider, approximate costs, any other software needed etc
 

giga

Well-Known Member
Licensed User
Longtime User
I made one android app, very simple app which can send data to a server to a defined port.

I also attached one PIC with a wifi module which can do the same as the app i.e send data to a server IP at specified port. I want to be able to send data from my app to my PIC from outside my home network.

What I have learned upto now is that I need a fixed IP (as my routers IP keep changing) for this, app and PIC can both communicate to this fixed IP and exchange messages with each other.

Can someone please explain in some detail what exactly is required to make this possible? I read about fixed IP, but no one mentions more than this like providers, what to look for in a provider, approximate costs, any other software needed etc

Most Internet Service Providers(ISPs) Assigned Dynamic IP addresses for their clients. So what you are seeing is the WAN IP also known as the Public IP address changing.

In order to get around this ask your ISP for a Static IP address on your account and usually they can give you one for an extra fee. This will fix any time you need to access resources in your network you Public(WAN) from the outside the IP wont change.
The steps after that is assigning static IPs to device(s) in the Local Area Network(LAN) and then port forwarding to the device(s).

Good Luck,
 
Upvote 0

rfsingh81

Member
Licensed User
Longtime User
Thanks Giga. My aim is to develop something which I can present to others. This would be a arrangement which is good for me, but I want an idea which can work at other places without any settings change like port forwarding.

I was thinking something like PIC sending data to a fixed IP somewhere, registering itself there with a IP/Port as client. And when the data comes from the app, which will include the PIC ID, gets forwarded to the PIC. I want to know how doable is this? and if I am thinking around the right line, what else do I need. Cheers
 
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
Thanks Giga. My aim is to develop something which I can present to others. This would be a arrangement which is good for me, but I want an idea which can work at other places without any settings change like port forwarding.

I was thinking something like PIC sending data to a fixed IP somewhere, registering itself there with a IP/Port as client. And when the data comes from the app, which will include the PIC ID, gets forwarded to the PIC. I want to know how doable is this? and if I am thinking around the right line, what else do I need. Cheers

A PIC could work to transmit outbound from the client, However keep in mind there are 165535 UDP and TCP ports typically so you could choose one to go out and another to come in, or one that does both(maybe slower). If you want to communicate into the PIC from the outside you would have to find a port that goes directly into it.

"when the data comes from the app, which will include the PIC ID, gets forwarded to the PIC." What port would you use for this? You could have a bidirectional port which sends/receives on some ports but also keep in mind At&t Uverse and Xfinity (if your clients are using them) have routers which have NAT firewalls installed standard.
 
Upvote 0

rfsingh81

Member
Licensed User
Longtime User
For checking, for now, I made my app as server and manually did the communication on internal network.
I got this project idea from app based swithes like WEMO from Belkin. You load the network details onto their switch and then control with an app from your iphone/ipad from anywhere in the world. Their switch stays online. I am trying to figure out how it is done, what is the process.
 
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
For checking, for now, I made my app as server and manually did the communication on internal network.
I got this project idea from app based swithes like WEMO from Belkin. You load the network details onto their switch and then control with an app from your iphone/ipad from anywhere in the world. Their switch stays online. I am trying to figure out how it is done, what is the process.

If the WAN IP is static the app can connect directly to the device through the WAN. Ports still need to be opened see link: WeMo Firewall Ports Sinatra Network | Sinatra Network

But if it is dynamic(its like hitting a moving target)Maybe the devices connect to the WEMO server and the account you are signed into picks the devices up from there. Just like Logmein if you ever used it.
 
Upvote 0

rfsingh81

Member
Licensed User
Longtime User
Maybe the devices connect to the WEMO server and the account you are signed into picks the devices up from there.

Exactly what I am trying to understand. How does this work? Can one be built? What are the appx costs associated with this?
 
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
Exactly what I am trying to understand. How does this work? Can one be built? What are the appx costs associated with this?

Here would be the design you are trying to acheive.
1. PIC device(s) contact your web server from their location and sign into their accounts.
2. Phone App would contact the corresponding accounts on the webserver to maintain a connection to the PIC Device(s)

Can one be built(can't see why not 3 Main Elements required, PIC,WebServer,Phone App)
Cost (Not sure what you already have to work with) but webserver for PIC to connect to would be probably be your highest cost.
 
Upvote 0

rfsingh81

Member
Licensed User
Longtime User
Cost (Not sure what you already have to work with) but webserver for PIC to connect to would be probably be your highest cost.

This is the direction I would like more info on. Lets start with the
Webserver- -
* What is it? A website/software etc
* Where is it? with a service provider/can it be with me/ is it a service or some hardware?
What should be my first step if I want to go ahead and try to setup something like this. For testing purposes, I can manage the app part and the PIC part. Cheers
 
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
This is the direction I would like more info on. Lets start with the
Webserver- -
* What is it? A website/software etc
* Where is it? with a service provider/can it be with me/ is it a service or some hardware?
What should be my first step if I want to go ahead and try to setup something like this. For testing purposes, I can manage the app part and the PIC part. Cheers

Webserver
- (this is a business level computer with a static LAN IP and WAN IP for the PICs to connect to.) (this is hardware and software just like any computer) DELL has them but the problem is you have to base your purchase off of how much traffic you will expect)

Location- You could house it but again if it gets too large it will have to be moved to a faster internet or a data center.

First
step would be to find what the PIC can/needs to authenticate to(software).
Second would be to male sure the app can connect to this (software).
Then build/order a webserver(hardware) that can handle that software.
 
Upvote 0
Top