Using Rank 0, Rank 1, and Rank 2 Modem ID Strings

As stated earlier, probably the most important change you can make to your modem INF file is the placement of your modem ID strings. In the earlier example, the modem ID of the hypothetical Zippy 144 PCMCIA Data Fax Modem was "PCMCIA\ZIP-DATAFAX_14.4-77CE" and the modem ID of the Zippy 288 External Data Fax Modem was "UNIMODEMAC9AF91E." These modem ID strings were used in the INF file as shown below:


 
[Manufacturer]
%Mfg% = Models

[Models]
%Modem1% = Modem1, PCMCIA\ZIP-DATAFAX_14.4-77CE
%Modem2% = Modem2, UNIMODEMAC9AF91E

[Strings]
ClassName = "Modem"
Mfg = "Zip"
Modem1 = "Zippy 144 PCMCIA Data Fax Modem"
Modem2 = "Zippy 288 External Data Fax Modem"

In this example INF, the modem ID strings are used as Rank 0 strings. However, there are Rank 1 and Rank 2 uses of modem ID strings and this topic describes how to use those. (For a definition of Rank 0, Rank 1, and Rank 2 modem ID strings, see Rank 0, Rank 1, and Rank 2 ID Differences.)

These are the types of modem ID strings that can be obtained from modems:

Modem ID String Type

Example

Unimodem ID

UNIMODEMAC9AF91E

Serenum PNP Hardware ID

SERENUM\PPI1907

ISAPNP Hardware ID

ISAPNP\SSC0001_DEV0002 (long form) or SSC0002 (short form)

ISAPNP Compatible ID

*PNPB003

PCMCIA PNP modem ID

PCMCIA\RIPICAB-RC144ACL-3BD0

Parallel port modem ID

LPTENUM\MICROCOMTRAVELPORTE_1FF4

Platform modem ID

BIOS\*PNPC003


Note that two or three types of modem ID strings can be obtained from a single modem model. For example, from an ISA Plug and Play modem, you might be able to obtain a unimodem ID, an ISAPNP hardware ID, and an ISAPNP compatible ID.

General Strategies for Using Modem ID Strings

The primary and best strategy for using modem ID strings in your INF file is to include every type of ID string you can obtain from the modem, using the tools described in Using Tools to Obtain Modem ID Strings from Modems. Then test the modem after it is installed with the INF file and if everything works as you want, you have a workable strategy. So, for example, if your modem is a Plug and Play ISA modem, you would include three different modem ID strings in your INF: the ISAPNP HardwareID, the ISAPNP Compatible ID string (if one can be obtained from this particular modem), and the Unimodem ID string.

The above strategy is the most robust strategy because:

More Precise Strategies for Using Modem ID Strings

However, some alternate strategies might be used. Some examples of alternate strategies follow:

Rank 0, Rank 1, and Rank 2 ID Differences

Rank 0 modem ID strings are used by the Windows 95 Plug and Play system as hardware IDs. Rank 1 modem ID strings are used as compatible IDs. Using Rank 0 and Rank 1 syntax has user interface implications during a modem install which are listed below.

The syntax of the INF item that uses modem ID strings is:


 
<description> = <install section>, <hardware ID>, <compatible ID>, <Rank 2 ID>

You can use a hardware ID alone or a compatible ID alone. The Rank 2 ID is seldom used; the use of a Rank 2 ID is described below.

The rank of a modem ID string in an INF is always indicated by the number of commas in the INF item that contains the modem ID string. For example, in the example INF file listing in the previous section, there are two Rank 0 ID strings:


 
[Microsoft]
; See INF documentation for additional information on this section.
; This is the list of modems that will appear in the Install New Modem wizard's list
; of modems for this manufacturer.
%Modem1% = Modem1, PCMCIA\RIPICAB-RC144ACL-3BD0
%Modem2% = Modem2, UNIMODEME9DF4BA4

Rank 0 ID strings are considered unique and are automatically installed by Windows 95 autodetection or enumeration. Below is an example Rank 0 ID from an INF file. Note the single comma.


 
%Reveal1%  = Rockwell20, UNIMODEM8CF33BE4   

