Creating a website to communicate with the embedded device

I am currently working on a project in which I am trying to control an embedded device through an Internet site. The idea is that the user can go to the website and inform the device about it in order to perform some action. The action on the website will be translated into a sequence of CLI commands and then sent to the device. Communication could potentially go both ways in the future, but right now I'm focusing on connecting to the server.

The web server is a LAMP stack using Python (Django), and the device I'm trying to connect to is the Beagle board running eLinux. Only one device communicating with the server would be available at any time.

I have all the functional parts written on the server and device side, but I have some problems figuring out how to write the connection level. One of my big problems is that the device will be mobile and will move places every few days. Therefore, I cannot guarantee the static IP address of the device. My knowledge of network programming is pretty minimal, so I don’t have such a big idea where to start.

Does anyone have any ideas / resources on how I can start developing such communication?

Thank!

+5
source share
4 answers

, DynDNS, IP- -, hostname IP- - Linux , .., .

+3

, , IP-.

UDP-, , python -.

+3

(, NAT ..), SSH, " ": http://www.howtoforge.com/reverse-ssh-tunneling

, SSH , heartbeat , (Beagle Board) , .

+2

. , IP- .

-.

- .

  • HTML .

  • , HTML. - HTTP- -. IP- , malarky, HTTP-. ( , )

, - , . ( , " , " , , HTTP.)

- . , -, HTTP, - -, HTTP. . HTTP , SSL .

HTTP , , HTTP- . XML, JSON YAML. ; , , , JSON.

Building these two interfaces in Django is pretty trivial. You just have a URL that is meant for people and some that are designed for your device. You will have view functions for people who return HTML pages, and view functions for your device that return JSON or XML messages.

0
source

All Articles