Bananian

Can't connect via wifi after disconnecting wired network

11 2273
AR9285  
Edited by AR9285 at Mon Sep 28, 2015 04:56

Hi,
I'm using bananian 15.08 on banana pro, /etc/network/interfaces and wpa_suppicant.conf are configured per wiki.

Both wireless and wired network are connected, say:
Wired network: 192.168.1.106
Wireless network: 192.168.1.105
And I can ssh to the bPro via both wireless and wired network.

However:

1. I can't see the wireless client in router's page, only wired client are shown
2. After pulling out the ethernet cable, I can't connect to the bPro via wireless. Reconnecting the ethernet cable and check the log only to found out that wireless stay connected after ethernet cable are unplugged. But I cannot connect to it.
Here is the log:
  1. Sep 28 17:47:26 debian-bpro dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
  2. Sep 28 17:47:26 debian-bpro dhclient: DHCPOFFER from 192.168.1.1
  3. Sep 28 17:47:26 debian-bpro dhclient: DHCPACK from 192.168.1.1
  4. Sep 28 17:47:26 debian-bpro dhclient: bound to 192.168.1.105 -- renewal in 77403 seconds.
  5. Sep 28 17:47:28 debian-bpro ntpd[1212]: Listen normally on 9 wlan0 192.168.1.105 UDP 123
  6. Sep 28 17:47:28 debian-bpro ntpd[1212]: peers refreshed
  7. Sep 28 17:47:32 debian-bpro kernel: [  916.484365] [ap6210] Chip: a962 Rev 1 Pkg 9
  8. Sep 28 17:47:32 debian-bpro kernel: [  927.423911] wlan0: no IPv6 routers present
  9. Sep 28 17:49:54 debian-bpro kernel: [ 1069.487608] PHY: sunxi_gmac-0:00 - Link is Down
  10. Sep 28 17:50:15 debian-bpro kernel: [ 1090.498314] PHY: sunxi_gmac-0:00 - Link is Up - 100/Full
Copy the Code


Also it seems that I cannot reliably get DHCPOFFER from the router.

Any ideas?

Thanks!
nebkas  
Hi AR9285,

could you paste the settings from your /etc/network/interfaces file?

There must be an entry something like:

auto wlan0
iface wlan0 inet dhcp

greets

Nebkas

AR9285  
Edited by AR9285 at Mon Sep 28, 2015 05:24
nebkas replied at Mon Sep 28, 2015 05:13
Hi AR9285,

could you paste the settings from your /etc/network/interfaces file?

Thanks.

/etc/network/interfaces :
  1. # interfaces(5) file used by ifup(8) and ifdown(8)
  2. # Include files from /etc/network/interfaces.d:
  3. source-directory /etc/network/interfaces.d

  4. auto lo
  5. iface lo inet loopback

  6. auto eth0

  7. # dhcp configuration
  8. iface eth0 inet dhcp

  9. # static ip configuration
  10. #iface eth0 inet static
  11. #       address 192.168.6.241
  12. #       netmask 255.255.255.0
  13. #       gateway 192.168.6.1

  14. auto wlan0
  15. iface wlan0 inet dhcp
  16. pre-up wpa_supplicant -d -B -Dwext -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
  17. pre-down killall -q wpa_supplicant
Copy the Code


wpa_suppicant.conf:
  1. ap_scan=1 # use the wpa_supplicant to scan and choose the AP
  2. network={
  3. ssid="myAP"
  4. psk="blah"
  5. }
Copy the Code

Now only once in 10 attempts I can get DHCPACK and bound to an address. The other 9 times no DHCPOFFER was received, no DHCPDISCOVER shown up in router's log.

Thanks!

AR9285  
Edited by AR9285 at Mon Sep 28, 2015 05:30
nebkas replied at Mon Sep 28, 2015 05:13
Hi AR9285,

could you paste the settings from your /etc/network/interfaces file?

