ppp between vxworks and winnt 4 - vxdev.com between vxworks and winnt 4.x wtn-50 ... make a copy of...

38
Version 1.0 March 2000 WTN-50 Establishing a PPP Session between VxWorks and Windows NT Copyright © 1984-1999 Wind River Systems Inc. ALL RIGHTS RESERVED. VxWorks, Wind River Systems, the Wind River Systems logo and wind are registered trademarks of Wind River Systems Inc. Crosswind, IxWorks, Tornado, VxSim, VxVmi, WindC++, WindConfig, Wind Foundation Classes, WindNet, WindPower, WindSh and WindView are trademarks of Wind River Systems Inc. All other trademarks used in this document are the property of their respective owners. PPP between VxWorks and WinNT 4.x Wind Tech Notes are maintained and published by Wind River Systems Customer Support Telephone Email Fax Corporate 800/872-4977 Toll Free, US and Canada. [email protected] 510/749-2164 Europe (+) 800 49 77 49 77 [email protected] (+) 33 1 60 92 63 15 Japan 011-81-3-5467-5900 [email protected] 011-81-5467-5877 If you purchased your Wind River systems Product from a distributor, please contact your distributor to determine how to reach your technical support organization. Please provide your license number when contacting Customer Support

Upload: truongdang

Post on 21-Mar-2018

250 views

Category:

Documents


2 download

TRANSCRIPT

Version 1.0 March 2000

WTN-50

Establishing a PPP Session between VxWorks andWindows NT

Copyright © 1984-1999 Wind River Systems Inc.

ALL RIGHTS RESERVED.

VxWorks, Wind River Systems, the Wind River Systems logo and wind are registered trademarks of WindRiver Systems Inc. Crosswind, IxWorks, Tornado, VxSim, VxVmi, WindC++, WindConfig, Wind FoundationClasses, WindNet, WindPower, WindSh and WindView are trademarks of Wind River Systems Inc.

All other trademarks used in this document are the property of their respective owners.

PPP between VxWorks and WinNT 4.x

Wind Tech Notes are maintained and published by Wind River Systems Customer Support

Telephone Email FaxCorporate 800/872-4977 Toll

Free, US andCanada.

[email protected] 510/749-2164

Europe (+) 800 49 77 49 77 [email protected] (+) 33 1 60 92 63 15Japan 011-81-3-5467-5900 [email protected] 011-81-5467-5877

If you purchased your Wind River systems Product from a distributor, please contact your distributor todetermine how to reach your technical support organization.

Please provide your license number when contacting Customer Support

PPP between VxWorks and WinNT 4.x WTN-50

50-2

1 IntroductionThis tech note outlines how to establish a simple PPP session between VxWorks and a Window NT host.“Simple” is intended to be interpreted as a basic configuration, with the minimum hardware and only thosesoftware options necessary to establish a connection.

Instructions are provided to configure either the VxWorks target or WinNT host to initiate the PPP session.

The VxWorks target must be running at least VxWorks 5.3.1 with the WindNet SENS component orVxWorks 5.4. The VxWorks target in this demonstration was a PC486 target, with two serial ports.

The Window NT host was running NT4.0 with Service Pack 3.

This tech note covers the hardware connection, and next a WinNT configuration from which WinNT caneither employ Dial-up Networking to initiate a PPP connection or respond to a PPP configuration requestfrom a VxWorks target.

VxWorks will be configured as a “client” to initiate the PPP connection, and then as a “server” to respond tothe NT’s Dial-up session.

Finally, some troubleshooting hints will be provided. It is highly recommended that the user scan the entiredocument, including the troubleshooting section before trying to implement this.

2 ReferencesIn many cases, references for “more information” or “in case of trouble” are provided at the end of adocument. In this document, some sources of useful information are listed first.

Sun, Andrew, Using & Managing PPP, Sebastapol, O’Reilly, 1999.

Carlson, James, PPP Design and Debugging, Reading, MA, Addison-Wesley, 1998

Hunt, Craig & Thompson, Robert Bruce, Windows NT TCP/IP Network Administration, Sebastapol,O’Reilly, 1998.

VxWorks Network Programmer’s Guide 5.4 , “ Section 3.4 PPP, the Point-to-Point Protocol for Serial LineIP”

A useful URL is: http://www.stokely.com/unix.serial.port.resources/ppp.slip.html

3 Hardware ConnectionThe VxWorks target and NT host was connected with a minimum null modem cable, two female DB9adapters, using only three wires. Transmit and Receive (pins 2 and 3) were crossed and GND on bothsides were connected (pin 5).

2 TX ----------- 3 RX

3 RX ----------- 2 TX

5 GND ---------- 5 GND

PPP between VxWorks and WinNT 4.x WTN-50

50-3

In this demonstration, the PPP connection was established between the second serial port, COM2 on theWin NT host and TTY 1 on the VxWorks target.

(The PC’s first serial port, COM1, was used to display the VxWorks console output, which uses TTY 0.)

It is strongly recommended that the serial ports and cable be tested beforehand. The cable used for thePPP connection can be swapped with the cable for the target’s console output. Likewise, the port on theNT host can be checked with Hyperterm.

4 WinNT 4.0 Host ConfigurationThis section discusses how to configure the WinNT 4.0 host. This configuration enables the NT host toeither initiate the PPP session using Dialup Networking (DUN) or to receive a request to negotiate a PPPconnection from the VxWorks target using Remote Access Services (RAS).

The procedures could be separated to emphasize the “client” and “server” roles. Instead, using this setup,the NT host can either initiate a dialup session or receive a configuration request from the VxWorks target.

4.1 Confirm that TCP/IP is installed

Confirm that TCP/IP is installed on the NT host. From the Task Bar, navigate from “Settings” to “ControlPanel.” Double-click on “Network”.

Once the “Network” window appears, select the “Protocols” tab.

Confirm that “TCP/IP Protocol” appears in the Protocols window. If TCP/IP is not displayed, it must beinstalled. Please consult a system administrator.

4.2 Confirm that Remote Access Service (RAS) is installed

Remote Access Service or RASenables remote hosts (or clients) toaccess the NT host.

Select the “Services” tab in the“Network” control.

Confirm that “Remote AccessServices” is listed as in the figureto the right.

If not, refer to Appendix A ofthis tech note for instructions.

PPP between VxWorks and WinNT 4.x WTN-50

50-4

4.3 Configure the Dial-up Networking Serial Cable

From the “Services” dialog box of the “Network” control panel, select “Remote Access Service”, and clickon “Properties...”

The Remote Access Service dialog box should look something Figure 4-2 below:

Confirm that ”Dial-up NetworkingSerial Cable between Two PCs” isinstalled on COM2.

If necessary, install the driver for theDial-Up Networking Serial Cablebetween 2 PCs. Refer to AppendixB.

Continue by clicking on “Configure”

Figure 4-2

In the “Configure Port Usage” window,select “Dial out and Receive Calls”. Thisenables the NT host to use Dial-upNetworking (DUN) and Remote AccessService (RAS) on COM2 (Figure 4-3).

Click on “OK” to return to the RemoteAccess Service window.

Figure 4-3

NT allows only a single port to be configured to receive calls. If COM1 is already configured to receive, itwill be necessary to modify the setting to allow COM2 to receive.

PPP between VxWorks and WinNT 4.x WTN-50

50-5

4.4 Configure Remote Access Service (RAS)

Figure 4-4

Click on “Network...” in the Remote Access Servicedialog box. The “Network Configuration” dialogbox appears.

