CycloneFire
CycloneFire

Reputation: 51

How to acess my router on home, using 3G data of Android?

I worked on a simple app....which works by sending simple instructions to Arduino over my WiFi router, just like - 192.168.0.177/status or 192.168.0.177/currenttemp etc,while my phone is directly connected to the router.

What I am trying to achieve now,is to be able to send same instructions to Arduino(which is connected to router) over the 3G/2G data of my android(which is not directly connected to router).

I tried to research a bit,but its all is just fuzzing up things more & more....

(I m big nooooob).

So,what should I do to get that to happen?

is it--[PUBLIC IP of router]/status. I just cant understand.

Some port forwarding,router remote access,I do not know. Direction reqd.

++I dont know...how can i get this Public IP,,it quite keeps on changing & if so,,,how to set up.?.? :-(

Upvotes: 1

Views: 629

Answers (2)

Brizee
Brizee

Reputation: 190

So this seems like a question of 2 parts - but overall you're going to have to become familiar with your routers status page. It should allow you to do port forwarding (which you will have to do) and may help with your IP changing.

Finding your Router Status Page

Your router status page is usually available from one of these two urls:

Hopefully one of these will take you to a web page, where you can configure things- if neither do then you're going to have to find out what the right address is - this should be the same as your default gateway so you can follow these instructions: https://wiki.amahi.org/index.php/Find_Your_Gateway_IP

Port Forwarding

Simply put, for home internet connections you're probably going to use Port Forwarding whenever a device that's not on your network (in this case your phone) initiates a connection to a device that is on your network (your arduino).

This is because when your phone connects it will do so to an internet IP address rather than a local IP address and the internet IP can't specify which device within a local network you want to talk to. If your Arduino were to make the connection you wouldn't need to port forward on your home network.

Within your Router Status page you should find configuration options for port forwarding, without knowing your router I can't say much about where you'll find them but they're usually obvious - once there typically you can pick a port or range of ports you want to forward and which IP address you want to forward them too. Judging by your question the port you want is 80, the default one for web browsing - the IP address you want is the internal IP of the Arduino which seems to be 192.168.0.177.

Once you save that you should be able to make connections to your Arduino from off your network but you've still got your IP issue left.

Dynamic IPs

You're quite right you'll need your public IP to connect, this can easily be found from within your network by going to a site like https://www.whatismyip.com

However as you've mentioned, your IP changes quite a lot, so if you don't want to keep looking it up you've only got a couple of choices:

  1. Pay for a static IP from your internet service provider (if they offer this)
  2. Use a dynamic DNS updating service

Probably the most well known amongst those services is DynDNS though there are free alternatives, it's worth remembering that you may be getting what you pay for and I'd perhaps look for recommendations from other StackOverflow users on which to use.

In terms of the actual updating you have two options, the easier one is to install a client on a supported computer which will periodically update your IP. Alternatively, some more sophisticated routers have Dynamic DNS updating built in and this would also be accessible by your router status page, which you're hopefully already a pro at rooting around in.

Upvotes: 1

CodingRat
CodingRat

Reputation: 1944

yes you need public ip of your router as your both device is not in the same network.

Upvotes: 0

Related Questions