Configuration of the PPP interface in µVision.
Configuration of the PPP interface in µVision.
The PPP interface is configured using the Net_Config_PPP.h file. The options are set in the file directly or using the Configuration Wizard.
PPP Interface Configuration File
The PPP configuration file contains the following settings:
- Connect to hardware via Driver_UART# defines the number of the UART peripheral on the microcontroller device to be used.
- Modem Settings specifies connection parameters for the serial modem like baud rate, flow control, and an initialization string.
- Speed specifies the baud rate that is to be used for the UART.
- The Flow Control switch enables the usage of RTS/CTS flow control in the UART.
- Initialization String specifies a string that is to be used for modem initialization.
- IP Address specifies a static local 4 bytes IP address. The value 255.255.255.255 is not allowed.
- Primary DNS Server specifies the IP address of the primary DNS server. The DNS Client sends IP address resolution requests to this address. The setting is irrelevant if the DNS Client is disabled.
- Secondary DNS Server specifies the IP address of the secondary DNS server. It is used if the primary DNS server is down or not accessible. In this case, the DNS Client automatically switches to the secondary DNS server if a non-zero address is provided. The setting is irrelevant if the DNS Client is disabled.
- IP Fragmentation enables fragmentation of outgoing IP datagrams, and reassembling the fragments of incoming IP datagrams.
- The Logon Authentication switch enables or disables the logon authentication. When the authentication is not used, it should be disabled to reduce the application's code size.
- The Unsecured password (PAP) switch enables or disables the Password Authentication Protocol. PAP transmits unencrypted ASCII passwords over the network and is therefore considered insecure.
- The Secured password (CHAP-MD5) switch enables or disables the Challenge-Handshake Authentication Protocol with a MD5 digest algorithm. CHAP requires that both the client and server know the plaintext of the secret password, although it is never sent over the network.
- The Obtain Client IP address automatically option applies when the PPP dial-up connection dials to a remote PPP Server. If it is enabled, the local PPP IP address is obtained from the remote server automatically. In this case, the Local IP address setting is ignored.
- The Use Default Gateway on remote Network option applies when both Ethernet and PPP dial-up networks are used simultaneously. If a packet with a destination IP address does not belong to either the LAN or the PPP interface is found, this option determines which gateway to use. If this option is disabled, these packets are forwarded to the default gateway on the LAN. If this option is enabled, these packets are forwarded to the Dial-up PPP network.
- Async Control Character Map specifies the map of control characters that are transmitted with an escape character. All 32 control characters are mapped into a 4-byte map table.
- LCP Echo Interval in seconds configures the idle timeout of the Link Control Protocol (LCP). If no frames are received within this time interval, PPP sends an Echo Request and expects an Echo Response from the peer. If the response is not received, after certain number of retries, the link is terminated.
- Number of Retries specifies the number of retransmissions before the PPP protocol module gives up.
- Retry Timeout in seconds is the timeout after which the PPP protocol module retransmits the packet.
- OS Resources Settings are used to optimize usage of OS resources.
- The default Interface Thread Stack Size is 512 bytes.
- The default Interface Thread priority is osPriorityAboveNormal. You can change this priority by changing the PPP_THREAD_PRIORITY defined in this configuration file. This priority must be high enough for the PPP interface to respond to events in a timely manner. Due to this requirement, it is recommended that this setting remain the default. For more information on default settings, see the section CMSIS-RTOS Requirements.
Additional PPP configuration settings:
- The PPP_ICMP_NO_ECHO defines the Echo response mode that is enabled by default. A value of 1 disables the echo response, and a value of 0 enables it. Alternatively, you can change it from a running application with the netICMP_SetNoEcho function.