Select “TCP/IP” for the Dial out Protocol.

Under “Encryption settings”, select “Allow anyauthentication including clear text”

For “Server Settings”, select “TCP/IP” and click on“Configure...”

In the “RAS Server TCP/IPConfiguration” dialog box, select thefollowing parameters:

“Entire network”

and

“Use static address pool”.

Specify beginning and endingaddresses of 90.0.0.1 and 90.0.0.254,respectively. Clients will be assigned IPaddresses, beginning at 90.0.0.1.

Select “Allow remote clients torequest a predetermined IPaddress.”

Click “OK”.

In the Network Configuration window, click “OK”.

In the “Remote Access Server” window, click on “Continue”.

PPP between VxWorks and WinNT 4.x WTN-50

50-6

Clicking ‘Close” in the initial “Network” window brings up a warning that the NT must be shutdown andrestarted before any changes become effective. (This will appear even if no changes have been made.)The NT can be shutdown and restarted immediately by selecting “Yes”.

4.5 Add User and Password Using the User Manager

A new user and passwordcorresponding to the PAP user andpassword in the VxWorksconfiguration later must be createdusing the User Manger,.

From the Task Bar, select Start=>Programs =>AdministrativeTools (Common) =>UserManager.

To add a user and password, fromthe “User” menu, select “NewUser”.

In the “New User” window, enter a “Username”and “Password”. Type the designatedpassword a second time in the “ConfirmPassword” field.

The Username and Password are the samethat will be used to configure VxWorks with aPAP user and password. For this example,“vxWorks and “password” were selected. Beaware that VxWorks is case sensitive.

Deselect “User Must Change Password atNext Logon”.

Click on the “Dialin” button.

In the “Dialin Information” window, select “Grantdialin permission to user” and “No Call Back.”

PPP between VxWorks and WinNT 4.x WTN-50

50-7

4.6 Confirm that Dial-up Networking is Installed

To confirm that Dial-Up Networking has been installed, open “My Computer”. An icon for “Dial-upNetworking” should be present. Double-clicking the icon will bring up DUN or a prompt asking if you wantto install it.

4.7 Configure Dial-Up Networking (DUN) settings

Double-click on the “Dial-up Networking” icon to access the configuration settings.

Confirm that“Operator assistedor manual dialing”is not checked.

Click on “New” tocreate a new phonebook entryconfigured for aDUN PPPconnection.

Confirm that “Dial-up Networking SerialCable between 2 PCs (COM2) isselected.

Deselect “Use another port if busy.”

Click on “Configure.”

PPP between VxWorks and WinNT 4.x WTN-50

50-8

In the “Modem Configuration” dialog box, set the baud rate.

It is critical that “Enable hardware flow control” is not selected.

In the Server tab, confirm that the Dial-upserver type is “PPP, Windows NT,Windows 95 Plus, Internet.”

“Enable software compression” and“Enable PPP LCP extensions” can beselected.

Select TCP/IP for the “Networkprotocol” and click on “TCP/IPSettings” to configure.

In the “PPP TCP/IP Settings” window,

select the following settings:

“Server assigned IP address”

and

“Server assigned name server addresses.”

Deselect “Use IP header compression”and “Use default gateway on remotenetwork.”

Click “OK”.

PPP between VxWorks and WinNT 4.x WTN-50

50-9

In the “Security” tab, select“Accept any authenticationincluding clear text.”

(This is a critical setting to avoid using MS-CHAP for authentication.)

Click “OK”

In the “Script” tab, “none” should be selected. No dialup script is necessary.

In the “X.25” tab also, “none” should be selected.

Click “OK” to complete the addition of the phone book entry.

4.8 Confirm Modem Configuration

From the Start bar, navigate to Settings => Control Panel =>Modem.

These settings should all be set exactly as whenDial-Up Networking was configured.

Click on “Properties.”

Verify the baud rate.

PPP between VxWorks and WinNT 4.x WTN-50

50-10

In the “Connection” tab, click on “Advanced… ”

Verify that “Use flow control” isnot checked.

This is a common error.

4.9 Confirm Port Configuration

From the Start bar, navigate toSettings => Control Panel =>Port.

These settings should be set exactly as when Dial-Up Networking was configured.

Click on “Settings.”

Verify the baud rate.

Verify that “Use flow control” is “None”.

PPP between VxWorks and WinNT 4.x WTN-50

50-11

4.10 Confirm Remote Access Service (RAS) is Running

From the “Start” bar, go toSettings => Control Panel=> Services.

Verify that Remote AccessServer is “Started.”

If it is not started, click the“Start” button. A watch willappear with the message:“RAS is being started on hostthor.”

In the figure above, RAS is configured to bestarted manually.

To start RAS automatically when NT is booted,click “Startup… ”

Select “Automatic” for Startup Type.

5. Configure VxWorks to respond to NT’s request toestablish PPP session (VxWorks as “server”)In this configuration, Dial-up Networking (DUN) on the NT will be used to initiate the PPP connection bydialing out to the vxWorks target. The VxWorks target will call usrPPPInit, and wait for the NT to try tonegotiate a connection.

5.1 Modify config.h

5.1.1 Tornado 2 Users need to create a new directory, workspace and project.

Make a copy of the bsp directory and its contents, pc486, in this example, and name the copy “pc486ppp.”

Create a new workspace using the Project configuration tool.

Create a new project, selecting “Create a bootable VxWorks image”.

Base the Project on a BSP and select “pc486ppp” from the pull-down menu.

Any changes to config.h should be made to the config.h in the pc486ppp directory. This will avoid makingany modifications universal to all pc486 projects.

PPP between VxWorks and WinNT 4.x WTN-50

50-12

5.1.2. Tornado 2 Users: Add INCLUDE_PPP to PROJECT

Locate the PPP component in the VxWorks tab by navigating to “network components > network devices >PPP. Right-click on “PPP” and select Include ‘PPP’. In the “Include Component(s)” dialog box thatappears, click “OK”. The PPP and PPP Boot components will appear in bold type.

5.1.3. Modifications to config.hModify config.h by adding the following lines, somewhere after the statement:

#include “configAll.h”

#define INCLUDE_PPP /* include Point-to-Point Procotol */

#undef PPP_OPT_DEBUG#define PPP_OPT_DEBUG 1 /* Enable daemon debug mode */#undef PPP_OPT_DRIVER_DEBUG#define PPP_OPT_DRIVER_DEBUG 1 /* Enable driver debug mode */

/* defines for target as PPP server */#undef PPP_OPT_PASSIVE_MODE#define PPP_OPT_PASSIVE_MODE 1 /* Set passive mode */#undef PPP_OPT_SILENT_MODE#define PPP_OPT_SILENT_MODE 1 /* Set silent mode */

#define INCLUDE_PING

Starting PPP in Passive and Silent modes causes vxWorks to try and initiate a PPP connection once, afterwhich it sits waiting for a “client” or peer to send a PPP request. If these options are not defined, whenusrPPPInit is called later on the vxWorks target, it attempts to connect and quickly times out.

5.2 Rebuild vxWorks

5.3 Reboot target

5.4 Call usrPPPInit()

From a target shell or Windshell, usrPPPInit should be called as follows:

usrPPPInit ("ppp=/tyCo/1,19200",1,"90.0.0.50", "90.0.0.60")

