Jump to content
Read the Funtoo Newsletter: Summer 2023 ×

wpa_supplicant does not connect to wi-fi


Recommended Posts

Hello! I timed Funtoo current + Xorg + xdm + Slim boot. It is 64 seconds, much more that I had after first installation pure64 + Xorg XFCE. The NetworkManager is the main problem

When I deleted NetworkManager and dhcpcd from rc-update. My Slim appeared after 38 seconds. So I think to use wpa_supplicant, but I cannot connect with it.

I added dhcpcd to rc-update and rebooted.  I tried to use line that worked on Gentoo. Have no sense why it is not working.

 

# rfkill list
0: ideapad_wlan: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
1: ideapad_bluetooth: Bluetooth
	Soft blocked: yes
	Hard blocked: no
2: phy0: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
3: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no

# rfkill unblock 0
# rfkill unblock 2

# cat wpa.sh
wpa_supplicant -B -i wlan0 -c<(wpa_passphrase internet password) && dhcpcd wlan0
                                              
# ./wpa.sh
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process

# ping -c 5 funtoo.org
ping: unknown host funtoo.org


# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 2  bytes 100 (100.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 100 (100.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


# rc-status -a
Runlevel: default
 dhcpcd                                                            [  started  ]
 sshd                                                              [  started  ]
 dbus                                                              [  started  ]
 xdm                                                               [  started  ]
 local                                                             [  started  ]
Runlevel: sysinit
 sysfs                                                             [  started  ]
 devfs                                                             [  started  ]
 dmesg                                                             [  started  ]
 kmod-static-nodes                                                 [  started  ]
 opentmpfiles-dev                                                  [  started  ]
 udev                                                              [  started  ]
 cgroups                                                           [  started  ]
Runlevel: shutdown
 savecache                                                         [  stopped  ]
 killprocs                                                         [  stopped  ]
 mount-ro                                                          [  stopped  ]
Runlevel: boot
 hwclock                                                           [  started  ]
 swap                                                              [  started  ]
 modules                                                           [  started  ]
 fsck                                                              [  started  ]
 root                                                              [  started  ]
 mtab                                                              [  started  ]
 localmount                                                        [  started  ]
 procfs                                                            [  started  ]
 loopback                                                          [  started  ]
 urandom                                                           [  started  ]
 sysctl                                                            [  started  ]
 binfmt                                                            [  started  ]
 hostname                                                          [  started  ]
 bootmisc                                                          [  started  ]
 termencoding                                                      [  started  ]
 keymaps                                                           [  started  ]
 opentmpfiles-setup                                                [  started  ]
Runlevel: nonetwork
 local                                                             [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 modules-load                                                      [  started  ]
 xdm-setup                                                         [  started  ]
Dynamic Runlevel: manual

 

Please, is there way to use wpa_supplicant + wpa_passphrase + dhcpcd to connect to wifi via one bash line ?

Link to comment
Share on other sites

why don't you create a /etc/wpa_supplicant/wpa_supplicant.conf ? and start wpa_supplicant as a service?

wpa_passphrase [ssid] [passphrase] >> /etc/wpa_supplicant/wpa_supplicant.conf
rc-update add wpa_supplicant #(default) can be ommited because default level is default

reboot :) or openrc to reload rc settings and services

Link to comment
Share on other sites

I've created /etc/wpa_supplicant/wpa_supplicant.conf , deleted networkmanager from rc-update, added wpa_supplicant to rc-update made `rc-update -u` and rebooted.

after reboot it should connect without any actions from me? but not.

# cd ~
# ls
10-openrc-status  90xsession  Desktop  kernel-config-4.8.15-1  re.sh  wpa.sh
# rfkill list
0: phy0: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
1: ideapad_wlan: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
2: ideapad_bluetooth: Bluetooth
	Soft blocked: yes
	Hard blocked: no
3: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no
# rfkill unblock 0
# rfkill unblock 1
# cat wpa.sh
wpa_supplicant -B -i wlan0 -c<(wpa_passphrase internet password) && dhcpcd wlan0
# ./wpa.sh
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
# ping -c 5 funtoo.org
ping: unknown host funtoo.org


