EVB-B1+ WIZnet, EVB-B1+ Datasheet - Page 82

no-image

EVB-B1+

Manufacturer Part Number
EVB-B1+
Description
Development Boards & Kits - ARM W3150A+EVAL BOARD BASED ON AVR
Manufacturer
WIZnet
Datasheet

Specifications of EVB-B1+

Rohs
yes
Product
Evaluation Boards
Interface Type
RS-232, SPI
Operating Supply Voltage
3.3 V, 5 V
Data Bus Width
8 bit
Dimensions
50 mm x 40 mm
Processor Series
ATmega128
STATE_DHCP_LEASED state represents the network information and means that getIP_DHCP() is done
successfully. If network information is not obtained from DHCP Server during the waiting time for
‘DHCP_WAIT_TIME & MAX_DHCP_RETRY’, check_DHCP_state() sets DHCP_Timeout to 1. When
DHCP_Timeout is 1, getIP_DHCPS() returns failure after releasing the DHCP Timer.
When it failed to obtain network information from DHCP server, EVB B/D sets network configuration using
default network information or previously obtained network information.
<Table 3-35> is a definition of State, Timeout , and Retry Count of DHCP Client.
At getIP_DHCP(),‘DHCP_XID’ is variable to set up xid Field of DHCP message in <Fig 3.26: DHCP Message
Format>, it must be unique and maintain the same value until Lease Time of network information is expired.
DHCP_XID is fixed with ‘0x12345678’ on here, but it’s recommended to use the random value.
Be advised to set source IP address as ‘0.0.0.0.’ when initializing W3150A
server. You can use any IP address to set Source IP address of W3150A
because ‘0.0.0.0’ corresponds to Class A in IPv4 addressing and it’s a Null IP address that is not actually
used. For this reason, there is no chance for collision with other network.
For DHCP server to transmit UDP broadcast packet, note that Flag field MSB of DHCP message must be set
1. Refer to <Fig 3.26: DHCP Message Format>.
<Table 3-36> is a part of code that sets up Flag field
#define STATE_DHCP_DISCOVER 1
#define STATE_DHCP_REQUEST 2
#define STATE_DHCP_LEASED
#define STATE_DHCP_REREQUEST 4
#define STATE_DHCP_RELEASE 5
#define MAX_DHCP_RETRY
#define DHCP_WAIT_TIME
#define DHCP_FLAGSBROADCAST
pRIPMSG->flags = htons(DHCP_FLAGSBROADCAST);
Define
© Copyright 2006 WIZnet Co., Inc. All rights reserved.
<Table 3-34: DHCP Client State & Timeout Definition>
<Table 3-35: DHCP Message Flag Field Setup>
3
3
5
Waiting time for receiving DHCP Message, 5 sec.
DISCOVERY Transmission
OFFER Receiving & REQUEST Transmission
ACK Receiving, Acquiring Network Information
After obtaining Network Information, REQUEST
Retransmission
RELEASE Transmission
Number of Same DHCP Message Transmission, 3
times
0x8000
Description
+
for communication with DHCP
+
, but using ‘0.0.0.0’ is better
72

Related parts for EVB-B1+