usrPPPInit( ) routine is in src/config/usrNetwork.c. Calling it as illustrated instructs vxWorks to use serialdevice /tyCo/1, with a baud rate of 19200, to create PPP interface 1. The local PPP interface has an IPaddress of 90.0.0.50 and the remote IP address is 90.0.0.60. (For more information on usrPPPInit andpppInit, refer to the VxWorks (Network) Programmer’s Guide.

As a convenience, the statement above can be placed in a script, for example, pppServer, which canexecuted from the shell.

When usrPPPInit is called, the following response can be expected:

-> <pppServerusrPPPInit ("ppp=/tyCo/1,19200",1,"90.0.0.50", "90.0.0.60")Attaching network interface ppp1...ppp1: ppp 2.1.2 started by keithkppp1: Connect: ppp1 <--> /tyCo/1

PPP between VxWorks and WinNT 4.x WTN-50

50-13

done.value = 0 = 0x0-> iNAME ENTRY TID PRI STATUS PC SP ERRNO DELAY---------- ------------ -------- --- ---------- -------- -------- ------- -----tExcTask _excTask 3ed5b6c 0 PEND 1648dc 3ed5adc 0 0tLogTask _logTask 3ed3254 0 PEND 1648dc 3ed31c0 0 0tShell _shell 3e87f18 1 READY 129800 3e87bf8 dd 0tWdbTask 149798 3e890c0 3 PEND 14b414 3e88f68 0 0tNetTask _netTask 3e9490c 50 PEND 14b414 3e948b4 0 0tPPP1 _ppp_task 3e846dc 55 PEND 151a64 3e84568 0 0tPPP1Wrt _ppp_wrt_tas 3e7a984 60 PEND 14b414 3e7a910 0 0value = 0 = 0x0

VxWorks will sit and wait with the ppp tasks running until the NT client tries to negotiate a connection.

5.5 Start Dial-up Networking on the NT

Open “My Computer”, double-click“Dial-up Networking” and select thephone book entry created for PPP.

Click on “Dial.”

A message will appear to indicate the NT is dialing outusing the phone book entry PPPCOM2.

If the physical connection is successful, the message willnow indicate : “Registering your computer on thenetwork.”

The Dial-up Networking Monitor shows the CD orCarrier Detect light, signifying the connection has beenestablished.

The use of the Dial-Up Networking Monitor will becovered in more detail in the section on

PPP between VxWorks and WinNT 4.x WTN-50

50-14

“Troubleshooting.”

If instead, the following message box appears, theVxWorks target has not responded. This may be theresult of any number of mistakes. Make sureusrPPPInit was called on the target before dialing fromthe NT. Check config.h to confirm the correct PPPoptions were defined. See Section 7 onTroubleshooting.

5.6 Confirm PPP connection on VxWorks target

On the VxWorks target shell, the PPP debug messages are displayed and indicate how the PPPconnection was negotiated. A successful connection will look something like this:

-> ppp1: rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <magic 0x6661> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x3 <mru 1500> <magic 0x5e54> <pcomp> <accomp>]ppp1: sent [LCP ConfAck id=0x0 <asyncmap 0x0> <magic 0x6661> <pcomp> <accomp>]ppp1: rcvd [LCP ConfAck id=0x3 <mru 1500> <magic 0x5e54> <pcomp> <accomp>]ppp1: sent [IPCP ConfReq id=0x9c <addr 90.0.0.50> <compress VJ 0f 01>]ppp1: rcvd [proto=0x80fd] 01 01 00 0a 12 06 00 00 00 06ppp1: input: Unknown protocol (80fd) received!ppp1: sent [LCP ProtRej id=0x4 80 fd 01 01 00 0a 12 06 00 00 00 06]ppp1: rcvd [IPCP ConfReq id=0x2 <addr 0.0.0.0> < 81 06 00 00 00 00> < 82 06 00 00 00 00> < 83 06 00 00 00 00> < 84 06 00 00 00 00>]ppp1: sent [IPCP ConfRej id=0x2 < 81 06 00 00 00 00> < 82 06 00 00 00 00> < 83 06 00 00 00 00> < 84 06 00 00 00 00>]ppp1: rcvd [IPCP ConfRej id=0x9c <compress VJ 0f 01>]ppp1: sent [IPCP ConfReq id=0x9d <addr 90.0.0.50>]ppp1: rcvd [IPCP ConfReq id=0x3 <addr 0.0.0.0>]ppp1: sent [IPCP ConfNak id=0x3 <addr 90.0.0.60>]ppp1: rcvd [IPCP ConfAck id=0x9d <addr 90.0.0.50>]ppp1: rcvd [IPCP ConfReq id=0x4 <addr 90.0.0.60>]ppp1: sent [IPCP ConfAck id=0x4 <addr 90.0.0.60>]ppp1: local IP address 90.0.0.50ppp1: remote IP address 90.0.0.60

The output of “I” shows the PPP tasks are running; the status is PEND because nothing is currently beingsent over the PPP interface.

-> i

NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY---------- ------------ -------- --- ---------- -------- -------- ------- -----tExcTask _excTask 3ed3b6c 0 PEND 1648dc 3ed3adc 0 0tLogTask _logTask 3ed1254 0 PEND 1648dc 3ed11c0 0 0tShell _shell 3e70f40 1 READY 129800 3e70c20 dd 0tWdbTask 149798 3e720e8 3 PEND 14b414 3e71f90 0 0tNetTask _netTask 3e9290c 50 PEND 14b414 3e928b4 0 0tPPP1 _ppp_task 3e6e688 55 PEND 151a64 3e6e514 0 0tPPP1Wrt _ppp_wrt_tas 3e64c38 60 PEND 14b414 3e64bc4 0 0value = 0 = 0x0

“ifShow” shows the PPP interface is “UP” and lists its IP address and the remote peer’s IP.

PPP between VxWorks and WinNT 4.x WTN-50

50-15

-> ifShowppp (unit number 1): Flags: (0x8071) UP POINT-TO-POINT MULTICAST ARP RUNNING Type: PPP Internet address: 90.0.0.50 Destination Internet address: 90.0.0.60 Netmask 0xff000000 Subnetmask 0xff000000 Metric is 0 Maximum Transfer Unit size is 1500 8 packets received; 8 packets sent 0 multicast packets received 0 multicast packets sent 0 input errors; 0 output errors 0 collisions; 0 droppedvalue = 29 = 0x1d

5.7 Confirm communication by pinging the remote interface

From the VxWorks target (or from the NT host), the remote interface can be pinged to verify communicationover the PPP link.

ping does not behave normally with the PPP connection-- the local PPP interface cannot be pinged and willtime out. This is also true on NT when trying to ping its local PPP interface.

On the VxWorks target, when using “ping”, specify the number of packets to be sent. Omitting the numberof packets will cause ping to execute indefinitely.

-> ping "90.0.0.60",3PING 90.0.0.60: 56 data bytes64 bytes from 90.0.0.60: icmp_seq=0. time=112. ms64 bytes from 90.0.0.60: icmp_seq=1. time=112. ms64 bytes from 90.0.0.60: icmp_seq=2. time=112. ms----90.0.0.60 PING Statistics----3 packets transmitted, 3 packets received, 0% packet lossround-trip (ms) min/avg/max = 112/112/112value = 0 = 0x0

5.8 Terminating the PPP Session

Properly terminating the PPP session by either VxWorks or WinNT will save a lot of frustration, especiallyduring the initial attempts to establish a connection.

5.8.1 Hang Up the Dial-up Network on NT

From the NT side, hanging up the PPP connection is done through the Dialup Network Monitor. If thispanel is not visible, display it by going from the Task bar => Settings => Control Panel => Dial-upMonitor. (The Dial-up Monitor is covered in more detail in section 7.12.)