# rc-status
Runlevel: default
 syslog-ng                                                         [  started  ]
 wpa_supplicant                                                    [  started  ]
 dhcpcd                                                            [  started  ]
 fcron                                                             [  started  ]
 sshd                                                              [  started  ]
 dbus                                                              [  started  ]
 xdm                                                               [  started  ]
 local                                                             [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 modules-load                                                      [  started  ]
 xdm-setup                                                         [  started  ]
Dynamic Runlevel: manual


# rc-update add NetworkManager
 * service NetworkManager added to runlevel default
# rc-update deletewpa_supplicant
 * rc-update: invalid command `deletewpa_supplicant'
# rc-update delete wpa_supplicant
 * service wpa_supplicant removed from runlevel default
# rc-update -u
 * Caching service dependencies ...  
# openrc
 * Stopping WPA Supplicant Daemon ...                                     [ ok ]
 * Starting NetworkManager ...                                            [ ok ]
Connecting...............    0s [offline]
 * Marking NetworkManager as inactive. It will automatically be marked
 * as started after a network connection has been established.
 * WARNING: NetworkManager has started, but is inactive

Network could not connect showing "waiting" icon in tray, but is not connecting. cause dhcpcd  was run. do not know why, but always needs to reboot after dhcpcd was run.

please, how to connect with wpa_supplicant?

Link to comment
Share on other sites

this try was unsuccessful too

after creating wpa_supplicant.conf, adding wpa_supplicant to rc-update instead networkmanager and reboot. I saw during boot messages by rfkill. do not know how to show them cause `dmesg |grep rfkill` shows nothing.


# cat /etc/wpa_supplicant/wpa_supplicant.conf
network={
	ssid="internet"
	#psk="password"
	psk=hashmyhashlyhash
}

# cat /root/wpa-c.sh
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -Dwext
dhclient wlan0

# ./wpa-c.sh
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument

# ping -c 5 funtoo.org
ping: unknown host funtoo.org

may be need to unblock wifi with rfkill during boot?

Link to comment
Share on other sites

not work again

 

# cat wpa-c2.sh
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -D nl80211 && dhcpcd wlan0

# cat wpa-c2.sh
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -D nl80211 && dhcpcd wlan0

# ./wpa-c2.sh
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
# ping -c 5 funtoo.org
ping: unknown host funtoo.org

 

Link to comment
Share on other sites

wicd not working too. after boot it shows error "failed to connect to d-bus interface. error messages are in the wicd log file" https://itmag.es/4F0IO then again one message: "service wicd was stopped, service will not work correctly if not restart service" https://itmages.ru/image/view/6377079/eee6cc02

# cd /var/log/wicd
# ls
wicd.log
# cat wicd.log |grep '2018/01/05'
2018/01/05 12:21:23 :: ---------------------------
2018/01/05 12:21:23 :: wicd initializing...
2018/01/05 12:21:23 :: ---------------------------
2018/01/05 12:21:23 :: wicd is version 1.7.4 961
2018/01/05 12:21:23 :: setting backend to external
2018/01/05 12:21:23 :: trying to load backend external
2018/01/05 12:21:23 :: successfully loaded backend external
2018/01/05 12:21:23 :: trying to load backend external
2018/01/05 12:21:23 :: successfully loaded backend external
2018/01/05 12:21:23 :: Automatically detected wireless interface wlan0
2018/01/05 12:21:23 :: setting wireless interface wlan0
2018/01/05 12:21:23 :: automatically detected wired interface eth0
2018/01/05 12:21:23 :: setting wired interface eth0
2018/01/05 12:21:23 :: setting wpa driver wext
2018/01/05 12:21:23 :: setting use global dns to False
2018/01/05 12:21:23 :: setting global dns
2018/01/05 12:21:23 :: global dns servers are None None None
2018/01/05 12:21:23 :: domain is None
2018/01/05 12:21:23 :: search domain is None
2018/01/05 12:21:23 :: setting automatically reconnect when connection drops True
2018/01/05 12:21:23 :: Setting dhcp client to 0
2018/01/05 12:21:23 :: Wireless configuration file found...
2018/01/05 12:21:23 :: Wired configuration file found...
2018/01/05 12:21:23 :: chmoding configuration files 0600...
2018/01/05 12:21:23 :: chowning configuration files root:root...
2018/01/05 12:21:23 :: Using wireless interface...wlan0
2018/01/05 12:21:23 :: Using wired interface...eth0
2018/01/05 12:21:29 :: Autoconnecting...
2018/01/05 12:21:29 :: No wired connection present, attempting to autoconnect to wireless network
2018/01/05 12:21:29 :: Unable to autoconnect, you'll have to manually connect
2018/01/05 12:21:34 :: Autoconnecting...
2018/01/05 12:21:34 :: No wired connection present, attempting to autoconnect to wireless network
2018/01/05 12:21:34 :: Unable to autoconnect, you'll have to manually connect
2018/01/05 12:21:39 :: Autoconnecting...
2018/01/05 12:21:39 :: No wired connection present, attempting to autoconnect to wireless network
2018/01/05 12:21:39 :: Unable to autoconnect, you'll have to manually connect
2018/01/05 12:21:44 :: Autoconnecting...
2018/01/05 12:21:44 :: No wired connection present, attempting to autoconnect to wireless network
2018/01/05 12:21:44 :: Unable to autoconnect, you'll have to manually connect
2018/01/05 12:25:04 :: Autoconnecting...
2018/01/05 12:25:04 :: No wired connection present, attempting to autoconnect to wireless network
2018/01/05 12:25:04 :: Unable to autoconnect, you'll have to manually connect
2018/01/05 12:28:29 :: Autoconnecting...
2018/01/05 12:28:29 :: No wired connection present, attempting to autoconnect to wireless network
2018/01/05 12:28:29 :: Unable to autoconnect, you'll have to manually connect
2018/01/05 12:30:54 :: rfkill: unblocking wifi
2018/01/05 12:30:54 :: rfkill: unblocking wlan
2018/01/05 12:30:54 :: rfkill: unblocking wimax
2018/01/05 12:30:54 :: rfkill: unblocking wwan
2018/01/05 12:31:00 :: Connecting to wireless network internet 
2018/01/05 12:31:01 :: Putting interface down
2018/01/05 12:31:01 :: Releasing DHCP leases...
2018/01/05 12:31:01 :: Setting false IP...
2018/01/05 12:31:01 :: Stopping wpa_supplicant
2018/01/05 12:31:01 :: Flushing the routing table...
2018/01/05 12:31:01 :: Putting interface up...
2018/01/05 12:31:03 :: Generating psk...
2018/01/05 12:31:03 :: Attempting to authenticate...
2018/01/05 12:31:04 :: Running DHCP with NO hostname
2018/01/05 12:31:04 :: sending commands to master dhcpcd process
2018/01/05 12:31:04 :: 
2018/01/05 12:31:04 :: 
2018/01/05 12:31:04 :: DHCP connection successful
2018/01/05 12:31:04 :: not verifying
2018/01/05 12:31:04 :: Connecting thread exiting.
2018/01/05 12:31:04 :: Sending connection attempt result success
2018/01/05 12:32:07 :: Connecting to wireless network internet 
2018/01/05 12:32:07 :: Putting interface down
2018/01/05 12:32:07 :: Releasing DHCP leases...
2018/01/05 12:32:07 :: Setting false IP...
2018/01/05 12:32:07 :: Stopping wpa_supplicant
2018/01/05 12:32:07 :: Flushing the routing table...
2018/01/05 12:32:07 :: Putting interface up...
2018/01/05 12:32:09 :: Generating psk...
2018/01/05 12:32:09 :: Attempting to authenticate...
2018/01/05 12:32:10 :: Running DHCP with NO hostname
2018/01/05 12:32:10 :: sending commands to master dhcpcd process
2018/01/05 12:32:10 :: 
2018/01/05 12:32:10 :: 
2018/01/05 12:32:10 :: DHCP connection successful
2018/01/05 12:32:10 :: not verifying
2018/01/05 12:32:10 :: Connecting thread exiting.
2018/01/05 12:32:10 :: Sending connection attempt result success
2018/01/05 12:32:54 :: Connecting to wireless network internet 
2018/01/05 12:32:54 :: Putting interface down
2018/01/05 12:32:54 :: Releasing DHCP leases...
2018/01/05 12:32:54 :: Setting false IP...
2018/01/05 12:32:54 :: Stopping wpa_supplicant
2018/01/05 12:32:54 :: Flushing the routing table...
2018/01/05 12:32:54 :: Putting interface up...
2018/01/05 12:32:56 :: Generating psk...
2018/01/05 12:32:56 :: Attempting to authenticate...
2018/01/05 12:32:57 :: Running DHCP with NO hostname
2018/01/05 12:32:57 :: sending commands to master dhcpcd process
2018/01/05 12:32:57 :: 
2018/01/05 12:32:57 :: 
2018/01/05 12:32:57 :: DHCP connection successful
2018/01/05 12:32:57 :: not verifying
2018/01/05 12:32:57 :: Connecting thread exiting.
2018/01/05 12:32:58 :: Sending connection attempt result success
2018/01/05 12:33:38 :: Autoconnecting...
2018/01/05 12:33:38 :: No wired connection present, attempting to autoconnect to wireless network
2018/01/05 12:33:39 :: internet  has no never connect value
2018/01/05 12:33:39 :: trying to automatically connect to...internet 
2018/01/05 12:33:39 :: Connecting to wireless network internet 
2018/01/05 12:33:40 :: Putting interface down
2018/01/05 12:33:40 :: Releasing DHCP leases...
2018/01/05 12:33:40 :: Setting false IP...
2018/01/05 12:33:40 :: Stopping wpa_supplicant
2018/01/05 12:33:40 :: Flushing the routing table...
2018/01/05 12:33:40 :: Putting interface up...
2018/01/05 12:33:42 :: Generating psk...
2018/01/05 12:33:42 :: Attempting to authenticate...
2018/01/05 12:33:47 :: Running DHCP with NO hostname
2018/01/05 12:33:47 :: sending commands to master dhcpcd process
2018/01/05 12:33:47 :: 
2018/01/05 12:33:47 :: 
2018/01/05 12:33:47 :: DHCP connection successful
2018/01/05 12:33:47 :: not verifying
2018/01/05 12:33:47 :: Connecting thread exiting.
2018/01/05 12:33:51 :: Sending connection attempt result success

 

and this trouble continues: when I delete and add NetworkManager to rc-update, slim does not appears after reboot. I need to delete NetworkManager, dhcpcd from rc-update, and add it again, run 'rc-update -u` and then slim appears after reboot. or other times needs to delete and add xdm to rc-update and reboot. I cannot know where to see this error log. this is my dmesg. may be wireless mouse is the reason??

[   11.639505] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8
[   11.641136] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
[   11.641235] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[   11.641343] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[   11.796430] usb 1-1: new high-speed USB device number 2 using ehci-pci
[   11.954755] usb 1-1: New USB device found, idVendor=8087, idProduct=07e6
[   11.954766] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   11.957149] hub 1-1:1.0: USB hub found
[   11.957695] hub 1-1:1.0: 4 ports detected
[   12.244485] usb 1-1.4: new high-speed USB device number 3 using ehci-pci
[   12.358082] usb 1-1.4: New USB device found, idVendor=05e3, idProduct=0608
[   12.358094] usb 1-1.4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   12.358102] usb 1-1.4: Product: USB2.0 Hub
[   12.360566] hub 1-1.4:1.0: USB hub found
[   12.360973] hub 1-1.4:1.0: 4 ports detected
[   12.406930] psmouse serio1: synaptics: queried max coordinates: x [..5670], y [..4794]
[   12.459836] psmouse serio1: synaptics: queried min coordinates: x [1314..], y [1098..]
[   12.563763] psmouse serio1: synaptics: Touchpad model: 1, fw: 8.1, id: 0x1e2b1, caps: 0xd00123/0x840300/0x2a800/0x0, board id: 2848, fw id: 1581875
[   12.631225] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input6
[   12.656829] usb 1-1.4.1: new high-speed USB device number 4 using ehci-pci
[   12.834707] usb 1-1.4.1: New USB device found, idVendor=5986, idProduct=0652
[   12.834718] usb 1-1.4.1: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[   12.834726] usb 1-1.4.1: Product: Lenovo EasyCamera
[   12.834734] usb 1-1.4.1: Manufacturer: Generic
[   12.834742] usb 1-1.4.1: SerialNumber: 200901010001
[   12.856733] Console: switching to colour frame buffer device 170x48
[   12.876361] media: Linux media interface: v0.10
[   12.883426] Linux video capture interface: v2.00
[   12.885985] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[   12.893929] uvcvideo: Found UVC 1.00 device Lenovo EasyCamera (5986:0652)
[   12.899625] uvcvideo 1-1.4.1:1.0: Entity type for entity Extension 4 was not initialized!
[   12.899631] uvcvideo 1-1.4.1:1.0: Entity type for entity Processing 2 was not initialized!
[   12.899634] uvcvideo 1-1.4.1:1.0: Entity type for entity Camera 1 was not initialized!
[   12.899801] input: Lenovo EasyCamera: Lenovo EasyC as /devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.4/1-1.4.1/1-1.4.1:1.0/input/input12
[   12.899935] usbcore: registered new interface driver uvcvideo
[   12.899937] USB Video Class driver (1.1.1)
[   12.924992] usb 1-1.4.2: new high-speed USB device number 5 using ehci-pci
[   13.038313] usb 1-1.4.2: New USB device found, idVendor=0bda, idProduct=0129
[   13.038318] usb 1-1.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   13.038320] usb 1-1.4.2: Product: USB2.0-CRW
[   13.038323] usb 1-1.4.2: Manufacturer: Generic
[   13.038325] usb 1-1.4.2: SerialNumber: 20100201396000000
[   13.063114] usbcore: registered new interface driver rtsx_usb
[   13.128052] usb 1-1.4.3: new full-speed USB device number 6 using ehci-pci
[   13.238616] usb 1-1.4.3: New USB device found, idVendor=0cf3, idProduct=3004
[   13.238625] usb 1-1.4.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   13.291623] Bluetooth: Core ver 2.22
[   13.291648] NET: Registered protocol family 31
[   13.291649] Bluetooth: HCI device and connection manager initialized
[   13.291655] Bluetooth: HCI socket layer initialized
[   13.291659] Bluetooth: L2CAP socket layer initialized
[   13.291675] Bluetooth: SCO socket layer initialized
[   13.297706] usbcore: registered new interface driver btusb
[   13.303981] usb 1-1.4.3: firmware: direct-loading firmware ar3k/ramps_0x31010000_40.dfu
[   13.309746] usbcore: registered new interface driver ath3k
[   13.495889] usb 1-1.4.3: USB disconnect, device number 6
[   13.720674] usb 1-1.4.3: new full-speed USB device number 7 using ehci-pci
[   13.994663] EXT4-fs (sda3): re-mounted. Opts: (null)
[   14.292140] Adding 2097148k swap on /dev/sda2.  Priority:-2 extents:1 across:2097148k SSFS
[   16.864316] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   16.866763] r8169 0000:03:00.0: firmware: direct-loading firmware rtl_nic/rtl8168g-3.fw
[   16.886158] r8169 0000:03:00.0 eth0: link down
[   16.886231] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   16.894296] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   16.911670] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   16.998645] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   17.982283] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   18.967342] wlan0: authenticate with xx:xx:xx:xx:xx:xx
[   18.983590] wlan0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
[   18.985986] wlan0: authenticated
[   18.986338] wlan0: associating with AP with corrupt beacon
[   18.992231] wlan0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
[   18.996409] usb 1-1.4.3: device descriptor read/64, error -110
[   18.996934] wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x431 status=0 aid=5)
[   18.997129] wlan0: associated
[   18.997160] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   24.399084] usb 1-1.4.3: New USB device found, idVendor=0cf3, idProduct=3004
[   24.399099] usb 1-1.4.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   32.720132] random: crng init done

 

