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.
Hi rmm200, Thanks very much for the encouragement! It does helps
I'm using this kind of antenna:
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
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.
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?
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 184.108.40.206
[ 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
No lease, failing
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 220.127.116.11
[ 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
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
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
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
RX bytes:162878374 (155.3 MiB) TX bytes:16781099 (16.0 MiB)
Note the bytes received / transferred...
1 of 1 people found this helpful
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:
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.