Rank 1 ID strings indicate an exact ID match with some other modem. In other words, the same ID appears elsewhere in the same INF or in another Windows 95 modem INF. It is important to note that whenever Rank 1 ID strings are found in several modems it is likely that a single Rank 0 ID has been created in one of the Windows 95 INF files to attempt an automatic install. It is imperative that any new ID be checked against all other Windows 95 modem INFs. A simple file text search or Grep tool can search all modem INFs for matches.

Below is a Rank 1 ID example. Note the double comma structure. As an aside, the string "Rockwell_Reavea1" is provided to preserve a Rank 0 "placeholder" ID whenever upgrades are done in a Windows 95 machine. That "placeholder ID", which is obviously a non-existent device ID, is usually built by using the filename of the INF and the modem name between the percent signs. For the moment, simply notice the double comma structure which indicates Rank 1 designation.


 
%Reveal1%  = Rockwell20,  Rockwell_Reavea1, UNIMODEM8CF33BE4   

Rank 2 ID strings are used sparingly and likewise designate exact match ID strings and further allow a user to select from a pick list when two modems share dissimilar command sets or responses. Below is an example from MDMUSRWP.INF. Note the triple comma structure.


 
     %Modem3b% = Modem3b, USRWP_Modem3b,,PCMCIA\INTEL-MODEM_2400+-9E9E 

Resolving Rank 1 ID Matches

Below are INF entries which illustrate how to resolve a common situation: two modems share the same ID string:


[ControlFlags]
ExcludeFromSelect=PCMCIA\MEGAHERTZ-CC3144-4ADE

[Models]
%Modem3% = Modem3, PCMCIA\MEGAHERTZ-CC3144-4ADE"
%Modem2% = Modem2, MDMROCK_Modem2, PCMCIA\MEGAHERTZ-CC3144-4ADE
%Modem1% = Modem1, MDMROCK_Modem1, PCMCIA\MEGAHERTZ-CC3144-4ADE

In the above example two modems share the same ID. This can happen with any ID type but is most commonly seen with Unimodem legacy ID strings. Here is a workaround for this example:

1. Make both modems rank 1 per above (double comma entries).

2. Create a new Rank 0 entry for a combined ID, in this case modem3.

3. Note that the new entry is rank zero (one comma).

4. Create a special control flag section with the ExcludeFromSelect syntax as above. This will hide the rank 0 modem from visibility in any GUI or control panel displays but allow installation

5. Create installation sections as needed for Modem3.

6. Create or modify a string section for Modem3 with a generic model name, perhaps "28.8 Data Fax modem."

7. Create an [AddReg] section in your INF file for modem 3 which uses the LOWEST COMMON DENOMINATOR of commands which BOTH modems can use assuming automatic installation would happen of EITHER modem. If few commands can be shared (which is unlikely) it may be necessary to have this rank 0 modem entry simply be a generic modem entry in MDMGEN.INF which can usually be safely shared by both modems because it uses very few initialization commands.

The purpose of the ExcludefromSelect entry in the [ControlFlags] section is to prevent a user from being able to select the "generic combination" entry manually from a pick list. The above scheme allows both automatic installation of conflicting modems sharing identical modem ID strings, but also allows for manual installation of modems by name.

A variant of this situation: two modems are found to share the same ID. However one is external and one is internal modem. Which icon profile should be used for the rank 0 entry? In this case use external.

Testing Dual Rank 0 and 1 Entries

It is important to determine whether there is a modem INF file that uses your modem ID string in a Rank 0 position, search all the Mdm*.inf files in \Windows\Inf for your modem ID string, using a Grep-like tool. You must make sure that your modem ID string is unique before you use it as a Rank 0 ID in your INF. If you find your modem ID is being used as a Rank 0 ID in another modem INF, you must use your modem ID as a Rank 1 ID.

If you decide to use a Rank 1 modem ID string in your INF file, you may have to do some extra work when you test your INF file with Windows 95. If there is a modem INF file in the \Windows\Inf subdirectory that uses the same modem ID as a Rank 0 ID, use the following procedures to guarantee you test the installation of your modem with both INF files. Different procedures are used for non-Plug and Play modems as opposed to Plug and Play or PCMCIA modems.

