Testing an UnSupported Network Driver with GenMAC

By Martin Iturbide

Some days ago a post on the OS2World.com forum inspired me to write about how to test network adapters with GenMac to see if it runs on eComStation.

GenMAC (in short) is a driver developed for eCs-OS2 to run some 32bits Windows network drivers. Sadly, GenMac is a close source software and had not get any further development in some time, but we can try to run other 32bits Windows device drivers on it.

What do you need
You will require:
 * GenMAC Installed.
 * GenMU (To get some templates on how to make you own files)
 * Wireless LAN Monitor installed.
 * EgenM32W tool

If you are using eComStation 2.1 it is recommend that you update:
 * WPA Supplicant
 * XWireless LAN Monitor to version 3.12 beta 2

First Steps
1) Identify the chipset of the network card. Sometime this can be tricky. You can look at the card and check the name of the chip on it. Or if the device is installed on Windows you can use this freeware tool (HWinfo32) to check the information about the device. On this example, I am going to work with a RALink 5360 wireless PCI card, which Windows XP recognize it (and is branded) as “D-Link DWA-525 Wireless N 150 Desktop”.

2) Find the vendor and device ID. If this card is installed on Windows you can check the hardware manager and check for the ids. For example on my case:
 * 1814 is the vendor ID
 * 5360 the device ID.



3) Grab the Windows device drivers. It is important to use the 32bits WindowsXP driver. Only the 32Bits driver works on OS/2 with GenMac and there is no warranty that all drivers works, so it can be useful also to check all the version of the Windows 32bits drivers for this card.

4) Once you have the Windows 32bits drivers you need to select the .SYS and .INF files from this driver that will run on OS/2-eCS. On this case I’m using:
 * DRT2860.SYS
 * DRT2860.INF



Creating a .NIF file for the Driver.
Now we need to create a .NIF file for the Windows/GenMAC driver. The .NIF file is a text file.

On this case I created the W1814x5360.NIF based on other examples on GenMU. (I based mine on the W10ECx8180.nif file from GenMU)

So here it is the NIF file and what I had changed. It was basically just changing the name of the driver, the VendorID, HardwareID and .sys and .inf file names. Put some attention on the lines I marked with "red".

[W1814x5360] Type = NDIS Title = "GenMac Wrapper Ralink 5360 Wlan [1814:5360]" Version = 1.0 DriverName = WRND32$ Xports = NETBEUI, LANDD CopyFile = GENM32M.MSG [FILE] Name = GENM32W.OS2 Path = IBMCOM\MACS [VENDOR] Display = "Vendor Value" Type = Hexadecimal Range = 0-FFFF Optional = NO Editable = NO Default = 1814 Help= "Vendor-ID of your NIC" [DEVICE] Display = "Device Value" Type = Hexadecimal Range = 0-FFFF Optional = NO Editable = NO Default = 5360 Help= "Device-ID of your NIC" [NDIS_SYS] Display = "Windows SYS-Filename" Type = String StrLength = 32 Default = "DRT2860.SYS" Optional = YES Editable = YES Help= "You should not modify this value." [NDIS_INF] Display = "Windows INF-Filename" Type = String StrLength = 32 Default = "DRT2860.INF" Optional = YES Editable = YES Help= "You should not modify this value." [SSID] Display = "Network Name (SSID)" Type = String StrLength = 32 Default = "WLAN" Optional = YES Editable = YES Help= "You need to provide the Service Set ID of your Wireless LAN." [DEBUGLEVEL] Display = "Debuglevel" Type = String StrLength = 64 Default = "NONE" Optional = YES Editable = YES Help= "You need to provide the DEBUGLEVELS." [OPTIONS] Display = "Wrapper Options" Type = String StrLength = 64 Default = "NONE" Optional = YES Editable = YES Help= "You need to provide the OPTIONS."

Install the Files on for OS/2-eCS
Now let’s put the driver on OS/2.

The W1814x5360.NIF is going to be located at X:\IBMCOM\MACS directory.

The two driver files, DRT2860.SYS and DRT2860.INF if you are using eCS 2.1 is going to be located at “X:\eCS\SYSTEM\GENMAC\DRIVER\WRAPPER_1814_5360”. You need to create that directory.

Install the Driver on OS/2
This should be easy if you know OS/2-eCS. Go to “System Setup->Network->Adapters and Protocols”.



On the “Stage 1 – Add a network card” select the installed “GenMac Wrapper Ralink 5360 Wlan [1814:5360]" (on my case) and don't forget to also install the TCP/IP driver.



After this, the Config.sys and Protocol.ini files will get updated.

Modifying the “genm32w.os2 “ file to add the network adapter.
Using a tool called “EgenM32W” (hobbes) you can edit the “genm32w.os2” supported device list.

Please read the "readmefile" of this software to understand some of the codes that uses.



I generated a new GENM32M.OS2 file and I replaced (making a backup) the one at “C:\IBMCOM\MACS”.

Running the Driver on OS/2-eCS with GenMac
Now reboot and pray for the driver to work.

On this case the hardware loaded. Check if the leds turn on the Wifi card.

Enable your Wifi NIC
Now you can use the Wireless LAN Monitor as usual to enable the “radio” and look for you Wifi network access.



Share what happened
It is important as community efforts to share if the driver worked or not on your case.

You can share your progress at the GenMac mailing list or also at the OS2World Hardware forum.

It is also very important that you share the driver files with the group so it can possible be included in the next GenMU WarpIn Package.

NO VALID HARDWARE INFO in PROTOCOL.INI FOR (“WRND322$”)


I got this error when I misspelled the name on this directory: “X:\eCS\SYSTEM\GENMAC\DRIVER\WRAPPER_1814_5360” Check that you are pointing to the right .SYS driver and the right directories. Check also that you are not making any typos on the driver hardware ID.

NO VALID HARDWARE FOUND FOR (“WRND322$”)


This message will show up when the hardware is not recognized at all. It may mean that the driver is not working.

Creating a .INF File
I had been told that it is also important to create a .INF file from the Windows registry to it goes with the Windows driver on OS/2.

To generate your .INF file in Windows run the RegEdit.exe application.

On the reg edit look for the VendorID and HardwareID of your device. It is generally available under "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\". Search for "1814" or "VEN_1814&DEV_5360" (on my case) to find correct network adapter in that subdirectory.

We are looking for an entry that contains somethings like this (Not exactly the same):  "WPSDevName"="Ralink Client" "OpMode"="0" "TXBurst"="1" "ShortSlot"="1" "BACapability"=dword:07034040 "TransmitSetting"=dword:0002ba15 "RDG"="1" "NetworkType"="1" "AdhocNMode"="0" "SmartScan"="0" "PSMode"="0" "PSControl"=dword:00000000 "BusType"="5" "ComponentId"="pci\\ven_1814&dev_5360" "InfPath"="netr28x.inf" "IncludedInfs"=hex(7):6e,00,65,00,74,00,76,00,77,00,69,00,66,00,69,00,62,00,75,\ 00,73,00,2e,00,69,00,6e,00,66,00,00,00,00,00 

Here it goes what I found on the Windows registry.



Right click the registry folder and select "Export...". It will export a .reg file.

Links

 * GenMAC
 * GenMU
 * GenMac in Unsupported mode by Neil Waldhauer
 * Getting new Intel cards supported by Mike Kölling
 * Unsupported GenMAC Wrapper Driver