Hello! I have several questions about wpa-supplicant + dhcpcd  services.

First of all I do not want to use networkmanager and I usually get Internet 
working manually with this:
# cat startnet
#!/bin/sh
#connect to wi-fi through wpa_supplicant
herd stop wpa-supplicant
rfkill unblock wifi
wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
sleep 2
dhclient -v wlp2s0
#./startnet

I configured services wpa-supplicant and dhcpcd in my config.scm (in attach). 
Guix reconfigures my system normally, start services wpa-supplicant, 
networking, dhcpv4-daemon. But these services do not give me Internet. `ping 
gnu.org` says unknow host.

The wpa_supplicant.conf is the same as I use. But dhcpcd.conf is that from one 
forum.
I really do not know what to write there. ip of my router is 192.168.1.1 but 
the other lines are from forum.
Please, let me see how configure dhcpcd if usually I used `dhclient -v wlp2s0`.
What to type there?
Also is it ok my wpa-supplicant-service-type config?
And why I have NetworkManager in my /var/log/messages, is networkmanager living 
in my system? How to push it out?



Apr 4, 2019, 8:36 PM by zna...@tutanota.com:

> Hi! There actually were wpa-supplicant config twice. The necessary one is in 
> the (modify-services) section. I rest only  that one. And it works. But the 
> network is not working, cause dhcpd is not configured. I really want to get 
> around 
> "dhcpcd@.service causes slow startup" > 
> https://wiki.archlinux.org/index.php/Dhcpcd 
> <https://wiki.archlinux.org/index.php/Dhcpcd>
>
> Would you give some advises how to prevent slow booting? How to set timeout 
> on wpa-supplicant service and dhcpcd that they'll start after slim shows me 
> auth form?
>
> My actual manual network start is this:
>
> # cat startnet
> #!/bin/sh
>
> #connect to wi-fi through wpa_supplicant
>
> herd stop wpa-supplicant
> rfkill unblock wifi
> wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
> sleep 2
> dhclient -v wlp2s0
>
> May be I can use dhclient service or something like that instead of dhcpcd?
>
> I attached my current workable config, but dhcpcd is commented there. Also I 
> do not know how to write dhcpd.conf for my case?
>
>
> Apr 4, 2019, 7:26 PM by > zna...@tutanota.com <mailto:zna...@tutanota.com>> :
>
>> Hello! I am so novice in Guile.
>> I have trouble trying to add wpa-supplicant configuration to my config. I 
>> get this error:
>>
>> # guix system reconfigure /etc/config.scm
>> guix system: error: service 'wpa-supplicant' provided more than once
>>
>> Please, let me know where to place my wpa-config lines?
>>
>
>

;;this is znavko's cute config

(use-modules (gnu) (gnu system nss)
             (gnu system locale) ;;for locale-definition
             (gnu services desktop)
             ;;(gnu services dns) ;;for dnsmasq
             (srfi srfi-1) ;;for remove function
             (gnu services networking) ;;for remove ntp
             (gnu services avahi) ;;for remove avahi
             (gnu services xorg)
             ;;(gnu services databases);;for postgres
             (gnu packages admin) ;;for wpa_supplicant
)
(use-service-modules desktop)
(use-package-modules certs gnome)

