Go Down

Topic: Arduino and internet not local network (Read 1 time) previous topic - next topic

durkinnj

Everytime I search how to connect the arduino to the internet it always shows you how to connect it via lan. I want to be able to access my arduino from anywhere in the world via internet. Is there a guide for this somewhere? I can't find one for some reason.

AWOL

How were you planning on connecting your Arduino to the internet, if not via a LAN?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

liudr

Say, you don't use a wired network, that points to one thing, wireless network, or wifi. Get yourself a wifi shield and you can lose the wire. Then again due to the fact that people don't pay much to get on the internet, they don't get a permanent domain name like google.com or static IP such as 74.125.225.5 for google.com. They get a dynamically assigned IP address like 212.09.77.124

This IP address will take you to your system (or arduino) if you know this number somehow beforehand. This is not possible since it is assigned dynamically to your system. So now you are down to one way, the system (arduino) gets online, receives an IP address, it sends some message to a known server to report its presents and report the IP address. Suddenly if you have access to this server, you can pull the IP address stored on the server and use it to contact your arduino. Is that what you want?

PeterH


Everytime I search how to connect the arduino to the internet it always shows you how to connect it via lan. I want to be able to access my arduino from anywhere in the world via internet. Is there a guide for this somewhere? I can't find one for some reason.


If you aren't connecting via a local area network then I guess you'll need a direct connection to a service provider. The only practical ways I can think of to achieve that are using a cellular modem, or a sat comms system. I haven't used an Arduino+cellular modem myself, but it's a well-known solution and I expect you'll be able to find hardware and example applications.
I only provide help via the forum - please do not contact me for private consultancy.

liudr



Everytime I search how to connect the arduino to the internet it always shows you how to connect it via lan. I want to be able to access my arduino from anywhere in the world via internet. Is there a guide for this somewhere? I can't find one for some reason.


If you aren't connecting via a local area network then I guess you'll need a direct connection to a service provider. The only practical ways I can think of to achieve that are using a cellular modem, or a sat comms system. I haven't used an Arduino+cellular modem myself, but it's a well-known solution and I expect you'll be able to find hardware and example applications.


I did. You get a dynamic ip address and you are not reachable once you finish sending data out, unlike wifi.

sonnyyu

Long incomplete list

ip over power line
ip over serial
ip over satellite
Point-to-point protocol over Ethernet/PPPoE
2G (GSM)
3G
4G
5G  7 years waiting time.

wifi at Starbucks, wifi at home or office does not count since it go through LAN.
...

some method need arduino shield, might need DIY shield. ip over power line
and ip over serial's other end connect to internet directly. say those at remote site.

zoomkat

Quote
Everytime I search how to connect the arduino to the internet it always shows you how to connect it via lan. I want to be able to access my arduino from anywhere in the world via internet.


Looks like two different concepts some what being muddled into one.
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

sonnyyu

I think the title "Arduino and internet not local network" has over weight than rest statement. but I could be wrong.

PeterH


I did. You get a dynamic ip address and you are not reachable once you finish sending data out, unlike wifi.


Maybe in your particular solution that was so, but that's not a universal restriction that applies to all cellular modems. If you're using 3G it should be possible to be 'always on'. For example it is possible to leave a GPRS context activated if you want to.
I only provide help via the forum - please do not contact me for private consultancy.

zoomkat

The op said he wanted to reach his arduino from anywhere in the world via internet, which indicates the arduino will be performing a server function. Server functions are probably somewhat more involved when not operated from behind a LAN.
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

durkinnj

#10
Apr 27, 2013, 05:39 pm Last Edit: Apr 27, 2013, 06:39 pm by durkinnj Reason: 1

How were you planning on connecting your Arduino to the internet, if not via a LAN?


Not really sure but I want to find a cheap and somewhat reliable mobile solution. Was looking at the GSM shield but not sure who, in the united states, offers the service for a cheap price. Not really sure where to start. I guess I could use the bluevia service but I'm not really sure how much data I will be using. Could I test the amount of data I use by lan before I start paying for service? Also, you guys were talking about dedicated IP address. How exactly DO I access the arduino using the GSM shield? Would it be by IP address?

liudr


How exactly DO I access the arduino using the GSM shield? Would it be by IP address?


Yes. Yet you don't know it until your arduino connects to the network and get assigned one.

durkinnj

If I lose connection and then reconnect will I then have a different IP address? If so, what is the solution to this problem?

liudr


If I lose connection and then reconnect will I then have a different IP address? If so, what is the solution to this problem?


Most likely. Consider the situation of checking yourself into a hotel. If you check out and come back later, you will get a different room. There is no mechanism to tip the front desk person to get into the same room, not any I know off in the network world.

tack

With a GSM connection you could probably write some code to make use of a Dynamic DNS service, such as No-IP or DyDNS.

Basically your Arduino/GSM would need to perioidically tell the Dynamic DNS service what it's currently assigned IP address is from the network provider. The Dynamic DNS service then maps this to a static domain name, so that you can always access your device from that domain, no matter if it's assigned IP address changes.

How will you contact the Arduino? If you are doing so from a web based application then you could do something similar, where the Arduino transmits it's IP address if/when it changes, so that your 'client' always knows which IP to use to contact the Arduino.

It shouldn't be too hard to choose a suitable solution.

Go Up