PPP between VxWorks and WinNT 4.x WTN-50

50-16

This connection was initiated by the NT using Dialup Networking, while the VxWorks target acts as a serverwaiting to handle the connection requests. The Dialup Networking can be hung up and restarted by dialingagain as long as the PPP task is still running on the target. (On the target, pppDelete ( ) will send aterminate request and kill the PPP tasks.)

From the Dialup Networking Monitor, buttons to “Hangup”are accessible in the “Status” and “Summary” windows, andby right clicking on the dialup Network LEDs (if this isdisplayed).

Click on “Hangup” in either the Status or Summary windowto terminate the PPP session from NT.

5.8.2 Call pppDelete( ) on VxWorks

On the target, pppDelete ( ) will send a terminate request and kill the PPP tasks. Since the target acts as aserver in this configuration, once pppDelete is called, the NT will no longer be able to dial in.

pppDelete should be called, specifying the PPP Unit Number as the argument. In this demonstration,usrPPPInit() created a PPP interface numbered “1.” Below pppDelete (1) is called to terminate the session.

PPP between VxWorks and WinNT 4.x WTN-50

50-17

-> i

NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY---------- ------------ -------- --- ---------- -------- -------- ------- -----tExcTask _excTask 3ed3b6c 0 PEND 1648ec 3ed3adc 0 0tLogTask _logTask 3ed1254 0 PEND 1648ec 3ed11c0 0 0tShell _shell 3e70f40 1 READY 129810 3e70c20 320001 0tWdbTask 1497a8 3e720e8 3 PEND 14b424 3e71f90 0 0tNetTask _netTask 3e9290c 50 PEND 14b424 3e928b4 0 0tPPP1 _ppp_task 3e6db74 55 PEND 151a74 3e6da00 0 0tPPP1Wrt _ppp_wrt_tas 3e639ac 60 PEND 14b424 3e63938 0 0value = 0 = 0x0

-> pppDelete(1)value = 0 = 0x0-> ppp1: sent [LCP TermReq id=0x46]

Failure to properly Hangup DUN on NT and to call pppDelete may prevent a connection from being re-established.

PPP between VxWorks and WinNT 4.x WTN-50

50-18

6. Configure VxWorks to initiate PPP connection(VxWorks as “client”)In this configuration, the VxWorks target will act as a “client” and initiate the PPP connection. The NT Hostwas configured to use Remote Access Services (RAS) as well as DUN on the NT’s COM2 (in Section 4above).

6.1 Prepare script to call usrPPPInit()

Because of the behavior of the NT when it responds to the request to negotiate a connection, some actionsare required before usrPPPInit is called. First, the serial port is opened and a file descriptor assigned. Thestring “CLIENT” is written to the port, which serves to wake up the Remote Access Service on the NT. NTresponds by writing “CLIENT SERVER”. A short script (pppClient in this example) can be prepared toperform these tasks and call usrPPPInit.

pppfd=open("/tyCo/1",2);pppString=malloc(100);write pppfd, "Client",6;taskDelay (2*sysClkRateGet());read pppfd, pppString,100;printf pppString;usrPPPInit ("ppp=/tyCo/1,19200",1,"90.0.0.2", "90.0.0.1")

Of course, these statements can be executed manually from the VxWorks shell. Technically, the twostatements below are not necessary:

read pppfd, pppString,100;printf pppString;

Important: When trying to establish a connection, the script may hang on the read statement. Removingthe read statement may enable usrPPPInit to be called and the connection may or may not be successful.For troubleshooting purposes, it is recommended they be left in the script. Removing the read pppfdstatement may alter the conditions that appear, which may not longer correspond to symptoms addressedin the Troubleshooting chapter, particularly section 7.8.

usrPPPInit( ) instructs vxWorks to use serial device /tyCo/1, with a baud rate of 19200, to create PPPinterface 1. The local PPP interface has an IP address of 90.0.0.1 and the remote IP address is 90.0.0.2.

6.2 Modify config.h

6.2.1 Reminder to Tornado 2 Users

If the bsp directory was not been copied and renamed the copy “bspppp”, per section 5.1.1, this should bedone now. According to the instructions in 5.1.1, create a new workspace using the Project configurationtool.

Create a new project to “Create a bootable VxWorks image”.

Base the Project on a bsp, selected from the pull down menu, “pc486ppp” in this example.

Any changes to config.h in the following section should be made to the config.h pc486ppp directory.

PPP between VxWorks and WinNT 4.x WTN-50

50-19

6.2.2. Modifications to config.h

Modify config.h by adding the following lines, somewhere after the statement:

#include “configAll.h”

#define INCLUDE_PPP /* include Point-to-Point Procotol */

#undef PPP_OPT_DEBUG#define PPP_OPT_DEBUG 1 /* Enable daemon debug mode */#undef PPP_OPT_DRIVER_DEBUG#define PPP_OPT_DRIVER_DEBUG 1 /* Enable driver debug mode */

/* defines for target as PPP client */

#undef PPP_OPT_NO_CHAP#define PPP_OPT_NO_CHAP 1#undef PPP_STR_PAP_USER_NAME#define PPP_STR_PAP_USER_NAME "vxWorks" /* username for PAP peer auth */#undef PPP_STR_PAP_PASSWD#define PPP_STR_PAP_PASSWD "password" /* password for PAP peer auth */

The use of the NO_CHAP option is critical. NT will try to use MS-CHAP which VxWorks’ PPPimplementation does not support.

Care should be taken not to leave the PPP options, SILENT and PASSIVE, defined from Section 5. Thiswill cause the PPP connection to fail.

Confirm that the PAP User and Password correspond to the new user and password added to the NT Host,using the User Manager (Section 4.5)

6.3 Rebuild vxWorks

6.4 Reboot target

6.5 Run the “pppClient” shell script

The shell script prepared earlier “pppClient” or the equivalent commands should be run from a VxWorkstarget shell or Tornado Windsh.

After usrPPPInit is called, the PPP connection should be negotiated and established when the IPaddresses are displayed. The following is the expected output, with some notes interjected.

> <pppClientpppfd=open("/tyCo/1",2);pppfd = 0x3efde8c: value = 8 = 0x8pppString=malloc(100);pppString = 0x3efde20: value = 65461836 = 0x3e6de4cwrite pppfd, "Client",6;value = 6 = 0x6taskDelay (2*sysClkRateGet());value = 0 = 0x0read pppfd, pppString,100;value = 29 = 0x1dprintf pppString;~ÿ}#À!}&}&} }$õn~CLIENTSERVERÞæ�¡—�value = 35 = 0x23 = '#'usrPPPInit ("ppp=/tyCo/1,19200",1,"90.0.0.2", "90.0.0.1")

PPP between VxWorks and WinNT 4.x WTN-50

50-20

Attaching network interface ppp1...ppp1: ppp 2.1.2 started by keithkppp1: Connect: ppp1 <--> /tyCo/1ppp1: sent [LCP ConfReq id=0x43 <mru 1500> <magic 0x28f69> <pcomp> <accomp>]

The NT host responds to the initial configuration request by trying to use MS CHAP for authentication:

ppp1: rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap 80> <magic 0xc6e> <pcomp> <accomp>]

VxWorks responds by suggesting PAP be used.

ppp1: sent [LCP ConfNak id=0x0 <auth upap>]

The NT host obligingly responds by requesting PAP, which VxWorks acknowledges.

