7 Replies Latest reply on Feb 16, 2014 4:58 PM by X_Y

    wifi not working

    X_Y

      I'm testing Galileo with Intel Wireless-N 135, however I have great difficulties getting it to work.

       

      So I've updated the firmware to 00782, and using the LINUX_IMAGE_FOR_SD_Intel_Galileo_v0.7.5 in a SD card to boot Galileo.

       

      I've been running the following commands:

       

      root@clanton:~# ifconfig wlan0 up

      root@clanton:~# iwconfig wlan0 essid MY_NETWORK_NAME

       

      and getting the following results:

       

      [  201.466911] wlan0: authenticate with 58:6d:8f:d8:35:5a

      [  201.486545] wlan0: send auth to 58:6d:8f:d8:35:5a (try 1/3)

      [  201.495763] wlan0: authenticated

      root@clanton:~# [  201.503726] wlan0: associate with 58:6d:8f:d8:35:5a (try 1/3)

      [  201.514475] wlan0: RX AssocResp from 58:6d:8f:d8:35:5a (capab=0x401 status=0 aid=4)

      [  201.528978] wlan0: associated

      [  201.537008] wlan0: deauthenticating from 58:6d:8f:d8:35:5a by local choice (reason=3)

      [  201.564663] cfg80211: Calling CRDA to update world regulatory domain

       

      Seems like wlan0 is losing connection by iteself.

       

      and then if I run

       

      root@clanton:~# ifup wlan0

       

      It shows up like this:

       

      udhcpc (v1.20.2) started

      Sending discover...

      Sending discover...

      Sending discover...

      No lease, failing

       

      Or if I run udhcpc wlan0, the same result.

       

      I've tried the tutorial by Sergey Kiselev(Intel Galileo Meets Wireless - Malinov Family Web Presence) but nothing works either.

       

      What's the problem here? I'm not familiar with linux command line so these things are really getting me confused.

        • 1. Re: wifi not working
          rmm200

          Hitting the easy items first - what kind of antenna are you using? Inadequate signal could cause loss of connection.

          Are you set up to get an address through DHCP? There are all kind of potential errors you could make if you are not using DHCP. It can also help to watch the connected devices display on your router.

           

          Just to encourage you that it can work - my Galileo has been connected through WiFi 24/7 for over a week now.

          • 2. Re: wifi not working
            X_Y

            Hi rmm200, Thanks very much for the encouragement! It does helps

            I'm using this kind of antenna:

            2014-02-16 20.53.39.jpg

            But I don't think it's the problem, since the deauthentication always happen when I run


                iwconfig wlan0 essid MY_NETWORK_NAME

             

            ,and if I run

             

                iwlist scan

             

            it never fails in reporting the whole list.

             

            I think it's running on hdhcpc, if I get it correct. Never changed the configuration so it should be default settings.

            • 3. Re: wifi not working
              rmm200

              I used Sergey's instructions - exactly, including setting the passphrase, and "auto wlan0" in /etc/network/interfaces.

              Every time I boot - WiFi just comes up automatically. Two differences I may have - I am using an N6235, and I am using WPA.

               

              Your trace looks different than Sergey's in that you never got an IP address assigned. If you reboot your board, how does the trace look? Is your router logging any errors?

              • 4. Re: wifi not working
                X_Y

                I tried adding wlan0 to boot, nothing changes though. I get these in my bootup log:

                 

                [   14.167776] cfg80211: Calling CRDA to update world regulatory domain

                [   14.211190] Intel(R) Wireless WiFi driver for Linux, in-tree:

                [   14.216992] Copyright(c) 2003-2012 Intel Corporation

                [   14.223266] iwlwifi 0000:01:00.0: enabling device (0000 -> 0002)

                [   14.321932] iwlwifi 0000:01:00.0: loaded firmware version 18.168.6.1

                [   14.622154] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEBUG disabled

                [   14.628145] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEBUGFS disabled

                [   14.634442] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled

                [   14.643677] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEVICE_TESTMODE disabled

                [   14.650672] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_P2P disabled

                [   14.656502] iwlwifi 0000:01:00.0: Detected Intel(R) Centrino(R) Wireless-N 135 BGN, REV=0x120

                [   14.672560] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S

                 

                 

                Configuring network interfaces... Successfully initialized wpa_supplicant

                [   18.760145] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S

                [   18.773543] iwlwifi 0000:01:00.0: Radio type=0x0-0x0-0x0

                [   19.006841] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S

                [   19.020238] iwlwifi 0000:01:00.0: Radio type=0x0-0x0-0x0

                [   19.465443] NET: Registered protocol family 10

                [   19.505116] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

                udhcpc (v1.20.2) started

                Sending discover...

                Sending discover...

                Sending discover...

                No lease, failing

                • 5. Re: wifi not working
                  X_Y

                  Dan, just got it to work. I setup a WPA network with my phone and Galileo connected with a snap. It really frustrates me though, why an unprotected network wouldn't work. Would be great if there's some explanation for it. I'm going to try WPA2 next.

                  • 6. Re: wifi not working
                    rmm200

                    Congratulations! Who cares why, as long as it works....

                     

                    Just for comparison, my trimmed dmesg output for WiFi is:

                     

                    [   18.913937] Intel(R) Wireless WiFi driver for Linux, in-tree:

                    [   18.919736] Copyright(c) 2003-2012 Intel Corporation

                    [   19.068464] iwlwifi 0000:01:00.0: enabling device (0000 -> 0002)

                    [   19.074731] iwlwifi 0000:01:00.0: enabling bus mastering

                    [   19.145868] iwlwifi 0000:01:00.0: irq 44 for MSI/MSI-X

                    [   19.465641] iwlwifi 0000:01:00.0: loaded firmware version 18.168.6.1

                    [   20.329054] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEBUG disabled

                    [   20.335190] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEBUGFS disabled

                    [   20.341472] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled

                    [   20.348239] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEVICE_TESTMODE disabled

                    [   20.355222] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_P2P enabled

                    [   20.361086] iwlwifi 0000:01:00.0: Detected Intel(R) Centrino(R) Advanced-N 6235 AGN, REV=0xB0

                    [   20.783971] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S

                    [   21.179257] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'

                    [   41.226429] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S

                    [   41.260254] iwlwifi 0000:01:00.0: Radio type=0x2-0x1-0x0

                    [   41.753437] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S

                    [   41.790253] iwlwifi 0000:01:00.0: Radio type=0x2-0x1-0x0

                    [   42.080504] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

                    [   59.727279] wlan0: authenticate with 84:1b:5e:46:14:ab

                    [   59.763615] wlan0: send auth to 84:1b:5e:46:14:ab (try 1/3)

                    [   59.773530] wlan0: authenticated

                    [   59.803268] wlan0: waiting for beacon from 84:1b:5e:46:14:ab

                    [   60.000287] wlan0: associate with 84:1b:5e:46:14:ab (try 1/3)

                    [   60.012120] wlan0: RX AssocResp from 84:1b:5e:46:14:ab (capab=0x11 status=0 aid=9)

                    [   60.038561] wlan0: associated

                    [   60.041862] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

                     

                    and ifconfig:

                     

                    root@clanton:~# ifconfig

                    eth0      Link encap:Ethernet  HWaddr 98:4f:ee:00:09:6f

                              UP BROADCAST MULTICAST  MTU:1500  Metric:1

                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:1 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:0 (0.0 B)  TX bytes:322 (322.0 B)

                              Interrupt:40 Base address:0xc000

                     

                     

                    lo        Link encap:Local Loopback

                              inet addr:127.0.0.1  Mask:255.0.0.0

                              inet6 addr: ::1/128 Scope:Host

                              UP LOOPBACK RUNNING  MTU:65536  Metric:1

                              RX packets:218 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:218 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:0

                              RX bytes:15744 (15.3 KiB)  TX bytes:15744 (15.3 KiB)

                     

                     

                    wlan0     Link encap:Ethernet  HWaddr b4:b6:76:f7:51:16

                              inet addr:192.168.1.110  Bcast:192.168.1.255  Mask:255.255.255.0

                              inet6 addr: fe80::b6b6:76ff:fef7:5116/64 Scope:Link

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:921163 errors:0 dropped:209721 overruns:0 frame:0

                              TX packets:77675 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:162878374 (155.3 MiB)  TX bytes:16781099 (16.0 MiB)

                     

                    Note the bytes received / transferred...

                    • 7. Re: wifi not working
                      X_Y

                      Thanks for the help! I kind of get a hang on it, it's possible to connect to all of open, WPA and WPA2 networks. So here's my discovery:

                       

                      All what you need to do is define the networks in "/etc/wpa_supplicant.conf", and call ifup wlan0 to connect. The command will make it to try out the definitions in sequence. You can add multiple network blocks to it, here's my example file:

                       

                      network={

                           ssid="OPEN_NETWORK"

                           psk_mgmt=NONE

                      }

                      network={

                           ssid="WPA/WPA2_PROTECTED_NETWORK"

                           psk=GENREATED_BY_WPA_PASSPHRASE

                      }

                       

                      The first one is an open network(unencrypted, plain-text) and the second supports both WPA/WPA2. The psk needs to be generated by wpa_passphrase command, as described in Intel Galileo Meets Wireless - Malinov Family Web Presence. Regarding the configuration file, I find this article being most informative: http://www.lsi.upc.edu/lclsi/Manuales/wireless/files/wpa_supplicant.conf

                       

                      If the file is changed, you have to call ifdown wlan0 first so the changes will apply.

                       

                       

                      I spent quite some time looking into ifconfig, iwconfig etc. But they don't seem to be very helpful here. Since dhclient command doesn't exist in Galileo, I have to run ifup anyways.

                       

                      Again, I don't have much ideas about either command line or networks, so correct me if I'm wrong.

                      1 of 1 people found this helpful