Testing an UnSupported Network Driver with GenMAC: Difference between revisions

From OS2World.Com Wiki
Jump to navigation Jump to search
(20 intermediate revisions by one other user not shown)
Line 1: Line 1:
By [[User:Martini|Martin Iturbide]]
By [[User:Martini|Martin Iturbide]]


Some days ago some posts on the OS2World.com forum inspired me write about how to test network adapters with GenMac to see if it runs on eComStation.  
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.  
 
[[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==
==What do you need==


You will require:  
You will require:  
* GenMAC Installed.  
* [http://trac.netlabs.org/genmac GenMAC] Installed.  
* GenMU (To get some templates on how to make you own files)
* [[GenMU]] (To get some templates on how to make you own files)
* Xwireless LAN Monitor installed.  
* [http://trac.netlabs.org/xwlan Wireless LAN Monitor] installed.  
* [http://hobbes.nmsu.edu/h-search.php?key=EgenM32W EgenM32W tool]


If you are using eComStation 2.1 it is recommend that you update:
If you are using eComStation 2.1 it is recommend that you update:
* WPASupplicant
* [http://os2ports.smedley.id.au/index.php?page=wpa-supplicant WPA Supplicant]
* XWireless LAN Monitor to version 3.12beta 2  
* [ftp://ftp.netlabs.org/pub/wlan/xwlan312beta2.zip XWireless LAN Monitor to version 3.12 beta 2]


==First Steps==
==First Steps==
1) Identify the chipset of the network card.
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.  
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”.
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.
2) Find the vendor and device ID.
Line 29: Line 31:




1) Grab the Windows device drivers. It is important to use the 32bits WindowsXP driver.
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.  
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.  


2) 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.  
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:
On this case I’m using:
* DRT2860.SYS
* DRT2860.SYS
* DRT2860.INF
* DRT2860.INF


[[Image:WinXP-DriverName.png]]
[[Image:WinXP-DriverName.png|600px]]


==Creating a .NIF file for the Driver.==
==Creating a .NIF file for the Driver.==
Now we need to create a .NIF file for the Windows/GenMAC 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)
On this case I created the W1814x5360.NIF based on other examples on GenMU. (I based mine on the W10ECx8180.nif file from GenMU)
Line 129: Line 131:


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


[[image:ADAPTERS.PNG|400px]]
[[image:ADAPTERS.PNG|400px]]


On the “Stage 1 – Add a network card” select the installed “GenMac Wrapper Ralink 5360 Wlan [1814:5360]on mi case and install the TCP/IP driver.
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.


[[image:ADAPTERS1.PNG|400px]]  
[[image:ADAPTERS1.PNG|400px]]  


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


==Modifying the “genm32w.os2 “ file to add the network adapter.==
==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.  
Using a tool called “[[EgenM32W]]” [http://hobbes.nmsu.edu/h-search.php?key=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.  
Please read the "readmefile" of this software to understand some of the codes that uses.  
Line 155: Line 157:
On this case the hardware loaded. Check if the leds turn on the Wifi card.
On this case the hardware loaded. Check if the leds turn on the Wifi card.


==Enable your Wifi Networks==
==Enable your Wifi NIC==
Now you can use the XWireless LAN Monitor as usual to enable the “radio” and look for you Wifi network access.  
Now you can use the Wireless LAN Monitor as usual to enable the “radio” and look for you Wifi network access.
 
[[Image:EnableRadio.PNG]]


==Share what happened==
==Share what happened==
It is important as community efforts to share if the driver worked or not on your case.  
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.  
 
You can share your progress at the [http://dir.gmane.org/gmane.org.netlabs.genmac.user GenMac mailing list] or also at the [http://www.os2world.com/forum/index.php/board,10.0.html 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.


==Troubleshoot.==
==Troubleshoot.==
Line 166: Line 173:
[[image:NoValidHW-Protocol.jpg]]
[[image:NoValidHW-Protocol.jpg]]


I got this error when I misspelled the name on this directory: “X:\eCS\SYSTEM\GENMAC\DRIVER\WRAPPER_1814_5360”
* 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 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.  
* Check also that you are not making any typos on the driver hardware ID.
* Check that you remembered to patch GENM32W.OS2 with [[EgenM32W]] tool.


====NO VALID HARDWARE FOUND FOR (“WRND322$”)====
====NO VALID HARDWARE FOUND FOR (“WRND322$”)====
Line 175: Line 183:
This message will show up when the hardware is not recognized at all. It may mean that the driver is not working.
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):
<PRE>
"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
</PRE>
Here it goes what I found on the Windows registry.
[[image:WindowsRegNIC.png|400px]]
Right click the registry folder and select "Export...". It will export a .reg file.


==Links==
==Links==
* [[GenMAC]]
* [[GenMAC]]
* [[GenMU]]
* [[GenMU]]
* [http://www.blondeguy.com/GenmacUnsupported.html GenMac in Unsupported mode] by [[Neil Waldhauer]]
* [http://permalink.gmane.org/gmane.org.netlabs.genmac.user/2387 Getting new Intel cards supported] by Mike Kölling
* [http://ru.ecomstation.ru/projects/genmac/?action=unsupported Unsupported GenMAC Wrapper Driver]


[[Category:How_To]]
[[Category:How_To]]

Revision as of 13:14, 9 June 2017

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:

If you are using eComStation 2.1 it is recommend that you update:

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.

Troubleshoot.

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.
  • Check that you remembered to patch GENM32W.OS2 with EgenM32W tool.

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