Link to comment
Share on other sites

 I can respond only that dbus was always in rc-update and I did not touch it never.

# rc-update
       NetworkManager |      default                           
               binfmt | boot                                   
             bootmisc | boot                                   
              cgroups |                                 sysinit
                 dbus |      default                           
                devfs |                                 sysinit
               dhcpcd |      default                           
                dmesg |                                 sysinit
                fcron |      default                           
                 fsck | boot                                   
             hostname | boot                                   
              hwclock | boot                                   
              keymaps | boot                                   
            killprocs |                        shutdown        
    kmod-static-nodes |                                 sysinit
                local |      default nonetwork                 
           localmount | boot                                   
             loopback | boot                                   
              modules | boot                                   
             mount-ro |                        shutdown        
                 mtab | boot                                   
     opentmpfiles-dev |                                 sysinit
   opentmpfiles-setup | boot                                   
               procfs | boot                                   
                 root | boot                                   
            savecache |                        shutdown        
                 sshd |      default                           
                 swap | boot                                   
               sysctl | boot                                   
                sysfs |                                 sysinit
            syslog-ng |      default                           
         termencoding | boot                                   
                 udev |                                 sysinit
              urandom | boot                                   
                  xdm |      default     

 

Link to comment
Share on other sites

i tried also to add NetworkManager to /etc/X11/xinit/xinitrc.d  but it did not start

