MiniTutorial: Adding a Network Card and RT

Transcription

MiniTutorial: Adding a Network Card and RT
RTX MiniTutorial
ADDING A NETWORK CARD AND
RT-TCP/IP SUPPORT
Copyright © 1996-2015 by IntervalZero, Inc. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means, graphic, electronic, or mechanical, including
photocopying, and recording or by any information storage or retrieval system without the prior written permission of IntervalZero, Inc.
unless such copying is expressly permitted by federal copyright law.
While every effort has been made to ensure the accuracy and completeness of all information in this document, IntervalZero, Inc.
assumes no liability to any party for any loss or damage caused by errors or omissions or by statements of any kind in this document,
its updates, supplements, or special editions, whether such errors, omissions, or statements result from negligence, accident, or any
other cause. IntervalZero, Inc. further assumes no liability arising out of the application or use of any product or system described
herein; nor any liability for incidental or consequential damages arising from the use of this document. IntervalZero, Inc. disclaims all
warranties regarding the information contained herein, whether expressed, implied or statutory, including implied warranties of
merchantability or fitness for a particular purpose.
IntervalZero, Inc. reserves the right to make changes to this document or to the products described herein without further notice.
Microsoft, MS, and Win32 are registered trademarks and Windows 7, Windows Vista, Windows XP, and Windows Server 2003 are
trademarks of Microsoft Corporation.
All other companies and product names may be trademarks or registered trademarks of their respective holders.
MiniTutorial: Add a Network Card and RT-TCP/IP Support
IZ-DOC-X86-0055
April 2015
400 Fifth Avenue
www.intervalzero.com
Fourth Floor
Waltham, MA 02451
Phone: 781-996-4481
Overview
IntervalZero’s RTX software supports several Network Interface Cards (NICs). This RTX MiniTutorial will walk
you through the steps of selecting a NIC, adding RTX hardware support for your new card, and configuring
local network parameters.
To ensure you are running in a supported environment, please read the section Preparing your RTX
Environment in the document RTX Quick Start Guide, available in the RTX Help documentation.
IZ-DOC-X86-0055
1
Overview
Adding NIC Support
To add NIC support, do the following:
l
Select and install a supported NIC
l
Add the device to the Setup Information File (.inf)
l
Activate the RTX driver for the device
l
Configure and enable RT-TCP/IP Support
If you have multiple cards with the same vendor and device identifiers, read the section Selecting From
Multiple Cards at the end of this document.
Select and Install a Supported NIC
Before selecting a NIC to use, check the FactSheet titled RTX Supported Network Interface Cards available from
a link on the IntervalZero Support page (http://www.intervalzero.com/technical-support/guides-andminitutorials/). For this example, we've selected to use the Intel® 82574L Gigabit Network Connection.
After placing new hardware in your system, the next time Windows starts up, if a supported driver exists, it
will be installed. After a Windows driver has been installed, it will show up in the Windows Device Manager
window. To view the Device Manager window, right-click My Computer and select Properties from the pulldown menu. In the System Properties window, select the Hardware tab and then click Device Manager.
Ensure that your card is not currently being relied on by Windows.
IZ-DOC-X86-0055
2
Adding NIC Support
Add Device to the Setup Information File (.INF)
1. Open the RTX Properties control panel by selecting IntervalZero > RTX 2012 > RTX Properties from
the start menu.
2. Click the Hardware tab and then click Settings.
3. Right-click the device name and then click Add RTX INF Support on the pop-up menu.
IZ-DOC-X86-0055
3
Adding NIC Support
4. Click Apply to have the device added to the RTX setup information file.
If you receive the following warning, click OK to continue.
Conversion will cause the line:
"Intel(R) 82574L Gigabit Network Connection #6 RTX Supported"=IZRtxPnPNetDrv,"PCI\VEN_
8086&DEV_10D3&SUBSYS_A01F8086&REV_00"
To be added to the file %SYSTEMROOT%\inf\RtxPnpNet.inf.
NOTE: If you are adding a device that does not have a windows driver, you might not see the
device in the RTX properties control panel. In this case, you will need to manually add a line for
your device under the [VCI] section of the RtxPNP.inf setup information file, using the format:
“<DEVICE_NAME> RTX Supported”=RtxPnP_Inst,”<HARDWARE_ID>”
Associate the RTX Device Driver
1. Click Device Manager in the Pnp Device Settings window to open the RTX Device Manager window.
IZ-DOC-X86-0055
4
Adding NIC Support
2. Right-click on the device name and select Update Driver... from the pop-up menu.
NOTE: If the device does not exist in the device manager section, click Scan for Hardware
changes in the pull-down menu.
When the Hardware Update Wizard begins, provide responses to indicate that the driver should not be
automatically selected, but should be located manually. The example shown below is from Windows 7.
Other operating system versions may vary slightly.
IZ-DOC-X86-0055
5
Adding NIC Support
3. When asked how to search for software, make the selection that indicates you want to locate the driver
manually, and not automatically.
IZ-DOC-X86-0055
6
Adding NIC Support
4. Continue making selections indicating that you want to manually select the device driver.
IZ-DOC-X86-0055
7
Adding NIC Support
5. Since the device was added to the RTX setup information file (RtxPnp.inf) it will now appear in the
list, with the words RTX Supported appended to the end. Select this line and click Next to allow the RTX
hardware update wizard to install the RTX driver.
NOTE: In Windows Vista and Windows 7, each time you associate a device with a driver,
Windows will make a copy of the .inf file. As a result, you may see multiple RTX Supported
lines. Selecting any of them should allow the RTX driver to be installed.
NOTE: Ignore security warnings indicating that the driver is unsigned or the publisher cannot
be verified. The RtxPnp.inf file is purposely not signed, to allow for user modification.
IZ-DOC-X86-0055
8
Adding NIC Support
The hardware update wizard will now install the appropriate driver(s).
6. When the hardware update wizard is done, click Close (or Finish).
IZ-DOC-X86-0055
9
Adding NIC Support
The Windows Device Manager window should now have the device in its list of Rtx Drivers.
NOTE: In versions of RTX prior to RTX 2009 with Service Pack 2 Update 2, Net class devices are
listed under the RTX branch in Device Manager once they are converted to RTX control.
IZ-DOC-X86-0055
10
Adding NIC Support
7. Return to the RTX PnP Device Settings window and click Refresh to see the device name under the list
of RTX Devices.
IZ-DOC-X86-0055
11
Adding NIC Support
8. To view device properties, right-click the device and select Properties from the pull-down menu.
IZ-DOC-X86-0055
12
Adding NIC Support
View properties for the newly converted device. If the device is Message Signaled Interrupt (MSI or MSIX) capable, RTX will not request a line-based resource unless line-based resources are enabled. Click
Cancel to return to the previous screen.
IZ-DOC-X86-0055
13
Adding NIC Support
Line-Based Devices
If the device only supports line-based interrupts, RTX will try to obtain an exclusive line-based resource. If
you are working with a line-based device, do the following:
1. Right-click the device and select Properties from the pull-down menu.
IZ-DOC-X86-0055
14
Adding NIC Support
2. Check Obtain line-based resource, provide IRQ and Disposition information and then click OK.
NOTE: Setting an IRQ value of 0 will cause the RTX driver to try to reserve whatever line-based
resource is available. Disposition should remain Device Exclusive unless you plan to share the
resource with another RTX device. RTX devices cannot share resources with Windows Devices.
IZ-DOC-X86-0055
15
Adding NIC Support
The system must be rebooted for changes to take effect.
After reboot, if the RTX Properties Control panel displays an exclamation point within a red circle to the
left of the device name, this means that the Subsystem was unable to get the requested line-based
resource. You can right-click and select Properties from the pop-up menu to edit device properties, or
review the document cited below, if you are running Windows XP.
NOTE: For more information on how to obtain a unique line-based IRQ when running on Windows
XP, refer to the document Working with Hardware Resource Limitations. To access this paper, log
onto the IntervalZero support page and look in the RTX Knowledge Base under the list of Hardware
topics.
IZ-DOC-X86-0055
16
Adding NIC Support
Configure the Device and Enable RTTCP/IP Support
To enable RT-TCP/IP support and correctly initialize your selected NIC card, update information in the RTX
Properties TCP/IP tab and the configuration file as shown below.
Steps:
1. If it isn't open, start up the RTX Properties control panel from the start menu by selecting:
IntervalZero > RTX 2012 > RTX Properties
IZ-DOC-X86-0055
17
Configure the Device and Enable RT-TCP/IP Support
2. Click the TCP/IP tab and look at the name of the RT-TCP/IP initialization file. In the example below, the
file is called RtxTcpip.ini.
3. Using the directory information listed in the RTX Properties TCP/IP tab Configuration file field, find and
edit the initialization file so that it includes TCP/IP configuration information for your network, and
references the correct driver for your device. To select the appropriate driver, ensure your device is on
the RTX Supported Network Interface Cards list.
A simple ini file supporting one NIC card will look like the example below; the highlighted fields should
be customized for your device and network setup.
[TCP/IP]
IZ-DOC-X86-0055
18
Configure the Device and Enable RT-TCP/IP Support
MemoryInK=256
TickInterval=200
MaxSockets=30
TimerPriority=66
NumStartupEvents=20
NumOfInterfaces=1
[rtnd0]
Driver=Rte1000
IPAddr=192.168.1.132
Netmask=255.255.255.0
InterruptPriority=64
ReceivePriority=63
NumRecvBuffers=48
NumXmitBuffers=48
LatencyRecvUpdated=0
NOTE: The driver name can be found either in the RTX Supported Network Interface Cards fact
sheet found on the http://www.intervalzero.com/technical-support/guides-and-minitutorials/
web page, or in the <RTXDIR>/drivers directory. The driver name must match the name of the
driver file without the .rtdll filetype extension. If you are not using one of the drivers provided
by IntervalZero, you will also need to register the driver with the system before enabling the
RT-TCP/IP stack. This is done with the command:
RTSSrun /d <driver name>.rtdll
The configuration information file can be saved with any name, as long as it matches the name entered
into the RTX Properties TCP/IP window. In this example, the file was saved with the name RtxTcpIpCT.ini. The Configuration file field on the TCP/IP tab of the RTX Properties control panel was
updated to reflect the new file name.
NOTE: Depending upon the version of Windows that you are using, you may not be able to
modify or create a file under the Program Files directory without changing privilege levels. If
that is the case, you can create a copy of the .ini file anywhere on your system to which you
have read/write access.
IZ-DOC-X86-0055
19
Configure the Device and Enable RT-TCP/IP Support
4. Enter the appropriate configuration file name, select the Enable RT-TCP/IP support check box and
then click Apply.
NOTE: After any changes are made to the ini file, the TCP/IP stack should be restarted for the
changes to take effect. Also, it is helpful to set verbose mode when first using RT-TCP/IP or
when making changes, to view the initialization sequence.
IZ-DOC-X86-0055
20
Configure the Device and Enable RT-TCP/IP Support
Wait while the RTX control panel configures drivers and changes process dependencies.
By enabling RT-TCP/IP Support the RT-TCP/IP stack will be treated as a required part of the RTX Subsystem.
This means on startup of the subsystem the RT-TCP/IP Stack will be started and it will load your devices
driver and your Network Interface Card will be ready to use from your RTX application.
To test the new configuration, run the RtssIpConfig or RtssPing utility, found in the <RTXDIR>/bin
directory. Entering a valid IP address, should result in a successful response.
C:\>cd "c:\Program Files\Intervalzero\RTX\bin"
c:\Program Files\IntervalZero\RTX\bin>rtssrun rtssping 192.168.1.104
IZ-DOC-X86-0055
21
Configure the Device and Enable RT-TCP/IP Support
IZ-DOC-X86-0055
22
Configure the Device and Enable RT-TCP/IP Support
Selecting From Multiple Cards
If your system has multiple NIC cards with the same Vendor and Device ID, use the following hints to ensure
you are converting the correct card for use by the RTX subsystem.
1. Collect details about the card you will use.
It is helpful to write down specific identifying details about the NIC you will be converting for use by the
RTX subsystem. This can be done using both the Windows ipconfig command and the scanbus sample
program.
a. Before converting the NIC for use by the RTX subsystem, open a command prompt and type
ipconfig/all. Output will include the machine (MAC) address of any NICs recognized by
Windows.
>ipconfig /all
Ethernet adapter Local Area Connection 3:
Media State . . . : Media disconnected
Description . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC #2
Physical Address.. : 00-40-33-5B-8F-0B
Ethernet adapter Local Area Connection 2:
Media State . . . : Media disconnected
Description . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC
Physical Address.. : 00-40-33-5B-8F-03
Write down the MAC address of the card you will be using.
b. To use the scanbus program, build and run the <RTXDIR>\samples\Pci\Scanbus project.
> rtssrun scanbus.rtss
. . .
PciData: ------------------------BusNumber:
2
DeviceNumber:
10
FunctionNumber: 0
VendorID:
0x10ec
DeviceID:
0x8139
Command:
0x105
Status:
0x290
. . .
Identify the NIC card and write down Vendor and Device ID information.
IZ-DOC-X86-0055
23
Selecting From Multiple Cards
2. Determine driver support
Using the Vendor ID and Device ID information, open the RTX Supported Network Interface Cards
document to find the driver name.
Verify that the driver exists by looking in the <RTXDIR>/drivers directory.
3. Add RTX INF Support
Follow the steps listed earlier to add NIC support so that the selected card can be used by RTX.
4. Enable RT-TCP/IP Support
Follow the steps listed earlier to configure the device and enable RT-TCP/IP Support.
When you edit the configuration file, identify the specific NIC by adding a line that includes the device
MAC address. A sample RtxTcpip.ini file is shown below.
[TCP/IP]
MemoryInK=256
TickInterval=200
MaxSockets=30
TimerPriority=66
NumStartupEvents=20
NumOfInterfaces=1
[rtnd0]
Driver=RtRtl81x9
IPAddr=192.168.123.98
Netmask=255.255.255.0
EA=0040335B8F0B
InterruptPriority=64
ReceivePriority=63
NumRecvBuffers=48
NumXmitBuffers=48
LatencyRecvUpdated=0
LineBasedOnly=0
5. Test the new configuration.
To test the new configuration, run the RtssIpConfig or RtssPing utility
IZ-DOC-X86-0055
24
Selecting From Multiple Cards
l
Use RtssRun RtssIpConfig
C:\Program Files\IntervalZero\RTX\bin>rtssrun RtssIpConfig.rtss
RtxServer console:
RtxTcpIpStack: Interface rtnd0 is up
RtxTcpIpStack: Successfully configured IPv6 address
fe80::240:33ff:fe5b:8f0b%1
RtxTcpIpStack: Successfully configured IPv4 address
l
192.168.123.98
Use RtssRun RtssPing
C:\Program Files\IntervalZero\RTX\bin>rtssrun rtssping 192.168.123.43
Pinging 192.168.123.43 with 32 bytes of data :
Reply
Reply
Reply
Reply
from
from
from
from
192.168.123.43:
192.168.123.43:
192.168.123.43:
192.168.123.43:
bytes=12
bytes=12
bytes=12
bytes=12
time=5ms
time=3ms
time=3ms
time=2ms
Ping Statistics for 192.168.123.43:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 5ms, Average = 3ms
IZ-DOC-X86-0055
25
Selecting From Multiple Cards
Resources
For more information, see the following sections in the RTX product Help:
l
The RT-TCP/IP section under Subsystem
l
The Network section of Understanding RTX Behavior under Application Development
l
l
The Hints and Tips blocks at the end of the Converting a Windows Device to an RTX Device and Converting
an RTX Device to a Windows Device sections, which can be found under Managing PCI and ISA Devices
under Subsystem
Also, visit the IntervalZero website at http://www.intervalzero.com/.
NOTE: If any problems occur with the Windows adapter after adding RTX support to the second
NIC, see the article Converting a Network Adapter card to RTX Appears to Corrupt the Remaining
Windows Adapters in the RTX Knowledge Base on the IntervalZero.com support website.
IZ-DOC-X86-0055
26
Resources