help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wpa-supplicant service configuration. Guile is hard


From: znavko
Subject: Re: wpa-supplicant service configuration. Guile is hard
Date: Sat, 06 Apr 2019 08:54:24 +0000

Hello! I've spent 3 hours reading emacs tutorial and searching for scheme mode 
but did not get result.
Pressing M-q on each paragraph of my config has broke it (attached file with 
suffix emacs).

> Why do you do this all manually instead of using
> wpa-supplicant-service-type and dhcp-client-service-type?

I do have wpa-supplicant-service-type and dhcp-client-service-type, and they do 
not work, cause wlan is soft blocked. I need to use `rfkill unblock wifi` in my 
script, but services do not do this.
After reboot I have `herd status` as in attach, networking is inactive there. I 
think soft blocking happens because there are 2 wlan in my system, a strange 
tun0 has appeared.

# ifconfig
enp3s0    Link encap:Ethernet  HWaddr xx:xx:xx:11
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0  TX bytes:0

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:0.0.0.0  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0  TX bytes:0

tun0      Link encap:(hwtype unknown)
          inet addr:10.14.0.26  Bcast:0.0.0.0  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:8911 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5637 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:8626006  TX bytes:703476

wlp2s0    Link encap:Ethernet  HWaddr xx:xx:xx:xx:22
          inet addr:192.168.1.33  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10351 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5867 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9765341  TX bytes:1265501

Also I attach some dmesg lines if it will give some info.
Now I have network services, but they do not manage the soft blocking of wifi. 
How to unblock automatically?


April 6, 2019 4:36 AM, "Ricardo Wurmus" <address@hidden> wrote:

> address@hidden writes:
> 
>> 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
> 
> Why do you do this all manually instead of using
> wpa-supplicant-service-type and dhcp-client-service-type?
> 
> Your configuration looks … adventurous. Here are some recommendations:
> 
> * don’t nest modify-services. Nothing good will come of this. It only
> serves to confuse you. “modify-services” can modify more than one
> service at once.
> 
> * don’t leave parentheses on lines all by themselves. They get lonely.
> 
> * don’t use dhcpd-service-type unless you want to run a DHCP server.
> Use dhcp-client-service-type for the DHCP *client*.
> 
> * you don’t need to add wpa-supplicant to the list of globally installed
> packages. The service is enough.
> 
> * maybe try fixing the indentation (Emacs can do this with M-q) — it’s
> very hard to understand the configuration when the indentation tries
> hard to mislead you.
> 
> --
> Ricardo

Attachment: config-wpa-dhcp-client2.conf
Description: Text document

Attachment: config-wpa-dhcp-client2--emacs.conf
Description: Text document

Attachment: herd-status.txt
Description: Text document

Attachment: dmesg-lines.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]