# pwd
/etc/X11/xinit/xinitrc.d
# ls -la
итого 28
drwxr-xr-x 2 root root 4096 янв  5 13:31 .
drwxr-xr-x 3 root root 4096 дек 21 06:12 ..
-rwxr-xr-x 1 root root  255 дек 21 06:12 00-xhost
-rwxr-xr-x 1 root root  275 дек 20 19:17 40-libcanberra-gtk-module
-rwxr-xr-x 1 root root  341 дек 24 20:02 80-dbus
-rwxr-xr-x 1 root root   15 янв  5 13:31 90-NetworkManager
-rwxr-xr-x 1 root root 1027 дек 24 21:29 90-consolekit

# cat 90-N*
NetworkManager

also my ~/.xinitrc  does not start it, cause my user is not root. Think it will be temporary solution but while I not found all those problems.... how to start NetworkManager after LXDE was run?

Link to comment
Share on other sites

ok, znavko what do you actually want to do? Do you want to use wpa_supplicant and dhcpcd? Then lets work on this solution and not jump from wpa to NM to wicd .... It makes your posts a mess.

Restore your system to state before your modifications. And add paste /etc/wpa_supplicant/wpa_supplicant.conf without the passphrase and replace it with xxxx.

Remove networkmanager and add wpa_supplicant and dhcpd to default.

