Netcfg v2.0.3

netcfg2 is a refined network profile system for Arch Linux, replacing the current implementation. Through this, it has also gained various features and improvements which are listed on the development wiki page (http://wiki.archlinux.org/index.php/Network_Scripts)
Wireless Detection
This kinda big feature in this release is "including" wireless detection support.
To detect on boot, may add "auto-wireless $interface" to your NETWORKS=() line. This can even be added among other profiles, for example:
NETWORKS=(auto-wireless ipw0 ethernet)
To run after boot, run: /usr/bin/netcfg-auto-wireless
Changlog
* Added: fancy auto detection support
* Added: Explicitly specify menu default via NETWORKS_MENU_DEFAULT in rc.conf
* Added: Explicitly set menu timeout with NETWORKS_MENU_TIMEOUT in rc.conf
* Added: Recording of last setup profile as $PROFILE_DIR/last symlinked to last profile
* Tidied: rc.d/net-profiles
* Fixed: typos in some example configs
* Fixed: Workaround for some drivers who crash on ifconfig down
Install
It's currently in testing. If you're not running testing, uncomment it at the end of your pacman.conf, and then whether you're using testing or not:
pacman -S testing/netcfg
netcfg v2 will be out of testing soon, keep an eye on the mailing list. x86_64 package will be updated later tonight
Documentation
* netcfg manpage
* Detailed examples in /etc/network.d/examples
* Wiki: http://wiki.archlinux.org/index.php/Network_Profiles
Last edited by iphitus (2008-01-06 09:23:35)

ok thanks for the testing guys.
Pierre
* What is this "last" link for?
Someone wanted a record of the last network they connected to, so i created that symlink. Seems i didnt think it through enough... I'll change it in the next release. 
Could you try removing the 'last' symlink, and then remove lines 210 and 211 in /usr/lib/network/network.subr? Then make sure there's no traces to last in /var/run/network.
* auto-wireless scans for all networks and connects if a matching profile exists, right?
Correct.
* Just cosmetics, but it would be nice to have some output like "Scanning for available networks". Currently it looks like as if something hangs.
Will do.
* Would it be possible to detect if a lan cabel is connected or not in order to stop trying to connect if there is no cable inserted?
Already supported and on by default on ethernet profiles, provided your card works with 'mii-tool'. I just leave ethernet in the NETWORKS=() line, and if there's no cable it simply spits out:
:: ethernet up - No connection available [FAIL]
zenlord
Odd. I'll give the auto script some more thorough testing and get back to you on that, I have an idea.
For auto to work, networks _must_ appear in an iwlist scan. Do yours not appear in a regular iwlist scan?
It's not PROFILE_DIR causing the problem, it's defined in /usr/lib/network/network.subr which is source'd by the auto script.
carrouf
Intentional. The network is no longer configured, so despite the device being up, it's effectively disconnected. I've been told it's bad practice to 'down' interfaces, and on top of that, it causes at least one driver to crash. I'm still not sure on what to do here, but the current situation works in all cases. If you'd like it down for sure, you could always set
POST_DOWN="ifconfig $INTERFACE down"
Last edited by iphitus (2008-01-09 09:33:28)

Similar Messages

  • Scan for and connect to networks from an openbox pipe menu (netcfg)

    So the other day when i was using wifi-select (awesome tool) to connect to a friends hot-spot, i realized "hey! this would be great as an openbox pipe menu."  i'm fairly decent in bash and i knew both netcfg and wifi-select were in bash so why not rewrite it that way?
    Wifi-Pipe
    A simplified version of wifi-select which will scan for networks and populate an openbox right-click menu item with available networks.  displays security type and signal strength.  click on a network to connect via netcfg the same way wifi-select does it.
    zenity is used to ask for a password and notify of a bad connection.  one can optionally remove the netcfg profile if the connection fails.
    What's needed
    -- you have to be using netcfg to manage your wireless
    -- you have to install zenity
    -- you have to save the script as ~/.config/openbox/wifi-pipe and make it executable:
    chmod +x ~/.config/openbox/wifi-pipe
    -- you have to add a sudoers entry to allow passwordless sudo on this script and netcfg (!)
    USERNAME ALL=(ALL) NOPASSWD: /usr/bin/netcfg
    USERNAME ALL=(ALL) NOPASSWD: /home/USERNAME/.config/openbox/wifi-pipe
    -- you have to adjust  ~/.config/openbox/menu.xml like so:
    <menu id="root-menu" label="Openbox 3">
    <menu id="pipe-wifi" label="Wifi" execute="sudo /home/USERNAME/.config/openbox/wifi-pipe INTERFACE" />
    <menu id="term-menu"/>
    <item label="Run...">
    <action name="Execute">
    <command>gmrun</command>
    </action>
    </item>
    where USERNAME is you and INTERFACE is probably wlan0 or similar
    openbox --reconfigure and you should be good to go.
    The script
    #!/bin/bash
    # pbrisbin 2009
    # simplified version of wifi-select designed to output as an openbox pipe menu
    # required:
    # netcfg
    # zenity
    # NOPASSWD entries for this and netcfg through visudo
    # the following in menu.xml:
    # <menu id="pipe-wifi" label="Wifi" execute="sudo /path/to/wifi.pipe interface"/>
    # the idea is to run this script once to scan/print, then again immediately to connect.
    # therefore, if you scan but don't connect, a temp file is left in /tmp. the next scan
    # will overwrite it, and the next connect will remove it.
    # source this just to get PROFILE_DIR
    . /usr/lib/network/network
    [ -z "$PROFILE_DIR" ] && PROFILE_DIR='/etc/network.d/'
    # awk code for parsing iwlist output
    # putting it here removes the wifi-select dependency
    # and allows for my own tweaking
    # prints a list "essid=security=quality_as_percentage"
    PARSER='
    BEGIN { FS=":"; OFS="="; }
    /\<Cell/ { if (essid) print essid, security, quality[2]/quality[3]*100; security="none" }
    /\<ESSID:/ { essid=substr($2, 2, length($2) - 2) } # discard quotes
    /\<Quality=/ { split($1, quality, "[=/]") }
    /\<Encryption key:on/ { security="wep" }
    /\<IE:.*WPA.*/ { security="wpa" }
    END { if (essid) print essid, security, quality[2]/quality[3]*100 }
    errorout() {
    echo "<openbox_pipe_menu>"
    echo "<item label=\"$1\" />"
    echo "</openbox_pipe_menu>"
    exit 1
    create_profile() {
    ESSID="$1"; INTERFACE="$2"; SECURITY="$3"; KEY="$4"
    PROFILE_FILE="$PROFILE_DIR$ESSID"
    cat > "$PROFILE_FILE" << END_OF_PROFILE
    CONNECTION="wireless"
    ESSID="$ESSID"
    INTERFACE="$INTERFACE"
    DESCRIPTION="Automatically generated profile"
    SCAN="yes"
    IP="dhcp"
    TIMEOUT="10"
    SECURITY="$SECURITY"
    END_OF_PROFILE
    # i think wifi-select should adopt these perms too...
    if [ -n "$KEY" ]; then
    echo "KEY=\"$KEY\"" >> "$PROFILE_FILE"
    chmod 600 "$PROFILE_FILE"
    else
    chmod 644 "$PROFILE_FILE"
    fi
    print_menu() {
    # scan for networks
    iwlist $INTERFACE scan 2>/dev/null | awk "$PARSER" | sort -t= -nrk3 > /tmp/networks.tmp
    # exit if none found
    if [ ! -s /tmp/networks.tmp ]; then
    rm /tmp/networks.tmp
    errorout "no networks found."
    fi
    # otherwise print the menu
    local IFS='='
    echo "<openbox_pipe_menu>"
    while read ESSID SECURITY QUALITY; do
    echo "<item label=\"$ESSID ($SECURITY) ${QUALITY/.*/}%\">" # trim decimals
    echo " <action name=\"Execute\">"
    echo " <command>sudo $0 $INTERFACE connect \"$ESSID\"</command>"
    echo " </action>"
    echo "</item>"
    done < /tmp/networks.tmp
    echo "</openbox_pipe_menu>"
    connect() {
    # check for an existing profile
    PROFILE_FILE="$(grep -REl "ESSID=[\"']?$ESSID[\"']?" "$PROFILE_DIR" | grep -v '~$' | head -n1)"
    # if found use it, else create a new profile
    if [ -n "$PROFILE_FILE" ]; then
    PROFILE=$(basename "$PROFILE_FILE")
    else
    PROFILE="$ESSID"
    SECURITY="$(awk -F '=' "/$ESSID/"'{print $2}' /tmp/networks.tmp | head -n1)"
    # ask for the security key if needed
    if [ "$SECURITY" != "none" ]; then
    KEY="$(zenity --entry --title="Authentication" --text="Please enter $SECURITY key for $ESSID" --hide-text)"
    fi
    # create the new profile
    create_profile "$ESSID" "$INTERFACE" "$SECURITY" "$KEY"
    fi
    # connect
    netcfg2 "$PROFILE" >/tmp/output.tmp
    # if failed, ask about removal of created profile
    if [ $? -ne 0 ]; then
    zenity --question \
    --title="Connection failed" \
    --text="$(grep -Eo "[\-\>]\ .*$" /tmp/output.tmp) \n Remove $PROFILE_FILE?" \
    --ok-label="Remove profile"
    [ $? -eq 0 ] && rm $PROFILE_FILE
    fi
    rm /tmp/output.tmp
    rm /tmp/networks.tmp
    [ $(id -u) -ne 0 ] && errorout "root access required."
    [ -z "$1" ] && errorout "usage: $0 [interface]"
    INTERFACE="$1"; shift
    # i added a sleep if we need to explicitly bring it up
    # b/c youll get "no networks found" when you scan right away
    # this only happens if we aren't up already
    if ! ifconfig | grep -q $INTERFACE; then
    ifconfig $INTERFACE up &>/dev/null || errorout "$INTERFACE not up"
    while ! ifconfig | grep -q $INTERFACE; do sleep 1; done
    fi
    if [ "$1" = "connect" ]; then
    ESSID="$2"
    connect
    else
    print_menu
    fi
    Screenshots
    removed -- Hi-res shots available on my site
    NOTE - i have not tested this extensively but it was working for me in most cases.  any updates/fixes will be edited right into this original post.  enjoy!
    UPDATE - 10/24/2009: i moved the awk statement from wifi-select directly into the script.  this did two things: wifi-select is no longer needed on the system, and i could tweak the awk statement to be more accurate.  it now prints a true percentange.  iwlist prints something like Quality=17/70 and the original awk statement would just output 17 as the quality.  i changed to print (17/70)*100 then bash trims the decimals so you get a true percentage.
    Last edited by brisbin33 (2010-05-09 01:28:20)

    froli wrote:
    I think the script's not working ... When I type
    sh wifi-pipe
    in a term it returns nothing
    well, just to be sure you're doing it right...
    he above is only an adjustment to the OB script's print_menu() function, it's not an entire script to itself.  so, if the original OB script shows output for you with
    sh ./wifi-pipe
    then using the above pint_menu() function (with all the other supporting code) should also show output, (only really only changes the echo's so they print the info in the pekwm format).
    oh, and if neither version shows output when you rut it in a term, then you've got other issues... ;P
    here's an entire [untested] pekwm script:
    #!/bin/bash
    # pbrisbin 2009
    # simplified version of wifi-select designed to output as an pekwm pipe menu
    # required:
    # netcfg
    # zenity
    # NOPASSWD entries for this and netcfg through visudo
    # the following in pekwm config file:
    # SubMenu = "WiFi" {
    # Entry = { Actions = "Dynamic /path/to/wifi-pipe" }
    # the idea is to run this script once to scan/print, then again immediately to connect.
    # therefore, if you scan but don't connect, a temp file is left in /tmp. the next scan
    # will overwrite it, and the next connect will remove it.
    # source this to get PROFILE_DIR and SUBR_DIR
    . /usr/lib/network/network
    errorout() {
    echo "Dynamic {"
    echo " Entry = \"$1\""
    echo "}"
    exit 1
    create_profile() {
    ESSID="$1"; INTERFACE="$2"; SECURITY="$3"; KEY="$4"
    PROFILE_FILE="$PROFILE_DIR$ESSID"
    cat > "$PROFILE_FILE" << END_OF_PROFILE
    CONNECTION="wireless"
    ESSID="$ESSID"
    INTERFACE="$INTERFACE"
    DESCRIPTION="Automatically generated profile"
    SCAN="yes"
    IP="dhcp"
    TIMEOUT="10"
    SECURITY="$SECURITY"
    END_OF_PROFILE
    # i think wifi-select should adopt these perms too...
    if [ -n "$KEY" ]; then
    echo "KEY=\"$KEY\"" >> "$PROFILE_FILE"
    chmod 600 "$PROFILE_FILE"
    else
    chmod 644 "$PROFILE_FILE"
    fi
    print_menu() {
    # scan for networks
    iwlist $INTERFACE scan 2>/dev/null | awk -f $SUBR_DIR/parse-iwlist.awk | sort -t= -nrk3 > /tmp/networks.tmp
    # exit if none found
    if [ ! -s /tmp/networks.tmp ]; then
    rm /tmp/networks.tmp
    errorout "no networks found."
    fi
    # otherwise print the menu
    echo "Dynamic {"
    IFS='='
    cat /tmp/networks.tmp | while read ESSID SECURITY QUALITY; do
    echo "Entry = \"$ESSID ($SECURITY) $QUALITY%\" {"
    echo " Actions = \"Exec sudo $0 $INTERFACE connect \\\"$ESSID\\\"\"</command>"
    echo "}"
    done
    unset IFS
    echo "}"
    connect() {
    # check for an existing profile
    PROFILE_FILE="$(grep -REl "ESSID=[\"']?$ESSID[\"']?" "$PROFILE_DIR" | grep -v '~$' | head -n1)"
    # if found use it, else create a new profile
    if [ -n "$PROFILE_FILE" ]; then
    PROFILE=$(basename "$PROFILE_FILE")
    else
    PROFILE="$ESSID"
    SECURITY="$(awk -F '=' "/$ESSID/"'{print $2}' /tmp/networks.tmp | head -n1)"
    # ask for the security key if needed
    if [ "$SECURITY" != "none" ]; then
    KEY="$(zenity --entry --title="Authentication" --text="Please enter $SECURITY key for $ESSID" --hide-text)"
    fi
    # create the new profile
    create_profile "$ESSID" "$INTERFACE" "$SECURITY" "$KEY"
    fi
    # connect
    netcfg2 "$PROFILE" >/tmp/output.tmp
    # if failed, ask about removal of created profile
    if [ $? -ne 0 ]; then
    zenity --question \
    --title="Connection failed" \
    --text="$(grep -Eo "[\-\>]\ .*$" /tmp/output.tmp) \n Remove $PROFILE_FILE?" \
    --ok-label="Remove profile"
    [ $? -eq 0 ] && rm $PROFILE_FILE
    fi
    rm /tmp/output.tmp
    rm /tmp/networks.tmp
    [ $(id -u) -ne 0 ] && errorout "root access required."
    [ -z "$1" ] && errorout "usage: $0 [interface]"
    INTERFACE="$1"; shift
    # i added a sleep if we need to explicitly bring it up
    # b/c youll get "no networks found" when you scan right away
    # this only happens if we aren't up already
    if ! ifconfig | grep -q $INTERFACE; then
    ifconfig $INTERFACE up &>/dev/null || errorout "$INTERFACE not up"
    sleep 3
    fi
    if [ "$1" = "connect" ]; then
    ESSID="$2"
    connect
    else
    print_menu
    fi
    exit 0

  • [SOLVED] Asus eee 1000H : netcfg and wicd unable to obtain IP

    Hi,
    I just installed arch linux on my asus eee 1000h, but I can't get
    wireless to work. I installed the packages:
    - wireless_tools
    - netcfg
    I have been reading through the beginners guide and the wireless setup guide,
    but still no success.
    I did
    lspci | grep -i net
    And found out I had to add the firmware for my card, so I did that and:
    ifconfig wlan0 up
    worked. So I did:
    iwlist wlan0 scan
    And found the network I wanted to connect too, so I do:
    iwconfig wlan0 essid network_id key wep_hex_key
    But I dont get associated to any access point, so I tried:
    ifconfig wlan0 down
    ifconfig wlan0 up
    Sometimes this gets me associated to the access point, however, it seems to
    be pretty unstable. Usually it 'looses' it's association after a short period
    of time.
    Then I do:
    dhcpcd wlan0
    However, I just get the output
    dhcpcd: version 5.2.2 starting
    dhcpcd: broadcasting for a lease
    dhcpcd: timed out
    I check "iwconfig wlan0" at it says it is still associated to the access point.
    I have tried netcfg, but it also just get's timed out waiting for a lease.
    I've tried to get this to work for a long time now, but can't seem to get it to
    work. I've read somewhere that it might be a bug in dhcpcd? If you have a
    suggestion for something to try, please keep in mind that I am not at all
    familiar with arch linux and explain accordingly.
    I installed arch linux because I want a distribution that forces me to learn
    more about linux, I just did'nt think it would be this much trouble, been trying
    for a couple of days now, I have allready learned alot though.
    Thanks for any reply.
    EDIT: I also tried setting the timeout to 120, it did not work
    EDIT 2: I tried using netcfg again. It first returned:
    WPA Authentication/Association Failed
    I tried again, and it returned:
    DHCP IP lease attempt failed
    Does this mean I have to use wpa encryption? I find this
    strange as I am connecting to the same network with
    my ubuntu machine using wep encryption.
    Last edited by khs (2011-04-20 12:31:28)

    edit your /etc/rc.conf to blacklist all of the modules that interfere with the rt2860sta module:
    MODULES=(!rt2800pci !rt61pci !rt2x00pci !rt2800usb !rt2800lib !rt2x00usb !rt2x00lib)
    don't initialize network with any other services:
    #eth0="dhcp"
    #wlan0="dhcp"
    INTERFACES=()
    make sure you don't have conflicting daemons running:
    DAEMONS=(syslog-ng dbus wicd netfs crond)
    then restart and try again(or go through rmmod and stopping and starting the individual services)
    btw... I am using arch+wicd on my eee 1000h to write this post, so if you have any more problems just let me know.
    also check out the eee 901 archwiki page it has a lot of good info and links.
    Last edited by trash (2011-04-20 00:23:21)

  • Short wifi sessions with netcfg (was "Freeze due to netcfg2") [Solved]

    Hey guys and girls,
    I'm experiencing some problems with netcfg. This is kind of urgent since that's my parents' computer and I have to leave tomorrow (actually I already delayed my departure from today because of that).
    Here is the problem :
    [- I have to boot at least ten times for the computer to boot successfully, otherwise the boot process stops at "Wifi up" ("wifi" being the name of my profile).][doesn't seem true anymore with ndiswrapper]
    - When it works, the network randomly stops working after a few minutes.
    - After it worked (and fell), trying to stop net-profiles won't work : it will just print "Wifi down [BUSY]" up to nowhen, then any attempt to sudo anything (even vi) will fail (the prompt will just hang on), and shutting down process will also fail on this "Wifi down [BUSY]" thing.
    The computer is up to date (that's actually part of the problem, no upgrade since at least six months and I didn't want to, but finally did because of mis-diagnosis…) with only stable repositories. Here are some useful config files and output :
    rc.conf:
    wlan0="wlan0 192.168.0.2"
    INTERFACES=(lo wlan0)
    ROUTES=(!gateway)
    NETWORKS=(wifi)
    network.d/wifi:
    CONNECTION="wireless"
    DESCRIPTION="wifi"
    INTERFACE=wlan0
    SCAN="no"
    SECURITY="wep"
    ESSID="whocares"
    KEY="loose key"
    IP="static"
    IFOPTS="192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
    GATEWAY="192.168.0.254"
    TIMEOUT=60
    DHCP_TIMEOUT=60
    (the timeouts don't work as the system freezes)
    The router is a french "freebox" configured in dhcp, with a permanent 192.168.0.2 address dedicated to the MAC address of the computer, its address is 192.168.0.254 and it works well.
    The wifi card is a Zyxel one with Realtek's RTL8185L chipset. It worked fine before the switch to netcfg, and I use ndiswrapper [it is worst if I use the "new" rtl8180 driver, see edit3].
    So, any idea ? Thanks.
    Edit : Oh, and logs are empty…
    Edit2 : In case it could be related, I use pci=routeirq and edd=off at boot.
    Edit3 : Additional problem I had with rtl8180 : "If I remove net-profiles from rc.conf' daemons list, starting manually netcfg2, netcfg-auto-wireless or net-profiles freezes the computer, forcing me to hard reboot]
    Last edited by Skippy le Grand Gourou (2008-08-22 10:13:18)

    Still no idea ? I figured out that iwlist cannot scan anything [edit: well, not everytime…] (while the network is working):
    $ iwlist wlan0 scan
    wlan0 Failed to read scan data : Resource temporarily unavailable
    And maybe this might help some guru :
    $ iwpriv wlan0
    wlan0 Available private ioctls :
    ndis_reset (8BF0) : set 0 & get 0
    power_profile (8BF1) : set 1 int & get 0
    deauthenticate (8BF3) : set 0 & get 0
    network_type (8BF2) : set 1 char & get 0
    media_stream (8BF4) : set 1 int & get 0
    reload_defaults (8BF7) : set 0 & get 0
    I'm really hoping to hear from anybody soon… Thanks.
    Last edited by Skippy le Grand Gourou (2008-08-21 19:58:30)

  • Wpa supplicant can't get it to work on boot(netcfg) [solved]

    As the title using Ralink RT2870 chipset with rt2870sta module.
    rc.conf
    NETWORKS=(wpa_suppl)
    DAEMONS=(syslog-ng netfs crond hal fam @vmware @sensors @cups network_profiles)
    All other networking bits commented out.
    cat /etc/network.d/wpa_suppl
    TIMEOUT=60
    CONNECTION='wireless'
    DESCRIPTION='A wpa_supplicant configuration based wireless connection'
    INTERFACE='wlan0'
    SECURITY='wpa-config'
    WPA_CONF='/etc/wpa_supplicant.conf'
    IP='dhcp'
    cat /etc/wpa_supplicant.conf
    ctrl_interface=/var/run/wpa_supplicant
    ctrl_interface_group=network
    update_config=1
    network={
    ssid="Myconnection"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    psk=hashedsomepasskey
    On boot it doesn't connect but running netcfg wpa_suppl it works fine. I'm not sure if it is related but in my boot messages I get
    /etc/rc.d/functions: line 192: /etc/rc.d/network_profiles: No such file or directory
    Which is correct is this related have I missed something in the tuts. Its just I didn't see any mention of this part and was under the impression network.d was the correct place. Line 192 seems to be looping through the daemons so I'm not sure what is triggering this.
    Can any one point me in the correct direction as to why it is working manually but not on boot?
    Last edited by FeatherMonkey (2010-09-27 00:51:27)

    The daemon is called "net-profiles", not "network_profiles".
    Last edited by hokasch (2010-09-26 23:21:49)

  • Can't get netcfg to work properly

    I'm currently trying to setup my netcfg.  I can connect wirelessly without any problems by the following process:
    ifconfig wlan0 up
    iwconfig wlan0 essid "networkid"
    wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
    dhcpcd wlan0
    However, when I follow the guides on wiki to get it started up, I get the following errors when i use the
    netcfg wpa_suppl
    :: wpa_suppl up [BUSY]
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
    > WPA Authentication/Association Failed
    Any help would be greatly appreciated.  I'm trying to get my netcfg to work properly so I can set up my wireless to where it connects automatically instead of having to put in commands everytime I log in.  Thanks!

    Strazku wrote:
    alexandrite wrote:What's your profile look like?
    CONNECTION='wireless'
    DESCRIPTION='A wpa_supplicant configuration based wireless connection'
    INTERFACE='wlan0'
    SECURITY='wpa-config'
    WPA_CONF='/etc/wpa_supplicant.conf'
    IP='dhcp'
    If you truly must use wpa-config, make sure there are no directives in the config file outside your network block.  Netcfg cannot use wpa_supplicant files that do, and it prints a similar error message if I remember correctly.  Also, you may still need to specify your ESSID in the profile, as stated above.
    But! Consider just using "SECURITY='wpa'" or "SECURITY='wpa-configsection'" instead of "SECURITY='wpa-config'"  Netcfg will generate a wpa_supplicant config file and use wpa_supplicant to manage the connection.  Netcfg comes with example syntax for it, and it's much simpler.
    Last edited by alexandrite (2010-08-24 02:09:02)

  • [SOLVED]Netcfg works great manually, but when using the daemon it wont

    I installed netcfg a really long time ago following the arch wiki. When I first installed it and set everything up, it was all working perfectly.
    For the past three or four months Ive been having problems where netcf daemon is failing to connect (home wireless network 256bit wep). It takes about 20 seconds just waiting and eventually says failed. If I log in and run the command manually (sudo netcfg home-wifi) it connect perfectly fine every time.
    Ive tried everything I can think of including different QUIRKS and changing permissions on the profiles but nothing works. I also tried using the netcfg menu but it doesnt work like that either. I went over the wiki page again thinking something might have chnaged, but its all the same. I even reinstalled and configured again but still nothing.
    heres my rc.conf
    # /etc/rc.conf - Main Configuration for Arch Linux
    # LOCALIZATION
    # LOCALE: available languages can be listed with the 'locale -a' command
    # HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
    # in the hardware clock being left untouched (useful for virtualization)
    # TIMEZONE: timezones are found in /usr/share/zoneinfo
    # KEYMAP: keymaps are found in /usr/share/kbd/keymaps
    # CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
    # CONSOLEMAP: found in /usr/share/kbd/consoletrans
    # USECOLOR: use ANSI color sequences in startup messages
    LOCALE="en_US.UTF-8"
    HARDWARECLOCK="UTC"
    TIMEZONE="America/New_York"
    KEYMAP="us"
    CONSOLEFONT=
    CONSOLEMAP=
    USECOLOR="yes"
    # HARDWARE
    # MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
    # MOD_BLACKLIST: Prevent udev from loading these modules
    # MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
    # NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
    MOD_AUTOLOAD="yes"
    #MOD_BLACKLIST=() #deprecated
    MODULES=(acpi-cpufreq cpufreq_ondemand vboxdrv loop)
    # Scan for LVM volume groups at startup, required if you use LVM
    USELVM="no"
    # NETWORKING
    # HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
    HOSTNAME="Arch"
    # Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
    # Interfaces to start at boot-up (in this order)
    # Declare each interface then list in INTERFACES
    # - prefix an entry in INTERFACES with a ! to disable it
    # - no hyphens in your interface names - Bash doesn't like it
    # DHCP: Set your interface to "dhcp" (eth0="dhcp")
    # Wireless: See network profiles below
    #Static IP example
    #eth0="dhcp"
    eth0="dhcp"
    INTERFACES=(eth0)
    # Routes to start at boot-up (in this order)
    # Declare each route then list in ROUTES
    # - prefix an entry in ROUTES with a ! to disable it
    gateway="default gw 192.168.0.1"
    ROUTES=(!gateway)
    # Enable these network profiles at boot-up. These are only useful
    # if you happen to need multiple network configurations (ie, laptop users)
    # - set to 'menu' to present a menu during boot-up (dialog package required)
    # - prefix an entry with a ! to disable it
    # Network profiles are found in /etc/network.d
    # This now requires the netcfg package
    NETWORKS=(home-wifi)
    # DAEMONS
    # Daemons to start at boot-up (in this order)
    # - prefix a daemon with a ! to disable it
    # - prefix a daemon with a @ to start it up in the background
    DAEMONS=(syslog-ng crond hal cpufreq !network net-profiles @netfs @alsa @sensors @mpd)
    What gets me is that it actually takes longer to fail then it does when I manually connect. It times out for like 20 seconds, but when I manually connect its almost instantaneous.
    Last edited by tjwoosta (2010-03-02 05:31:37)

    I had arch installed on my Sony VAIO, had this problem, and then fixed it somehow.  That was several months ago, recently I fried the laptop so I just reinstalled and can't remember.  But now I have a "solution"  haha
    this is kind of silly how I got it to work, though.
    I created another profile "home-wifi-boot" with a short timeout, this is called from rc.conf.
    then I put "/usr/bin/netcfg home-wifi" in my /etc/rc.local  , which is exactly the same but has a 30 sec timeout.
    This just does the same thing as I was doing manually, runs netcfg a second time.  It works for me!
    Last edited by jamba (2010-02-14 15:30:58)

  • [SOLVED] Configuring and using a netcfg profile

    Hi guys,
    As per the Beginner's Guide I have been trying to set up netcfg to use my network configuration profile https://wiki.archlinux.org/index.php/Be … de#Wired_2
    I can successfully setup network connectivity every time I boot using the 'ip addr add 10.1.0.8/8 dev eth0' and 'ip route add default via 10.0.150.1' commands but ideally I'd like a static IP setup automatically.
    I have installed ifplugd and successfully enabled net-auto-wired.service using systemctl.
    I have created my profile here '/etc/network.d/ethernet-static'
    CONNECTION='ethernet'
    INTERFACE='eth0'
    IP='static'
    ADDR='10.1.0.8'
    GATEWAY='10.0.150.1'
    DNS=('10.0.0.17' '10.0.0.18')
    Now when I manually run 'netcfg -u ethernet-static' it fails and I can't for the life of me work out why...
    Is there any other information I could provide? As I said I can use the 'ip' commands to connect using the same addresses.
    Please help! Many thanks
    Last edited by Robula (2012-11-22 10:23:33)

    p0x8 wrote:
    According to the netcfg-profiles man page, the netmask value defaults to /24. So your interface is being configured with a 10.1.0.8/24 address, thus making the 10.0.0.0 network (where your gateway resides) unreachable.
    You have to specify your /8 netmask explicitly, e.g.:
    CONNECTION='ethernet'
    INTERFACE='eth0'
    IP='static'
    ADDR='10.1.0.8'
    NETMASK=8
    GATEWAY='10.0.150.1'
    DNS=('10.0.0.17' '10.0.0.18')
    Genius! Thank you so much, it's working now.
    I was trying to use journalcfg, however I couldn't work out how to filter it properly or just show the last 20 or so entries.... But anyways problem solved.
    Kudos to you p0x8
    Thanks all!
    Last edited by Robula (2012-11-22 10:24:03)

  • Eth0 not working in netcfg but in rc.conf

    i have a itx board intel d525mw. i am trying to let the eth0 working under netcfg but failed. i try to do 'dhcpcd eth0' but it returned a time out. however, i hand coded the ip address in rc.conf and it works (on intra-net but no internet). it is a headless nas so it is difficult to move it back and fore to my monitor and keyboard.

    just did and it can connect to internet now. but i want to point out that it is not a driver problem (i guess). it must be some setting wrong. i copy the example/ethernet-dhcp to /etc/networks.d/ put the "ethernet-dhcp" in NETWORKS in rc.conf. change network to net-profiles in  rc.conf. it should work but it didn't.

  • Netcfg v2.5.2 - note: change in auto wireless config

    This release brings a completely new auto wireless/wired configuration. The old net-auto is deprecated and no longer included. There are also some very minor configuration changes that may affect a few people.
    Move to new auto-wireless/wired
    The new automatic connection has proper roaming support and will prove more reliable than the old setup - particularly with more complicated wireless configurations. To migrate to the new automatic wireless setup:
    1. pacman -S core/wpa_actiond
    2. Set WIRELESS_INTERFACE="" to your wireless interface in /etc/rc.conf.
    For example WIRELESS_INTERFACE="wlan0"
    3. Add net-auto-wireless to your DAEMONS=() array.
    Note: wpa-config profiles do not work with this, convert them to wpa-configsection profiles. An example is included in
    /etc/network.d/examples/
    The new auto-wired uses similar configuration - follow the above instructions except use the net-auto-wired daemon, and WIRED_INTERFACE configuration option.
    New features:
    - net-auto-wireless/wpa_actiond - Real wireless roaming/auto connection. Based on same principle as autowifi. Requires optional dependency: wpa_actiond
    - net-auto-wired - automatic ethernet configuration. Requires optional dependency: ifplugd
    - Interface configurations - set options for all profiles using an interface
    - Output hooks
    - Internal cleanup & improvement
    Internal changes:
    - Uses wpa_supplicant for all wireless configuration by default, including wep/none security. This adds improves support for most and should improve reliability.
      - Uses iproute by default for all static configuration. net_tools which contains ifconfig is effectively obsolete and hasnt seen a release for over 8 years. The 'ethernet-iproute' and 'ethernet' connection types have been merged together to simply 'ethernet'. All options are still supported and existing configurations will continue to work for both types. A symlink has been made to ensure that profiles using 'ethernet-iproute' will continue to function.
    Changes in configuration syntax
    - net-auto and AUTO_NETWORKS is now deprecated in favour of net-auto-wireless/net-auto-wired.
    - wireless: If you were previously specifying the wpa_supplicant driver in WPA_OPTS, you now need to specify it in WPA_DRIVER.
    - wireless: iwconfig based configuration for wep/none can be used by changing to wep-old or none-old. This should not be necessary and is left in place only for the possibility of very old drivers that do not
    support wpa_supplicant.
    - ethernet-iproute: As 'ethernet' is now iproute based, those using 'ethernet-iproute' can revert the name. There is a symlink in place, so existing configurations of either name will continue to function
    regardless.
    - wireless-dbus: Unsupported. The wpa_supplicant dbus interface isn't particularly well documented and it doesn't fit well into the netcfg codebase. There is a symlink in place so that configurations using wireless-dbus will continue to function using the 'wireless' connection scripts.
    Download:
    netcfg 2.5.2 is in [core].
    Source: ftp://ftp.archlinux.org/other/netcfg/ne … 5.2.tar.gz
    PKGBUILD: In subversion
    Documentation:
    http://wiki.archlinux.org/index.php/Network_Profiles
    Contributors:
    I had a few big contributors to this release:
    Jim Pryor: Many internal changes and improvements
    Thomas Bächler: wpa_actiond based auto roaming/connection
    Thanks guys!
    Future Plans:
    * Complete non-Arch support
    * Redo rfkill using the 'rfkill' tool in the repos
    * Fix bugs
    Bugs:
    On the bug tracker as always.
    Last edited by iphitus (2010-02-18 11:22:41)

    I continued to have difficulty connecting to my default wireless network, but I eventually figured out why.  I seem to recall netcfg used to not care if a POSTUP command failed.  I read somewhere that now it does.
    So once I got that taken care of, I experimented with net-auto-wireless.  It fails for me with no error message.
    Being a bit of a tinkerer, I looked into the net-auto-wireless script.  I found this line...
    /usr/bin/netcfg-wpa_actiond "${WIRELESS_INTERFACE}" >/dev/null
    ...Removed the >/dev/null, and ran it again.
    $ sudo /etc/rc.d/net-auto-wireless start
    :: Starting netcfg auto-wireless mode for interface wlan0 [BUSY]
    eth-xover
    eth-hc
    wifi-home
    wifi-rounds
    wifi-rollingst
    wifi-kevin
    eth-dhcp
    Line 12: WPA-PSK accepted for key management, but no PSK configured.
    Line 12: failed to parse network block.
    Line 22: WPA-PSK accepted for key management, but no PSK configured.
    Line 22: failed to parse network block.
    Failed to read or parse configuration '/tmp/wpa.wlan0/wpa.conf'.
    [FAIL]
    ...And now that I think about it,  I bet it's because I didn't set security="none" in the open network profiles.
    ...Yep, that was it.
    Last edited by aaaantoine (2010-02-21 01:03:02)

  • Netcfg + wpa enterprise help

    Here is what I have / the troubleshooting I have done:
    [phil@pwned ~]$ cd /etc/network.d/
    [phil@pwned network.d]$ cat uw-secure
    CONNECTION="wireless"
    DESCRIPTION="secure uw"
    INTERFACE=wlan0
    IP=dhcp
    ESSID="uw-secure"
    TIMEOUT=30
    SECURITY=wpa-config
    SCAN="YES"
    WPA_CONF="/etc/network.d/wpa_supplicant.conf"
    QUIRKS=(prescan postsleep)[phil@pwned network.d]$
    [phil@pwned network.d]$ cat wpa_supplicant.conf
    ctrl_interface=/var/run/wpa_supplicant
    network={
    ssid="uw-secure"
    scan_ssid=1
    key_mgmt=WPA-EAP
    eap=PEAP
    identity="me"
    password="not_telling"
    ca_cert="/usr/share/ca-certificates/mozilla/Thawte_Premium_Server_CA.crt"
    phase1="peaplabel=0"
    phase2="auth=MSCHAPV2"
    }[phil@pwned network.d]$
    [phil@pwned network.d]$ sudo netcfg uw-secure up
    :: uw-secure up [BUSY] :: waterloo down [DONE]
    wlan0 Interface doesn't support scanning : Device or resource busy
    wlan0 Interface doesn't support scanning : Device or resource busy
    wlan0 Interface doesn't support scanning : Device or resource busy
    wlan0 Interface doesn't support scanning : Device or resource busy
    wlan0 Interface doesn't support scanning : Device or resource busy
    - Network not present.
    [FAIL]
    [phil@pwned network.d]$ sudo netcfg waterloo up
    :: waterloo up [DONE]
    [phil@pwned network.d]$ sudo iwlist scan
    lo Interface doesn't support scanning.
    eth0 Interface doesn't support scanning.
    wmaster0 Interface doesn't support scanning.
    wlan0 Scan completed :
    Cell 01 - Address: 00:1A:1E:A7:DD:00
    Channel:1
    Frequency:2.412 GHz (Channel 1)
    Quality=48/70 Signal level=-62 dBm
    Encryption key:off
    ESSID:"uw-wireless"
    Bit Rates:5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=0000000f0b28e181
    Extra: Last beacon: 36ms ago
    IE: Unknown: 000B75772D776972656C657373
    IE: Unknown: 01088B0C129618243048
    IE: Unknown: 030101
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: Unknown: DD0A00037F04010000000000
    Cell 02 - Address: 00:0B:86:67:6B:80
    Channel:1
    Frequency:2.412 GHz (Channel 1)
    Quality=32/70 Signal level=-78 dBm
    Encryption key:off
    ESSID:"uw-wireless"
    Bit Rates:5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=0000000181ee87a3
    Extra: Last beacon: 6153ms ago
    IE: Unknown: 000B75772D776972656C657373
    IE: Unknown: 01088B0C129618243048
    IE: Unknown: 030101
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: Unknown: DD0A00037F04010000000000
    Cell 03 - Address: 00:1A:1E:A7:DD:01
    Channel:1
    Frequency:2.412 GHz (Channel 1)
    Quality=45/70 Signal level=-65 dBm
    Encryption key:on
    ESSID:"uw-secure"
    Bit Rates:5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=0000000f0acb8b3a
    Extra: Last beacon: 6153ms ago
    IE: Unknown: 000975772D736563757265
    IE: Unknown: 01088B0C129618243048
    IE: Unknown: 030101
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: WPA Version 1
    Group Cipher : TKIP
    Pairwise Ciphers (1) : TKIP
    Authentication Suites (1) : 802.1x
    IE: Unknown: DD0A00037F04010000000000
    Cell 04 - Address: 00:0B:86:67:6B:82
    Channel:1
    Frequency:2.412 GHz (Channel 1)
    Quality=33/70 Signal level=-77 dBm
    Encryption key:on
    ESSID:"uw-secure"
    Bit Rates:5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=0000000181ee7f80
    Extra: Last beacon: 6156ms ago
    IE: Unknown: 000975772D736563757265
    IE: Unknown: 01088B0C129618243048
    IE: Unknown: 030101
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: WPA Version 1
    Group Cipher : TKIP
    Pairwise Ciphers (1) : TKIP
    Authentication Suites (1) : 802.1x
    IE: Unknown: DD0A00037F04010000000000
    Cell 05 - Address: 00:0B:86:67:6C:E0
    Channel:6
    Frequency:2.437 GHz (Channel 6)
    Quality=57/70 Signal level=-53 dBm
    Encryption key:off
    ESSID:"uw-wireless"
    Bit Rates:5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=00000002e7f9ef66
    Extra: Last beacon: 5716ms ago
    IE: Unknown: 000B75772D776972656C657373
    IE: Unknown: 01088B0C129618243048
    IE: Unknown: 030106
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: Unknown: DD0A00037F04010000000000
    Cell 06 - Address: 00:0B:86:67:6C:E2
    Channel:6
    Frequency:2.437 GHz (Channel 6)
    Quality=57/70 Signal level=-53 dBm
    Encryption key:on
    ESSID:"uw-secure"
    Bit Rates:5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=00000002e7f9f1c2
    Extra: Last beacon: 5713ms ago
    IE: Unknown: 000975772D736563757265
    IE: Unknown: 01088B0C129618243048
    IE: Unknown: 030106
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: WPA Version 1
    Group Cipher : TKIP
    Pairwise Ciphers (1) : TKIP
    Authentication Suites (1) : 802.1x
    IE: Unknown: DD0A00037F04010000000000
    Cell 07 - Address: 32:24:81:B7:BB:8C
    Channel:6
    Frequency:2.437 GHz (Channel 6)
    Quality=25/70 Signal level=-85 dBm
    Encryption key:off
    ESSID:"hpsetup"
    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
    Mode:Ad-Hoc
    Extra:tsf=0000000000000000
    Extra: Last beacon: 5720ms ago
    IE: Unknown: 000768707365747570
    IE: Unknown: 010482848B96
    IE: Unknown: 030106
    IE: Unknown: 06020000
    Cell 08 - Address: 00:0B:86:6D:E1:60
    Channel:11
    Frequency:2.462 GHz (Channel 11)
    Quality=70/70 Signal level=-39 dBm
    Encryption key:off
    ESSID:"uw-wireless"
    Bit Rates:5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=0000000226cc163e
    Extra: Last beacon: 5353ms ago
    IE: Unknown: 000B75772D776972656C657373
    IE: Unknown: 01088B0C129618243048
    IE: Unknown: 03010B
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: Unknown: DD0A00037F04010000000000
    Cell 09 - Address: 00:0B:86:6D:E1:62
    Channel:11
    Frequency:2.462 GHz (Channel 11)
    Quality=70/70 Signal level=-40 dBm
    Encryption key:on
    ESSID:"uw-secure"
    Bit Rates:5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=0000000226cc189a
    Extra: Last beacon: 5350ms ago
    IE: Unknown: 000975772D736563757265
    IE: Unknown: 01088B0C129618243048
    IE: Unknown: 03010B
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: WPA Version 1
    Group Cipher : TKIP
    Pairwise Ciphers (1) : TKIP
    Authentication Suites (1) : 802.1x
    IE: Unknown: DD0A00037F04010000000000
    Cell 10 - Address: 00:0B:86:6D:DF:A2
    Channel:11
    Frequency:2.462 GHz (Channel 11)
    Quality=32/70 Signal level=-78 dBm
    Encryption key:on
    ESSID:"uw-secure"
    Bit Rates:5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=0000000635fbf2d9
    Extra: Last beacon: 5340ms ago
    IE: Unknown: 000975772D736563757265
    IE: Unknown: 01088B0C129618243048
    IE: Unknown: 03010B
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: WPA Version 1
    Group Cipher : TKIP
    Pairwise Ciphers (1) : TKIP
    Authentication Suites (1) : 802.1x
    IE: Unknown: DD0A00037F04010000000000
    Cell 11 - Address: 00:0B:86:6D:DF:A0
    Channel:11
    Frequency:2.462 GHz (Channel 11)
    Quality=31/70 Signal level=-79 dBm
    Encryption key:off
    ESSID:"uw-wireless"
    Bit Rates:5.5 Mb/s; 11 Mb/s; 6 Mb/s; 9 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=0000000635fbf181
    Extra: Last beacon: 5340ms ago
    IE: Unknown: 000B75772D776972656C657373
    IE: Unknown: 01088B960C1218243048
    IE: Unknown: 03010B
    IE: Unknown: 050400010000
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: Unknown: DD0A00037F04010000000000
    Cell 12 - Address: 00:0B:86:67:6C:F0
    Channel:161
    Frequency:5.805 GHz
    Quality=28/70 Signal level=-82 dBm
    Encryption key:off
    ESSID:"uw-wireless"
    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
    36 Mb/s; 48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=00000080ad85be31
    Extra: Last beacon: 313ms ago
    IE: Unknown: 000B75772D776972656C657373
    IE: Unknown: 01088C129824B048606C
    IE: Unknown: 0301A1
    IE: Unknown: DD0A00037F04010000000000
    Cell 13 - Address: 00:0B:86:67:6C:F2
    Channel:161
    Frequency:5.805 GHz
    Quality=29/70 Signal level=-81 dBm
    Encryption key:on
    ESSID:"uw-secure"
    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
    36 Mb/s; 48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=00000080ad85bf54
    Extra: Last beacon: 313ms ago
    IE: Unknown: 000975772D736563757265
    IE: Unknown: 01088C129824B048606C
    IE: Unknown: 0301A1
    IE: WPA Version 1
    Group Cipher : TKIP
    Pairwise Ciphers (1) : TKIP
    Authentication Suites (1) : 802.1x
    IE: Unknown: DD0A00037F04010000000000
    Cell 14 - Address: 00:1A:1E:A7:03:41
    Channel:6
    Frequency:2.437 GHz (Channel 6)
    Quality=22/70 Signal level=-88 dBm
    Encryption key:on
    ESSID:"uw-secure"
    Bit Rates:5.5 Mb/s; 11 Mb/s; 6 Mb/s; 9 Mb/s; 12 Mb/s
    18 Mb/s; 24 Mb/s; 36 Mb/s
    Bit Rates:48 Mb/s; 54 Mb/s
    Mode:Master
    Extra:tsf=0000000194f7e2d9
    Extra: Last beacon: 5693ms ago
    IE: Unknown: 000975772D736563757265
    IE: Unknown: 01088B960C1218243048
    IE: Unknown: 030106
    IE: Unknown: 050400010000
    IE: Unknown: 2A0100
    IE: Unknown: 3202606C
    IE: WPA Version 1
    Group Cipher : TKIP
    Pairwise Ciphers (1) : TKIP
    Authentication Suites (1) : 802.1x
    IE: Unknown: DD0A00037F04010000000000
    [phil@pwned network.d]$
    I got the base config from:
    http://bbs.archlinux.org/viewtopic.php?id=62365

    Ok, sorry for the super delayed response but I didn't have access to my laptop, then I was busy with midterms. I successfully connected manually with wpa_supplicant with this config file:
    [phil@pwned network.d]$ cat /etc/wpa_supplicant.conf
    ctrl_interface=/var/run/wpa_supplicant
    eapol_version=1
    ap_scan=1
    fast_reauth=1
    network={
    ssid="uw-secure"
    scan_ssid=1
    key_mgmt=WPA-EAP
    eap=PEAP
    identity="rofl"
    password="lolol"
    phase1="peaplabel=0"
    I then updated my uw-secure file so that it referenced the new wpa config file:
    [phil@pwned network.d]$ cat uw-secure
    CONNECTION="wireless"
    DESCRIPTION="secure uw"
    INTERFACE="wlan0"
    IP="dhcp"
    SECURITY="wpa-config"
    SCAN="YES"
    WPA_CONF="/etc/wpa_supplicant.conf"
    I then tried to connect with netcfg, and I got this:
    [phil@pwned network.d]$ sudo netcfg uw-secure
    :: uw-secure up
    wlan0 Interface doesn't support scanning : Device or resource busy
    wlan0 Interface doesn't support scanning : Network is down
    wlan0 Interface doesn't support scanning : Network is down
    wlan0 Interface doesn't support scanning : Network is down
    wlan0 Interface doesn't support scanning : Network is down
    - Network not present.
    any help would be appreciated.

  • [solved] manually wpa-wlan works, netcfg won't

    hi there,
    i'm new to arch linux, and actually trying to connect to my wpa-wlan with netcfg...
    when i boot my system, wlan works fine with:
    sudo iwconfig wlan0 essid "my connection"
    sudo wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
    sudo dhcpcd wlan0
    and i'm able to connect to the internet.
    Trying to connect with netcfg2 doesnt work:
    sudo netcfg2 default.conf
    :: default.conf up
    wlan0: timed out
                              - DHCP IP lease attempt failed
    (the same with netcfg instead of netcfg2)
    i'm wondering what i did wrong. these are my configuration files:
    default.conf (Path: /etc/network.d/default.conf)
    CONNECTION="wireless"
    INTERFACE=wlan0
    SCAN="yes"
    SECURITY="wpa2"
    ESSID="my connection"
    KEY="mykey"
    IP="dhcp"
    TIMEOUT=30
    DHCP_TIMEOUT=30
    also tried SCAN="no", same error
    wpa_supplicant.conf (Path: /etc/wpa_supplicant.conf)
    ctrl_interface=/var/run/wpa_supplicant
             eapol_version=1
             ap_scan=1
    network={
             ssid="my connection"
             scan_ssid=1
             key_mgmt=WPA-PSK
             psk=687.......c05
    any ideas?
    Last edited by DaStevo (2009-02-22 22:23:39)

    If you're using custom wpa_supplicant.conf file then you should use:
    SECURITY=wpa-config
    and define the path to the wpa_supplicant.conf file:
    WPA_CONF=/etc/wpa_supplicant.conf
    I'm not hundred percent sure, but I don't think you need KEY and ESSID variables.

  • DHCP_TIMEOUT in /etc/conf.d/netcfg has no effect

    I want to set DHCP_TIMEOUT to 30 for all netcfg profiles. On  this page in wiki it is suggested to set the variable in /etc/conf.d/netcfg. But this has no effect. I tried 'NETCFG_DEBUG="yes" netcfg <arguments>' and the timeout was still 10.
    How can I set DHCP_TIMEOUT for all profiles without editing every profile?

    opt1mus wrote:Could you paste into this thread your /etc/conf.d/netcfg and the debug output. It's easier for people to help with troubleshooting when actual output is to hand.
    Here it is (network names changed):
    # cat /etc/conf.d/netcfg
    # Enable these netcfg profiles at boot time.
    #   - prefix an entry with a '@' to background its startup
    #   - set to 'last' to restore the profiles running at the last shutdown
    #   - set to 'menu' to present a menu (requires the dialog package)
    # Network profiles are found in /etc/network.d
    NETWORKS=(network1 network2)
    # Specify the name of your wired interface for net-auto-wired
    WIRED_INTERFACE="eth0"
    # Specify the name of your wireless interface for net-auto-wireless
    WIRELESS_INTERFACE="wlan0"
    # Array of profiles that may be started by net-auto-wireless.
    # When not specified, all wireless profiles are considered.
    #AUTO_PROFILES=("profile1" "profile2")
    DHCP_TIMEOUT=30
    # NETCFG_DEBUG="yes" netcfg network1
    DEBUG: Loading profile network1
    DEBUG: Configuring interface wlan0
    :: network1 up                                                                                                                                                                          [ BUSY ] DEBUG: status reported to profile_up as:
    DEBUG: Loading profile network1
    DEBUG: Configuring interface wlan0
    DEBUG: wireless_up start_wpa wlan0 /run/network/wpa.wlan0/wpa.conf nl80211,wext
    Successfully initialized wpa_supplicant
    DEBUG: wireless_up Configuration generated at /run/network/wpa.wlan0/wpa.conf
    DEBUG: wireless_up wpa_reconfigure wlan0
    DEBUG: wpa_cli -i wlan0 -p /run/wpa_supplicant reconfigure
    DEBUG: wireless_up ifup
    DEBUG: wireless_up wpa_check
    DEBUG: Loading profile network1
    DEBUG: Configuring interface wlan0
    DEBUG: ethernet_up bring_interface up wlan0
    DEBUG: ethernet_up dhcpcd -qL -t 10 wlan0
    DEBUG:
    > DHCP IP lease attempt failed.
    DEBUG: Loading profile network1
    DEBUG: Configuring interface wlan0
    DEBUG: Loading profile network1
    DEBUG: Configuring interface wlan0
    DEBUG: ethernet_down bring_interface flush wlan0
    DEBUG: wireless_down stop_wpa wlan0
    DEBUG: wpa_cli -i wlan0 -p /run/wpa_supplicant terminate
    DEBUG: profile_up connect failed

  • [Fixed...] wpa_supplicant and netcfg stopped working since updates

    Hello, I am new to the forums and have run into a problem with wpa_supplicant and netcfg (though I believe the problem resides with wpa_supplicant).
    A bit about me - This is my first "intermediate" linux distro (I tried fedora back when it was version 6 but didn't get terribly far with it). I have mostly been using Ubuntu (because it is out of the box and easy), but I ran out of use for an old laptop I had around and chose to install a minimalist distro on it (hence arch). The learning curve was a bit steep, but it is intersting and makes for a nice learning experience at the very least.
    The problem:
    I updated my system (which I do each time there is an available update on linux because it normally fixes things) on the 11th and everything was working great. However, my ip lease expired over the weekend (apparently) and as I am mostly a windows user (sorry, but it is true) I didn't notice it until today (when I went to check pacman for any updates and no longer had an internet connection).
    It appears that the last round of updates I installed included updates for wpa_supplicant in them and changed the way things are supposed to be done in the /etc/wpa_supplicant.conf file. It looked like so beforehand (and still does though I have attempted to rewrite with the new format - sadly that hasn't worked out and I am here as a result):
    network={
    ssid="zelda"
    psk=<... long key here> # note - Like I said, this was working before, I removed the key on purpose.
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
    And here is what I have attempted with my new wpa_supplicant.conf file:
    network={
    ssid="zelda"
    psk=<... long key here>
    scan_ssid=1
    priority=1
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
    Here are the steps I am taking to attempt and access the internet (manually):
    sudo ifconfig wlan0 up
    sudo wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
    <wait a bit>
    sudo dhcpcd wlan0
    dhcpcd[2281]: version 5.2.12 starting
    dhcpcd[2281]: wlan0: rebinding lease of <IP>
    dhcpcd[2281]: wlan0: carrier lost
    dhcpcd[2281]: wlan0: carrier acquited
    dhcpcd[2281]: wlan0: rebinding lease of <IP>
    dhcpcd[2281]: wlan0: boradcasting for a lease
    dhcpcd[2281]: wlan0: carrier lost
    dhcpcd[2281]: wlan0: carrier acquired
    dhcpcd[2281]: wlan0: rebinding lease of <IP>
    dhcpcd[2281]: wlan0: broadcasting for a lease
    dhcpcd[2281]: wlan0: carrier lost
    dhcpcd[2281]: wlan0: carrier acquired
    dhcpcd[2281]: wlan0: rebinding lease for <IP>
    dhcpcd[2281]: timed out
    And if I attempt to use netcfg (in code because it uses spaces):
    sudo netcfg zelda
    :: zelda up [BUSY]
    > WPA Authentication/Association Failed
    [FAIL]
    Here is my /etc/network.d/zelda file (like I said, this used to work. I haven't modified this file though):
    CONNECTION='wireless'
    DESCRIPTION='Home network'
    INTERFACE='wlan0'
    SECURITY='wpa-config'
    WPA_CONF='/etc/wpa_supplicant.conf'
    IP='dhcp'
    Any help would be appreciated.
    <edit>
    Well, this is what I like to see. Apparently it wasn't as difficult as I was making it out to be, and the second wpa_supplicant.conf file I posted (the new one) works. I just had to do a reboot for it to notice the changes (though this does lead me to wonder if a daemon caches the wpa_supplicant entries...). It is all working now.
    </edit>
    Last edited by BetaWar (2011-05-18 23:55:22)

    trixrabbit wrote:
    Then I use netcfg-menu to connect to the netowork.
    My problem is I tried doing this again and I get  : Please install 'dialog' to use netcfg-menu
    You are trying to use netcfg-menu.
    The error message is telling you that you need to install the "dialog" package to use netcfg-menu.
    Solution: install the "dialog" package (pacman -S dialog).
    edit:  You can also use netcfg without the dialog package. For example, "netcfg -u <profile>", "netcfg -l". See "netcfg --help" for more options.
    10PinkPanther wrote:Wiki says that dialog is needed in some cases.Do you see your network when you run wifi-menu?
    Last edited by Xyne (2012-12-02 19:12:18)

  • [SOLVED]How to configure pptp vpn start on boot with netcfg?

    I've configured 2 profiles:
    eth0 and ppp0, where ppp0 is a pptp vpn tunnel.
    $ ls /etc/network.d/
    eth0  examples  interfaces  ppp0
    $ cat /etc/network.d/ppp0
    CONNECTION='ppp'
    INTERFACE='ppp0'
    PEER='dxt'
    PPP_TIMEOUT=10
    $ cat /etc/conf.d/netcfg
    # Enable these netcfg profiles at boot time.
    #   - prefix an entry with a '@' to background its startup
    #   - set to 'last' to restore the profiles running at the last shutdown
    #   - set to 'menu' to present a menu (requires the dialog package)
    # Network profiles are found in /etc/network.d
    NETWORKS=(eth0 ppp0)
    # Specify the name of your wired interface for net-auto-wired
    WIRED_INTERFACE="eth0"
    # Specify the name of your wireless interface for net-auto-wireless
    WIRELESS_INTERFACE="wlan0"
    Manually, I can start up ppp0 correctly.
    $ sudo netcfg -u ppp0
    :: ppp0 up                                                                                                                                                                 [ BUSY ] Using interface ppp0
    Connect: ppp0 <--> /dev/pts/3
    CHAP authentication succeeded
    MPPE 128-bit stateless compression enabled
    Cannot determine ethernet address for proxy ARP
    local  IP address 10.100.3.132
    remote IP address 10.100.3.1
                                                                                                                                                                               [ DONE ]
    $ ip addr list dev ppp0
    8: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1496 qdisc pfifo_fast state UNKNOWN qlen 3
        link/ppp
        inet 10.100.3.132 peer 10.100.3.1/32 scope global ppp0
    But after booting, only eth0 is up. How to configure ppp0 to start on boot with netcfg?
    Last edited by rchiang (2012-12-21 01:09:32)

    Thanks a lot for your instruction.
    netcfg works now!
    chris_l wrote:
    Did you
    systemctl enable [email protected]

  • Wireless connection drops and doesn't reconnect (netcfg, wpa_actiond)

    I use netcfg 2.5.4-1 and wpa_actiond 1.1-1, B43 driver (BCM4318 wireless card) with firmware.
    $ uname -a
    Linux vekta 2.6.32-ARCH #1 SMP PREEMPT Mon Mar 15 20:08:25 UTC 2010 i686 Mobile AMD Sempron(tm) Processor 3100+ AuthenticAMD GNU/Linux
    Connecting works fine. I can connect using sudo netcfg <profile>, or it automatically connects me on startup.
    However, after a few minutes (up to 15 at best, usually 3-5) the connection is dropped. dmesg prints:
    "No probe response from AP <macaddress> after 500ms, disconnecting."
    However, netcfg isn't notified of this event, and still thinks the profile is connected. So I have to use netcfg -r <profile> to reconnect. Isn't netcfg supposed to notice this connection drop and try to reconnect again automatically?
    Also, is there any way to increase the 500ms threshold mentioned in the log? I don't think I ever had this problem when I first installed arch in november/december last year.
    Thank you.

    geniuz wrote:
    Hey,
    I'm having this sort of problem with my Broadcom wireless card, in my case however the connection seems to drop after a period of inactivity. What you have done might solve my problem. So exactly what modification have you made in netcfg ?
    This is the patch I made;
    diff --git a/src/globals b/src/globals
    index 2d5cf19..dcffea3 100644
    --- a/src/globals
    +++ b/src/globals
    @@ -15,7 +15,7 @@ SUBR_DIR="/usr/lib/network/"
    HOOKS_DIR="${SUBR_DIR}/hooks/"
    CONN_DIR="${SUBR_DIR}/connections/"
    STATE_DIR="/var/run/network/"
    +AUTOWIRELESS_DIR="/etc/rc.d/"
    ### Logging/Error reporting
    diff --git a/wpa_actiond/netcfg-wpa_actiond-action b/wpa_actiond/netcfg-wpa_actiond-action
    index 3547fef..324d990 100755
    --- a/wpa_actiond/netcfg-wpa_actiond-action
    +++ b/wpa_actiond/netcfg-wpa_actiond-action
    @@ -42,7 +42,12 @@ case $action in
             fi
             set_profile down "$profile"
    -    LOST|REESTABLISHED)
    +    LOST)
    +        if ! "$AUTOWIRELESS_DIR/net-auto-wireless" restart; then
    +            exit 1
    +        fi
    +        ;;
    +    REESTABLISHED)
             # Not handled.
             exit 0

Maybe you are looking for