views:

1452

answers:

6

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?

+2  A: 

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.

Cogsy
Could you post a link to the distribution, please?
Matthew Murdoch
done. download is on the left menu
Cogsy
@Cogsy - Thank you +1
Matthew Murdoch
@Cogsy - Thanks for the info. In this case I am planning to use a smaller chip if possible.
Dana Holt
A: 

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.

Mark
Please can you post a link to the source code?
Matthew Murdoch
The license from Microchip says that you can only use their stack on their micros. I'd stay away from that unless you use their chips - even for prototypes.
Robert
Mark
+1  A: 

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.

Matthew Murdoch
+1  A: 

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.

lImbus
+2  A: 

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!

Stephen Friederichs
+1  A: 

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.

Craig McQueen
Thanks for the links. Both look very interesting. The device will be using ethernet.
Dana Holt