Report back and tell me what the problem seems to be. Wait for my reply and do not do any modifications on your own. Do not unnecessary edit posts that you posted in the past.

 

Link to comment
Share on other sites

Thank you for your attention to this. I definitely want to handle network with wpa_supplicant.

# cat /etc/wpa_supplicant/wpa_supplicant.conf
network={
	ssid="internet"
	#psk="password"
	psk=hashmyhashlyhas
}
# rc-update delete NetworkManager
 * service NetworkManager removed from runlevel default
# rc-update add wpa_supplicant
 * service wpa_supplicant added to runlevel default
# rc-update -u
 * Caching service dependencies ...                                       [ ok ]
# reboot

After reboot have no Internet. And trying to connect with one of my bash scripts:


# rc-status
Runlevel: default
 syslog-ng                                                         [  started  ]
 wpa_supplicant                                                    [  started  ]
 dhcpcd                                                            [  started  ]
 fcron                                                             [  started  ]
 sshd                                                              [  started  ]
 dbus                                                              [  started  ]
 xdm                                                               [  started  ]
 local                                                             [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 modules-load                                                      [  started  ]
 xdm-setup                                                         [  started  ]


# rfkill list
0: ideapad_wlan: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
1: ideapad_bluetooth: Bluetooth
	Soft blocked: yes
	Hard blocked: no
2: phy0: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
3: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no

 # rfkill unblock 0
# rfkill unblock 2
# cd ~
# ls
10-openrc-status  Desktop                 rcstatus.txt  wpa-c.sh   wpa.sh
90xsession        kernel-config-4.8.15-1  re.sh         wpa-c2.sh
# cat wpa-c.sh
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -D nl80211
dhclient wlan0
# cat wpa-c2.sh
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -D nl80211 && dhcpcd wlan0
# cat wpa.sh
wpa_supplicant -B -i wlan0 -c<(wpa_passphrase internet password) && dhcpcd wlan0
# ./wpa-c2.sh
Successfully initialized wpa_supplicant
sending commands to master dhcpcd process
# ping -c 5 www.funtoo.org
ping: unknown host www.funtoo.org

Using nl80211 driver does not give any errors, but not conects.

Using -Dwext gives errors and does not connect.

# reboot
# rfkill list
0: ideapad_wlan: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
1: ideapad_bluetooth: Bluetooth
	Soft blocked: yes
	Hard blocked: no
2: phy0: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
3: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no
# rfkill unblock 0
# rfkill unblock 2
# cat wpa-c3.sh
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -Dwext && dhcpcd wlan0
# ./wpa-c3.sh
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
sending commands to master dhcpcd process
# ping -c 5 www.funtoo.org
ping: unknown host www.funtoo.org

Please, is there way to see what is not working?

I do not turn settings back, use another notebook to post here. Hope we'll catch it.

Link to comment
Share on other sites

ok my last post does not work here sorry, but I did get it connected with this command as root:

wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -dd -f /var/log/wpa.log
# wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
        ssid="yesnotworking"
        scan_ssid=1 # for hidden ssid
        psk="supersecretpass"
        proto=RSN
        key_mgmt=WPA-PSK
}

 

