Installing driver

Hi,
I just installed opensuse 11.4 and bought a network adapter with linux support, the Asus USB-N13 with RT2870 driver
Too install the driver, I need to use the ‘make’ command, gcc and probably some more tools from the development packages + dependecies, which are not installed default - I can hardly understand why.
However I find it hard to install all those packages without internet access.
Any suggestions?
Thank you very much in advance.

On 05/18/2011 12:06 AM, John Paul wrote:
>
> I need to use the ‘make’ command, gcc and
> probably some more tools from the development packages + dependecies,
> which are not installed default - I can hardly understand why.

welcome to our forum…

all of the tools are available for install, but not in a default
install…why? because they are not needed in all situations, by all
people…both the DVD and live CDs are packed full…there is no way to
have all the packages everyone thinks should be default installed…

> Any suggestions?

i think those tools are all on the DVD…do, you have that?
if not, you might try doing like i did, downloading with another machine
(or another OS on the same machine) and then slide the packages over via
a USB stick, or . . .


dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255

Thank you, DenverD.

I managed to set up a wired connection at a friends place to download and install make and gcc.
I also ran

>zypper in kernel-desktop-devel

and

>zypper in kernel-desktop

, as was suggested here: [SOLVED] opensuse 11.4 cannot use the tar.gz file from Realtek rtl8192se](http://www.linuxquestions.org/questions/showthread.php?p=4359339)

When I follow the instructions from README_STA, I get this output though:

~/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1> make
make -C tools
make[1]: Entering directory `/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools/bin2h
cp -f os/linux/Makefile.6 /home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/Makefile
make -C /lib/modules/2.6.37.6-0.5-desktop/build SUBDIRS=/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux modules
make[1]: Entering directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop'
make -C ../../../linux-2.6.37.6-0.5 O=/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop/. modules
  CC [M]  /home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.o
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c: In function ‘RTMPAllocUsbBulkBufStruct’:
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:52:2: error: implicit declaration of function ‘usb_buffer_alloc’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:52:13: warning: assignment makes pointer from integer without a cast
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c: In function ‘RTMPFreeUsbBulkBufStruct’:
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:78:3: error: implicit declaration of function ‘usb_buffer_free’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c: In function ‘RTMPFreeTxRxRingMemory’:
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:234:9: warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:62:20: note: expected ‘UCHAR **’ but argument is of type ‘struct __TX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:241:9: warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:62:20: note: expected ‘UCHAR **’ but argument is of type ‘struct __TX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:278:11: warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:62:20: note: expected ‘UCHAR **’ but argument is of type ‘struct __HTTX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c: In function ‘NICInitTransmit’:
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:507:12: warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:62:20: note: expected ‘UCHAR **’ but argument is of type ‘struct __TX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c: In function ‘RTMPAllocTxRxRingMemory’:
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:566:13: warning: passing argument 3 of ‘RTMPAllocUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:34:20: note: expected ‘VOID **’ but argument is of type ‘struct __HTTX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:596:12: warning: passing argument 3 of ‘RTMPAllocUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:34:20: note: expected ‘VOID **’ but argument is of type ‘struct __TX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:610:12: warning: passing argument 3 of ‘RTMPAllocUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:34:20: note: expected ‘VOID **’ but argument is of type ‘struct __TX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:628:13: warning: passing argument 3 of ‘RTMPAllocUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:34:20: note: expected ‘VOID **’ but argument is of type ‘UCHAR **’
make[4]: *** [/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.o] Error 1
make[3]: *** [_module_/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop'
make: *** [LINUX] Error 2

This occurs both when using the driver from the supplied cd and the latest driver I downloaded here: Ralink corp.

On 05/18/2011 06:36 AM, John Paul wrote:
>
> Thank you, DenverD.
>
> I managed to set up a wired connection at a friends place to download
> and install make and gcc.
> I also ran
> Code:
> --------------------
> >zypper in kernel-desktop-devel
> --------------------
> and
> Code:
> --------------------
> >zypper in kernel-desktop
> --------------------
> , as was suggested here: ‘[SOLVED] opensuse 11.4 cannot use the tar.gz
> file from Realtek rtl8192se’
> (http://www.linuxquestions.org/questions/showthread.php?p=4359339)
>
> When I follow the instructions from README_STA, I get this output
> though:
>
>
> Code:
> --------------------
> ~/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1> make
> make -C tools
> make[1]: Entering directory `/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools’

gcc -g bin2h.c -o bin2h
make[1]: Leaving directory /home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools' > /home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools/bin2h > cp -f os/linux/Makefile.6 /home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/Makefile > make -C /lib/modules/2.6.37.6-0.5-desktop/build SUBDIRS=/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux modules > make[1]: Entering directory /usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop’
make -C …/…/…/linux-2.6.37.6-0.5 O=/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop/. modules
CC [M] /home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.o
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c: In function ‘RTMPAllocUsbBulkBufStruct’:
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:52:2: error: implicit declaration of function ‘usb_buffer_alloc’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:52:13: warning: assignment makes pointer from integer without a cast
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c: In function ‘RTMPFreeUsbBulkBufStruct’:
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:78:3: error: implicit declaration of function ‘usb_buffer_free’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c: In function ‘RTMPFreeTxRxRingMemory’:
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:234:9: warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:62:20: note: expected ‘UCHAR **’ but argument is of type ‘struct __TX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:241:9: warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:62:20: note: expected ‘UCHAR **’ but argument is of type ‘struct __TX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:278:11: warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:62:20: note: expected ‘UCHAR **’ but argument is of type ‘struct __HTTX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c: In function ‘NICInitTransmit’:
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:507:12: warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:62:20: note: expected ‘UCHAR **’ but argument is of type ‘struct __TX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c: In function ‘RTMPAllocTxRxRingMemory’:
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:566:13: warning: passing argument 3 of ‘RTMPAllocUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:34:20: note: expected ‘VOID **’ but argument is of type ‘struct __HTTX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:596:12: warning: passing argument 3 of ‘RTMPAllocUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:34:20: note: expected ‘VOID **’ but argument is of type ‘struct __TX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:610:12: warning: passing argument 3 of ‘RTMPAllocUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:34:20: note: expected ‘VOID **’ but argument is of type ‘struct __TX_BUFFER **’
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:628:13: warning: passing argument 3 of ‘RTMPAllocUsbBulkBufStruct’ from incompatible pointer type
/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.c:34:20: note: expected ‘VOID **’ but argument is of type ‘UCHAR **’
make[4]: *** [/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/…/…/common/cmm_mac_usb.o] Error 1
make[3]: *** [module/home/pieter/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop’
> make: *** [LINUX] Error 2
> --------------------
>
>
> This occurs both when using the driver from the supplied cd and the
> latest driver I downloaded here: ‘Ralink corp.’
> (http://www.ralinktech.com/support.php?s=2)

That driver source is too old and bitrotted for your kernel. Ralink is not
updating their drivers because they are now supported by an active in-kernel
project. For your kernel and device, the rt2870sta driver is the one to use. By
openSUSE 12.1, that will change to rt2800usb.

You likely only need to install the firmware. Check the output of dmesg for the
file needed.

On 05/18/2011 01:36 PM, John Paul wrote:
>
> error: implicit declaration of function ‘usb_buffer_alloc’
> warning: assignment makes pointer from integer without a cast
> In function ‘RTMPFreeUsbBulkBufStruct’:
> error: implicit declaration of function ‘usb_buffer_free’
> In function ‘RTMPFreeTxRxRingMemory’:
> warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible pointer type
> note: expected ‘UCHAR **’ but argument is of type ‘struct __TX_BUFFER **’
> warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible pointer type
> [snip]
> make[2]: *** [sub-make] Error 2
> make[1]: *** [all] Error 2

i’m no hacker, but to me it look like the supplied driver source is not
actually correctly written … (hopefully a real hacker will drop in,
laugh at me, and give the correct advice…soon)

what did the folks at Ralink customer service say when they saw the
above output?


dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255

On 05/18/2011 10:11 AM, DenverD wrote:
> On 05/18/2011 01:36 PM, John Paul wrote:
>>
>> error: implicit declaration of function ‘usb_buffer_alloc’
>> warning: assignment makes pointer from integer without a cast
>> In function ‘RTMPFreeUsbBulkBufStruct’:
>> error: implicit declaration of function ‘usb_buffer_free’
>> In function ‘RTMPFreeTxRxRingMemory’:
>> warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible
>> pointer type
>> note: expected ‘UCHAR **’ but argument is of type ‘struct __TX_BUFFER **’
>> warning: passing argument 3 of ‘RTMPFreeUsbBulkBufStruct’ from incompatible
>> pointer type
>> [snip]
>> make[2]: *** [sub-make] Error 2
>> make[1]: *** [all] Error 2
>
> i’m no hacker, but to me it look like the supplied driver source is not actually
> correctly written … (hopefully a real hacker will drop in, laugh at me, and
> give the correct advice…soon)
>
> what did the folks at Ralink customer service say when they saw the above output?

It probably was correctly written, or would at least compile, for some kernel
version. The problem is that the kernel keeps changing. Some features are
reworked and the driver source needs to be revised to account for this. Look at
the lines containing the KERNEL_VERSION macro in any out-of-kernel driver.

On 05/18/2011 11:15 PM, Larry Finger wrote:

> It probably was correctly written, or would at least compile, for some
> kernel version.

understand, thx!


dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255

Thank you so much, lwfinger.
As I’m new to opensuse, I really don’t know where to find the 2879sta driver.
I have the package ‘kernel-firmware’ (version 2.6.38-1.2.1) already installed, which contains the file /lib/firmware/rt2870.bin

On 05/19/2011 07:36 AM, John Paul wrote:
>
> lwfinger;2341307 Wrote:
>> On 05/18/2011 06:36 AM, John Paul wrote:
>> That driver source is too old and bitrotted for your kernel. Ralink is
>> not
>> updating their drivers because they are now supported by an active
>> in-kernel
>> project. For your kernel and device, the rt2870sta driver is the one to
>> use. By
>> openSUSE 12.1, that will change to rt2800usb.
>>
>> You likely only need to install the firmware. Check the output of dmesg
>> for the
>> file needed.
>
> Thank you so much, lwfinger.
> As I’m new to opensuse, I really don’t know where to find the 2879sta
> driver.
> I have the package ‘kernel-firmware’ (version 2.6.38-1.2.1) already
> installed, which contains the file /lib/firmware/rt2870.bin

What kernel are you running? Please post the output of ‘uname -r’.

2.6.37.6-0.5-desktop