Back to the SERVICES main page

# AVR®32 AT32UC3 Series Software Framework: Basic Web server and TFTP server example.

Copyright © 2007 Atmel Corporation

## Introduction

This example implements a basic Web server and a basic TFTP server. It is running on top of the lwIP TCP/IP stack and the AVR32 UC3 freeRTOS.org port.

This example thus contains a port of the lwIP TCP/IP stack. This port is using both the AVR32 UC3 freeRTOS.org port and the AVR32 UC3A MACB interface for the Ethernet access.

## lwIP TCP/IP stack

lwIP is an implementation of the TCP/IP protocol suite. The focus of the lwIP TCP/IP implementation is to reduce resource usage while still having a full scale TCP.

lwIP features:

  - IP (Internet Protocol) including packet forwarding over multiple network interfaces

  - ICMP (Internet Control Message Protocol) for network maintenance and debugging

  - UDP (User Datagram Protocol) including experimental UDP-lite extensions

  - TCP (Transmission Control Protocol) with congestion control, RTT estimation and fast recovery/fast retransmit

  - Specialized raw API for enhanced performance

  - Optional Berkeley-alike socket API

  - DHCP (Dynamic Host Configuration Protocol)

  - PPP (Point-to-Point Protocol)

  - ARP (Address Resolution Protocol) for Ethernet

  lwIP is freely available (under a BSD-style license) in C source code format and can be downloaded from the development homepage.

  ## The Basic Web server

  Implements a simplistic WEB server. To use this demo part, define HTTP_USED to 1, else define to 0. (default is 1)

  Demo description: Every time a connection is made and data is received, a dynamic page that shows the current FreeRTOS.org kernel statistics is generated and returned. The connection is then closed. Note: The WEB server is reachable at the IP address 192.168.0.2.

  ## The Basic TFTP server

  Implements a simplistic TFTP server. To use this demo part, define TFTP_USED to 1, else define to 0. (default is 1)

Demo description:

  - To put a file onto the TFTP server (Supported file size < 2048 bytes), on a PC command line type tftp 192.168.0.2 PUT "a_file": this will copy a_file from your hard drive to a RAM buffer of the demo.

  - To get a file from the TFTP server, on a PC command line type tftp 192.168.0.2 GET "a_file": this will copy a_file from the RAM buffer of the application to the PC's hard drive.
  Note 1: only one file at a time is supported on this TFTP server. This is because the TFTP server being a simplistic example, it does not use a file system to store files but a predefined RAM area of 2048 Bytes.

  Note 2: The TFTP server is reachable at the IP address 192.168.0.2.

  ## The Basic SMTP client

  Implements a simplistic SMTP client. To use this demo part, define SMTP_USED to 1, else define to 0. (default is 0)

Demo description:

  - Prior to compile and run the SMTP client, you will have to configure the connection settings :
  - Server address : default is 192.168.0.1.
  - Server name : used in the EHLO field, default is smtp.domain.com.
  - Mail sender : used in the mailfrom field, default is sender@domain.com.
  - Mail recipient : used in the mailto field, default is receiver@domain.com.
  - Mail content : default is Subject: *** SPAM ***\r\nFROM: \"Your Name here\" \r\nTO: \"Your Contact here\" \r\n\r\nSay what you want here.

  - Once all fields are configured, remove the #error lines to allow compilation.

  - Run the software and press Push Button 0 to send an email.

  ## Device Info

  All AVR32 UC3A devices with a MACB module can be used. This example has been tested with the following setup(s):

  - AT32UC3A0512 on the EVK1100 evaluation kit.

  AVR is a registered trademark of Atmel Corporation.