Ethernet Manual Configuration Test Application
Overview
This application demonstrates how to manually configure Ethernet speed and duplex settings instead of using the default autonegotiation mode. The program provides an interactive command-line interface for testing different Ethernet configurations and includes network diagnostic tools.
Features
Ethernet Configuration Options
- Autonegotiation mode - Automatically negotiates optimal speed and duplex
- 100Mbps Full Duplex - High-speed bidirectional communication
- 100Mbps Half Duplex - High-speed unidirectional communication
- 10Mbps Full Duplex - Standard speed bidirectional communication
- 10Mbps Half Duplex - Standard speed unidirectional communication
Network Diagnostic Tools
- ARP Cache Display - Shows the Address Resolution Protocol cache
- Network Counters - Displays various network statistics
- Ethernet Register Dump - Shows low-level Ethernet hardware registers
- Ping Functionality - Tests network connectivity to specified IP addresses
- Link Status Monitor - Displays current Ethernet link state and configuration
- System Timer - Shows OS tick counter and uptime
Usage
Interactive Menu Commands
After starting the application, use these single-character commands:
1 - Set Autonegotiate mode
2 - Set 100Mbps Full Duplex
3 - Set 100Mbps Half Duplex
4 - Set 10Mbps Full Duplex
5 - Set 10Mbps Half Duplex
A - Show ARP Cache
C - Show Counters
E - Show Ethernet Registers
P -
Ping (Example:
"P 192.168.1.1")
W - Show OS Seconds Counter
? - Display Menu
int Ping(const IPADDR &to, uint16_t id, uint16_t seq, uint16_t maxwaitticks, int size=32)
Generic ping function that uses IPv6 when IPv6 is enabled.
Definition ip.h:792
Ping Command Examples
P
- Ping the default gateway
P 192.168.1.1
- Ping a specific IP address
P 10.0.0.1
- Ping another specific address
Technical Details
Platform Support
- Supports NetBurner embedded systems
- Special handling for MCF5441X multi-port Ethernet devices
- Primary port configuration for multi-port devices
Network Protocols
- IPv4 - Full support with DHCP, static, and auto-IP configuration
- IPv6 - Complete IPv6 support including:
- Link-local addresses
- Router-assigned addresses
- DHCP v6 addresses
- Static addresses
- DNS configuration
- Warning
- Manual Ethernet configuration is not available in debug mode. The application will display a warning message when attempting to change settings while debugging.
File Structure
main.cpp
- Main application with command interface and Ethernet configuration
ip_util.cpp
- IP address utility functions for display and web interface
ip_util.h
- Header file for IP utilities
Network Information Display
IPv4 Details
- IP address and subnet mask
- Primary and secondary DNS servers
- Default gateway
- Auto-IP configuration status
IPv6 Details
- Link-local addresses
- Router-assigned prefixes
- DHCP v6 leases with timing information
- Static address assignments
- DNS server information
Interface Status
- Link state (UP/DOWN)
- Current speed (10/100 Mbps)
- Duplex mode (Full/Half)
- MAC address information
Web Interface
The application includes a web server component that displays network configuration through a browser interface. The web page shows:
- Complete interface information
- Clickable links for IPv4 and IPv6 addresses
- DHCP lease timing details
- DNS server assignments
System Requirements
- NetBurner RTOS environment
- Ethernet hardware interface
- Serial port for command interface
- Optional web browser for web interface access
Notes
- The application waits up to 5 seconds for network initialization on startup
- System diagnostics are enabled by default (should be disabled for production)
- All network interfaces are automatically detected and configured
- Link status is continuously monitored and displayed