Web client on Atmega128

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a small web server on my ATmega128 which can upload data of a sensor installed with Atmega128, when pinged. Now i want to establish a web client on the chip so that it can upload data to a server at its own at regular interval of time or in case of any alert.
Pls help how to go about it. And if some can provide a sample code, it will be highly appreciated.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just did a Google 'web client avr' and got a few hits. Can you tell us what information you are missing?

Code 'n' all -

http://www.nuelectronics.com/est...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thxs Kartman.
But this arduino IDE is only for arduino boards and a limited no of Atmega chips. Using Tuxgraphics TCP stack, I wanted to implement the web client, without using any IDE. But I don't know the algorithm in which a web client communicate to web server.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You obviously didn't read did you? You want the algorithm - its all in the Arduino code - it's actually just c/c++ with specific libraries.

The function 'gen_client_request' does what you want - you just need to adapt it to the tuxgraphics code (it's been a while since I touched the tuxgraphics code, but the array names look similar). Basically what it is doing is sending via tcp a packet of data. We can see the packet consists of a GET request along with the php code to be executed and the parameter strings for pwd, client ip and status. It appends the temperature data and then follows that with the HTTP header info.