Because I used '-d' switch on wpa_suppicant, I see some suspicious output: (wlan0: State: DISCONNECTED -> DISCONNECTED)


  1. WEXT: cfg80211-based driver detected
  2. wext: interface wlan0 phy: phy0
  3. rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
  4. rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
  5. SIOCGIWRANGE: WE(compiled)=22 WE(source)=19 enc_capa=0xf
  6.   capabilities: key_mgmt 0xf enc 0x1f flags 0x0
  7. netlink: Operstate: ifindex=4 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
  8. Add interface wlan0 to a new radio phy0
  9. wlan0: Own MAC address: 98:3b:16:e8:11:72
  10. wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
  11. wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
  12. wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
  13. wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
  14. wpa_driver_wext_set_key: alg=0 key_idx=4 set_tx=0 seq_len=0 key_len=0
  15. ioctl[SIOCSIWENCODEEXT]: Invalid argument
  16. Driver did not support SIOCSIWENCODEEXT
  17. wpa_driver_wext_set_key: alg=0 key_idx=5 set_tx=0 seq_len=0 key_len=0
  18. ioctl[SIOCSIWENCODEEXT]: Invalid argument
  19. Driver did not support SIOCSIWENCODEEXT
  20. wpa_driver_wext_set_countermeasures
  21. wlan0: RSN: flushing PMKID list in the driver
  22. wlan0: Setting scan request: 0.100000 sec
  23. TDLS: TDLS operation not supported by driver
  24. TDLS: Driver uses internal link setup
  25. wlan0: WPS: UUID based on MAC address: 6b35fe7f-aaec-5797-8b6a-07b3edaa6cf9
  26. EAPOL: SUPP_PAE entering state DISCONNECTED
  27. EAPOL: Supplicant port status: Unauthorized
  28. EAPOL: KEY_RX entering state NO_KEY_RECEIVE
  29. EAPOL: SUPP_BE entering state INITIALIZE
  30. EAP: EAP entering state DISABLED
  31. wlan0: Added interface wlan0
  32. wlan0: State: DISCONNECTED -> DISCONNECTED
  33. wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
  34. netlink: Operstate: ifindex=4 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
  35. Daemonize..
  36. Internet Systems Consortium DHCP Client 4.3.1
  37. Copyright 2004-2014 Internet Systems Consortium.
  38. All rights reserved.
  39. For info, please visit [url=https://www.isc.org/software/dhcp/]https://www.isc.org/software/dhcp/[/url]

  40. Listening on LPF/wlan0/98:3b:16:e8:11:72
  41. Sending on   LPF/wlan0/98:3b:16:e8:11:72
  42. Sending on   Socket/fallback
  43. DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
  44. DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
  45. ....
  46. (no dhcpoffer received.)
Copy the Code


...and also in syslog: ([ap6210] wl_iw_set_wap: WLC_REASSOC failed (-22).)
  1. Sep 28 19:25:29 debian-bpro dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
  2. Sep 28 19:25:30 debian-bpro kernel: [  669.625858] [ap6210] Chip: a962 Rev 1 Pkg 9
  3. Sep 28 19:25:30 debian-bpro kernel: [  671.089844] [ap6210] scan is not ready
  4. Sep 28 19:25:30 debian-bpro kernel: [  671.117352] [ap6210] Setting the D11auth 1
  5. Sep 28 19:25:30 debian-bpro kernel: [  671.140090] [ap6210] wl_iw_set_wap: WLC_REASSOC failed (-22).
  6. Sep 28 19:25:32 debian-bpro dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
  7. Sep 28 19:25:34 debian-bpro ntpd[1348]: Listen normally on 9 wlan0 fe80::9a3b:16ff:fee8:1172 UDP 123
  8. Sep 28 19:25:34 debian-bpro ntpd[1348]: peers refreshed
  9. Sep 28 19:25:40 debian-bpro kernel: [  680.713882] wlan0: no IPv6 routers present
Copy the Code

nebkas  
May you could put this into your /etc/network/interfaces

  1. allow-hotplug eth0
  2. allow-hotplug wlan0
Copy the Code


Does it work in static configuration from wlan0?

AR9285  
Edited by AR9285 at Mon Sep 28, 2015 05:47
nebkas replied at Mon Sep 28, 2015 05:31
May you could put this into your /etc/network/interfaces

Thanks.

I can use static ip address to connect, but the problem in #1 persists.

  1. auto wlan0
  2. allow-hotplug wlan0
  3. iface wlan0 inet static
  4. pre-up wpa_supplicant -d -B -Dwext -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
  5. address 192.168.1.110
  6. netmask 255.255.255.0
  7. pre-down killall -q wpa_supplicant
Copy the Code


While connected:
  1. # iwconfig
  2. wlan0     Link encap:Ethernet  HWaddr 98:3b:16:e8:11:72  
  3.           inet addr:192.168.1.110  Bcast:192.168.1.255  Mask:255.255.255.0
  4.           inet6 addr: fe80::9a3b:16ff:fee8:1172/64 Scope:Link
  5.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  6.           RX packets:26 errors:0 dropped:0 overruns:0 frame:0
  7.           TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
  8.           collisions:0 txqueuelen:1000
  9.           RX bytes:2542 (2.4 KiB)  TX bytes:11754 (11.4 KiB)
Copy the Code

  1. #route -nv
  2. Kernel IP routing table
  3. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  4. 0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
  5. 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
  6. 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
Copy the Code



And I can ping 192.168.1.110 from my other machine.
After pulling out the ethernet cable, I cannot ping 192.168.1.110 anymore.

nebkas  
ah ok.

Try to add:

  1. gateway 192.168.1.1
Copy the Code


and maybe a nameserver to your wlan0 device

It seems like wlan0 doesn' know where to put the packages

nebkas  
And what does show you

iptables -nvL

AR9285  
1. rt5370 USB wifi adapter - same problem, but can get DHCPACK more reliably
2. static address - same problem

So:
1. not ap6120 driver issue, not an ap6181 hardware issue
2. not DHCP issue

What could be the problem?

nebkas  
In your logfile i'd seen that u use the 'wext' driver for your wlan0. Maybe you can use a propper  rt5370 driver.

Sorry that I couldn't help you so long

You have to log in before you can reply Login | Sign Up

Points Rules