Installing and Testing Non-Plug and Play Modems

Suppose your INF file is named MDMMINE.INF and contains the following Rank 1 entry:


 
   %Modem1% = Modem1,,  UNIMODEMD9C98361

Suppose also that you found another INF file in \Windows\Inf named MDMOTHER.INF that contains the following Rank 0 entry:


 
   %Modem13% = Modem13,  UNIMODEMD9C98361

You must install and test your modem with both of these INF files. You can do this by turning the auto-detection feature on and off in the Add New Modem wizard dialog.

To run the Add New Modem wizard, select Start:Settings:Control Panel and double-click the Modem icon. On the Modem Properties panel, click the Add button. That starts the Add new Modem wizard. On the first wizard dialog box, you can toggle the auto-detection feature using the check box labeled "Don't detect my modem; I will select it from a list."

Continuing with the two example INF files for non-Plug and Play modems, MDMMINE.INF (which has the Rank 1 entry) and MDMOTHER.INF (which has the Rank 0 entry), use the following procedure to test both INF files:

1. To install your modem using MDMOTHER.INF, use the Add New Modem wizard with the check box mentioned above turned off (unchecked).

2. When you done testing the MDMOTHER.INF installation, remove your modem from the Control Panel.

3. To install your modem using MDMMINE.INF, use the Add New Modem wizard with the check box turned on (checked) and then test that installation.

Testing PCMCIA and Plug and Play Modems

Suppose your INF file for your PCMCIA modem is named MDMMINE.INF and contains the following Rank 1 entry:


   %Modem1% = Modem1,,  PCMCIA\GENERIC__-14.4_MODEM/FAX_-D900

Suppose also that you found another INF file in \Windows\Inf named MDMOTHER.INF that contains the following Rank 0 entry:


 
   %Modem4% = Modem4,  PCMCIA\GENERIC__-14.4_MODEM/FAX_-D900

This sort of thing can happen if you and another manufacturer are OEMs using a PC card chip set from the same chip set manufacturer and neither OEM changes the tuples the chip set manufacturer built into the PC card. If you do not (or cannot) change the tuples on your PC card, then you must install and test your modem with both of these INF files. Unlike non-Plug and Play modems, you cannot do this by turning the auto-detection feature on and off in the Add New Modem wizard dialog. Here is the procedure to use for PCMCIA cards:

1. Physically install your PC card modem and start the system; this will cause Windows 95 to install your modem using MDMOTHER.INF (which has the Rank 0 modem ID).

2. When you are done testing your modem with the MDMOTHER.INF installation, edit MDMOTHER.INF and change the Rank 0 entry to a comment by putting one or more semicolons in front of the entry.

For example, change the Rank 0 entry from


 
   %Modem4% = Modem4,  PCMCIA\GENERIC__-14.4_MODEM/FAX_-D900

to


   ;;%Modem4% = Modem4,  PCMCIA\GENERIC__-14.4_MODEM/FAX_-D900

3. Next, edit the Rank 1 entry in MDMMINE.INF to change it to a Rank 0 entry.

For example, change the Rank 1 entry from


 
   %Modem4% = Modem4,,  PCMCIA\GENERIC__-14.4_MODEM/FAX_-D900

to


   %Modem4% = Modem4,  PCMCIA\GENERIC__-14.4_MODEM/FAX_-D900

4. With your PC card modem physically installed, restart the system. This will cause the system to install your modem using MDMMINE.INF.

5. When you are done testing the MDMMINE.INF installation of the modem, edit the two INF files to restore the original Rank 0 and Rank 1 entries.

If your modem is a Plug and Play modem (ISAPNP or SERENUM) and you use a Rank 1 modem ID, the probability you will find a modem INF file in the \Windows\Inf subdirectory that uses the same modem ID in a Rank 0 entry is quite low. However, you must always check for the possibility using a Grep-like tool. If you do find such a case, to test both INF files use the same procedure that is shown above for PCMCIA modems.