Author Topic: Adding additional wireless drivers (IPFire 2.x, Ralink RT3062)  (Read 3364 times)

Offline mcham27

  • Newbie
  • *
  • Posts: 2
Adding additional wireless drivers (IPFire 2.x, Ralink RT3062)
« on: January 11, 2012, 10:15:26 PM »
My uphill adventure with a Zonet ZEW1690 (PCI-based, 2.4GHz Wireless 802.11b/g/n), using the Ralink RT3062 Chipset (which uses rt2860 firmware), and does not work 'out of the box' in IPFire 2.x (as of Core 55).

When looking into the firmware and [Linux] drivers through Ralink, the firmware download as of Dec-31-2011, gave a rt2860.bin modified on Jan-27-2010. Core 53, updated incrementally from a Core 43 install, already had a version of the rt2860.bin firmware on it (in /lib/firmware), as does the Core 55 (that I installed in a VM while I'm traveling).

lspci details: (From Core 53)
Code: [Select]
01:05.0 Network controller: Ralink corp. Unknown device 3062
        Subsystem: Ralink corp. Unknown device 3062
        Flags: bus master, slow devsel, latency 32, IRQ 6
        Memory at e5000000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3

From other Linux fronts, there were multiple reports of it working after blacklisting the following: rt2800pci, rt2800lib, rt2800usb, rt2x00pci, rt2x00lib, rt2x00usb.  However, I did not have success after that.

Kernel Modules found in Virtual Core 55 install
Code: [Select]
/lib/modules/2.6.32.45-ipfire/kernel/drivers/net/wireless/rt2x00/{11 listed below}
rt2500usb.ko
rt2800usb.ko
rt2x00.ko
rt73usb.ko
rt2800lib.ko
rt2800pci.ko
rt2500pci.ko
rt2x00pci.ko
rt61pci.ko
rt2400pci.ko
rt2x00lib.ko

Attempting build the Ralink drivers from source (DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217) on my physical IPFire 53 install (again, just before Core 54+55 releases), complained about missing GCC, even after installing git and make (via pakfire from the command line), and getting the precompiled toolchain.  I'd almost assume I made a simple error (not defining path to GCC system-wide, or in the config.mk for the driver source), and that fixing that may resolve everything. Note: Hardware is an old P3 1.1GHz with 512MB of ram, and it took quite a while to build IPFire from source (>12 hours), started on Jan-02-2012.

The driver does build successfully (with WPA Supplicant related flags in the config.mk set to Y) on Ubuntu 11.10 (3.0.0-14-generic), which yielded rt3562sta.o & rt3562sta.ko.  However, the "make install" portion attempts to create a "/etc/Wireless/RT2860STA" directory, which I am fairly certain is not how ipfire would want to handle the blue network via hostapd.

Assuming that I did compile a binary compatible "rt3562sta.ko" on Ubuntu 11... would I "just" need to...
Code: [Select]
Copy it to into a "/lib/modules/2.6.32.45-ipfire/kernel/drivers/net/wireless/{subdirectory}"
`sudo modprobe rt3562sta` #to load the driver (at startup?)
# Restart required? Or did the above load only for the current run
Change from Red/Green to Red/Green/Blue topology via Setup at Console.
Assign blue network device/card.
Configure hostapd via web admin site.
After verifying wireless connectivity works bridge blue-green via http://wiki.ipfire.org/en/configuration/network/bridge-green-blue
...?

Alternatively, to the above if I cannot add a module like this to IPFire post-build, where would I need to place the driver source directory to be able to build IPFire (2.x) from source, including the rt3562 module for the kernel?

The other step that I am unsure about, would be if I need to symlink a new /lib/firmware/rt3062.bin or /lib/firmware/rt3562.bin to the existing /lib/firmware/rt2860.bin, like rt3070.bin and rt3090.bin are in Core 55.

I will be returning home (to have physical access to my hardware) late Friday-night (GMT-6), with time to resume this battle on Saturday Jan-14-2012.  Any suggestions, corrections, or links to threads in the German portion (that can be translated via 3rd party tools) would be greatly appreciated.

Offline digiz12

  • User
  • ***
  • Posts: 38
Re: Adding additional wireless drivers (IPFire 2.x, Ralink RT3062)
« Reply #1 on: January 21, 2012, 01:34:28 PM »
This card is weary cheap in ebay. So for me is very interesting if you manage to work this card in Ipfire??

Offline mcham27

  • Newbie
  • *
  • Posts: 2
Re: Adding additional wireless drivers (IPFire 2.x, Ralink RT3062)
« Reply #2 on: January 22, 2012, 12:30:21 AM »
In short, not yet.

The driver builds from source just fine, in Ubuntu 11, 64-bit and 32-bit.  Admittedly, it does give some warnings.

Meanwhile, I keep hitting errors when attempting to build from the dev-environment shell in a VM.  One item I did find is that the kernel source directories do not match the value returned by...
Code: [Select]
uname -r ... in the build shell.  As a result I had to
Code: [Select]
cp -r /lib/modules/2.6.35.42-ipfire /lib/modules/2.6.32.45 ... for the Ralink Makefile to be able to find the kernel source.

Unfortunately, from the build shell, there are multiple other issues I have run into with missing files (such as /lib/modules/2.6.32.45/build/include/linux/modversion.h, "asm/swab.h" included from /lib/modules/2.6.32.45/build/include/linux/swab.h), and syntax errors (in /usr/include/asm/cpufeature.h, /lib/modules/2.6.32.45/build/include/linux/log2.h), "#error BITS_PER_LONG not 32 or 64" in /lib/modules/2.6.32.45/build/include/linux/bitops.h:129:2, and seemingly a bunch of other issues working with byte order.

From the end of the stdout,
Code: [Select]
/tmp/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/common/crypt_md5.o] error 1
make: *** [LINUX] Error 2
root:/tmp/DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217# _
with the 209,705 Bytes of stderr output... I still have a lot to try to sort out yet. =\
« Last Edit: January 22, 2012, 01:21:22 AM by mcham27 »

Offline Arne.F

  • Administrator
  • Master Supporter
  • *****
  • Posts: 5,356
Re: Adding additional wireless drivers (IPFire 2.x, Ralink RT3062)
« Reply #3 on: January 26, 2012, 06:13:40 PM »
You cannot simply build wireless modules from source because ipfire use compat-wireless that replace the entire wlan stack.

You need to add the sourcecode to compat-wireless buildscript and use this headers to get a compatible driver.
I have already tried to build some of the ralink drivers but the xxxxsta driver support only the station mode that is not supported by ipfire and the ralink ap mode is incompatible to the normal linux nl80211 configuration mode that is used by the webinterface. So i think it is hard to get this working.

Arne

Support the project on the IPFire whishlist!