OpenWrt Forum Archive

Topic: external usb wifi interface

The content of this topic has been archived on 13 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi!

I have successfully installed openwrt to my asus 500gp router.
I need to setup another wifi interface. My usb wifi card is a ralink device (rt2570 module).
I have found the module source on openwrt sources directory but I need a minimal howto to compile it.
Is anybody have compiled this module?
Is anybody use external usb wifi module on this system?

thx for your answers!

OK, I have done it.
I got the openwrt sources and compile it.
The compile process downloaded and compiled the kernel.
When I changed the kernel path to openwrt kernel in the ralink driver's Makefile,
it compiled successfully.

hi pasztorl,
I am using the Kernel 2.6.19.2, for WL-500B. I would like to add my USB card WUSB54G support too. And compile driver rt2570-1.1.0-b2.tar.gz using below command:
make module KERNDIR=/home/alex/work2/openwrt/kamikaze/trunk/build_mipsel/linux-2.6-brcm47xx/linux-2.6.19.2 \
                    PATCHLEVEL=6 \
                    CC=/home/alex/work2/openwrt/kamikaze/trunk/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc \
                    LD=/home/alex/work2/openwrt/kamikaze/trunk/staging_dir_mipsel/bin/mipsel-linux-uclibc-ld
And then got an errror like this,
make[1]: Entering directory `/home/alex/work2/openwrt/kamikaze/trunk/build_mipsel/linux-2.6-brcm47xx/linux-2.6.19.2'
  CC [M]  /home/alex/work2/openwrt/kamikaze/mypackages/rt2570-1.1.0-b2/Module/rtusb_main.o
cc1: error: unrecognized command line option "-maccumulate-outgoing-args"
make[2]: *** [/home/alex/work2/openwrt/kamikaze/mypackages/rt2570-1.1.0-b2/Module/rtusb_main.o] Error 1
make[1]: *** [_module_/home/alex/work2/openwrt/kamikaze/mypackages/rt2570-1.1.0-b2/Module] Error 2
make[1]: Leaving directory `/home/alex/work2/openwrt/kamikaze/trunk/build_mipsel/linux-2.6-brcm47xx/linux-2.6.19.2'
rt2570.ko failed to build!

Looks like CFLAGS is wrong.
May I ask you some questions?
1) Which version kernel do you use?
2) Could you please give me a minihowto?
3) Can anybody help me to solve this issue?

Thanks
Alex

OK, I got the way to build it.
1) Go to the folder trunk/package/rt2570
2) Modify the line   
  DEPENDS:=@LINUX_2_4 @USB_SUPPORT +wireless-tools
TO:
  DEPENDS:=@LINUX_2_6 @USB_SUPPORT +wireless-tools
3) make menuconfig, will find an option in Kernel Module --> Wireless Drivers --> <M> Kmod-rt2570
4) make package/rt2570-compile V=99

late, I will test if It can work on my router.

The discussion might have continued from here.