Show Posts
Pages: 1 [2]
16  Topics / Home Automation and Networked Objects / Re: control without port forwarding on: March 22, 2013, 04:40:51 am
After diving into this topic I now think some form of UDP hole punching is the key to solving this problem.
I think what I need is an Arduino that acts as both a server and a client. To make reading this a bit better I will call the server running on the Arduino server_A and my external Linux server will be called server_L.
The client on the Arduino sends UDP packets through the routers NAT to server_L. The router will translate the Arduino's IP and port to its WAN IP. Server_L then responds to the router which will forward the response to the IP the request came from, so a connection is made between Arduino and Server_L. Then when Server_L sends a request to server_A the routers NAT will route this request to the Arduino. Since the Arduino is also acting as a server it will accept this request and deal with it.
I think in theory this will work, though I have no idea how to implement this in a practical situation.
I'm not even sure if it is possible to setup an Arduino as a server and still have it send UDP/TCP packages at certain intervals to keep the connection alive.
Learning a little bit every day...
17  Topics / Home Automation and Networked Objects / control without port forwarding on: March 21, 2013, 03:07:19 am

I have the following setup: an Arduino with ethernet shield running a simple web server and a page on my 'real' server where the user interface resides. This is a php scripted page doing all the graphic stuff so the Arduino only has to list the status of the used ports and listen to POST commands to change the status of the ports. The Arduino is on port 80 with a fixed IP so I forwarded this IP on my router. Works fine.
But of course it only works in my own home. When I take the device somewhere else I would have to mess with their router to demonstrate it working. Not really an option...
So I'm looking for a way to communicate with the Arduino without the need for portforwarding. This can be done (Teleduino does it, but I don't want to use a third party). I suppose I'll have to setup the Arduino as a client so once it establishes a connection with my server they can communicate without the need for port forwarding, but I have yet to find out how to do so.
Any pointers?

Pages: 1 [2]