ppp1: rcvd [LCP ConfAck id=0x43 <mru 1500> <magic 0x28f69> <pcomp> <accomp>]ppp1: rcvd [LCP ConfReq id=0x1 <asyncmap 0x0 > <auth upap> <magic 0xc6e> <pcomp><accomp>]ppp1: sent [LCP ConfAck id=0x1 <asyncmap 0x0> <auth upap> <magic 0xc6e> <pcomp><accomp>]

VxWorks authenticates the user and password using PAP.

ppp1: sent [PAP AuthReq id=0x1 user="vxWorks" password="password"]ppp1: rcvd [PAP AuthAck id=0x1msg=""]ppp1: Remote message:

After LCP and authentication have been negotiated, VxWorks begins negotiation of the Network Protocol,IPCP.

ppp1: sent [IPCP ConfReq id=0x7c <addr 90.0.0.2> <compress VJ 0f 01>]ppp1: rcvd [proto=0x80fd] 01 02 00 d5 fe cb 01 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 74 ff c9 00 00 00 00 00 c8 00 00 00 dc 00 00 00 6f 72 6b 69 05 00 00 00 e8 00 00 00 e0 00 00 00 e4 00 00 00 31 6c f1 77 84 00 00 00 00 00 00 00 0b 24 1a 75 00 00 00 00ppp1: 00 00 00 00 e8 fe c9 00 90 c6 f1 77 06 00 00 00 00 00 00 00 00 00 00 00 000 00 80 00 20 00 00ppp1: 00 0e 00 b0 b9 14 00 b8 00 14 00 43 00 3a 00 5c 00 57 00 49 00 4e 00 4e 00 54 00 5c 00 53 00 79 00 73 00 74 00 65 00 6d 00 33 00 32 12 06 00 00 00 06ppp1: input: Unknown protocol (80fd) received!ppp1: sent [LCP ProtRej id=0x44 80 fd 01 02 00 d5 fe cb 01 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 74 ff c9 00 00 00 00 00 c8 00 00 00 dc 00 00 00 6f 72 6b 69 05 00 00 00 e8 00 00 00 e0 00 00 00 e4 00 00 00 31 6c f1 77 84 00 00 00 00 00 00 00 0b 24 1a 75ppp1: 00 00 00 00 00 00 00 00 e8 fe c9 00 90 c6 f1 77 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 80ppp1: 00 20 00 00 00 0e 00 b0 b9 14 00 b8 00 14 00 43 00 3a 00 5c 00 57 00 49 00 4e 00 4e 00 54 00 5c 00 53 00 79 00 73 00 74 00 65 00 6d 00 33 00 32 12 06 0000 00 06]ppp1: rcvd [IPCP ConfReq id=0x3 <compress VJ 0f 01> <addr 90.0.0.1>]ppp1: sent [IPCP ConfAck id=0x3 <compress VJ 0f 01> <addr 90.0.0.1>]ppp1: rcvd [IPCP ConfAck id=0x7c <addr 90.0.0.2> <compress VJ 0f 01>]ppp1: local IP address 90.0.0.2ppp1: remote IP address 90.0.0.1ppp1: rcvd [IPCP ConfReq id=0x3 <compress VJ 0f 01> <addr 90.0.0.1>]ppp1: sent [IPCP ConfReq id=0x7d <addr 90.0.0.2> <compress VJ 0f 01>]ppp1: sent [IPCP ConfAck id=0x3 <compress VJ 0f 01> <addr 90.0.0.1>]ppp1: rcvd [proto=0x80fd] 01 02 00 d5 fe cb 01 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 74 ff c9 00 00 00 00 00 c8 00 00 00 dc 00 00 00 6f 72 6b 69 05 00 00 00 e8 00 00 00 e0 00 00 00 e4 00 00 00 31 6c f1 77 84 00 00 00 00 00 00 00 0b 2

PPP between VxWorks and WinNT 4.x WTN-50

50-21

4 1a 75 00 00 00 00ppp1: 00 00 00 00 e8 fe c9 00 90 c6 f1 77 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 80 00 20 00 00ppp1: 00 0e 00 b0 b9 14 00 b8 00 14 00 43 00 3a 00 5c 00 57 00 49 00 4e 00 4e 00 54 00 5c 00 53 00 79 00 73 00 74 00 65 00 6d 00 33 00 32 12 06 00 00 00 06ppp1: input: Unknown protocol (80fd) received!ppp1: sent [LCP ProtRej id=0x45 80 fd 01 02 00 d5 fe cb 01 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 74 ff c9 00 00 00 00 00 c8 00 00 00 dc 00 00 00 6f 72 6b 69 05 00 00 00 e8 00 00 00 e0 00 00 00 e4 00 00 00 31 6c f1 77 84 00 00 00 00 00 00 00 0b 24 1a 75ppp1: 00 00 00 00 00 00 00 00 e8 fe c9 00 90 c6 f1 77 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 80ppp1: 00 20 00 00 00 0e 00 b0 b9 14 00 b8 00 14 00 43 00 3a 00 5c 00 57 00 49 00 4e 00 4e 00 54 00 5c 00 53 00 79 00 73 00 74 00 65 00 6d 00 33 00 32 12 06 0000 00 06]ppp1: rcvd [IPCP ConfReq id=0x4 <compress VJ 0f 01> <addr 90.0.0.1>]ppp1: sent [IPCP ConfAck id=0x4 <compress VJ 0f 01> <addr 90.0.0.1>]ppp1: rcvd [IPCP ConfAck id=0x7d <addr 90.0.0.2> <compress VJ 0f 01>]ppp1: local IP address 90.0.0.2ppp1: remote IP address 90.0.0.1ppp1: rcvd [IPCP ConfReq id=0x4 <compress VJ 0f 01> <addr 90.0.0.1>]ppp1: sent [IPCP ConfReq id=0x7e <addr 90.0.0.2> <compress VJ 0f 01>]ppp1: sent [IPCP ConfAck id=0x4 <compress VJ 0f 01> <addr 90.0.0.1>]ppp1: rcvd [IPCP ConfReq id=0x5 <compress VJ 0f 01> <addr 90.0.0.1>]ppp1: sent [IPCP ConfAck id=0x5 <compress VJ 0f 01> <addr 90.0.0.1>]ppp1: rcvd [IPCP ConfAck id=0x7e <addr 90.0.0.2> <compress VJ 0f 01>]ppp1: local IP address 90.0.0.2ppp1: remote IP address 90.0.0.1done.value = 0 = 0x0

A PPP connection is established. The NT side is assigned an IP address of 90.0.0.1; the VxWorks side isassigned the IP address of 90.0.0.2.

6.6 Confirm PPP Interface is “UP”

“I” and “ifShow” verify PPP is running and that the PPP interface is ‘UP.”

-> i

NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY---------- ------------ -------- --- ---------- -------- -------- ------- -----. . .tNetTask _netTask 3e9290c 50 PEND 14b424 3e928b4 0 0tPPP1 _ppp_task 3e6db74 55 PEND 151a74 3e6da00 0 0tPPP1Wrt _ppp_wrt_tas 3e639ac 60 PEND 14b424 3e63938 0 0value = 0 = 0x0

-> ifShow

ppp (unit number 1): Flags: (0x8071) UP POINT-TO-POINT MULTICAST ARP RUNNING Type: PPP Internet address: 90.0.0.2 Destination Internet address: 90.0.0.1 Netmask 0xff000000 Subnetmask 0xff000000

PPP between VxWorks and WinNT 4.x WTN-50

50-22

