3 Replies Latest reply on Mar 8, 2015 9:53 PM by Zigenz

    Trouble getting RTL8188-based USB WiFi dongle working

    Zigenz

      Hi guys,

       

      I have an Edimax EW-7811Un USB WiFi dongle that I have previously had running on a Raspberry Pi with virtually no difficulty.  Obviously didn't expect the process to be as straightforward on the Galileo Gen 1 (as I like my Yocto to be as lean and mean as possible) but have hit somewhat of a snag.

       

      I followed rgb's instructions in Setting up a Galileo Gen 1 to work with  a Realtek RTL8188CUS USB Wireless Adaptor, albeit taking AlexT_Intel's advice and installing only linux-firmware-rtl8192cu rather than all the firmware packages.  My AP has WP2-PSK configured so obviously I have modified /etc/wpa_supplicant.conf file accordingly.

       

      Problem is, when I have run through the motions and try to bring the adapter up, using "ifup wlan0", I receive the error message: SIOCSIFFLAGS: Operation not possible due to RF-kill.

       

      When I run an "rfkill list", the following is output to stdout:

      0: phy0: wlan

          Soft blocked: yes

          Hard blocked: no

      No matter what rfkill arguments I try ("0", "wifi", "all"), the soft block will not disappear.

       

      Note also that I am using a USB OTG cable rather than a conventional Micro-B Male : Type A Male adapter and a gender changer; I doubt this makes a difference but I am mentioning just in case.

       

      Really struggling with this one.  Any guidance appreciated!

       

      Cheers,

      Z

        • 1. Re: Trouble getting RTL8188-based USB WiFi dongle working
          rgb

          Hi Zigenz

          My first bit of advice about using a wifi dongle is don't. It doesn't work well and ties up the only usb port you have free, and using a usb hub just makes it harder to work. Better to use one of the two approved pci wifi cards.

          As for the rfkill, what version of linux are you using? I am using AlexT's AlexT_Intel version of standard Yocto with development tools added and I don't have rfkill, so assume you are mixing distributions, which will cause problems, or have installed some other package.

          As for the cable, does lsusb show the wifi dongle? and do you have all the modules?

          Run modprobe -l |grep rtl  and you should have the following

          kernel/drivers/net/wireless/rtlwifi/rtl8192cu/rtl8192cu.ko

          kernel/drivers/net/wireless/rtlwifi/rtlwifi.ko

          kernel/drivers/net/wireless/rtlwifi/rtl8192c/rtl8192c-common.ko

          Connecting to an access point with a passkey has proven troublesome to me but alexT was able to do it with little problem, so maybe my setup.

          Anyway
          AlexT recommends making a .conf file, example wifi.conf, make it executable, and just have one entry in it - rtl8192cu - and put it in /etc/modules-load.d

          Alex also wrote a script and put it in /etc/init.d/restartwifi
          #!/bin/sh

          TRIES=5
          TRY_DELAY=5

          TRY=1

          while [ $TRY -le $TRIES ]; do
             WLAN_ACTIVE=`ifconfig wlan0 |grep 'inet addr'`
             echo "Activating Wi-Fi - try $TRY..."
             if [ x"$WLAN_ACTIVE" = x"" ]; then
               echo "Interface wlan0 has no IP assigned - reactivating"
               killall wpa_supplicant
               ifdown wlan0
               ifup wlan0
             else
               echo "Interface already active, skipping..."
               exit 0
             fi
             sleep $TRY_DELAY
             let TRY=$TRY+1
          done

           

          good luck

          rgb

          • 2. Re: Trouble getting RTL8188-based USB WiFi dongle working
            AlexT_Intel

            Well, I'd say this seems to be a different case. In your one, I think we've established that there's some trouble with the dongle, either due to the dongle itself or the cable, or the radiowave environment at your lab - because it worked, but only really close to the AP. That may have caused other issues related to the interface activation at boot - and I think Zigenz hasn't yet come to that point anyway.

             

            My experience with using dongles isn't that bad and while it indeed takes the USB port, if you don't need it for anything else, it's just fine. If you want to do some webcam data capturing or work with other periferals, then indeed a mPCIe-based WiFe adapter would be a better choice.

             

            Now, to the issue itself, Zigenz, I assume you've ensured that your specific WiFi chipset is supported by the rtl8192cu module and you have the correct firmware loaded (even of the driver is teh same, you might need a different firmware for your specific model), so that rfkill error is indeed a bit interesting. I haven't seen anything like that with my board, I've used it with two different dongles (though the driver for one of those was utterly unstable, experimental one). Which rfkill subcommands have you tried? I don't have a board at hand to check, but on Edison that would've been something like "rfkill unblock wifi". What do you get after running this?

            • 3. Re: Trouble getting RTL8188-based USB WiFi dongle working
              Zigenz

              Thanks AlexT_Intel.  I agree that there should be no problem with the USB dongle.

               

              I have been a bit diverted on other activities lately, but will follow your advice and provide the feedback soon.