[Bug 1960910] [NEW] Cannot connect to WPA and Open Network

Penny Chiu 1960910 at bugs.launchpad.net
Tue Feb 15 10:03:26 UTC 2022


Public bug reported:

Description:    Ubuntu 20.04.3 LTS                                                                                                                                                                            
Release:        20.04 
netcfg version: 1.142ubuntu8

What you expected to happen:
Use oem-config debconf mode, in network configuration step, we can setup wifi network connection by choosing ESSID from ESSID list and entering WPA/WPA2 key.

What happened instead:
Choose an ESSID from ESSID list, then enter WPA/WPA2 key. Wait a moment, it showed the error 'Failure of key exchange and association'
If I change to enter ESSID manually and WPA/WPA2 key, it can connect to the ESSID successfully.

More information:
I traced netcfg source code which was downloaded from http://archive.ubuntu.com/ubuntu/pool/main/n/netcfg/netcfg_1.142ubuntu8.tar.xz.

I saw netcfg.c has defined the state machine in main loop. Depend on different state, the network interface will be up/down. For example, config a WPA wireless network and with DHCP method, I list the state flow, and the wlan0 status after this state as below:
1. GET_INTERFACE (wlan0 down)
2. WCONFIG (no change)
3. WCONFIG_ESSID (wlan0 is up first. If choose essid from the list, wlan0 will be down; if choose enter essid manually, wlan0 will keep up)
4. WCONFIG_SECURITY_TYPE (no change)
5. WCONFIG_WPA (no change)
6. START_WPA (no change)
7. GET_METHOD (no change)
8. GET_DHCP (wlan0 up)

The issue I encountered is choosing essid from the list, wlan0 will be
down, so I could see the below errors in syslog during START_WPA state:

Dec 2 04:37:11 localhost netcfg[8076]: INFO: buf = wpa_state=INTERFACE_DISABLED#012address=00:16:01:80:8a:47#012uuid=c9148e48-dd38-516c-80e
Dec 2 04:37:51 localhost netcfg[8076]: message repeated 8 times: [ INFO: buf = wpa_state=INTERFACE_DISABLED#012address=00:16:01:80:8a:47#0]
Dec 2 04:37:53 localhost wpa_supplicant[4114]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-100

And this causes the configuration is failed. But if I choose enter essid
manually, it will be successful because wlan0 keeps up during START_WPA
state.

My first question is: Why not keeping the wlan0 is up for both use cases
because it needs to send commands to wpa_supplicant daemon during
START_WPA state?

Another example is setting Open Network. I choose ‘Open Network’ and left wep key as blank. From syslog, I didn’t see the association with access point during WCONFIG_WEP state. Is this expected?
It will be failed due to wlan is carrier down:

Dec 2 05:22:48 localhost netcfg[6898]: DEBUG: State is now 0
Dec 2 05:22:48 localhost netcfg[6898]: DEBUG: Want link on wlan0
Dec 2 05:22:48 localhost netcfg[6898]: INFO: Waiting time set to 3
Dec 2 05:22:49 localhost netcfg[6898]: INFO: ethtool-lite: wlan0: carrier down
Dec 2 05:22:50 localhost netcfg[6898]: message repeated 5 times: [ INFO: ethtool-lite: wlan0: carrier down]

My second question is: Is this expected without association with access
point before doing DHCPDISCOVER?

** Affects: netcfg (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netcfg in Ubuntu.
https://bugs.launchpad.net/bugs/1960910

Title:
  Cannot connect to WPA and Open Network

Status in netcfg package in Ubuntu:
  New

Bug description:
  Description:    Ubuntu 20.04.3 LTS                                                                                                                                                                            
  Release:        20.04 
  netcfg version: 1.142ubuntu8

  What you expected to happen:
  Use oem-config debconf mode, in network configuration step, we can setup wifi network connection by choosing ESSID from ESSID list and entering WPA/WPA2 key.

  What happened instead:
  Choose an ESSID from ESSID list, then enter WPA/WPA2 key. Wait a moment, it showed the error 'Failure of key exchange and association'
  If I change to enter ESSID manually and WPA/WPA2 key, it can connect to the ESSID successfully.

  More information:
  I traced netcfg source code which was downloaded from http://archive.ubuntu.com/ubuntu/pool/main/n/netcfg/netcfg_1.142ubuntu8.tar.xz.

  I saw netcfg.c has defined the state machine in main loop. Depend on different state, the network interface will be up/down. For example, config a WPA wireless network and with DHCP method, I list the state flow, and the wlan0 status after this state as below:
  1. GET_INTERFACE (wlan0 down)
  2. WCONFIG (no change)
  3. WCONFIG_ESSID (wlan0 is up first. If choose essid from the list, wlan0 will be down; if choose enter essid manually, wlan0 will keep up)
  4. WCONFIG_SECURITY_TYPE (no change)
  5. WCONFIG_WPA (no change)
  6. START_WPA (no change)
  7. GET_METHOD (no change)
  8. GET_DHCP (wlan0 up)

  The issue I encountered is choosing essid from the list, wlan0 will be
  down, so I could see the below errors in syslog during START_WPA
  state:

  Dec 2 04:37:11 localhost netcfg[8076]: INFO: buf = wpa_state=INTERFACE_DISABLED#012address=00:16:01:80:8a:47#012uuid=c9148e48-dd38-516c-80e
  Dec 2 04:37:51 localhost netcfg[8076]: message repeated 8 times: [ INFO: buf = wpa_state=INTERFACE_DISABLED#012address=00:16:01:80:8a:47#0]
  Dec 2 04:37:53 localhost wpa_supplicant[4114]: wlan0: CTRL-EVENT-SCAN-FAILED ret=-100

  And this causes the configuration is failed. But if I choose enter
  essid manually, it will be successful because wlan0 keeps up during
  START_WPA state.

  My first question is: Why not keeping the wlan0 is up for both use
  cases because it needs to send commands to wpa_supplicant daemon
  during START_WPA state?

  Another example is setting Open Network. I choose ‘Open Network’ and left wep key as blank. From syslog, I didn’t see the association with access point during WCONFIG_WEP state. Is this expected?
  It will be failed due to wlan is carrier down:

  Dec 2 05:22:48 localhost netcfg[6898]: DEBUG: State is now 0
  Dec 2 05:22:48 localhost netcfg[6898]: DEBUG: Want link on wlan0
  Dec 2 05:22:48 localhost netcfg[6898]: INFO: Waiting time set to 3
  Dec 2 05:22:49 localhost netcfg[6898]: INFO: ethtool-lite: wlan0: carrier down
  Dec 2 05:22:50 localhost netcfg[6898]: message repeated 5 times: [ INFO: ethtool-lite: wlan0: carrier down]

  My second question is: Is this expected without association with
  access point before doing DHCPDISCOVER?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netcfg/+bug/1960910/+subscriptions




More information about the foundations-bugs mailing list