Metric is 0 Maximum Transfer Unit size is 1500 14 packets received; 14 packets sent 0 multicast packets received 0 multicast packets sent 0 input errors; 0 output errors 0 collisions; 0 droppedvalue = 29 = 0x1d

6.7 Ping the NT Host from VxWorks

Ping the NT Host from VxWorks to confirm the PPP link is operative.

-> ping "90.0.0.1",3PING 90.0.0.1: 56 data bytes64 bytes from 90.0.0.1: icmp_seq=0. time=112. ms64 bytes from 90.0.0.1: icmp_seq=1. time=112. ms64 bytes from 90.0.0.1: icmp_seq=2. time=112. ms----90.0.0.1 PING Statistics----3 packets transmitted, 3 packets received, 0% packet lossround-trip (ms) min/avg/max = 112/112/112value = 0 = 0x0

From a DOS prompt on NT, ping the VxWorks using the following command:

D: ping 90.0.0.2

(By default, NT will send three packets if the number of packets is not specified.)

6.8 Terminate the PPP Session

Again, call pppDelete( ) to terminate the PPP session.

-> pppDelete(1)value = 0 = 0x0-> ppp1: sent [LCP TermReq id=0x46]

PPP between VxWorks and WinNT 4.x WTN-50

50-23

7. Troubleshooting

In preparing and testing this tech note, probably every possible error was committed. They range from thehideous— making changes to config.h in the wrong bsp directory (and then wondering why the changeswere not reflected in the vxWorks image) to the totally inexplicable and frustrating— the apparent necessityto reboot NT two or even three times for no apparent reason.

A serious troubleshooting suggestion is to reboot the NT host. After configuring RAS and DUN, alwaysreboot the NT host. If a PPP connection repeatedly fails, reboot NT.

These troubleshooting hints correspond generally to the processes

7.1 Physical connection

The physical cable is very simple. Only three wires were connected. TX and RX, pins 2 and 3, werecrossed and GND, pin 5 was connected on both ends. Again, check this cable by swapping it with that usedfor the PC console. Be sure both serial ports on the target and NT host function properly.

7.2 VxWorks as the PPP “server”

Verify that the PPP options SILENT and PASSIVE are defined in config.h. If not defined, when usrPPPInit iscalled, instead of the PPP tasks sitting and waiting, one can expect the target to try and initiate a connectionwith the NT and quickly timeout without any response. Below is a sample output:

-> <x8610SEN/target/config/pc486/pppServerusrPPPInit ("ppp=/tyCo/1,19200",1,"90.0.0.50", "90.0.0.60")Attaching network interface ppp1...ppp1: ppp 2.1.2 started by keithkppp1: Connect: ppp1 <--> /tyCo/1ppp1: sent [LCP ConfReq id=0x97 <mru 1500> <magic 0xfb35> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x97 <mru 1500> <magic 0xfb35> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x97 <mru 1500> <magic 0xfb35> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x97 <mru 1500> <magic 0xfb35> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x97 <mru 1500> <magic 0xfb35> <pcomp> <accomp>]ppp0: timeout: could not establish link with peer.value = -1 = 0xffffffff = pppfd + 0xfc102af7

The ppp1 interface is attached by VxWorks and configuration request messages are sent. No reply isreceived from the NT and the PPP tasks time out.

7.3 Dial-up Networking on NT

NT does not provide useful error information if DUN fails to connect. The following are the most commonerrors are:

Error 633 Port is already in use or is not configured for Remote Access dial out.

Error 651: Your modem (or other connecting device) has reported an error.

Error 732 PPP negotiation is not converging.

PPP between VxWorks and WinNT 4.x WTN-50

50-24

7.4 Error 633 Port is already in use or is not configured for Remote Access dial out.

After the “Dial” button is clicked on the DUN phone book entry for PPP, a message box reports that DUN is“Dialing… ” and this error may be displayed.

Clicking on “More Info” produces a help screen. The port may not have been properly hung up previouslyor as the help indicates, RAS is not properly configured. Review section 4.3 and verify that for COM2, Dialout and receive calls is selected. If this needs to be modified, be sure to click on “Continue” in theNetwork control panel. NT will need to be rebooted.

Review the settings for the DUN phone book entry.

Just as often, the serial port is hung. Sometimes connecting and disconnecting the DB9 connector fromCOM2 once or twice will correct this.

If not, reboot the NT.

7.5 Error 651: Your modem (or other connecting device) has reported an error.

This is the most frequently displayed error during Dial up Networking. It is also the least helpful. This couldindicate anything from a bad physical connection to an incorrect setting of almost any kind.

After checking the physical connection, check the vxWorks target. Use “I” to check if ppp tasks are running:

-> i

NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY---------- ------------ -------- --- ---------- -------- -------- ------- -----

tPPP1 _ppp_task 3e6d6e8 55 PEND 151a64 3e6d574 0 0tPPP1Wrt _ppp_wrt_tas 3e639ac 60 PEND 14b414 3e63938 0 0

PPP between VxWorks and WinNT 4.x WTN-50

50-25

If these tasks don’t appear in the task list, was usrPPPInit run to start the tasks on the target before DialupNetworking from NT was attempted?

If so, hopefully the VxWorks was configured to include the DEBUG options and some debug messageswere output on the target console. Did usrPPPInit execute properly?

The output should not look like the example under “VxWorks as the PPP server” above and end with thestatement:

-> <x8610SEN/target/config/pc486/pppServer. . .ppp0: timeout: could not establish link with peer.value = -1 = 0xffffffff = pppfd + 0xfc102af7. . .ppp1: sent [LCP TermReq id=0x4]

Again, if this output appears, VxWorks is probably not built with the correct PPP options to be configured asthe server. Compare config.h with the instructions in Section 5.1.

Recheck the physical connection between the host and target.

If the cable is good and usrPPPInit executed correctly, focus on the NT configuration.

Check all Dialup Network phone book entry, Modem and Port settings.

Is the baud rate set correctly in the DUN phone book entry and “Modem and “Port” control panels? Dothey all match the baud rate passed to usrPPPInit (19200 in this example)?

“Hardware flow control” should not be selected as an option.

Remove the DB9 from the NT’s COM2 port and reinsert it a couple of times.

If DUN is still unable to dial in to the VxWorks target, reboot the NT.

7.6 Error 732 PPP negotiation is not converging.

In the event this error appears, dialing completes successfully and the link layer connection has beennegotiated. The “Dialing.” message is replaced with “Verifying username and password… ” and Error 732 isdisplayed.

PPP between VxWorks and WinNT 4.x WTN-50

50-26

The “Help” information indicates the peers could not successfully negotiate the options. In the case thatproduced this message, the NT host Dial up Network entry was configured in the “Security” dialog box to"Accept only Microsoft encrypted authentication".

The particular debug messages show that in the course of negotiation, VxWorks sends a configuration NTresponds with a negative configuration acknowledgement and “suggests” MS CHAP be used forauthentication.

ppp1: sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x486e> <pcomp> <accomp>]ppp1: rcvd [LCP ConfNak id=0x10 <auth chap 80>]

After several such exchanges, NT gives up and sends a termination request, which VxWorksacknowledges.

ppp1: rcvd [LCP TermReq id=0x2 00 00 02 dc]ppp1: sent [LCP TermAck id=0x2]

After several such exchanges, NT gives up and sends a termination request, which VxWorksacknowledges. It continues to send configuration requests until the PPP timer expires.