;;(define %redundant-linux-modules '("pcspkr" "snd_pcsp"))

(operating-system (host-name "antelope") (timezone "Europe/Moscow") (locale "en_US.utf8")
  (bootloader (bootloader-configuration
                (bootloader grub-bootloader)
                (target "/dev/sda")))
  (file-systems (cons (file-system
                        (device "/dev/sda1") (mount-point "/") (type "ext4"))
                      %base-file-systems))
  (swap-devices '("/dev/sda2"))

  (users (cons* (user-account (name "bob") (group "users")
                (supplementary-groups '("wheel" "netdev" "audio" "video"))
                (home-directory "/home/bob"))
                (user-account (name "mom") (group "users")
                (supplementary-groups '("wheel" "netdev" "audio" "video"))
                (home-directory "/home/mom"))
               %base-user-accounts))

  ;; This is where we specify system-wide packages.
  (packages (cons* nss-certs         ;for HTTPS access
                   gvfs              ;for user mounts
		   wpa-supplicant
		   isc-dhcp
                   %base-packages))

  (services (cons*  
                    ;;(service postgresql-service-type)
                    (service xfce-desktop-service-type)

                    (service dhcpd-service-type
                      (dhcpd-configuration
                        (config-file (local-file "/etc/dhcpcd.conf"))
                        (interfaces '("wlp2s0"))))


                    (modify-services      
                      (remove (lambda (service)
                        (eq? (service-kind service)
                          ntp-service-type))
                         (remove (lambda (service)
                           (eq? (service-kind service)
                             avahi-service-type))

                             ;; (modify-services  
                                (modify-services  
                                  (modify-services %desktop-services
                                    (slim-service-type config =>
                                      (slim-configuration
                                        (xorg-configuration
                                          (xorg-configuration
                                            (extra-config
                                                    
'("Section \"InputClass\"
        Identifier \"touchpad\"
        Driver \"libinput\"
        MatchIsTouchpad \"on\"
        Option \"Tapping\" \"on\"
EndSection")
                                              )))))
                                   )  ;end of modify-services 4th

                                   (wpa-supplicant-service-type config =>
                                     (wpa-supplicant-configuration
                                       (interface "wlp2s0")
                                       (config-file "/etc/wpa_supplicant/wpa_supplicant.conf")))

                                 )  ;end of modify-services 3rd

                               ;;)  ;end of modify-services 2nd

                            )  ;end of remove avahi
                          )  ;end of remove2 ntp
                      (elogind-service-type
                        c => (elogind-configuration (handle-lid-switch 'ignore)))
                    );;end of modify-services 1st desktop-services
  ));;end of services

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss)


 (kernel-arguments '("modprobe.blacklist=pcspkr,snd_pcsp"))
 ;(kernel-arguments
 ;    (list (string-append "modprobe.blacklist="
 ;                         (apply comma-separated
 ;   %redundant-linux-modules))))

);;end of operating-system

  

Attachment: wpa_supplicant.conf
Description: Binary data

Attachment: dhcpcd.conf
Description: Binary data

# tail -n22 /var/log/messages

Apr  5 12:32:11 localhost NetworkManager[2365]: <info>  [1554456731.8259] 
device (wlp2s0): supplicant interface state: authenticating -> disconnected
Apr  5 12:32:16 localhost vmunix: [ 4570.798352] wlp2s0: authenticate with 
xx:xx:xx:xx:xx:55
Apr  5 12:32:16 localhost vmunix: [ 4570.814242] wlp2s0: send auth to 
xx:xx:xx:xx:xx:55 (try 1/3)
Apr  5 12:32:16 localhost vmunix: [ 4570.816451] wlp2s0: xx:xx:xx:xx:xx:55 
denied authentication (status 1)
Apr  5 12:32:16 localhost NetworkManager[2365]: <info>  [1554456736.8303] 
device (wlp2s0): supplicant interface state: disconnected -> scanning
Apr  5 12:32:19 localhost vmunix: [ 4574.164465] wlp2s0: authenticate with 
xx:xx:xx:xx:xx:55
Apr  5 12:32:19 localhost vmunix: [ 4574.180508] wlp2s0: send auth to 
xx:xx:xx:xx:xx:55 (try 1/3)
Apr  5 12:32:19 localhost vmunix: [ 4574.183244] wlp2s0: xx:xx:xx:xx:xx:55 
denied authentication (status 1)
Apr  5 12:32:21 localhost vmunix: [ 4576.108663] wlp2s0: authenticate with 
xx:xx:xx:xx:xx:55
Apr  5 12:32:21 localhost vmunix: [ 4576.124479] wlp2s0: send auth to 
xx:xx:xx:xx:xx:55 (try 1/3)
Apr  5 12:32:21 localhost vmunix: [ 4576.126717] wlp2s0: xx:xx:xx:xx:xx:55 
denied authentication (status 1)
Apr  5 12:32:21 localhost NetworkManager[2365]: <info>  [1554456741.7345] 
device (wlp2s0): supplicant interface state: scanning -> authenticating
Apr  5 12:32:21 localhost NetworkManager[2365]: <info>  [1554456741.7662] 
device (wlp2s0): supplicant interface state: authenticating -> disconnected
Apr  5 12:32:31 localhost NetworkManager[2365]: <info>  [1554456751.7716] 
device (wlp2s0): supplicant interface state: disconnected -> scanning
Apr  5 12:32:40 localhost vmunix: [ 4595.013180] wlp2s0: authenticate with 
xx:xx:xx:xx:xx:55
Apr  5 12:32:40 localhost vmunix: [ 4595.031228] wlp2s0: send auth to 
xx:xx:xx:xx:xx:55 (try 1/3)
Apr  5 12:32:40 localhost vmunix: [ 4595.033446] wlp2s0: xx:xx:xx:xx:xx:55 
denied authentication (status 1)
Apr  5 12:32:41 localhost vmunix: [ 4596.047812] wlp2s0: authenticate with 
xx:xx:xx:xx:xx:55
Apr  5 12:32:41 localhost vmunix: [ 4596.063687] wlp2s0: send auth to 
xx:xx:xx:xx:xx:55 (try 1/3)
Apr  5 12:32:41 localhost NetworkManager[2365]: <info>  [1554456761.6727] 
device (wlp2s0): supplicant interface state: scanning -> authenticating
Apr  5 12:32:41 localhost vmunix: [ 4596.065800] wlp2s0: xx:xx:xx:xx:xx:55 
denied authentication (status 1)
Apr  5 12:32:41 localhost NetworkManager[2365]: <info>  [1554456761.7023] 
device (wlp2s0): supplicant interface state: authenticating -> disconnected
Apr  5 12:32:51 localhost NetworkManager[2365]: <info>  [1554456771.7037] 
device (wlp2s0): supplicant interface state: disconnected -> scanning

Reply via email to