notice the lack of -B which makes it run in background  - better to debug in foreground docs say.

 

 

 

 

Link to comment
Share on other sites

@palica rfkill list gives every time different numbers of wlan: sometimes 0 and 2, sometimes 0 and 1. I have'nt yet written autounblock script.

@dhudson I run wpa-d.sh in one terminal, while it was working I open log in other.

# ls
10-openrc-status  kernel-config-4.8.15-1  wpa-c.sh   wpa-d.sh
90xsession        rcstatus.txt            wpa-c2.sh  wpa.sh
Desktop           re.sh                   wpa-c3.sh
# nano wpa-d.sh
# 

# ls
10-openrc-status  Desktop                 rcstatus.txt  wpa-c.sh   wpa-c3.sh  wpa.sh
90xsession        kernel-config-4.8.15-1  re.sh         wpa-c2.sh  wpa-d.sh
# cat wpa-d.sh
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -dd -f /var/log/wpa.log
#
# nano /etc/wpa_supplicant/wpa_supplicant.conf
# 
# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
	ssid="internet"
	#psk="password"
	psk=hashmyhashlyhash
	proto=RSN
	key_mgmt=WPA-PSK
}
# rfkill list
0: ideapad_wlan: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
1: ideapad_bluetooth: Bluetooth
	Soft blocked: yes
	Hard blocked: no
2: phy0: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
3: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no
# rfkill unblock 0
# rfkill unblock 2
# rfkill list
0: ideapad_wlan: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: ideapad_bluetooth: Bluetooth
	Soft blocked: yes
	Hard blocked: no
2: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
3: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no
# ./wpa-d.sh


...while it is working the log is this

# ping -c 5 www.funtoo.org
ping: unknown host www.funtoo.org