ppp1: sent [LCP ConfReq id=0x18 <mru 1500> <magic 0x6e8f16f> <pcomp> <accomp>]ppp1: LCP: timeout sending Config-Requests

MS-CHAP is Microsoft’s version of CHAP authentication. MS-CHAP is not in compliance with RFC1700and is not supported by VxWorks’ PPP implementation. If NT has been configured to require Microsoft’sauthentication, it will be unable to establish a PPP session with VxWorks.

In the event error 732 occurs, examine the PPP debug messages for hints about the PPP option on whichan agreement cannot be reached. The VxWorks Network Programmer’s Guide (for Tornado 2 users) or theTornado Programmer’s Guide or SENS for Tornado documentation offer brief descriptions of the numerousPPP options.

7.7 VxWorks as the PPP Client

7.7.1 Check config.h

Before attempting to connect, check config.h and be sure the correct PPP Options are defined.

#undef PPP_OPT_NO_CHAP#define PPP_OPT_NO_CHAP 1#undef PPP_STR_PAP_USER_NAME#define PPP_STR_PAP_USER_NAME "vxWorks" /* username for PAP peer auth */#undef PPP_STR_PAP_PASSWD#define PPP_STR_PAP_PASSWD "password" /* password for PAP peer auth */

Make sure the PAP user name and password coincide with those entered on the NT User Manager.

7.7.2 Check Remote Access Service on NT

Before attempting to dial in from VxWorks to NT, verify that Remote Access Service is running. Refer toSection 4.10.

From the “Start” bar, navigate to Settings => Control Panel => Services and verify that Remote AccessServer is “Started.”

PPP between VxWorks and WinNT 4.x WTN-50

50-27

Although Remote Access Server may have been configured to start Automatically at boot time, it wasnot unusual to find it RAS in a Manual startup mode and stopped. If the VxWorks client is not able toestablish a connection with NT, RAS may have been stopped.

If it is not started, click the “Start” button. A watch will appear with the message: “RAS is beingstarted on host.”

7.8 VxWorks hangs when trying to read the serial port

The first indication that something is wrong may be that VxWorks is unable to read from the serial port. Aftersending the string “CLIENT” to wake up RAS on the NT, VxWorks may just hang at this point.

7.8.1 Remove and reinsert DB9 from COM2 of NT

Before giving up and rebooting the target, try popping out the DB9 from COM2 of the NT host andquickly reinserting it. This is usually enough to allow VxWorks to complete the script and run usrPPPInit.usrPPPInit will usually fail to establish a connection. The output may look like this:

-> <x8610SEN/target/config/pc486/pppClientpppfd=open("/tyCo/1",2);new symbol "pppfd" added to symbol table.pppfd = 0x3efd508: value = 7 = 0x7pppString=malloc(100);new symbol "pppString" added to symbol table.pppString = 0x3efd46c: value = 66049148 = 0x3efd47c = pppString + 0x10write pppfd, "Client",6;value = 6 = 0x6taskDelay (2*sysClkRateGet());value = 0 = 0x0read pppfd, pppString,100;

Here is where VxWorks frequently hangs. Pop out the cable and reinsert it. Try itagain, if it continues to hang.

value = 1 = 0x1printf pppString; îîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîtÔï�value = 105 = 0x69 = 'i'

Note that NT has not sent the “CLIENT SERVER” string back. RAS has not responded.

usrPPPInit ("ppp=/tyCo/1,19200",1,"90.0.0.2", "90.0.0.1")Attaching network interface ppp1...ppp1: ppp 2.1.2 started by keithkppp1: Connect: ppp1 <--> /tyCo/1ppp1: sent [LCP ConfReq id=0x3 <mru 1500> <magic 0x90d> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x3 <mru 1500> <magic 0x90d> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x3 <mru 1500> <magic 0x90d> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x3 <mru 1500> <magic 0x90d> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x3 <mru 1500> <magic 0x90d> <pcomp> <accomp>]ppp0: timeout: could not establish link with peer.value = -1 = 0xffffffff = pppfd + 0xfc102af7

After rebooting VxWorks and trying to connect again, VxWorks was again unable to read the serialport. This time, by popping out the serial cable and reinserting it, If VxWorks successfullynegotiated a connection.

7.8.2 Check that RAS is running on the NT

PPP between VxWorks and WinNT 4.x WTN-50

50-28

If VxWorks continues to hang reading the serial port, check that RAS is running on the NT. Again, even ifRAS was configured to start automatically on startup, it may have gone back to a Manual mode and maybe “Stopped.” Even if RAS is started, click “Stop”, wait a couple minutes until RAS is stopped andclick “Start” again.

7.8.3 Check the baud rate and hardware flow control

Recheck the “Modem” configuration. If either the baud rate is incorrect or if it is set up to use “HardwareFlow Control” the connection will fail with the same error that appears above.

7.84 Try removing the statement: read pppfd from the script.

7.9 usrPPPInit times out trying to connect

In this case RAS on the NT responds, but no connection is established:

-> <x8610SEN/target/config/pc486/pppClient2pppfd=open("/tyCo/1",2);pppfd = 0x3efd508: value = 14 = 0xepppString=malloc(100);pppString = 0x3efd46c: value = 65444480 = 0x3e69a80write pppfd, "Client",6;value = 6 = 0x6taskDelay (2*sysClkRateGet());value = 0 = 0x0read pppfd, pppString,100;value = 29 = 0x1dprintf pppString;~ÿ}#À!}&"} }$¯}.~CLIENTSERVERvalue = 29 = 0x1dusrPPPInit ("ppp=/tyCo/1,57600",1,"90.0.0.2", "90.0.0.1")Attaching network interface ppp1...ppp1: ppp 2.1.2 started by keithkppp1: Connect: ppp1 <--> /tyCo/1ppp1: sent [LCP ConfReq id=0x5f <mru 1500> <magic 0xa459> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x5f <mru 1500> <magic 0xa459> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x5f <mru 1500> <magic 0xa459> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x5f <mru 1500> <magic 0xa459> <pcomp> <accomp>]ppp1: sent [LCP ConfReq id=0x5f <mru 1500> <magic 0xa459> <pcomp> <accomp>]ppp0: timeout: could not establish link with peer.value = -1 = 0xffffffff = pppfd + 0xfc102af7

Check config.h to be sure PPP_OPT_NOCHAP is defined and that NT does not expect the peer to useMS-CHAP authentication.

-> <pppStartpppfd=open("/tyCo/1",2);pppfd = 0x1efd540: value = 8 = 0x8ioctl(pppfd,4,19200)value = 0 = 0x0pppString=malloc(100);pppString = 0x1efd4a4: value = 31929284 = 0x1e733c4write pppfd, "Client",6;value = 6 = 0x6taskDelay (2*sysClkRateGet());value = 0 = 0x0

PPP between VxWorks and WinNT 4.x WTN-50

50-29

read pppfd, pppString,100;value = 12 = 0xcprintf pppString;CLIENTSERVERì3ç�Ûó�value = 19 = 0x13usrPPPInit ("ppp=/tyCo/1,19200",1,"90.0.0.2", "90.0.0.1")Attaching network interface ppp1...ppp1: ppp 2.1.2 started by keithkppp1: Connect: ppp1 <--> /tyCo/1ppp1: sent [LCP ConfReq id=0xbb <mru 1500> <magic 0x2de0> <pcomp> <accomp>]ppp1: rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap 80> <magic 0x2861> <pcomp> <accomp>]ppp1: sent [LCP ConfRej id=0x0 <auth chap 80>]

