7 Replies Latest reply: Jul 11, 2012 11:21 PM by Aaronwu RSS

    RT3070 USB WIFI module can not loading firmware


      Hi All,


      Congratulations for new forum!


      I tired to make Ralink RT3070 USB WIFI module on the linux-, i can load the driver rt2800us.ko, but can not loading firmware properly,


      modprobe rt2800usb
      cfg80211: Calling CRDA to update world regulatory domain
      phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 3070, rf: 0005, rev: 0201.
      usbcore: registered new interface driver rt2800usb


      lo        no wireless extensions.


      eth0      no wireless extensions.


      wlan0     IEEE 802.11bgn  Mode:Managed  Access Point: Not-Associated
                Tx-Power=0 dBm
                Retry  long limit:7   RTS thr:off   Fragment thr:off
                Encryption key:off


      ifconfig wlan0 up
      phy0 -> rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'.
      rt2800usb 1-1.1:1.0: firmware: requesting rt2870.bin

      phy0 -> rt2x00lib_request_firmware: Error - Failed to request Firmware.
      SIOCSIFFLAGS: No such file or directory


      i have been put the rt2870.bin to /lib/firmware directory and add userspace to loading firmware support in kernel as following this - http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:hotplug#settings, but i always got such error.


      Anyone who faced such error and how i can to solve that? Thank you very much.


      I used blackfin-toolchain-2010R1-RC4, blackfin-toolchain-uclibc-default-2010R1-RC4 and blackfin-linux-dist-2010R1-RC5

        • 1. Re: RT3070 USB WIFI module can not loading firmware

          A while ago we have tried to enable the RT2870 module, here is some tips about porting and setting, hope it will help, if there is some warning asking you to copy the RT2870STA.dat to a specific location on the target board, just follow the prompt to copy it there.


          1) We have to modify the Makefile in the base directory

          Modifications are:


          ifeq ($(PLATFORM), BLACKFIN)
          LINUX_SRC =/home/rajiv/BF527-EZKIT/uClinux-dist-ezkit-bf527-2009R1-RC1/linux-2.6.x/  ---> specify the kernel path
          LINUX_SRC_MODULE =/home/rajiv/BF527-EZKIT/uClinux-dist-ezkit-bf527-2009R1-RC1/
          linux-2.6.x/drivers/net/wireless/                  ---> specify the kernel path
          CROSS_COMPILE = bfin-uclinux-
          ARCH := blackfin
          export ARCH

          2) There will be a config.mk file inside /os/linux/  This will have to be modified to add our platform.

          ifeq ($(PLATFORM),BLACKFIN)
               ifneq (,$(findstring 2.4,$(LINUX_SRC)))
                   # Linux 2.4
                   CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -O2
          -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
          -march=i686 -DMODULE -DMODVERSIONS -include     $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)
                   export CFLAGS
                   # Linux 2.6
                   EXTRA_CFLAGS := $(WFLAGS) -I$(RT28xx_DIR)/include


          3) We need to do one modification in the code before we start compiling for our module. In the file

            in structure HTTRANSMIT_SETTING we have to change MODE to MODE1
            in structure MACHTTRANSMIT_SETTING we have to change MODE to MODE1

            We will have to change all instances of structure.MODE to structure.MODE1 in the entire base. For example

            In file sta/rtmp_data.c
            we have to change (pAd->StaCfg.HTPhyMode.field.MODE == MODE_HTMIX)
               (pAd->StaCfg.HTPhyMode.field.MODE1 == MODE_HTMIX)

          Similarly we have to change all MODE to MODE1.

          4) Once this is done then we need to come to the base directory and execute the command
              make (Please do this in supervisor mode)

          5) Th .ko files will be generated in the folder /os/linux.

          • 2. Re: RT3070 USB WIFI module can not loading firmware

            Hi Aaronwu,


            Thanks for your reply.


            I just followed your insruction to try make the module, but i got following errors


            make -C tools
            make[1]: Entering directory `/opt/sf/sf/wifi/new/tools'
            gcc -g bin2h.c -o bin2h
            make[1]: Leaving directory `/opt/sf/sf/wifi/new/tools'
            cp -f os/linux/Makefile.6 /opt/sf/sf/wifi/new/os/linux/Makefile
            make -C /opt/sf/sf/build_ip12/blackfin-linux-dist/linux-2.6.x SUBDIRS=/opt/sf/sf/wifi/new/os/linux modules
            make[1]: Entering directory `/opt/sf/sf/build_ip12/blackfin-linux-dist/linux-2.6.x'
              CC [M]  /opt/sf/sf/wifi/new/os/linux/../../common/crypt_md5.o
            In file included from /opt/sf/sf/wifi/new/include/chip/mac_usb.h:32,
                             from /opt/sf/sf/wifi/new/include/chip/rt3070.h:50,
                             from /opt/sf/sf/wifi/new/include/rtmp_chip.h:39,
                             from /opt/sf/sf/wifi/new/include/rt_config.h:38,
                             from /opt/sf/sf/wifi/new/os/linux/../../common/crypt_md5.c:28:
            /opt/sf/sf/wifi/new/include/chip/rtmp_mac.h:699: error: expected identifier or '(' before numeric constant
            /opt/sf/sf/wifi/new/include/chip/rtmp_mac.h:700: error: expected ';' before 'ULONG'
            make[2]: *** [/opt/sf/sf/wifi/new/os/linux/../../common/crypt_md5.o] Error 1
            make[1]: *** [_module_/opt/sf/sf/wifi/new/os/linux] Error 2
            make[1]: Leaving directory `/opt/sf/sf/build_ip12/blackfin-linux-dist/linux-2.6.x'
            make: *** [LINUX] Error 2



            I used blackfin-toolchain-2010R1-RC4, blackfin-linux-dist-2010R1-RC5 and Ralink 2011_0407_5700_5800_Linux_android_V2.5.0.2_DPO package for compiling.


            Thank you.

            • 3. Re: RT3070 USB WIFI module can not loading firmware

              We were using the 2010_0831_RT3070_Linux_STA_v2.4.0.1, guess you may want to get support from Ralink for their package usage.

              • 4. Re: RT3070 USB WIFI module can not loading firmware

                Prior to doing some modifications to a 2010_0710_RT2870_Linux_STA_v2.4.0.1 according to the above (I did modify, but there are still errors), I have a more fundamental question.


                The tr2800usb.ko and associated dependencies are already supplied with the 2011-kernel. So I'd guess that I don't need to build it from this separate package. However, the driver apparently fails to load the firmware for the USB-wlan stick (rt2870.bin), as is also indicated by the thread starter. I'd also guess that this firmware is independent of host system. If not, I'd only need to build this .bin-file. Please supply some hints or at least some pointers to some comprehensive information. I'm using a BF526 system.

                • 5. Re: RT3070 USB WIFI module can not loading firmware

                  Could you start a new help thread instead of reply on the ancient ones?

                  • 6. Re: RT3070 USB WIFI module can not loading firmware

                    Well, in most cases, it is usual to append comparable stuff to an existing thread in order to contribute to not fragmentarizing topics - and in this this case the thread is really not old. Moreover: appending to an existing thread shows that topic issuers did not issue without a prior forum search.


                    Regarding the question: Is firmware loaded into the wifi-stick (in this case rt2870.bin) always the same, regardless the architecture of the host system? The page http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:wifi_over_usb&s[]=wifi suggests that a firmware file can be taken "off the shelf".

                    (BTW: I am surprised by the complexity of getting wifi working. It is much easier to establish an internet connection via a 3G-stick)

                    • 7. Re: RT3070 USB WIFI module can not loading firmware

                      One thread for one issue and one author makes it easy for us the track the status of issues, thanks for your understanding.


                      We happened to use the RT2870 module a while ago so there is something we can share, but indeed you need to consult them if have more issues. check if you have missed the following, the RT30xxEEPROM.bin is attached.


                      In the file rtusb_dev_id.c we need to add to the structure rtusb_dev_id the following:



                      also might need to do the following for the RT3370 module for the driver the come up properly.

                      1. Add the attached file RT30xxEEPROM.bin  in folder /tmp/ once the kernel has come up.

                      2. This is mainly done since the ee_fuse start and end values are different for the module. We have got updated files from Ralink for this but this can be handled also using the attached file since it will read the EEPROM values from the file.