# tail -n 70 /var/log/wpa.log
wlan0: nl80211: New scan results available
nl80211: Scan probed for SSID ''
nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472
wlan0: Event SCAN_RESULTS (3) received
wlan0: Scan completed in 0.935535 seconds
nl80211: Received scan results (1 BSSes)
wlan0: BSS: Start scan result update 73
BSS: last_scan_res_used=1/32
wlan0: New scan results available (own=1 ext=0)
wlan0: Radio work 'scan'@0xedd780 done in 0.946047 seconds
wlan0: radio_work_free('scan'@0xedd780: num_active_works --> 0
wlan0: Selecting BSS from priority group 0
wlan0: 0: xx:xx:xx:xx:xx ssid='internet ' wpa_ie_len=26 rsn_ie_len=24 caps=0x431 level=-61 freq=2412  wps
wlan0:    skip - SSID mismatch
wlan0: No suitable network found
wlan0: Setting scan request: 5.000000 sec
nl80211: Event message available
nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
wlan0: nl80211: Scan trigger
wlan0: Event SCAN_STARTED (47) received
wlan0: External program started a scan
nl80211: Event message available
nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
wlan0: nl80211: New scan results available
nl80211: Scan probed for SSID ''
nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472
wlan0: Event SCAN_RESULTS (3) received
nl80211: Received scan results (1 BSSes)
wlan0: BSS: Start scan result update 74
BSS: last_scan_res_used=1/32
wlan0: New scan results available (own=0 ext=1)
wlan0: Do not use results from externally requested scan operation for network selection
RTM_NEWLINK: ifi_index=3 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0xedd780
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0xedd780 after 0.000079 second wait
wlan0: nl80211: scan request
nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
nl80211: Scan extra IEs - hexdump(len=10): 7f 08 00 00 00 00 01 00 00 40
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
wlan0: nl80211: Scan trigger
wlan0: Event SCAN_STARTED (47) received
wlan0: Own scan request started a scan in 0.000047 seconds
RTM_NEWLINK: ifi_index=3 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
nl80211: Event message available
nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
wlan0: nl80211: New scan results available
nl80211: Scan probed for SSID ''
nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472
wlan0: Event SCAN_RESULTS (3) received
wlan0: Scan completed in 0.935575 seconds
nl80211: Received scan results (1 BSSes)
wlan0: BSS: Start scan result update 75
BSS: last_scan_res_used=1/32
wlan0: New scan results available (own=1 ext=0)
wlan0: Radio work 'scan'@0xedd780 done in 0.946588 seconds
wlan0: radio_work_free('scan'@0xedd780: num_active_works --> 0
wlan0: Selecting BSS from priority group 0
wlan0: 0: xx:xx:xx:xx:xx ssid='internet ' wpa_ie_len=26 rsn_ie_len=24 caps=0x431 level=-58 freq=2412  wps
wlan0:    skip - SSID mismatch
wlan0: No suitable network found
wlan0: Setting scan request: 5.000000 sec
nl80211: Event message available
nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
wlan0: nl80211: Scan trigger
wlan0: Event SCAN_STARTED (47) received
wlan0: External program started a scan

 

Link to comment
Share on other sites

@palica

# pwd
/etc/local.d
# ls
README  rfkill.start
# cat rfkill.start
#!/bin/sh
# unblocking wireless with rfkill

num=`rfkill list | grep Wireless | sed 's/\(^.\).*/\1/'`
i=`echo $num | sed 's/\(^.\).*/\1/'`
j=`echo $num | sed 's/..\(.\).*/\1/'`
echo 'rfkill unblock '$i
rfkill unblock $i
echo 'rfkill unblock '$j
rfkill unblock $j

# ./rfkill.start
rfkill unblock 0
rfkill unblock 2

After reboot this script unblocked wireless device successfully. Although the numbers rest 0 and 2 it detect wlan's numbers before unblock.

Link to comment
Share on other sites

yes, it is. on other notebook in the "Edit Connections" on network-manager applet there is a space character in the end of ssid: "internet "

I had no space in wpa_supplicant.conf. I added space to /etc/wpa_supplicant/wpa_supplicant.conf in line ssid: "internet ", but the log becomes bad.

# tail -n 120 /var/log/wpa.log
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x26d8880
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=0104
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 01 04
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=040a
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=040b
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=040c
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=040d
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=090a
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=090b
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=090c
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=090d
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 09 0d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=0801
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 08 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=06
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=0a07
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 0a 07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=0a11
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 0a 11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=0a1a
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 0a 1a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=1101
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 11 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=1102
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 11 02
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=0505
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 05 05
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x26d8880 match=0500
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 05 00
nl80211: Failed to register Action frame processing - ignore for now
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
netlink: Operstate: ifindex=3 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
wlan0: Own MAC address: 18:cf:5e:54:5e:1d
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=5 set_tx=0 seq_len=0 key_len=0
wlan0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlan0: Setting scan request: 0.100000 sec
ENGINE: Loading dynamic engine
ENGINE: Loading dynamic engine
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Using existing control interface directory.
ctrl_interface_group=10 (from group name 'wheel')
ctrl_iface bind(PF_UNIX) failed: Address already in use
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface 'DIR=/var/run/wpa_supplicant GROUP=wheel'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

Failed to add interface wlan0
wlan0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=00:00:00:00:00:00 reason=3 state=DISCONNECTED
nl80211: Data frame filter flags=0x0
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wlan0: WPA: Clear old PMK and PTK
wlan0: Cancelling scan request
wlan0: Cancelling authentication timeout
Off-channel: Clear pending Action frame TX (pending_action_tx=(nil)
nl80211: Data frame filter flags=0x0
Remove interface wlan0 from radio phy0
Remove radio phy0
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0x888888888ae50009 (mode change)

Do not know what to do with that space. Does not work without space. Does not work with space.

Link to comment
Share on other sites

# rm /var/run/wpa_supplicant/wlan0
# nano /etc/wpa_supplicant/wpa_supplicant.conf
# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1

network={
	ssid="internet "
	#psk="password"
	psk=hashmyhashlyhash
	proto=RSN
	key_mgmt=WPA-PSK
}

# cat wpa-d.sh
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -dd -f /var/log/wpa.log
# ./wpa-d.sh

..while it's working in one terminal I'm using other...

$ tail -n 120 /var/log/wpa.log
wlan0: Setting scan request: 0.100000 sec
BSSID xx:xx:xx:xx:xx:xx blacklist count incremented to 2
wlan0: Blacklist count 7 --> request scan in 10000 ms
wlan0: Ignore new scan request for 10.000000 sec since an earlier request is scheduled to trigger sooner
wlan0: WPA: Clear old PMK and PTK
wlan0: Disconnect event - remove keys
nl80211: Data frame filter flags=0x0
wlan0: State: ASSOCIATED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
nl80211: Data frame filter flags=0x0
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
RTM_NEWLINK: ifi_index=3 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
nl80211: Event message available
nl80211: Drv Event 46 (NL80211_CMD_CONNECT) received for wlan0
nl80211: Ignore connect event (cmd=46) when using userspace SME
l2_packet_receive: src=xx:xx:xx:xx:xx:xx len=99
wlan0: RX EAPOL from xx:xx:xx:xx:xx:xx
RX EAPOL - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 79 92 61 ed 72 fc 6e ce 18 93 0c d0 9a 63 09 47 ef e3 af c1 b5 96 20 56 cf 1f d5 e4 ff 8c de a3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
wlan0: Not associated - Delay processing of received EAPOL frame (state=DISCONNECTED bssid=00:00:00:00:00:00)
nl80211: Event message available
nl80211: Drv Event 20 (NL80211_CMD_DEL_STATION) received for wlan0
nl80211: Delete station xx:xx:xx:xx:xx:xx
nl80211: Event message available
nl80211: Drv Event 39 (NL80211_CMD_DEAUTHENTICATE) received for wlan0
nl80211: MLME event 39 (NL80211_CMD_DEAUTHENTICATE) on wlan0(18:cf:5e:54:5e:1d) A1=xx:xx:xx:xx:xx:xx A2=18:cf:5e:54:5e:1d
nl80211: MLME event frame - hexdump(len=26): c0 00 00 00 90 f6 52 52 5f 64 18 cf 5e 54 5e 1d 90 f6 52 52 5f 64 00 00 03 00
nl80211: Deauthenticate event
nl80211: Ignore deauth event triggered due to own deauth request
nl80211: Event message available
nl80211: Drv Event 48 (NL80211_CMD_DISCONNECT) received for wlan0
nl80211: Ignore disconnect event when using userspace SME
nl80211: Event message available
nl80211: Drv Event 36 (NL80211_CMD_REG_CHANGE) received for wlan0
nl80211: Regulatory domain change
 * initiator=0
 * type=1
wlan0: Event CHANNEL_LIST_CHANGED (28) received
wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
wlan0: Updating hw mode
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
wlan0: State: DISCONNECTED -> SCANNING
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0x1cfc0a0
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0x1cfc0a0 after 0.000080 second wait
wlan0: nl80211: scan request
nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
nl80211: Scan extra IEs - hexdump(len=10): 7f 08 00 00 00 00 01 00 00 40
nl80211: Scan trigger failed: ret=-16 (Device or resource busy)
wlan0: State: SCANNING -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
wlan0: CTRL-EVENT-SCAN-FAILED ret=-16 retry=1
wlan0: Radio work 'scan'@0x1cfc0a0 done in 0.013352 seconds
wlan0: radio_work_free('scan'@0x1cfc0a0: num_active_works --> 0
wlan0: Setting scan request: 1.000000 sec
nl80211: Event message available
nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
wlan0: nl80211: Scan trigger
wlan0: Event SCAN_STARTED (47) received
wlan0: External program started a scan
RTM_NEWLINK: ifi_index=3 ifname=wlan0 operstate=2 linkmode=1 ifi_family=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK: ifi_index=3 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
nl80211: Event message available
nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
wlan0: nl80211: New scan results available
nl80211: Scan probed for SSID ''
nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472
wlan0: Event SCAN_RESULTS (3) received
nl80211: Received scan results (1 BSSes)
wlan0: BSS: Start scan result update 16
BSS: last_scan_res_used=1/32
wlan0: New scan results available (own=0 ext=1)
wlan0: Do not use results from externally requested scan operation for network selection
wlan0: State: DISCONNECTED -> SCANNING
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0x1cfc0a0
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0x1cfc0a0 after 0.000078 second wait
wlan0: nl80211: scan request
nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
nl80211: Scan extra IEs - hexdump(len=10): 7f 08 00 00 00 00 01 00 00 40
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Event message available
nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
wlan0: nl80211: Scan trigger
wlan0: Event SCAN_STARTED (47) received
wlan0: Own scan request started a scan in 0.000236 seconds
RTM_NEWLINK: ifi_index=3 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
nl80211: Event message available
nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
wlan0: nl80211: New scan results available
nl80211: Scan probed for SSID ''
nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472
wlan0: Event SCAN_RESULTS (3) received
wlan0: Scan completed in 0.932663 seconds
nl80211: Received scan results (1 BSSes)
wlan0: BSS: Start scan result update 17
BSS: last_scan_res_used=1/32
wlan0: New scan results available (own=1 ext=0)
wlan0: Radio work 'scan'@0x1cfc0a0 done in 0.940806 seconds
wlan0: radio_work_free('scan'@0x1cfc0a0: num_active_works --> 0
wlan0: Postpone network selection by 56 seconds since all networks are disabled

$ ping -c 5 www.funtoo.org
ping: unknown host www.funtoo.org

have no internet

Link to comment
Share on other sites

sorry. i used again `wpa_passphrase 'internet ' 'password'` and written new hash into wpa_supplicant.conf.

and helped. I have internet! I can resume: space in ssid is important, needs to generate new hash with wpa_passphrase using params with quotes `wpa_passphrase 'internet ' 'password'`

Using wpa_supplicant to connect to Wi-Fi on Funtoo

To be sure in ssid (network name) need

# iwlist scanning

It will give SSID: "internet " -- in my case the last space was important (and risen the thread).

After that need to get hash using wpa_passphrase:

# wpa_passphrase 'internet ' 'password'

In my case QUOTES were important. Using result of wpa_passphrase need to write  config.

Correct wpa_supplicant configuration and script are the next:

# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1

network={
	ssid="internet "
	#psk="password"
	psk=hashmyhashlyhash
	proto=RSN
	key_mgmt=WPA-PSK
}

# cat wpa-d.sh
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -dd -f /var/log/wpa.log

This will give internet not in the blink of an eye but in a few seconds. but might to be an error device blocked by rfkill. to unblock in every boot I used this

# pwd
/etc/local.d
# ls
README  rfkill.start
# cat rfkill.start
#!/bin/sh
# unblocking wireless with rfkill

num=`rfkill list | grep Wireless | sed 's/\(^.\).*/\1/'`
i=`echo $num | sed 's/\(^.\).*/\1/'`
j=`echo $num | sed 's/..\(.\).*/\1/'`
echo 'rfkill unblock '$i
rfkill unblock $i
echo 'rfkill unblock '$j
rfkill unblock $j

# ./rfkill.start
rfkill unblock 0
rfkill unblock 2

Rfkill may be installed with `emerge rfkill`

 

To connect to the internet in every boot automatically I use wpa_supplicant into rc-update:

# rc-update add wpa_supplicant
# rc-update add dhcpcd

 

One more question. Network might to be lost. How to use wpa_supplicant in this case? `iwlist scanning` and then trying to start bash script?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...