…ppp1: sent [LCP ConfReq id=0xff <mru 1500> <magic 0x2de0> <pcomp> <accomp>]ppp0: timeout: could not establish link with peer.value = -1 = 0xffffffff = pppfd + 0xfe102abfè ppp1: sent [LCP TermReq id=0xbc]

In addition to PPP options incorrectly defined, check the IP addresses requested by VxWorks

The PPP debug messages printed on the target should give some hint about the IP address beingunsuccessfully negotiated.

Do the IP addresses correspond to pool of addresses from which RAS can assign?

Is RAS configured to allow the peer to request specific IP addresses?

7.10 PPP session seems to be established but PPP interface is down

VxWorks may appear to dialin to NT. RAS responds as expected with the “CLIENT SERVER string. If theDial-Up Monitor LEDs are visible, Carrier Detect (CD) might even be lit. However, ping fails and ifShowindicates that, although the ppp1 interface was attached, it is “DOWN”. PPP tasks are running on the target.

Again, recheck config.h. The SILENT and PASSIVE options may be defined. The following are the debugmessages one would expect to see if this is the case.

-> <x8610SEN/target/config/pc486/pppClientpppfd=open("/tyCo/1",2);new symbol "pppfd" added to symbol table.pppfd = 0x3e6cacc: value = 7 = 0x7pppString=malloc(100);new symbol "pppString" added to symbol table.pppString = 0x3e6ca30: value = 65456704 = 0x3e6ca40 = pppString + 0x10write pppfd, "Client",6;value = 6 = 0x6taskDelay (2*sysClkRateGet());value = 0 = 0x0read pppfd, pppString,100;value = 12 = 0xcprintf pppString;CLIENTSERVERîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîîî8Êæ�value = 105 = 0x69 = 'i'usrPPPInit ("ppp=/tyCo/1,19200",1,"90.0.0.2", "90.0.0.1")Attaching network interface ppp1...ppp1: ppp 2.1.2 started by keithkppp1: Connect: ppp1 <--> /tyCo/1done.

PPP between VxWorks and WinNT 4.x WTN-50

50-30

value = 0 = 0x0

-> i

NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY---------- ------------ -------- --- ---------- -------- -------- ------- -----

tPPP1 _ppp_task 3e6c734 55 PEND 151a64 3e6c5c0 0 0tPPP1Wrt _ppp_wrt_tas 3e624a0 60 PEND 14b414 3e6242c 0 0value = 0 = 0x0

-> ifShow

ppp (unit number 1): Flags: (0x8070) DOWN POINT-TO-POINT MULTICAST ARP RUNNING Type: PPP Netmask 0x18ee00 Subnetmask 0x18ee00 Metric is 0 Maximum Transfer Unit size is 1500 0 packets received; 0 packets sent 0 multicast packets received 0 multicast packets sent 0 input errors; 0 output errors 0 collisions; 0 droppedvalue = 29 = 0x1d

Notice that in addition to the ppp1 interface being marked as “DOWN”, no IP addresses have beenassigned to the point to point connections.

7.11 Miscellaneous Suggestions

Popping out the serial cable and reinserting it was so successful, it must be repeated here.

If everything seems correct, reboot NT and verify that RAS is still running.

Make sure that pppDelete was used to terminate the PPP connection on the VxWorks side.

Check NT’s Dialup Networking dialog box to be sure it is “Hung up.”

7.12 Dial-up Networking Monitor

Dial-up Networking Monitor, in some form, will usually be automatically displayed when “Dial” commandis initiated from Dial-up Networking. (section 5.5). This is a useful tool to verify that the PPP session hasbeen established and provides statistics about the PPP interface. Unfortunately, it is most useful once thePPP connection has been made.

7.12.1 Starting the Network Monitor

If the Network Monitor is not displayed or it has been closed, it can be opened in a number of ways.

One method to start the Dial-up Networking Monitor is to navigate from the Task Bar => Settings =>Control Panel => Dial-up Monitor.

PPP between VxWorks and WinNT 4.x WTN-50

50-31

If the DUN window is open,click on “More” and scrolldown to “Monitor Status”.

In many cases, the Dial-up Monitor automatically appearsDUN starts dialing out.

To bring up a summary and connection details, right click on thewindow’s title bar and select “Open Dial-up Monitor.”

PPP between VxWorks and WinNT 4.x WTN-50

50-32

7.12.2 Dial-up Networking Monitor Main Windows

Some form of the Dial-up Networking Monitor automatically appears when Dial-up Networking is initiated.Its main benefit is to provide statistics about the number of packets sent, possible errors and the IPaddresses

The Status window provides the mostuseful information.

The “Preferences” dialog box allows a fewoptions to be set:--under what conditions a soundwill be played, and how the Dialup Monitorwindow appears on the desktop.

PPP between VxWorks and WinNT 4.x WTN-50

50-33

The “Summary” screen has very littleinformation.

Clicking on “Details doesn’t show any details,only the IP address.

PPP between VxWorks and WinNT 4.x WTN-50

50-34

Appendix A. Installing Remote Access Service

If Remote Access Service did notappear in the “Network” controlpanel’s “Services” tab, it must beinstalled.

Click on “Add… ”

Click on “Remote AccessService.”

Double-click on “OK.”

(Don’t click “Have Disk… )

Click on “Continue.”

(If the files weren’t installed duringthe original setup, it may benecessary to specify the drive forthe CD-ROM device and \i386\directory, i.e. E:\i386\ )

PPP between VxWorks and WinNT 4.x WTN-50

50-35

After installing the necessary files, dialog boxesare presented to configure the RAS device. Beaware that RAS will present dialog boxes toconfigure the first device it detects, probablyCOMM1.

Complete the dialog boxes according to Sections4.4 and 4.3.

Click “OK.”

An entry for COM1 will be added tothe Remote Access Setup.

RAS will allow only one device toboth Dial out and Receive calls.

If COM1 is being configured, select“Dial out only.”

COM2 will be configured to both dialout and receive calls.

Click on “Network… ” to complete RASsetup.

PPP between VxWorks and WinNT 4.x WTN-50

50-36

In the “Network Configuration” dialog box:

Select “TCP/IP” for Dialout Protocols.

For “Server Settings”, allow remote clientsrunning “TCP/IP.”

For “Encryption settings”, select:”Allow anyauthentication including clear text.”

Click on “Configure… ”

In the “RAS Server TCP/IP Configuration” dialog box, select the following parameters:

“Entire network”

and

“Use static address pool”.

Specify beginning and endingaddresses of 90.0.0.1 and 90.0.0.254,respectively. Clients will be assignedIP addresses, beginning at 90.0.0.1.

Select “Allow remote clients torequest a predetermined IPaddress.”

Click “OK”.

PPP between VxWorks and WinNT 4.x WTN-50

50-37

Appendix B. Add Dial-Up Network DeviceIf, when configuring Remote Access Setup, a device was installed for only COM1, and COM2 will be usedfor a PPP connection, follow this procedure to add the Dial-up Networking Serial Cable for COM2.

Click on “Add… ”

Under the RAS device field, pulldown the menu of installed modemdevices and select “COM2 – Dial-upNetworking Serial Cable.”

If this selection does not appear, click“Install Modem… ”

Select “Don’t detect my modem; Iwill select it from a list.”

Click on “Next >”

PPP between VxWorks and WinNT 4.x WTN-50

50-38

Under (NULL Modem Types),select “RAS Serial Cable between2 PCs.”

Click on “Next > “

Select “COM2”

Click on “Next >”

Click “OK”

Click “Finish.”