Question

I need to build a prototype for a simple data collection device using an AVR microcontroller.

The device will basically collect sensor data and make this data available via SNMP and a HTTP response.

What are my options when it comes to AVR software that would already have a HTTP server and SNMP agent built-in?

Was it helpful?

Solution

Arduino Ethernet Shield has the hardware and the software to do such a thing and it works on the ATMEGA168. If you don't like the Arduino format or software it should be easy to reverse-engineer the code and hardware to work with your own designs.

It looks like the software library available is byte-oriented like serial connections. This wifi shield looks like it might be more complex with the software.

Good luck!

OTHER TIPS

If you're using an AVR32, Atmel has a buildroot distribution you can use. That'll include a host of networking daemons.

Haven't done much with the smaller chips I'm afraid.

Pascal Stang's avrlib provides libraries for basic networking (ARP, IP, ICMP, DHCP etc.) which could be built upon to provide HTTP and SNMP if you find nothing pre-coded.

uIP is an extremely small TCP/IP implementation that could suit your needs. It doesn't get much smaller than this.

If you have a bit more RAM to spare (say, 100 kB), you could try lwIP TCP/IP stack.

Both projects are free and not AVR-specific.

What is your low-level connection layer? Ethernet, or some sort of modem? If you're going through a modem, perhaps you need PPP. We chose to use lwIP on a paticular project because of its PPP support. uIP doesn't do PPP last I checked.

I found this german webpage which shows how to run a webserver on a AtMega32 with a connected NIC.

I once worked on a similar project, where we reimplemented the TCP/IP-Stack up to a Webserver on a AtMega128 with an (memory mapped) RTL network-PHY, called 8BitAmEth, but I can't find back any trace online atm. I am working on it to bring it back up. Otherwise, I can send you what I have, if it suits you.

Edit: There it is, the brute data, pcb, schema and sourcecode.

microchip offers a tcp/ip stack for their 8bit microcontrollers including a simple snmp and http server, the source is available on their website and is pretty generic C, you should be able to adapt it if you find nothing else.

if your actually using this in production make sure you check the license, i imagine it limits its use to PICs.

There is a complete environment for AVR board with TCP/IP and all the like support called ethersex (don't blame my for the name ... I'm not related to this project). There is a wiki http://www.ethersex.de/index.php/Main_Page. Although it is a .de address, it seems that most of the content is in English.

This environment comes with an excellent build configuration script, similar to the one of the Linux kernel and the download directly contains the whole toolchain.

I used it for some smaller stuff and it works very good.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top