Pages: [1]   Go Down
Author Topic: Ethernet Shield. Communication over the internet.  (Read 2559 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi I bougt the magnificent ethernet shield and put the webserver on my arduino. works just fine in my LAN. but I don't know how I can access my arduino over the internet. I think the problem is that I got a router(AVM FritzBox).

I want to built a sensor which gives me weather data over the internet. Where I can get graphs for last month last year etc. The Atmel chip is probably to small to store all this data. So My second question is how would you do it? Store data until its called from a home computer or a server? The best thing bwould be if one could put a flash card in the arduino like 4 gig an be done but I read that you cant use the Memory port and the Ethernet?
or can you switch back and force the whole time?
thanks
« Last Edit: June 07, 2010, 04:01:25 pm by KOR » Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 8
Posts: 1992
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Easier said than done, initially look into the documentation for your router into setting up port forwarding to port 80 and the IP adddress of your ethernet shield on your lan.  Once you've got that far you need to know how to address it from the internet.  If you're lucky enough to have a static IP address from your ISP (unlikely), its just a matter of pointing a browser at that IP address. Otherwise its going the dynamic DNS route with sites like http://www.dyndns.com/  and something on the inside updating the outside so to speak.  Your router is probably the best bet for this.  A complex subject in its own right.

The card slot on the ethernet shield is all but useless.

Heres one I did earlier :  http://majestic81.plus.com/    smiley-wink
« Last Edit: June 07, 2010, 04:19:29 pm by stephen_t » Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the problem is I cant do portforwarding for the arduino on my router. It wont show the arduino as an device. an one can only do portforwarding vor an device. odly I can access the arduino over the lan where the router is the central switch.
Do you mind to release your code
« Last Edit: June 07, 2010, 04:24:07 pm by KOR » Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 8
Posts: 1992
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The ones I've seen that play with devices usually have a function to add a device usually based on its MAC address, but I'm not familiar with your router.  The arduino code isn't going to help you access it from the internet. My example site very closely resembles the example server in the IDE which I used as a starting point.  Its just got extra bits tagged on.  

Accessing it from the lan is easy, it doesn't involve a router. smiley
« Last Edit: June 07, 2010, 04:42:12 pm by stephen_t » Logged


0
Offline Offline
Tesla Member
***
Karma: 114
Posts: 8919
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like a modern router is in order. I bought a Netgear WGR614 wireless router at Walmart for $40 and it works very well. No issues with port fowarding, sees my connected arduino ethernet shield, and has a feature for updating the dynamic IP services. I'm testing operating a robot via a web page and I use my no-ip.com address in the web page.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found the option to portforward an ip which has no device and it works just fine :-) and with dyn dns it works perfectly. :-)

Now a new question arises.
Is it possible to make a dynamic html site with the arduino?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 46042
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Depends on what you mean by dynamic. If you mean that you want the Arduino to serve up a page that shows the current values from several sensors attached to it, then, yes you can.

If you mean a page that lets you play a game, that would be more challenging.

The limit is the amount of memory that the Arduino has to contain the structure of the page. All the strings that define the page (HTML, BODY, TITLE, etc. are stored in memory. Too many of them and you run out of memory.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I mean the changing sensor values.
could you tell me how you put the canging values in a page If done a small html code on my arduino but i need to reload evrytime I want to see a change.
thanks
Logged

Wigan, UK
Offline Offline
God Member
*****
Karma: 18
Posts: 814
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I wouldn't use the arduino as the web server, I'd use it to pass details to a web site somewhere else.

If you have access to web server running PHP [edit: or ASP] (they're free, you could set one up on your home PC), you can create a web page that gets data from the URL.  If you're passing weather data you might have:
index.php?temp=60 where the value comes from your temp sensor.  The php web page can grab that data (using the GET method).

You web server will far more suited to dealing with the data than your arduino, so you'll be able to feed that into a database and output it as a graph.

As far as I'm aware you need to find the web server by IP address, so might be a bit tricky if you opt to use shared hosting, but if you're using a local host it'll be fine, and you'll be able to forward the port properly.
« Last Edit: June 08, 2010, 09:43:25 am by cowjam » Logged

Boston
Offline Offline
God Member
*****
Karma: 3
Posts: 575
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would publish the data to Pachube.  It gives you free graphing and you can add triggers.  http://www.pachube.com/
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have accessed my arduino via the local 192.. address. I can also access via the default gateway address. I cannot assign a domain to it tho...i have managed this for a NAS and an IP Cam before.

Any ideas as to what might be different this time?

TCP Port is 80
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 8
Posts: 1992
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I can also access via the default gateway address.

Does this mean you can access it from the gateway's internal address (from whatever is acting as your gateway - usually a router) or from out on the internet using the gateway's external IP address ?

Giving it a domain name usually involves either buying a domain, or using one of the ones provided by Dynamic DNS services.  What have you done so far ?.  

Its exactly the same process as setting up any other internal server type device although it doesn't come with setup software from the manufacturer like many NAS and IP cameras do

Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks I got it working right before I decided to do it the other way around and use the arduino as a client^^
Logged

Pages: [1]   Go Up
Jump to: