Keil Logo

Technical Support

On-Line Manuals

RL-ARM User's Guide (MDK v4)

RL-RTX RL-FlashFS RL-TCPnet TCP Socket Opening TCP Connection TCP Active Open TCP Passive Open Sending TCP Data Example for Sending Data Multiple TCP Connections UDP Socket Opening UDP Connection Sending UDP Data When DHCP Enabled When ARP Cache Empty Example for Sending Data IP Multicasting Multiple UDP Connections Configuring RL-TCPnet Static Configuration System Definitions Ethernet Network Interface PPP Network Interface SLIP Network Interface UDP Socket TCP Socket BSD Socket HTTP Server Telnet Server TFTP Server TFTP Client FTP Server FTP Client DNS Client SMTP Client SNMP Agent SNTP Client Error Function Runtime Configuration Library Files Using RL-TCPnet Stand Alone With RTX Kernel Event Driven Operation IP Address Assignment Ethernet Interface PPP Interface SLIP Interface Localhost Applications HTTP Server Script Language CGI Functions Ajax Support Using XML XML Example How it works SOAP Support SOAP Interface Large POST Messages Web Pages Default Page Error Pages Web on SD Card Web Update File System Interface Http Caching How it works Internal Web External Web Multi-user Authentication Using RAM File System FCARM File Converter PRINT Directive NOPRINT Directive PAGEWIDTH Directive PAGELENGTH Directive ROOT Directive Telnet Server Command Line Interface Multi-user Authentication Sending Reply Message Short Reply Long Reply Continuous Screen Update TFTP Server File System Interface TFTP Client File System Interface FTP Server File System Interface Multi-user Authentication Supported Commands FTP Client File System Interface SMTP Client SNMP Agent MIB Database MIB Interface MIB Entry MIB Table DNS Resolver Starting DNS Device Drivers Ethernet Driver Interrupt Mode Modem Driver Serial Driver Using Serial Link Cable Connection Modem Connection Windows Dial-up Add Direct Serial Link New Dial-up Connection Configure PPP Dial-up Configure SLIP Dial-up Debugging Enabling Debug Debug Level Redirecting Output Function Overview BSD Routines CGI Routines Ethernet Routines FTP Routines HTTP Routines IGMP Routines Miscellaneous Routines Modem Routines PPP Routines Serial Routines SLIP Routines SMTP Routines SNMP Routines System Functions TCP Routines Telnet Routines TFTP Routines UDP Routines RL-CAN RL-USB Example Programs Library Reference Appendix

Ethernet Network Interface

This section describes the options to configure a device for communicating in a LAN. The options are set in the file Net_Config.c directly or using the Configuration Wizard.

Ethernet Network Interface Options

Where

  • Ethernet Network Interface enables or disables the Ethernet Network interface. Disable this option when using the PPP or SLIP interface to reduce the code size. However, the Ethernet, PPP, and SLIP network interface can be used simultaneously. This option corresponds to #define ETH_ENABLE.
    #define ETH_ENABLE     1                        // 0=disable; 1=enable
    
  • MAC Address specifies a six byte Ethernet MAC address. It must be unique for each Ethernet controller located in the local area network. The value FF:FF:FF:FF:FF:FF is not allowed.

    MAC Address

    Address byte 1 contains the LSB, which must be 0 for a local MAC address. This option corresponds to #define _MAC1.
    Address byte 2 corresponds to #define _MAC2.
    Address byte 3 corresponds to #define _MAC3.
    Address byte 4 corresponds to #define _MAC4.
    Address byte 5 corresponds to #define _MAC5.
    Address byte 6 corresponds to #define _MAC6.

    #define _MAC1          0x1E
    #define _MAC2          0x30
    #define _MAC3          0x6C
    #define _MAC4          0xA2
    #define _MAC5          0x45
    #define _MAC6          0x5E
    
  • IP Address specifies a local IP address, which contains 4 bytes. The value 255.255.255.255 is not allowed.

    IP Address

    Address byte 1 corresponds to #define _IP1.
    Address byte 2 corresponds to #define _IP2.
    Address byte 3 corresponds to #define _IP3.
    Address byte 4 corresponds to #define _IP4.

    #define _IP1           192
    #define _IP2           168
    #define _IP3           0
    #define _IP4           100
    
  • Subnet Mask specifies the Net Mask. This is normally the class C for small LANs: 255.255.255.0. It is used by the system to check if the given IP address belongs to an internal LAN or an external WAN.

    Net Mask

    Mask byte 1 corresponds to #define _MSK1.
    Mask byte 2 corresponds to #define _MSK2.
    Mask byte 3 corresponds to #define _MSK3.
    Mask byte 4 corresponds to #define _MSK4.

    #define _MSK1          255
    #define _MSK2          255
    #define _MSK3          255
    #define _MSK4          0
    
  • Default Gateway specifies the IP address of the default gateway. It is used when accessing the external WAN. If the application is used on a local LAN only, then these values are irrelevant.

    Gateway

    Address byte 1 corresponds to #define _GW1.
    Address byte 2 corresponds to #define _GW2.
    Address byte 3 corresponds to #define _GW3.
    Address byte 4 corresponds to #define _GW4.

    #define _GW1           192
    #define _GW2           168
    #define _GW3           0
    #define _GW4           254
    
  • Primary DNS Server specifies the IP address of the primary DNS Server. The DNS Client sends IP address resolution requests to this address. The settings are irrelevant when the DNS Client is disabled.

    Primary DNS Server

    Address byte 1 corresponds to #define _pDNS1.
    Address byte 2 corresponds to #define _pDNS2.
    Address byte 3 corresponds to #define _pDNS3.
    Address byte 4 corresponds to #define _pDNS4.

    #define _pDNS1         194
    #define _pDNS2         25
    #define _pDNS3         2
    #define _pDNS4         129
    
  • Secondary DNS Server specifies the IP address of the secondary DNS Server. This DNS Server is used when the primary DNS Server is down or not accessible. In this case, the DNS Client automatically switches to a backup secondary DNS Server if a non-zero address is provided.

    Secondary DNS Server

    Address byte 1 corresponds to #define _sDNS1.
    Address byte 2 corresponds to #define _sDNS2.
    Address byte 3 corresponds to #define _sDNS3.
    Address byte 4 corresponds to #define _sDNS4.

    #define _sDNS1         194
    #define _sDNS2         25
    #define _sDNS3         2
    #define _sDNS4         130
    
  • ARP Definitions caches the addresses of remote peers (ARP - Ethernet Address Resolution Protocol). The following ARP parameters can be configured:

    ARP Definitions

    • Cache Table size specifies the size of ARP cache table. It defines how many cache entries can be kept in the ARP cache. Increase this value when using multiple simultaneous IP connections. This option corresponds to #define ARP_TABSIZE.
      #define ARP_TABSIZE    10
      
    • Cache Timeout in seconds specifies the timeout for an ARP cache entry. After a timeout, the Permanent IPs are refreshed, and the Temporary IPs are removed from the cache. The Timeout (Keep-alive) Timer is reset on every access to the cache entry. This option corresponds to #define ARP_TIMEOUT.
      #define ARP_TIMEOUT    150
      
    • Number of Retries is the maximum number of retries to resolve the Ethernet MAC address of the remote peer. This option corresponds to #define ARP_MAXRETRY.
      #define ARP_MAXRETRY   4
      
    • Resend Timeout in seconds specifies the waiting interval between two re-sends. When this timeout has expired and no response has been received from the remote peer, the ARP request is resent. This option corresponds to #define ARP_RESEND.
      #define ARP_RESEND     2
      
    • Send Notification on Address changes enables or disables the Gratuitous ARP Service. When it is enabled, the embedded host will broadcast a Gratuitous ARM notification at startup, or when the local IP address has changed. This option corresponds to #define ARP_NOTIFY.
      #define ARP_NOTIFY     0                        // 0=disable; 1=enable
      
  • IGMP Group Management enables or disables sending or receiving IP Multicast packets (IGMP - Internet Group Management Protocol). In order to receive Multicast packets, a host must first join a Host Group with specified Host Group IP address.

    IGMP Group Management

    This option corresponds to #define IGMP_ENABLE.

    #define IGMP_ENABLE    1                        // 0=disable; 1=enable
    
    • Membership Table size specifies the size of IGMP Host Group table. It defines how many Host Groups a host can join. This option corresponds to #define IGMP_TABSIZE.
      #define IGMP_TABSIZE   5                        // join max. 5 host groups
      
  • NetBIOS Name Service enables or disables the NBNS Name Service. When NBNS is enabled, the device can be accessed by its name in a LAN. For example, use the command: PING mcb1700 instead of PING 192.168.0.100.

    NetBIOS Name Service

    This option corresponds to #define NBNS_ENABLE.

    #define NBNS_ENABLE    1                        // 0=disable; 1=enable
    
  • Dynamic Host Configuration enables or disables the DHCP Service. When DHCP is enabled, the device obtains all network parameters like IP address, net mask, default gateway, primary and secondary DNS servers automatically from the DHCP server on the LAN. Enable also the option NetBIOS Name Service to access the hardware by name.

    DHCP Configuration

    This option corresponds to #define DHCP_ENABLE.

    #define DHCP_ENABLE    1                        // 0=disable; 1=enable
    
    • Vendor Class Identifier specifies a string, which is added to the DHCP request message. The Vendor Class Identifier can be used to selectively identify a device on a DHCP server. For example, the DHCP server can assign an IP address to a specific Vendor Class group and ignore all other DHCP clients with a different VCI. This option corresponds to #define DHCP_VCID.
      #define DHCP_VCID      "identifier_strg"        // default is an empty string ("")
      
    • Bootfile Name enables or disables the DHCP option 67. If this option is enabled, a DHCP client requests also a Bootfile Name parameter from a DHCP server. When enabled, the user needs to provide also a http_cbfunc() notification function. This function gets called by DHCP client, if option 67 is received in DHCP response to notify the user.
      #define DHCP_BOOTF     0                        // 0=disable; 1=enable
      
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.