Goal: How to do networking with SIM NT
Goal: Setup Networking on Full VxSim (SIM NT) on Windows NT
Fact: VxSim for Windows NT
Fact: Windows NT 4.0
Fact: Tornado / 2.0
Fact: VxWorks / 5.4
Fact: simpc
Fix: This solution describes how to configure the full VxSim or Sim NT
on WinNT, build VxWorks, launch two VxSim targets, and ping each other.
Details:
The full VxSimulator product is a BSP and requires the appropriate Tornado object.
// Presence of this file indicates that the full simulator has been installed.
Please follow the instructions in the VxWorks 5.4 Programmer's Guide, pp.
551-552 (Appendix H.5 VxSim Networking Component, "Installing ULIP on a
Windows NT Host").
Basically, this section describes how to navigate to the Network control
panel:
Settings > Control Panel > Network
Select the "Adapters" tab, and install the ULIP driver by specifying the
path to the driver, located in your Tornado installation at
../host/x86-w2in32/bin.
IMPORTANT:
However, for IP address enter the following:
90.0.0.254
instead of the value listed in the Programmer's Guide, which is
90.0.0.255. The 255 is incorrect and specifies the broadcast address.
Again, 255 is wrong; use 254.
If the ULIP driver has already been installed and it is necessary to
modify or to verify the settings, do the following:
For one vxSim target to talk to another, IP forwarding needs to be turned
on.
To turn on IP forwarding on NT:
After all these changes, you should be prompted that it is necessary to shutdown and restart WinNT.
Locate config.h and the following lines:
/* * The default configuration is no network. If you've installed the * full featured simulator (unbundled), change TRUE to FALSE below. */ #if TRUE /* change this to FALSE for full VxSim */ #undef INCLUDE_NETWORK #undef INCLUDE_NET_INIT #undef WDB_COMM_TYPE #define WDB_COMM_TYPE WDB_COMM_PIPE #undef WDB_TTY_TEST #else /* !TRUE */ #define INCLUDE_END #endif
Change the TRUE to FALSE, per the comment above.
Do this before you build a project based on simpc!!
Create a new project, which should be a downloadable vxWorks boot image, based on the bsp: simpc.
Configure the new Project to include a target shell, symbol table, show
routines, net show routines and ping.
Using the Project facility, identify the following components and
include them.
Launch a VxSim target by clicking on VxSim icon in tool bar. From the
dialog box that appears, select "Custom-built simulator".
Click on "Browse" and navigate to the directory where the vxWorks.exe
image is located, i.e. D:\T2sim\target\proj\simPROJ\default\vxWorks.exe
A "VxWorks Simulator for Windows" window appears:
0x4b9aeb0 Attached TCP/IP interface to nt unit 0 Attaching interface lo0...done Loading symbol table from host:D:/T2sim/target/proj/fullSimNT2/default/vxWorks.exe.sym ...done VxWorks Copyright 1984-1998 Wind River Systems, Inc. CPU: VxSim for Windows VxWorks: 5.4 BSP version: 1.1/1 Creation date: Jul 7 1999 WDB: Ready.
When the target is successfully launched, a window automatically appears: "VxSim Launch: Launch Target Server". A message reads:
"A Target Server named "vxsim@heiwa" is required and will be started."
IMPORTANT: click on CANCEL
Clicking on OK launches a target server that fails:
"tgtsvr (vxTarget@heiwa): Wed Aug 25 00:17:08 1999 Wind River Systems Target Server: NT/Win95 version Error: Target vxsim5 unknown. Attach failed. Error: Backend initialization routine failed. Problem during Backend initialization Target Server will exit"
And then an error box also appears:
Target Server failed to initialize before timeout.
(The automatically launched target server fails because the name of the target is vxTarget, as hostShow will indicate later. The name of the target is hardcoded in configAll.h to vxTarget.)
INSTEAD, from Tornado menu: select Tools > Target Server
Configure the target server to use wdbrpc backend, to attach to a target
with IP address 90.0.0.1. The target server command line should look like
this:
tgtsvr.exe 90.0.0.1 -n vxTarget1 -V -B wdbrpc -R d\ -RW
Click on "Launch"
Confirm that the Target Server connected to the target by
double-clicking on the small red and white, bulls-eye icon that appears
in the lower right hand corner of the desktop.
A window called vxTarget1@heiwa Log Console appears and contains something like the following text:
tgtsvr (vxTarget1@heiwa): Tue Aug 24 23:13:59 1999 Wind River Systems Target Server: NT/Win95 version Connecting to target agent... succeeded. Attaching C++ interface... succeeded. Attaching pecoff OMF reader for SIMNT CPU family... succeeded.
Launch windsh and run ifShow
Copyright 1995-1999 Wind River Systems, Inc. C++ Constructors/Destructors Strategy is AUTOMATIC -> ifShow nt (unit number 0): Flags: (0xf1) UP POINT-TO-POINT RUNNING Type: ETHERNET_CSMACD Internet address: 90.0.0.1 Destination Internet address: 0.0.0.0 Netmask 0xff000000 Subnetmask 0xff000000 Metric is 0 Maximum Transfer Unit size is 1520 0 packets received; 1 packets sent 0 multicast packets received 0 multicast packets sent 0 input errors; 0 output errors 0 collisions; 0 dropped lo (unit number 0): Flags: (0x8069) UP LOOPBACK RUNNING ARP MULTICAST Type: SOFTWARE_LOOPBACK Internet address: 127.0.0.1 Netmask 0xff000000 Subnetmask 0xff000000 Metric is 0 Maximum Transfer Unit size is 32768 0 packets received; 0 packets sent 0 multicast packets received 0 multicast packets sent 0 input errors; 0 output errors 0 collisions; 0 dropped value = 0 = 0x0
Launch a second VxSim target by clicking on the VxSim icon, and use
processor 1 (instead of 0).
Follow the same procedure as above to launch a second target server. The
IP address of the target is 90.0.0.2 (if processor 1 was used).
VxSimNT targets can be numbered from 0-9. IP addresses from 90.0.0.1
through 90.0.0.10
(Unlike VxSim on Solaris using ULIP which supports up to 15 targets,
full VxSimNT only supports up to 10 targets.)
Selecting target server "VxSim2@heiwa", start another Windsh:
Copyright 1995-1999 Wind River Systems, Inc. C++ Constructors/Destructors Strategy is AUTOMATIC ->
hostShow identifies the VxSim target as "vxTarget" with an IP address of 90.0.0.2.
-> hostShow hostname inet address aliases -------- ------------ ------- vxTarget 90.0.0.2 localhost 127.0.0.1 host 90.0.0.254 value = 0 = 0x0 -> ifShow nt (unit number 0): Flags: (0xf1) UP POINT-TO-POINT RUNNING Type: ETHERNET_CSMACD Internet address: 90.0.0.2 Destination Internet address: 0.0.0.0 Netmask 0xff000000 Subnetmask 0xff000000 Metric is 0 Maximum Transfer Unit size is 1520 4 packets received; 5 packets sent 0 multicast packets received 0 multicast packets sent 0 input errors; 0 output errors 0 collisions; 0 dropped lo (unit number 0): Flags: (0x8069) UP LOOPBACK RUNNING ARP MULTICAST Type: SOFTWARE_LOOPBACK Internet address: 127.0.0.1 Netmask 0xff000000 Subnetmask 0xff000000 Metric is 0 Maximum Transfer Unit size is 32768 0 packets received; 0 packets sent 0 multicast packets received 0 multicast packets sent 0 input errors; 0 output errors 0 collisions; 0 dropped value = 0 = 0x0
Vxsim targets can now ping each other:
From Windsh of target 90.0.0.2:
-> ping "90.0.0.1",3 PING 90.0.0.1: 56 data bytes 64 bytes from 90.0.0.1: icmp_seq=0. time=48. ms 64 bytes from 90.0.0.1: icmp_seq=1. time=64. ms 64 bytes from 90.0.0.1: icmp_seq=0. time=1072. ms ----90.0.0.1 PING Statistics---- 2 packets transmitted, 3 packets received, -50% packet loss round-trip (ms) min/avg/max = 48/394/1072 value = 0 = 0x0 ->
From WinNT DOS command prompt, ping the targets:
c:\tornado> ping 90.0.0.1 Pinging 90.0.0.1 with 32 bytes of data: Reply from 90.0.0.1: bytes=32 time=30ms TTL=64 Reply from 90.0.0.1: bytes=32 time=10ms TTL=64 Reply from 90.0.0.1: bytes=32 time=10ms TTL=64 Reply from 90.0.0.1: bytes=32 time<10ms TTL=64 c:\tornado> ping 90.0.0.2 Pinging 90.0.0.2 with 32 bytes of data: Reply from 90.0.0.2: bytes=32 time=30ms TTL=64 Reply from 90.0.0.2: bytes=32 time=10ms TTL=64 Reply from 90.0.0.2: bytes=32 time=10ms TTL=64 Reply from 90.0.0.2: bytes=32 time=10ms TTL=64
|