* iwd configure location and files
@ 2021-11-30 20:45 Jupiter
0 siblings, 0 replies; 16+ messages in thread
From: Jupiter @ 2021-11-30 20:45 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 3349 bytes --]
Hi,
I was running connman with wpa_supplicant on an embedded IoT device
with 2 wireless network interfaces, a home WiFi network and a 4G LTE
network interface managed by ofono, it was working well. Given the
connman is moving to using iwd, I am now building iwd 1.19 on Yocto
Honister, while the iwd was running well, it could not connect to the
home WiFi network.
# systemctl status iwd -l
* iwd.service - Wireless service
Loaded: loaded
(8;;file://solar/lib/systemd/system/iwd.service/lib/systemd/system/iwd.service8;;;
enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-08-04 15:11:22 UTC; 1min 34s ago
Main PID: 203 (iwd)
CGroup: /system.slice/iwd.service
`-203 /usr/libexec/iwd
Aug 04 15:11:23 solar iwd[203]: 48.0 Mbps
Aug 04 15:11:23 solar iwd[203]: 54.0 Mbps
Aug 04 15:11:23 solar iwd[203]: HT Capabilities:
Aug 04 15:11:23 solar iwd[203]: HT20
Aug 04 15:11:23 solar iwd[203]: Short GI for 20Mhz
Aug 04 15:11:23 solar iwd[203]: HT RX MCS indexes:
Aug 04 15:11:23 solar iwd[203]: 0-7
Aug 04 15:11:23 solar iwd[203]: 32
Aug 04 15:11:23 solar iwd[203]: Ciphers: CCMP TKIP BIP
Aug 04 15:11:23 solar iwd[203]: Supported iftypes: station ap
p2p-client p2p-go
I could see the WiFi network, but could not scan, nor could connect to
the network:
[iwd]# station mlan0 scan
[iwd]# station wlan0 get-networks
Available networks
--------------------------------------------------------------------------------
Network name Security Signal
--------------------------------------------------------------------------------
JupiterIoT psk ****
# station wlan0 connect JupiterIoT
Type the network passphrase for JupiterIoT psk.
Passphrase: superpassphrase
Operation aborted
# iwctl station wlan0 show
Station: wlan0
--------------------------------------------------------------------------------
Settable Property Value
--------------------------------------------------------------------------------
Scanning no
State disconnected
I believe it is not configured properly. According to the the document
https://iwd.wiki.kernel.org/networkconfigurationsettings, the network
configure files are stored in /var/lib/iwd by default, but I can only
see an empty folder /var/lib/iwd/hotspot, there are several files in
/lib/systed/network:
# ls /lib/systemd/network
80-container-host0.network 80-wifi-ap.network.example
80-container-ve.network 80-wifi-station.network
80-container-vz.network 80-wifi-station.network.example
80-iwd.link 80-wired.network
80-vm-vt.network 99-default.link
80-wifi-adhoc.network
Did you mean I need to copy network files from /lib/systemd/network to
/var/lib/iwd? For example, to run iwd for a home WiFi network, should
I copy the 80-wifi-station.network to /var/lib/iwd?
Thank you and appreciate your kind advice.
Kind regards,
- jh
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 20:52 James Prestwood
0 siblings, 0 replies; 16+ messages in thread
From: James Prestwood @ 2021-11-30 20:52 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 2866 bytes --]
Hi jh,
> I could see the WiFi network, but could not scan, nor could connect to
> the network:
>
> [iwd]# station mlan0 scan
>
> [iwd]# station wlan0 get-networks
>
> Available networks
> -----------------------------------------------------------------------
> ---------
> Network name Security Signal
> -----------------------------------------------------------------------
> ---------
> JupiterIoT psk ****
So scanning is working here...
>
> # station wlan0 connect JupiterIoT
> Type the network passphrase for JupiterIoT psk.
> Passphrase: superpassphrase
> Operation aborted
...but not connecting. For PSK networks you should not need to put
anything in /var/lib/iwd. iwctl will ask for a passphrase as you saw
and if successful a new file (JupiterIoT.psk in your case) will be
created.
Without any debug logs this gonna be difficult to see whats going on.
If you could enable debug logging when starting IWD and capture some
logs that would give us a better idea of whats going on.
https://iwd.wiki.kernel.org/debugging
>
> # iwctl station wlan0 show
> Station: wlan0
> -----------------------------------------------------------------------
> ---------
> Settable Property Value
> -----------------------------------------------------------------------
> ---------
> Scanning no
> State disconnected
>
>
> I believe it is not configured properly. According to the the document
> https://iwd.wiki.kernel.org/networkconfigurationsettings, the network
> configure files are stored in /var/lib/iwd by default, but I can only
> see an empty folder /var/lib/iwd/hotspot, there are several files in
> /lib/systed/network:
>
> # ls /lib/systemd/network
>
> 80-container-host0.network 80-wifi-ap.network.example
> 80-container-ve.network 80-wifi-station.network
> 80-container-vz.network 80-wifi-station.network.example
> 80-iwd.link 80-wired.network
> 80-vm-vt.network 99-default.link
> 80-wifi-adhoc.network
>
> Did you mean I need to copy network files from /lib/systemd/network to
> /var/lib/iwd? For example, to run iwd for a home WiFi network, should
> I copy the 80-wifi-station.network to /var/lib/iwd?
No, /var/lib/iwd contains IWD-specific provisioning files for networks
and a few other uses. Don't copy these systemd networks there.
Thanks,
James
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 21:29 Jupiter
0 siblings, 0 replies; 16+ messages in thread
From: Jupiter @ 2021-11-30 21:29 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 18030 bytes --]
Hi James,
Thanks for your kind response and debug instructions.
> Without any debug logs this gonna be difficult to see whats going on.
> If you could enable debug logging when starting IWD and capture some
> logs that would give us a better idea of whats going on.
>
> https://iwd.wiki.kernel.org/debugging
Here is debugging:
# /usr/libexec/iwd -d 'station*' > iwd.log
$ sed -E "s/([0-9a-fA-F]{2}:?){6}/11:22:33:44:55:66/" iwd.log | sed -e
"s/SSID:\ .*, f/SSID: xxx f/" | sed 's/Added new Network .*
security/Added new Network "xxx" security/'
# /usr/libexec/iwd -d 'station*'
Wireless daemon version 1.19
Loaded configuration from /etc/iwd/main.conf
Wiphy: 0, Name: phy0
Permanent Address: 11:22:33:44:55:66
2.4Ghz Band:
Bitrates (non-HT):
1.0 Mbps
2.0 Mbps
5.5 Mbps
11.0 Mbps
6.0 Mbps
9.0 Mbps
12.0 Mbps
18.0 Mbps
24.0 Mbps
36.0 Mbps
48.0 Mbps
54.0 Mbps
HT Capabilities:
HT20
Short GI for 20Mhz
HT RX MCS indexes:
0-7
32
Ciphers: CCMP TKIP BIP
Supported iftypes: station ap p2p-client p2p-go
../iwd-1.19/src/station.c:station_enter_state() Old State:
disconnected, new state: autoconnect_quick
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'11:22:33:44:55:66' with SSID: xxx freq: 2437, rank: 2722, strength:
-6600, data_rate: 81.0
../iwd-1.19/src/station.c:station_add_seen_bss() Added new Network
"xxx" security psk
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'11:22:33:44:55:66' with SSID: xxx freq: 2412, rank: 67, strength:
-8700, data_rate: 2.0
../iwd-1.19/src/station.c:station_add_seen_bss() Added new Network
"xxx" security psk
../iwd-1.19/src/station.c:station_autoconnect_start()
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: JupiterIoT
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'11:22:33:44:55:66' freq: 2437, rank: 2722, strength: -6600
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: WiFi-F263_Ext 2
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'11:22:33:44:55:66' freq: 2412, rank: 67, strength: -8700
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'11:22:33:44:55:66' with SSID: xxx freq: 2437, rank: 4537, strength:
-5800, data_rate: 135.0
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'11:22:33:44:55:66' with SSID: xxx freq: 2412, rank: 67, strength:
-9400, data_rate: 2.0
../iwd-1.19/src/station.c:station_add_seen_bss() Added new Network
"xxx" security psk
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'11:22:33:44:55:66' with SSID: xxx freq: 2412, rank: 33, strength:
-8900, data_rate: 1.0
../iwd-1.19/src/station.c:station_autoconnect_start()
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: JupiterIoT
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'11:22:33:44:55:66' freq: 2437, rank: 4537, strength: -5800
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: WiFi-F263
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'11:22:33:44:55:66' freq: 2412, rank: 67, strength: -9400
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: WiFi-F263_Ext 2
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'11:22:33:44:55:66' freq: 2412, rank: 33, strength: -8900
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'11:22:33:44:55:66' with SSID: xxx freq: 2437, rank: 4537, strength:
-6000, data_rate: 135.0
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'11:22:33:44:55:66' with SSID: xxx freq: 2412, rank: 184, strength:
-8600, data_rate: 5.5
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'11:22:33:44:55:66' with SSID: xxx freq: 2412, rank: 67, strength:
-9500, data_rate: 2.0
../iwd-1.19/src/station.c:station_autoconnect_start()
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: JupiterIoT
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'11:22:33:44:55:66' freq: 2437, rank: 4537, strength: -6000
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: WiFi-F263_Ext 2
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'11:22:33:44:55:66' freq: 2412, rank: 184, strength: -8600
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: WiFi-F263
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'11:22:33:44:55:66' freq: 2412, rank: 67, strength: -9500
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'11:22:33:44:55:66' freq: 2417, rank: 67, strength: -9800
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
It looks like it is missing network_autoconnect? How to configure that file?
# export IWD_TLS_DEBUG=1
# /usr/libexec/iwd -d
Wireless daemon version 1.19
../iwd-1.19/src/main.c:main() Using configuration directory /etc/iwd
Loaded configuration from /etc/iwd/main.conf
../iwd-1.19/src/storage.c:storage_create_dirs() Using state directory
/var/lib/iwd
../iwd-1.19/src/main.c:nl80211_appeared() Found nl80211 interface
../iwd-1.19/src/module.c:iwd_modules_init()
../iwd-1.19/src/wsc.c:wsc_init()
../iwd-1.19/src/knownnetworks.c:known_network_frequencies_load() No
known frequency file found.
../iwd-1.19/src/eap.c:__eap_method_enable()
../iwd-1.19/src/eap-wsc.c:eap_wsc_init()
../iwd-1.19/src/eap-md5.c:eap_md5_init()
../iwd-1.19/src/eap-tls.c:eap_tls_init()
../iwd-1.19/src/eap-ttls.c:eap_ttls_init()
../iwd-1.19/src/eap-mschapv2.c:eap_mschapv2_init()
../iwd-1.19/src/eap-sim.c:eap_sim_init()
../iwd-1.19/src/eap-aka.c:eap_aka_prime_init()
../iwd-1.19/src/eap-aka.c:eap_aka_init()
../iwd-1.19/src/eap-peap.c:eap_peap_init()
../iwd-1.19/src/eap-gtc.c:eap_gtc_init()
../iwd-1.19/src/eap-pwd.c:eap_pwd_init()
../iwd-1.19/src/manager.c:manager_wiphy_dump_callback() New wiphy phy0 added (0)
Wiphy: 0, Name: phy0
Permanent Address: d4:ca:6e:a4:e8:b4
2.4Ghz Band:
Bitrates (non-HT):
1.0 Mbps
2.0 Mbps
5.5 Mbps
11.0 Mbps
6.0 Mbps
9.0 Mbps
12.0 Mbps
18.0 Mbps
24.0 Mbps
36.0 Mbps
48.0 Mbps
54.0 Mbps
HT Capabilities:
HT20
Short GI for 20Mhz
HT RX MCS indexes:
0-7
32
Ciphers: CCMP TKIP BIP
Supported iftypes: station ap p2p-client p2p-go
../iwd-1.19/src/manager.c:manager_create_interfaces() creating wlan0
../iwd-1.19/src/wiphy.c:wiphy_update_reg_domain() New reg domain
country code for (global) is 00
../iwd-1.19/src/manager.c:manager_config_notify() Notification of
command New Interface(7)
../iwd-1.19/src/netdev.c:netdev_link_notify() event 16 on ifindex 8
../iwd-1.19/src/manager.c:manager_new_station_interface_cb()
../iwd-1.19/src/netdev.c:netdev_create_from_genl() Created interface wlan0[8 1]
../iwd-1.19/src/netdev.c:netdev_link_notify() event 16 on ifindex 8
../iwd-1.19/src/netdev.c:netdev_link_notify() event 16 on ifindex 8
../iwd-1.19/src/netdev.c:netdev_set_4addr() netdev: 8 use_4addr: 0
../iwd-1.19/src/netdev.c:netdev_initial_up_cb() Interface 8 initialized
../iwd-1.19/src/netconfig.c:netconfig_new() Starting netconfig for interface: 8
../iwd-1.19/src/station.c:station_enter_state() Old State:
disconnected, new state: autoconnect_quick
../iwd-1.19/src/scan.c:scan_periodic_start() Starting periodic scan for wdev 1
../iwd-1.19/src/wiphy.c:wiphy_radio_work_insert() Inserting work item 1
../iwd-1.19/src/wiphy.c:wiphy_radio_work_next() Starting work item 1
../iwd-1.19/src/rrm.c:rrm_add_frame_watches()
../iwd-1.19/src/netdev.c:netdev_link_notify() event 16 on ifindex 8
../iwd-1.19/src/manager.c:manager_config_notify() Notification of
command Set Interface(6)
../iwd-1.19/src/scan.c:scan_notify() Scan notification Trigger Scan(33)
../iwd-1.19/src/scan.c:scan_request_triggered() Passive scan triggered
for wdev 1
../iwd-1.19/src/scan.c:scan_periodic_triggered() Periodic scan
triggered for wdev 1
../iwd-1.19/src/scan.c:scan_notify() Scan notification New Scan Results(34)
../iwd-1.19/src/scan.c:get_scan_callback() get_scan_callback
../iwd-1.19/src/scan.c:scan_parse_bss_information_elements() Load: 12/255
../iwd-1.19/src/scan.c:get_scan_callback() get_scan_callback
../iwd-1.19/src/scan.c:scan_parse_bss_information_elements() Load: 6/255
../iwd-1.19/src/scan.c:get_scan_done() get_scan_done
../iwd-1.19/src/scan.c:scan_periodic_rearm() Arming periodic scan timer: 10
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'34:08:04:12:b1:a2' with SSID: JupiterIoT, freq: 2437, rank: 2722,
strength: -6500, data_rate: 81.0
../iwd-1.19/src/station.c:station_add_seen_bss() Added new Network
"JupiterIoT" security psk
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'00:e0:20:17:16:eb' with SSID: WiFi-F263_Ext 2, freq: 2412, rank: 67,
strength: -8800, data_rate: 2.0
../iwd-1.19/src/station.c:station_add_seen_bss() Added new Network
"WiFi-F263_Ext 2" security psk
../iwd-1.19/src/station.c:station_autoconnect_start()
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: JupiterIoT
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'34:08:04:12:b1:a2' freq: 2437, rank: 2722, strength: -6500
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: WiFi-F263_Ext 2
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'00:e0:20:17:16:eb' freq: 2412, rank: 67, strength: -8800
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/wiphy.c:wiphy_radio_work_done() Work item 1 done
../iwd-1.19/src/netdev.c:netdev_link_notify() event 16 on ifindex 8
../iwd-1.19/src/scan.c:scan_periodic_timeout() scan_periodic_timeout: 1
../iwd-1.19/src/wiphy.c:wiphy_radio_work_insert() Inserting work item 2
../iwd-1.19/src/wiphy.c:wiphy_radio_work_next() Starting work item 2
../iwd-1.19/src/scan.c:scan_notify() Scan notification Trigger Scan(33)
../iwd-1.19/src/scan.c:scan_request_triggered() Passive scan triggered
for wdev 1
../iwd-1.19/src/scan.c:scan_periodic_triggered() Periodic scan
triggered for wdev 1
../iwd-1.19/src/scan.c:scan_notify() Scan notification New Scan Results(34)
../iwd-1.19/src/scan.c:get_scan_callback() get_scan_callback
../iwd-1.19/src/scan.c:scan_parse_bss_information_elements() Load: 10/255
../iwd-1.19/src/scan.c:get_scan_callback() get_scan_callback
../iwd-1.19/src/scan.c:scan_parse_bss_information_elements() Load: 6/255
../iwd-1.19/src/scan.c:get_scan_callback() get_scan_callback
../iwd-1.19/src/scan.c:scan_parse_bss_information_elements() Load: 20/255
../iwd-1.19/src/scan.c:get_scan_done() get_scan_done
../iwd-1.19/src/scan.c:scan_periodic_rearm() Arming periodic scan timer: 20
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'34:08:04:12:b1:a2' with SSID: JupiterIoT, freq: 2437, rank: 4537,
strength: -5600, data_rate: 135.0
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'b0:95:75:98:f2:63' with SSID: WiFi-F263, freq: 2412, rank: 67,
strength: -9400, data_rate: 2.0
../iwd-1.19/src/station.c:station_add_seen_bss() Added new Network
"WiFi-F263" security psk
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'00:e0:20:17:16:eb' with SSID: WiFi-F263_Ext 2, freq: 2412, rank: 67,
strength: -9100, data_rate: 2.0
../iwd-1.19/src/station.c:station_autoconnect_start()
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: JupiterIoT
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'34:08:04:12:b1:a2' freq: 2437, rank: 4537, strength: -5600
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: WiFi-F263
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'b0:95:75:98:f2:63' freq: 2412, rank: 67, strength: -9400
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: WiFi-F263_Ext 2
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'00:e0:20:17:16:eb' freq: 2412, rank: 67, strength: -9100
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/wiphy.c:wiphy_radio_work_done() Work item 2 done
../iwd-1.19/src/netdev.c:netdev_link_notify() event 16 on ifindex 8
../iwd-1.19/src/scan.c:scan_periodic_timeout() scan_periodic_timeout: 1
../iwd-1.19/src/wiphy.c:wiphy_radio_work_insert() Inserting work item 3
../iwd-1.19/src/wiphy.c:wiphy_radio_work_next() Starting work item 3
../iwd-1.19/src/scan.c:scan_notify() Scan notification Trigger Scan(33)
../iwd-1.19/src/scan.c:scan_request_triggered() Passive scan triggered
for wdev 1
../iwd-1.19/src/scan.c:scan_periodic_triggered() Periodic scan
triggered for wdev 1
../iwd-1.19/src/scan.c:scan_notify() Scan notification New Scan Results(34)
../iwd-1.19/src/scan.c:get_scan_callback() get_scan_callback
../iwd-1.19/src/scan.c:scan_parse_bss_information_elements() Load: 10/255
../iwd-1.19/src/scan.c:get_scan_callback() get_scan_callback
../iwd-1.19/src/scan.c:scan_parse_bss_information_elements() Load: 7/255
../iwd-1.19/src/scan.c:get_scan_callback() get_scan_callback
../iwd-1.19/src/scan.c:scan_parse_bss_information_elements() Load: 18/255
../iwd-1.19/src/scan.c:get_scan_callback() get_scan_callback
../iwd-1.19/src/scan.c:scan_parse_bss_information_elements() Load: 0/255
../iwd-1.19/src/scan.c:get_scan_done() get_scan_done
../iwd-1.19/src/scan.c:scan_periodic_rearm() Arming periodic scan timer: 40
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'34:08:04:12:b1:a2' with SSID: JupiterIoT, freq: 2437, rank: 3629,
strength: -6300, data_rate: 108.0
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'b0:95:75:98:f2:63' with SSID: WiFi-F263, freq: 2412, rank: 67,
strength: -9300, data_rate: 2.0
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'00:e0:20:17:16:eb' with SSID: WiFi-F263_Ext 2, freq: 2412, rank: 67,
strength: -8800, data_rate: 2.0
../iwd-1.19/src/station.c:station_autoconnect_start()
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: JupiterIoT
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'34:08:04:12:b1:a2' freq: 2437, rank: 3629, strength: -6300
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: WiFi-F263
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'b0:95:75:98:f2:63' freq: 2412, rank: 67, strength: -9300
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'60:32:b1:a9:e8:4c' freq: 2417, rank: 67, strength: -9500
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: WiFi-F263_Ext 2
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'00:e0:20:17:16:eb' freq: 2412, rank: 67, strength: -8800
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
network_autoconnect: No such file or directory (-2)
../iwd-1.19/src/wiphy.c:wiphy_radio_work_done() Work item 3 done
../iwd-1.19/src/netdev.c:netdev_link_notify() event 16 on ifindex 8
# iwmon
Wireless monitor ver 1.19
Failed to create monitor interface nlmon: Unknown error -95
Thank you very much.
Kind regards,
- jupiter
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 21:40 James Prestwood
0 siblings, 0 replies; 16+ messages in thread
From: James Prestwood @ 2021-11-30 21:40 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]
On Wed, 2021-12-01 at 08:29 +1100, Jupiter wrote:
> Hi James,
>
> Thanks for your kind response and debug instructions.
>
> > Without any debug logs this gonna be difficult to see whats going
> > on.
> > If you could enable debug logging when starting IWD and capture
> > some
> > logs that would give us a better idea of whats going on.
> >
> > https://iwd.wiki.kernel.org/debugging
>
> Here is debugging:
>
> # /usr/libexec/iwd -d 'station*' > iwd.log
>
> $ sed -E "s/([0-9a-fA-F]{2}:?){6}/11:22:33:44:55:66/" iwd.log | sed -
> e
> "s/SSID:\ .*, f/SSID: xxx f/" | sed 's/Added new Network .*
> security/Added new Network "xxx" security/'
> # /usr/libexec/iwd -d 'station*'
So you'll want to actually try connecting with iwctl too. Autoconnect
will only work if you have previously connected successfully, i.e. a
network file exists in /var/lib/iwd.
Try capturing some debug logs once you've done 'station <iface> connect
<network>' in iwctl.
Alternatively you could put a file inside /var/lib/iwd which would let
autoconnect work (though you'll hit the same issue you previously saw
most likely):
/var/lib/iwd/JupiterIoT.psk
[Security]
Passphrase=<your passphrase>
Thanks,
James
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 22:01 Denis Kenzior
0 siblings, 0 replies; 16+ messages in thread
From: Denis Kenzior @ 2021-11-30 22:01 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 859 bytes --]
Hi Jupiter,
> Available networks
> --------------------------------------------------------------------------------
> Network name Security Signal
> --------------------------------------------------------------------------------
> JupiterIoT psk ****
>
> # station wlan0 connect JupiterIoT
> Type the network passphrase for JupiterIoT psk.
> Passphrase: superpassphrase
> Operation aborted
>
Are you running connman + iwd? Are you sure ConnMan isn't aborting the
connection? Have you tried using connmanctl or using iwd + iwctl with connman
not running?
We do need iwd logs and preferably iwmon logs. You may need to build nlmon
support into your kernel if iwmon doesn't start. e.g. CONFIG_NLMON=m or y
Regards,
-Denis
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 22:36 KeithG
0 siblings, 0 replies; 16+ messages in thread
From: KeithG @ 2021-11-30 22:36 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]
My suggestion is along these lines. Shut down connman and run iwd
stand alone. Use iwctl to see if it will connect to the SSID. If this
works, delete the associated SSID files created in /var/lib/iwd. Then
start connman and try to connect using connmanctl. I went through this
a while back, so it does work as long as the kernel is configured for
it and you are using recent iwd and connman. I am using connman 1.40
and iwd 1.20 on Arch Linux Arm (RPi) and am pleased with the
performance.
Keith
On Tue, Nov 30, 2021 at 4:04 PM Denis Kenzior <denkenz(a)gmail.com> wrote:
>
> Hi Jupiter,
>
> > Available networks
> > --------------------------------------------------------------------------------
> > Network name Security Signal
> > --------------------------------------------------------------------------------
> > JupiterIoT psk ****
> >
> > # station wlan0 connect JupiterIoT
> > Type the network passphrase for JupiterIoT psk.
> > Passphrase: superpassphrase
> > Operation aborted
> >
>
> Are you running connman + iwd? Are you sure ConnMan isn't aborting the
> connection? Have you tried using connmanctl or using iwd + iwctl with connman
> not running?
>
> We do need iwd logs and preferably iwmon logs. You may need to build nlmon
> support into your kernel if iwmon doesn't start. e.g. CONFIG_NLMON=m or y
>
> Regards,
> -Denis
> _______________________________________________
> iwd mailing list -- iwd(a)lists.01.org
> To unsubscribe send an email to iwd-leave(a)lists.01.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 22:38 Jupiter
0 siblings, 0 replies; 16+ messages in thread
From: Jupiter @ 2021-11-30 22:38 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 3078 bytes --]
Hi James and Denis,
> Alternatively you could put a file inside /var/lib/iwd which would let
> autoconnect work (though you'll hit the same issue you previously saw
> most likely):
>
> /var/lib/iwd/JupiterIoT.psk
>
> [Security]
> Passphrase=<your passphrase>
That is much handy, seems it could be connected now, here is log
copied from debug console:
# /usr/libexec/iwd -d 'station*'
................
Ciphers: CCMP TKIP BIP
Supported iftypes: station ap p2p-client p2p-go
../iwd-1.19/src/station.c:station_enter_state() Old State:
disconnected, new state: autoconnect_quick
../iwd-1.19/src/station.c:station_quick_scan_triggered() Quick scan
triggered for wlan0
../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
'34:08:04:12:b1:a2' with SSID: JupiterIoT, freq: 2437, rank: 2722,
strength: -6500, data_rate: 81.0
../iwd-1.19/src/station.c:station_add_seen_bss() Added new Network
"JupiterIoT" security psk
../iwd-1.19/src/station.c:station_autoconnect_start()
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
Trying SSID: JupiterIoT
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'34:08:04:12:b1:a2' freq: [ 6810.737092] mwifiex_sdio mmc0:0001:1:
info: trying to associate to 'JupiterIoT' bssid 34:08:04:12:b2
2437, rank: 2722, strength: -6500
../iwd-1.19/src/station.c:station_enter_state() Old State:
autoconnect_quick, new state: connecting (auto)
[ 6810.842559] mwifiex_sdio mmc0:0001:1: info: associated to bssid
34:08:04:12:b1:a2 successfully
[ 6810.855015] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x23f error, result=0x2
../iwd-1.19/src/station.c:station_netdev_event() Associating
[ 6810.899100] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x23f error, result=0x2
[ 6810.937171] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x23f error, result=0x2
../iwd-1.19/src/station.c:station_handshake_event() Setting keys
hardware_rekey not supported
../iwd-1.19/src/station.c:station_connect_cb() 12, result: 0
../iwd-1.19/src/station.c:station_connect_ok()
But there is no IP address, I guess iwd manages DHCP, how can I debug iwd DHCP?
# ifconfig
wlan0 Link encap:Ethernet HWaddr D4:CA:6E:A4:E8:B4
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1650 (1.6 KiB) TX bytes:9106 (8.8 KiB)
> Are you running connman + iwd? Are you sure ConnMan isn't aborting the
> connection? Have you tried using connmanctl or using iwd + iwctl with
> connman
> not running?
Yes, I was running connman + iwd, but I did stop connman in iwd debugging.
> We do need iwd logs and preferably iwmon logs. You may need to build nlmon
>
> support into your kernel if iwmon doesn't start. e.g. CONFIG_NLMON=m or y
Ahh, that was missing in defconfig, I am rebuilding it now, will run
iwmon and post iwmon log.
Thank you very much.
Kind regards,
- jupiter
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 22:42 Denis Kenzior
0 siblings, 0 replies; 16+ messages in thread
From: Denis Kenzior @ 2021-11-30 22:42 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 750 bytes --]
Hi Jupiter,
> But there is no IP address, I guess iwd manages DHCP, how can I debug iwd DHCP?
>
iwd can be configured to do so. You will need to add the appropriate
configuration entry in /etc/iwd/main.conf. Refer to 'man 5 iwd.config' or the
rst here:
https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/src/iwd.config.rst#n57
Note that for iwd + connman, connman would be the one performing DHCP and iwd
should use EnableNetworkConfiguration=false. Daniel can correct me if I'm wrong.
For DHCP debugging, refer to 'man iwd.debug'. You will need to set the
appropriate environment variable (IWD_DHCP_DEBUG or so). The iwd wiki [1] has
examples.
Regards,
-Denis
[1] https://iwd.wiki.kernel.org/debugging
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 22:46 James Prestwood
0 siblings, 0 replies; 16+ messages in thread
From: James Prestwood @ 2021-11-30 22:46 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 3923 bytes --]
On Wed, 2021-12-01 at 09:38 +1100, Jupiter wrote:
> Hi James and Denis,
>
> > Alternatively you could put a file inside /var/lib/iwd which would
> > let
> > autoconnect work (though you'll hit the same issue you previously saw
> > most likely):
> >
> > /var/lib/iwd/JupiterIoT.psk
> >
> > [Security]
> > Passphrase=<your passphrase>
>
> That is much handy, seems it could be connected now, here is log
> copied from debug console:
Glad that worked. Still strange you couldn't do this via iwctl though
if connman really wasn't running.
>
> # /usr/libexec/iwd -d 'station*'
> ................
>
> Ciphers: CCMP TKIP BIP
> Supported iftypes: station ap p2p-client p2p-go
> ../iwd-1.19/src/station.c:station_enter_state() Old State:
> disconnected, new state: autoconnect_quick
> ../iwd-1.19/src/station.c:station_quick_scan_triggered() Quick scan
> triggered for wlan0
> ../iwd-1.19/src/station.c:station_add_seen_bss() Processing BSS
> '34:08:04:12:b1:a2' with SSID: JupiterIoT, freq: 2437, rank: 2722,
> strength: -6500, data_rate: 81.0
> ../iwd-1.19/src/station.c:station_add_seen_bss() Added new Network
> "JupiterIoT" security psk
> ../iwd-1.19/src/station.c:station_autoconnect_start()
> ../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
> Trying SSID: JupiterIoT
> ../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
> '34:08:04:12:b1:a2' freq: [ 6810.737092] mwifiex_sdio mmc0:0001:1:
> info: trying to associate to 'JupiterIoT' bssid 34:08:04:12:b2
> 2437, rank: 2722, strength: -6500
> ../iwd-1.19/src/station.c:station_enter_state() Old State:
> autoconnect_quick, new state: connecting (auto)
> [ 6810.842559] mwifiex_sdio mmc0:0001:1: info: associated to bssid
> 34:08:04:12:b1:a2 successfully
> [ 6810.855015] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x23f error,
> result=0x2
> ../iwd-1.19/src/station.c:station_netdev_event() Associating
> [ 6810.899100] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x23f error,
> result=0x2
> [ 6810.937171] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x23f error,
> result=0x2
> ../iwd-1.19/src/station.c:station_handshake_event() Setting keys
> hardware_rekey not supported
> ../iwd-1.19/src/station.c:station_connect_cb() 12, result: 0
> ../iwd-1.19/src/station.c:station_connect_ok()
>
> But there is no IP address, I guess iwd manages DHCP, how can I debug
> iwd DHCP?
IWD can manage DHCP, and this works nicely but it is not required (you
could use conventional daemons for this, systemd, dhclient etc). If you
want IWD to do DHCP you can enable this in /etc/iwd/main.conf:
[General]
EnableNetworkConfiguration=True
>
> # ifconfig
> wlan0 Link encap:Ethernet HWaddr D4:CA:6E:A4:E8:B4
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:10 errors:0 dropped:0 overruns:0 frame:0
> TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:1650 (1.6 KiB) TX bytes:9106 (8.8 KiB)
>
> > Are you running connman + iwd? Are you sure ConnMan isn't aborting
> > the
> > connection? Have you tried using connmanctl or using iwd + iwctl
> > with
> > connman
> > not running?
>
> Yes, I was running connman + iwd, but I did stop connman in iwd
> debugging.
>
> > We do need iwd logs and preferably iwmon logs. You may need to build
> > nlmon
> >
> > support into your kernel if iwmon doesn't start. e.g. CONFIG_NLMON=m
> > or y
>
> Ahh, that was missing in defconfig, I am rebuilding it now, will run
> iwmon and post iwmon log.
>
> Thank you very much.
>
> Kind regards,
>
> - jupiter
> _______________________________________________
> iwd mailing list -- iwd(a)lists.01.org
> To unsubscribe send an email to iwd-leave(a)lists.01.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 22:51 Jupiter
0 siblings, 0 replies; 16+ messages in thread
From: Jupiter @ 2021-11-30 22:51 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 3690 bytes --]
Hi Keith,
> My suggestion is along these lines. Shut down connman and run iwd
> stand alone. Use iwctl to see if it will connect to the SSID. If this
> works, delete the associated SSID files created in /var/lib/iwd. Then
> start connman and try to connect using connmanctl. I went through this
> a while back, so it does work as long as the kernel is configured for
> it and you are using recent iwd and connman. I am using connman 1.40
> and iwd 1.20 on Arch Linux Arm (RPi) and am pleased with the
> performance.
I am using connman 1.40 and iwd 1.19, connman was stopped:
# systemctl status connman -l
* connman.service - Connection service
Loaded: loaded
(8;;file://solar/lib/systemd/system/connman.service/lib/systemd/system/connman.service8;;;
enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2021-08-04 17:23:59 UTC; 2min 5s ago
Process: 21507 ExecStart=/usr/sbin/connmand -n (code=exited,
status=0/SUCCESS)
Main PID: 21507 (code=exited, status=0/SUCCESS)
Aug 04 17:23:59 solar systemd[1]: Stopping Connection service...
Aug 04 17:23:59 solar connmand[21507]: Remove interface wlan0 [ wifi ]
Aug 04 17:23:59 solar connmand[21507]: Remove interface wwan0 [ cellular ]
Aug 04 17:23:59 solar connmand[21507]: Removing configuration wifi
Aug 04 17:23:59 solar connmand[21507]: Removing configuration cellular
Aug 04 17:23:59 solar connmand[21507]: wlan0 {remove} index 13
Aug 04 17:23:59 solar connmand[21507]: wwan0 {remove} index 5
Aug 04 17:23:59 solar connmand[21507]: Exit
Aug 04 17:23:59 solar systemd[1]: connman.service: Deactivated successfully.
Aug 04 17:23:59 solar systemd[1]: Stopped Connection service.
# systemctl status iwd -l
* iwd.service - Wireless service
Loaded: loaded
(8;;file://solar/lib/systemd/system/iwd.service/lib/systemd/system/iwd.service8;;;
enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-08-04 17:09:46 UTC; 14min ago
Main PID: 19620 (iwd)
CGroup: /system.slice/iwd.service
`-19620 /usr/libexec/iwd
Aug 04 17:09:46 solar iwd[19620]: 32
Aug 04 17:09:46 solar iwd[19620]: Ciphers: CCMP TKIP BIP
Aug 04 17:09:46 solar iwd[19620]: Supported iftypes: station
ap p2p-client p2p-go
Aug 04 17:09:47 solar iwd[19620]: hardware_rekey not supported
Aug 04 17:12:03 solar iwd[19620]: Received Deauthentication event,
reason: 2, from_ap: true
Aug 04 17:12:05 solar iwd[19620]: netconfig: Failed to start DHCPv4
client for interface 13
Aug 04 17:12:05 solar iwd[19620]: WARNING:
../iwd-1.19/src/station.c:station_connect_ok() condition
!netconfig_configure(station->netconfig,
station_netconfig_event_handler, station) failed
Aug 04 17:22:03 solar iwd[19620]: Received Deauthentication event,
reason: 2, from_ap: true
Aug 04 17:22:05 solar iwd[19620]: netconfig: Failed to start DHCPv4
client for interface 13
Aug 04 17:22:05 solar iwd[19620]: WARNING:
../iwd-1.19/src/station.c:station_connect_ok() condition
!netconfig_configure(station->netconfig,
station_netconfig_event_handler, station) failed
The home network is connected, but iwd failed DHCP, what could be
missing for DHCP?
> IWD can manage DHCP, and this works nicely but it is not required (you
> could use conventional daemons for this, systemd, dhclient etc). If you
> want IWD to do DHCP you can enable this in /etc/iwd/main.conf:
Sorry James, I should mention I do have the /etc/iwd/main.conf I
copied from source:
# cat /etc/iwd/main.conf
[Scan]
DisableMacAddressRandomization=true
[General]
EnableNetworkConfiguration=true
Thank you very much.
Kind regards,
- jupiter
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 23:25 Jupiter
0 siblings, 0 replies; 16+ messages in thread
From: Jupiter @ 2021-11-30 23:25 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1564 bytes --]
Hi Denis,
> For DHCP debugging, refer to 'man iwd.debug'. You will need to set the
> appropriate environment variable (IWD_DHCP_DEBUG or so). The iwd wiki [1]
> has
> examples.
My bad, here is DHCP debugging, looks like failed to get DHCP server response:
../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
'34:08:04:12:b1:a2' freq: 2437, rank: 2722, strength: -6500
../iwd-1.19/src/station.c:station_enter_state() Old State:
autoconnect_full, new state: connecting (auto)
../iwd-1.19/src/station.c:station_netdev_event() Associating
../iwd-1.19/src/station.c:station_handshake_event() Setting keys
../iwd-1.19/src/station.c:station_connect_cb() 14, result: 0
../iwd-1.19/src/station.c:station_connect_ok()
netconfig: Failed to start DHCPv4 client for interface 14
WARNING: ../iwd-1.19/src/station.c:station_connect_ok() condition
!netconfig_configure(station->netconfig,
station_netconfig_event_handler, station) failed
[DHCPv4] dhcp_client_timeout_resend:526
[DHCPv4] dhcp_client_send_discover:346
[DHCPv4] dhcp_client_timeout_resend:526
[DHCPv4] dhcp_client_send_discover:346
[DHCPv4] dhcp_client_timeout_resend:526
[DHCPv4] dhcp_client_send_discover:346
[DHCPv4] dhcp_client_timeout_resend:526
[DHCPv4] dhcp_client_send_discover:346
Is netconfig from iwd?
I think the DHCP server is running from the home WiFi modem, right? My
laptop is also connected to the same WiFi modem SSID JupiterIoT which
should rule out home WiFi network DHCP server issues.
Thank you very much.
Kind regards,
- jupiter
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-11-30 23:53 Denis Kenzior
0 siblings, 0 replies; 16+ messages in thread
From: Denis Kenzior @ 2021-11-30 23:53 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 2351 bytes --]
Hi Jupiter,
> My bad, here is DHCP debugging, looks like failed to get DHCP server response:
>
> ../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
> '34:08:04:12:b1:a2' freq: 2437, rank: 2722, strength: -6500
> ../iwd-1.19/src/station.c:station_enter_state() Old State:
> autoconnect_full, new state: connecting (auto)
> ../iwd-1.19/src/station.c:station_netdev_event() Associating
> ../iwd-1.19/src/station.c:station_handshake_event() Setting keys
> ../iwd-1.19/src/station.c:station_connect_cb() 14, result: 0
> ../iwd-1.19/src/station.c:station_connect_ok()
> netconfig: Failed to start DHCPv4 client for interface 14
> WARNING: ../iwd-1.19/src/station.c:station_connect_ok() condition
> !netconfig_configure(station->netconfig,
Ugh, not sure what happens here. First, can you update to iwd 1.20? I don't
think anything was touched around this for several releases, but I'd hate to try
and debug an old version. Also, share the full log of iwd when this happens...
Can you strace iwd and see what syscall might be failing around this time? You
may also need to step through l_dhcp_client_start to see why it is failing. It
really shouldn't under normal circumstances, hence we have no debugs in this area.
> station_netconfig_event_handler, station) failed
> [DHCPv4] dhcp_client_timeout_resend:526
> [DHCPv4] dhcp_client_send_discover:346
> [DHCPv4] dhcp_client_timeout_resend:526
> [DHCPv4] dhcp_client_send_discover:346
> [DHCPv4] dhcp_client_timeout_resend:526
> [DHCPv4] dhcp_client_send_discover:346
> [DHCPv4] dhcp_client_timeout_resend:526
> [DHCPv4] dhcp_client_send_discover:346
And this is even more strange. If l_dhcp_client_start() fails, then the resend
timer shouldn't even be set and you shouldn't even see this sequence.
Can you try compiling with optimizations off (./configure --enable-debug
--disable-optimization) and see if the behavior changes?
>
> Is netconfig from iwd?
yes
>
> I think the DHCP server is running from the home WiFi modem, right? My
> laptop is also connected to the same WiFi modem SSID JupiterIoT which
> should rule out home WiFi network DHCP server issues.
Given the fact that we fail to start dhcp client, I'm not sure we even send any
discover packets. So your server might be just fine.
Regards,
-Denis
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-12-01 9:24 Jupiter
0 siblings, 0 replies; 16+ messages in thread
From: Jupiter @ 2021-12-01 9:24 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 2890 bytes --]
Hi Denis,
I think all strange things could be caused by Marvell firmware
sd8801_uapsta.bin running unstable on kernel 5.10, that firmware was
running well on kernel 4.19. Let me debug and figure out the WiFi
firmware stability first.
Thank you.
- jupiter
On 12/1/21, Denis Kenzior <denkenz(a)gmail.com> wrote:
> Hi Jupiter,
>
>> My bad, here is DHCP debugging, looks like failed to get DHCP server
>> response:
>>
>> ../iwd-1.19/src/station.c:station_autoconnect_next() autoconnect:
>> '34:08:04:12:b1:a2' freq: 2437, rank: 2722, strength: -6500
>> ../iwd-1.19/src/station.c:station_enter_state() Old State:
>> autoconnect_full, new state: connecting (auto)
>> ../iwd-1.19/src/station.c:station_netdev_event() Associating
>> ../iwd-1.19/src/station.c:station_handshake_event() Setting keys
>> ../iwd-1.19/src/station.c:station_connect_cb() 14, result: 0
>> ../iwd-1.19/src/station.c:station_connect_ok()
>> netconfig: Failed to start DHCPv4 client for interface 14
>> WARNING: ../iwd-1.19/src/station.c:station_connect_ok() condition
>> !netconfig_configure(station->netconfig,
>
> Ugh, not sure what happens here. First, can you update to iwd 1.20? I
> don't
> think anything was touched around this for several releases, but I'd hate to
> try
> and debug an old version. Also, share the full log of iwd when this
> happens...
>
> Can you strace iwd and see what syscall might be failing around this time?
> You
> may also need to step through l_dhcp_client_start to see why it is failing.
> It
> really shouldn't under normal circumstances, hence we have no debugs in this
> area.
>
>> station_netconfig_event_handler, station) failed
>> [DHCPv4] dhcp_client_timeout_resend:526
>> [DHCPv4] dhcp_client_send_discover:346
>> [DHCPv4] dhcp_client_timeout_resend:526
>> [DHCPv4] dhcp_client_send_discover:346
>> [DHCPv4] dhcp_client_timeout_resend:526
>> [DHCPv4] dhcp_client_send_discover:346
>> [DHCPv4] dhcp_client_timeout_resend:526
>> [DHCPv4] dhcp_client_send_discover:346
>
> And this is even more strange. If l_dhcp_client_start() fails, then the
> resend
> timer shouldn't even be set and you shouldn't even see this sequence.
>
> Can you try compiling with optimizations off (./configure --enable-debug
> --disable-optimization) and see if the behavior changes?
>
>>
>> Is netconfig from iwd?
>
> yes
>
>>
>> I think the DHCP server is running from the home WiFi modem, right? My
>> laptop is also connected to the same WiFi modem SSID JupiterIoT which
>> should rule out home WiFi network DHCP server issues.
>
> Given the fact that we fail to start dhcp client, I'm not sure we even send
> any
> discover packets. So your server might be just fine.
>
> Regards,
> -Denis
>
--
"A man can fail many times, but he isn't a failure until he begins to
blame somebody else."
-- John Burroughs
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-12-02 15:47 Daniel Wagner
0 siblings, 0 replies; 16+ messages in thread
From: Daniel Wagner @ 2021-12-02 15:47 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 459 bytes --]
On 30.11.21 23:42, Denis Kenzior wrote:
> Note that for iwd + connman, connman would be the one performing DHCP
> and iwd should use EnableNetworkConfiguration=false. Daniel can correct
> me if I'm wrong.
This is correct. Though I think it should be possible to change this.
For example for VPN the VPN service tells ConnMan the IP configuration
to use. The iwd plugin could do the amse and tell the ConnMan core which
IP configuration to use.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-12-13 4:39 Jupiter
0 siblings, 0 replies; 16+ messages in thread
From: Jupiter @ 2021-12-13 4:39 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 3669 bytes --]
Thanks all for your advice.
Further debugging it, it seems failing DHCP was caused by an error of
Deauthentication even, not clear if the iwd error caused mwifiex
disconnected from WiFi modem or the mwifiex cause iwd fall:
# ifconfig
wlan0 Link encap:Ethernet HWaddr D4:CA:6E:A4:E8:B4
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:226 errors:0 dropped:0 overruns:0 frame:0
TX packets:224 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25538 (24.9 KiB) TX bytes:30240 (29.5 KiB)
# systemctl status iwd -l
* iwd.service - Wireless service
Loaded: loaded
(8;;file://solar/lib/systemd/system/iwd.service/lib/systemd/system/iwd.service8;;;
enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-08-04 15:25:58 UTC; 8s ago
Main PID: 345 (iwd)
CGroup: /system.slice/iwd.service
`-345 /usr/libexec/iwd
Aug 04 15:25:58 solar iwd[345]: 54.0 Mbps
Aug 04 15:25:58 solar iwd[345]: HT Capabilities:
Aug 04 15:25:58 solar iwd[345]: HT20
Aug 04 15:25:58 solar iwd[345]: Short GI for 20Mhz
Aug 04 15:25:58 solar iwd[345]: HT RX MCS indexes:
Aug 04 15:25:58 solar iwd[345]: 0-7
Aug 04 15:25:58 solar iwd[345]: 32
Aug 04 15:25:58 solar iwd[345]: Ciphers: CCMP TKIP BIP
Aug 04 15:25:58 solar iwd[345]: Supported iftypes: station ap
p2p-client p2p-go
Aug 04 15:26:03 solar iwd[345]: Received Deauthentication event,
reason: 2, from_ap: true
[ 931.528058] mwifiex_sdio mmc0:0001:1: info: successfully
disconnected from 34:08:04:12:b1:a2: reason code 2
[ 933.540667] mwifiex_sdio mmc0:0001:1: info: trying to associate to
'JupiterIoT' bssid 34:08:04:12:b1:a2
[ 933.564524] mwifiex_sdio mmc0:0001:1: info: associated to bssid
34:08:04:12:b1:a2 successfully
[ 933.580086] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x23f error, result=0x2
[ 933.611695] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x23f error, result=0x2
[ 936.585096] mwifiex_sdio mmc0:0001:1: info: successfully
disconnected from 34:08:04:12:b1:a2: reason code 2
[ 938.575824] mwifiex_sdio mmc0:0001:1: info: trying to associate to
'JupiterIoT' bssid 34:08:04:12:b1:a2
[ 938.603801] mwifiex_sdio mmc0:0001:1: info: associated to bssid
34:08:04:12:b1:a2 successfully
[ 938.618333] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x23f error, result=0x2
[ 938.655173] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x23f error, result=0x2
[ 941.619354] mwifiex_sdio mmc0:0001:1: info: successfully
disconnected from 34:08:04:12:b1:a2: reason code 2
I followed the document to enable all CRYPTO setup so I don't think it
is a CRYPTO configured issue in the kernel.
CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_CMAC=y
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_CBC=y
CONFIG_KEY_DH_OPERATIONS=y
Also searching the Internet to find someone added
ControlPortOverNL80211=False to resolve that issue on kernel 5.9.2,
but it did not work on my kernel 5.10.59:
# cat /etc/iwd/main.conf
[General]
EnableNetworkConfiguration=True
ControlPortOverNL80211=False
The other issue is the error from_ap, but I am connecting to a home
WiFi modem, it should use a station, not ap, right? Or doesn't matter?
Thanks for your advice.
Kind regards,
Jupiter
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: iwd configure location and files
@ 2021-12-14 20:42 Denis Kenzior
0 siblings, 0 replies; 16+ messages in thread
From: Denis Kenzior @ 2021-12-14 20:42 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]
Hi Jupiter,
On 12/12/21 10:39 PM, Jupiter wrote:
> Thanks all for your advice.
>
> Further debugging it, it seems failing DHCP was caused by an error of
> Deauthentication even, not clear if the iwd error caused mwifiex
> disconnected from WiFi modem or the mwifiex cause iwd fall:
You probably need to share full logs. From what I remember from your previous
logs, iwd was connecting successfully to the AP but DHCP client was not able to
start. I think you need to determine why that happens. I suspect an strace or
additional logging will be required on your system. Perhaps permissions are not
setup correctly?
<snip>
> Aug 04 15:26:03 solar iwd[345]: Received Deauthentication event,
> reason: 2, from_ap: true
That just means the AP has deauthenticated us. This may be because we're not
able to 4-Way handshake properly, or because we aren't requesting a DHCP
address, or any other reason.
> I followed the document to enable all CRYPTO setup so I don't think it
> is a CRYPTO configured issue in the kernel.
>
iwd would refuse to start if these options are not present. So this is most
likely not the culprit.
> Also searching the Internet to find someone added
> ControlPortOverNL80211=False to resolve that issue on kernel 5.9.2,
> but it did not work on my kernel 5.10.59:
>
> # cat /etc/iwd/main.conf
> [General]
> EnableNetworkConfiguration=True
> ControlPortOverNL80211=False
If EnableNetworkConfiguration is set to False, does iwctl show you as
successfully connected?
>
> The other issue is the error from_ap, but I am connecting to a home
> WiFi modem, it should use a station, not ap, right? Or doesn't matter?
No, this is fine. The message just states that AP was the initiator of the
disconnect and not the local (iwd) device.
Regards,
-Denis
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2021-12-14 20:42 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-14 20:42 iwd configure location and files Denis Kenzior
-- strict thread matches above, loose matches on Subject: below --
2021-12-13 4:39 Jupiter
2021-12-02 15:47 Daniel Wagner
2021-12-01 9:24 Jupiter
2021-11-30 23:53 Denis Kenzior
2021-11-30 23:25 Jupiter
2021-11-30 22:51 Jupiter
2021-11-30 22:46 James Prestwood
2021-11-30 22:42 Denis Kenzior
2021-11-30 22:38 Jupiter
2021-11-30 22:36 KeithG
2021-11-30 22:01 Denis Kenzior
2021-11-30 21:40 James Prestwood
2021-11-30 21:29 Jupiter
2021-11-30 20:52 James Prestwood
2021-11-30 20:45 Jupiter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox