Instructions
258Libraries
© 2013 Conrad Electronic
5.11 Ethernet (AVR32Bit)
The C-Control Pro Unit AVR32Bit supports Ethernet hardware and protocols that follow the IEEE
802.3 standard. The associated PHY works with auto-negotiation and connects to a speed of
100Mbit or a 10Mbit, whatever speed the opposite side (eg a switch) offers. Power-over-Ethernet is
not supported. The following protocols are currently implemented:
ARP
ICMP Echo (ping)
DHCP
TCP/IP
UDP
C-Control Pro (UDP Port 50234)
HTTP (TCP/IP)
Foreknowledge
Prerequisite to understand this chapter and the successful use of the library is a basic knowledge of
the following areas of IPv4:
IP-numbers
Port addresses and significance
UDP packets
TCP/IP data stream
It is recommended to have knowledge about TCP/IP in a programming environment like the BSD
socket interface.
5.11.1 Ethernet Activation
To avoid connection problems, the MAC address should be set to a new value ("Edit MAC Ad-
dress") before switching on the Ethernet support (see C-Control configuration). To this end, for each
sold C-Control Pro AVR32Bit Unit a unique MAC address is generated and supplied on a label. See
Software Installation.
In the C-Control configuration, the Ethernet Support has to be enabled. When plugging in the Eth-
ernet connector, the yellow LED should stay on and the green LED will flash sporadically .
If DHCP is not enabled, the network parameters from the C-Control configuration will be used. The
entries of IP address, subnet mask, and gateway must be entered manually.
If DHCP is in use, the network parameters are retrieved from the DHCP server (eg DSL router or
similar). The DHCP protocol is not supported in the bootloader, but only by the interpreter. There-
fore, after the DHCP is enabled in the configuration, press the reset button once to start the inter-
preter.
A change of the DHCP network data is stored directly in the configuration if the option save DHCP
settings is turned on.
To test whether the network is configured correctly, send a ping from the PC to the AVR32Bit
Unit. The parameter Allow Ping must be enabled for it.
When stopping the program with the Start/Stop button, the lwIP TCP/IP stack can get in a
state, where not all dynamic memory for the current connection is released. This memory may be
missing when you restart the program. If in doubt when encountering problems, press the reset but-