You are not logged in.

#1 2005-07-13 02:30:53

ith140
Member
From: Ottawa, ON
Registered: 2005-07-13
Posts: 32

WPA/IPW2200 help

I hate to beat the wireless thing to death as I can see many other excellent posts out there, but I'm having troubles getting my wireless working (at least the way I want it to).

I can make a connection to my AP using IPW2200 drivers on my Thinkpad R51 with an open network.  However, I would like to use WPA-PSK, which if I use on my router I can no longer connect at all. 

According to the IPW2200 page the driver requires crypto modules by michael_mic and AES.  I have also seen info from gentoo (my previous distro ) that talks about a WPA-supplicant, which Arch seems to lack (or does it?).

Has anyone had any experience with Arch, wireless PSK stuff?

Many thanks!

Offline

#2 2005-08-08 17:06:34

wabi
Member
Registered: 2005-04-04
Posts: 72

Re: WPA/IPW2200 help

I am trying currently to get a atheros card running with wpa-psk
There is a wpa-supplicant package in the AUR but some configurationproblem seems to stop me.

I'm comming to the end that perhaps the easiest way is to reconfigure my AP to use some other encryption.

sad smile
wabi

Offline

#3 2005-08-08 21:46:43

phydeaux
Member
Registered: 2005-06-13
Posts: 68

Re: WPA/IPW2200 help

I have ipw2200 and wpa_supplicant on my laptop running with no problems.  I didn't use the package from the aur though, I just configured my own.  I wasn't aware of what the aur was at the time, this was one of the first things I did afting migration to arch.  Anyhow I just took a quick look at the config file supplied with the current package and it looks to be fine.  Check to make sure the line CONFIG_DRIVER_IPW=y is un commented.

# Driver interface for Intel ipw2100/2200 driver
CONFIG_DRIVER_IPW=y

After that I needed to modify the wireless startup script.  The line:

/usr/bin/wpa_supplicant -wB -i$INTERFACE -c/etc/conf.d/wireless-profiles/${1}/wpa

Needs to become:

/usr/bin/wpa_supplicant -wB -i$INTERFACE -c/etc/conf.d/wireless-profiles/${1}/wpa -D ipw

That is if you're using the wireless bootup script from the wiki.  If not you just need to append -D ipw to the command string you use to start wpa_supplicant.

My wpa_supplicant config file looks like this:

network={
              ssid="foobard'
              scan_ssid=0
              psk="it's a secret to everybody"
              priority=1
}

Obviously with a diferent ssid and psk.

The only thing left is if you've disabled ssid brodcasts on your wap then you need to set the ssid with iwconfig as well.  It's problaby a noobie mistake but it drove me nuts for a bit untill I figured it out.

andy

Offline

#4 2005-08-25 14:39:05

ith140
Member
From: Ottawa, ON
Registered: 2005-07-13
Posts: 32

Re: WPA/IPW2200 help

I'm using the wireless.conf script from the wiki, installed the wpa_supplicant and I've made the modification you suggested.  I'm still having issues getting everything working together properly, and it's unclear to me how wlan, wireless-tools, rc.conf, wpa_supplicant and the network (start) script all interact together.  Is it possible for you to post (or pm) your relevant wlan.conf, relevant wireless-profiles file,wireless script, wpa_supplicant.conf and any others?

I could also post mine if you prefer, but I always feel it's better to work from something that works to something that doesn't.

Offline

#5 2005-08-28 04:09:52

phydeaux
Member
Registered: 2005-06-13
Posts: 68

Re: WPA/IPW2200 help

Ok, using the scripts from the wiki this is what I have.  Both of these scripts are located in /etc/conf.d/wireless-profiles/home

config

#! /bin/sh
#----
# The following sample contains the bare minimum working wireless
#  profile.  Other options are commented below.  Copy this script
#  and modify for a working profile.
#----

INTERFACE="eth1"
#
# Interface options (same as in rc.conf) - either dhcp or paramters for ifconfig
IFOPTS="dhcp" 
#
# Wireless ESSID (extended network name)
ESSID="foobard"
# Frequency or Channel of Wireless Radio
# FREQ=""
CHANNEL="6"

# This value is free-form, used for informational scripts
INFO="Home Wireless Profile"
# I snipped the rest of this file since its all optional parameters that I'm not using.

wpa

##### Example wpa_supplicant configuration file ###############################
# Empty lines and lines starting with # are ignored

# NOTE! This file may contain password information and should probably be made
# readable only by root user on multiuser systems.

# global configuration (shared by all network blocks)
#
# Interface for separate control program. If this is specified, wpa_supplicant
# will create this directory and a UNIX domain socket for listening to requests
# from external programs (CLI/GUI, etc.) for status information and
# configuration. The socket file will be named based on the interface name, so
# multiple wpa_supplicant processes can be run at the same time if more than
# one interface is used.
# /var/run/wpa_supplicant is the recommended directory for sockets and by
# default, wpa_cli will use it when trying to connect with wpa_supplicant.
ctrl_interface=/var/run/wpa_supplicant

# Access control for the control interface can be configured by setting the
# directory to allow only members of a group to use sockets. This way, it is
# possible to run wpa_supplicant as root (since it needs to change network
# configuration and open raw sockets) and still allow GUI/CLI components to be
# run as non-root users. However, since the control interface can be used to
# change the network configuration, this access needs to be protected in many
# cases. By default, wpa_supplicant is configured to use gid 0 (root). If you
# want to allow non-root users to use the control interface, add a new group
# and change this value to match with that group. Add users that should have
# control interface access to this group. If this variable is commented out or
# not included in the configuration file, group will not be changed from the
# value it got by default when the directory or socket was created.
#
# This variable can be a group name or gid.
#ctrl_interface_group=wheel
ctrl_interface_group=0

# IEEE 802.1X/EAPOL version
# wpa_supplicant was implemented based on IEEE 802-1X-REV-d8 which defines
# EAPOL version 2. However, there are many APs that do not handle the new
# version number correctly (they seem to drop the frames completely). In order
# to make wpa_supplicant interoperate with these APs, the version number is set
# to 1 by default. This configuration value can be used to set it to the new
# version (2).
eapol_version=1

# AP scanning/selection
# By default, wpa_supplicant requests driver to perform AP scanning and then
# uses the scan results to select a suitable AP. Another alternative is to
# allow the driver to take care of AP scanning and selection and use
# wpa_supplicant just to process EAPOL frames based on IEEE 802.11 association
# information from the driver.
# 1: wpa_supplicant initiates scanning and AP selection
# 0: driver takes care of scanning, AP selection, and IEEE 802.11 association
#    parameters (e.g., WPA IE generation); this mode can also be used with
#    non-WPA drivers when using IEEE 802.1X mode; do not try to associate with
#    APs (i.e., external program needs to control association)
# 2: like 0, but associate with APs using security policy and SSID (but not
#    BSSID); this can be used, e.g., with ndiswrapper and NDIS driver to
#    enable operation with hidden SSIDs and optimized roaming; in this mode,
#    only the first network block in the configuration file is used and this
#    configuration should have explicit security policy (i.e., only one option
#    in the lists) for key_mgmt, pairwise, group, proto variables
ap_scan=1

# EAP fast re-authentication
# By default, fast re-authentication is enabled for all EAP methods that
# support it. This variable can be used to disable fast re-authentication.
# Normally, there is no need to disable this.
fast_reauth=1

# network block
# <snipped lots of exapmle stuff>>

network={
              ssid="foobard'
              scan_ssid=0
              psk="it's a secret to everybody"
              priority=1
}

Those two scripts are the only configuration you should need to do to get it started.  They are both in /etc/conf.d/wireless-profiles/<profile_name>.  You should be able to start the wireless now by running this command as root:

/etc/rc.d/wireless profile home up

If that doesn't work that you can trouble shoot it by running the following commands assuming your card is eth1, your ssid is foobard, you are on channel 6, and your wpa_supplicant.conf has been renamed wpa and is in your wireless profile directory:

iwconfig eth1 essid foobard channel 6
ifconfig eth1 up
wpa_supplicant -i eth1 -c /etc/conf.d/wireless-profiles/home/wpa -D ipw -dddd

That will start wpa_supplicant in rediculously<sp?> verbose debugging mode.  If there is a problem with it we should be able to figure it out from there.  Take a look at it.  If you don't see it post the output here and I, or someone else, will take a look at the output and hopefully get you going.

[edit]
whoops.. the wireless script command should be
/etc/rc.d/wireless profile home up
I fixed it above.
[/edit]
andy

Offline

#6 2005-08-30 22:46:06

galiyosha
Member
From: Slovakia
Registered: 2005-08-01
Posts: 22

Re: WPA/IPW2200 help

I spent hours trying to solve the same problem. I thought there is something wrong with my AP, my wpa_supplicant configuration or wpa_supplicant itself. And it turned out to be a bug in the ipw2200 driver!

http://www.bughost.org/bugzilla/show_bug.cgi?id=729

So, grab the patch (http://www.bughost.org/bugzilla/attachment.cgi?id=467) and either compile and install the patched driver by hand or use ABS, editing PKGBUILD to patch the driver before compiling.

After this, everything should work as expected.

Offline

#7 2005-09-12 03:00:21

ith140
Member
From: Ottawa, ON
Registered: 2005-07-13
Posts: 32

Re: WPA/IPW2200 help

Okay, thanks for the help so far.  I'm still slightly stuck.  I have the config and the wpa script configured as you do in /etc/conf.d/wireless-profiles/home/.  I'm using the same wireless script from the wiki as you are with the slight modification for wpa.  Every time I try to run

/etc/rc.d/wireless profile home up

I get this back

"usage: /etc/rc.d/wireless {start
/etc/rc.d/wireless: line 226: profile_name: No such file or directory
/etc/rc.d/wireless: line 226: down}": command not found

Now this seems silly (and I'm starting to feel like a noob), but I can't figure you why it burping at me.  Here's my wireless script in case it helps...

# !/bin/sh
# Archlinux Wireless Networking Script
# phrakture <aaronmgriffin@gmail.com>
#
# Contributors:
#    dibblethewrecker <http://dtw.jiwe.org/>
#    Pierre Schmitz <http://archlinux.laber-land.de or http://www.laber-land.de/contact.php>
#    MasonM <mason_mullins (at) hotmail (dot) com>

. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/dhcpcd

# wireless''up <profile''name>
wireless_up()
{
  if [[ ! -f /etc/conf.d/wireless-profiles/${1}/config ]]; then
    echo "Profile [[$1]] NOT found!"
    return 1
  fi

  . /etc/conf.d/wireless-profiles/${1}/config
  if [[ ! -n "$INTERFACE" ]]; then
    echo "Profile [[$1]] has no interface defined!"
    return 1
  elif [[ -f /etc/dhcpc/dhcpcd-${INTERFACE}.pid ]]; then
    echo "Interface $INTERFACE already active"
    return 1
  fi

  if [[ -n "$INFO" ]]; then
    stat_busy "Loading Wireless Profile [[$INFO]] on $INTERFACE"
  else
    stat_busy "Loading Wireless Profile [[$1]] on $INTERFACE"
  fi


  if [[ -n "$MODE" ]]; then
    /usr/sbin/iwconfig $INTERFACE mode $MODE
  fi

  if [[ -n "$NWID" ]]; then
    /usr/sbin/iwconfig $INTERFACE nwid $NWID
  fi

  if [[ -n "$FREQ" ]]; then
    /usr/sbin/iwconfig $INTERFACE freq $FREQ
  elif [[ -n "$CHANNEL" ]]; then
    /usr/sbin/iwconfig $INTERFACE channel $CHANNEL
  fi

  if [[ -n "$KEY" ]]; then
    /usr/sbin/iwconfig $INTERFACE key $KEY
  fi

  if [[ -n "$SENS" ]]; then
    /usr/sbin/iwconfig $INTERFACE sens $SENS
  fi

  if [[ -n "$RATE" ]] ; then
    /usr/sbin/iwconfig $INTERFACE rate $RATE
  fi

  if [[ -n "$RTS" ]]; then
    /usr/sbin/iwconfig $INTERFACE rts $RTS
  fi

  if [[ -n "$FRAG" ]]; then
    /usr/sbin/iwconfig $INTERFACE frag $FRAG
  fi

  if [[ -n "$PARAMS" ]]; then
    /usr/sbin/iwconfig $INTERFACE $PARAMS
  fi

  if [[ -n "$ESSID" ]]; then
    /usr/sbin/iwconfig $INTERFACE essid $ESSID
  fi

  /sbin/ifconfig $INTERFACE up

# TBD : iwscan for each essid to verify it exists...
#  if [[ -n "$ESSID" ]]; then
#     sleep 2
#     if ! /usr/sbin/iwlist $INTERFACE scan || grep "ESSID:\"$ESSID\"" >/dev/null 2>&1; then
#       /sbin/ifconfig $INTERFACE down
#       echo "ESSID [[$ESSID]] was not found"
#       return 1
#     fi
#  fi

  if [[ -f /etc/conf.d/wireless-profiles/${1}/wpa ]]; then
    /usr/bin/wpa_supplicant -wB -i$INTERFACE -c/etc/conf.d/wireless-profiles/${1}/wpa -D ipw
    #I don´t know how we could determine if wpa_supplicant is ready...
    sleep 2
    let i=0
    while ! /usr/bin/wpa''cli status || grep "wpa''state=COMPLETED" >/dev/null 2>&1; do
      if [[ $i -gt 10 ]]; then
        echo "WPA failed"
        /usr/bin/wpa_cli terminate >/dev/null 2>&1
        /sbin/ifconfig $INTERFACE down
        return 1
      fi
      sleep 2
      let i++
   done
  fi

  if [[ "$IFOPTS" = "dhcp" ]]; then
    . /etc/conf.d/dhcpcd
    rm -f /etc/dhcpc/dhcpcd-${INTERFACE}.{pid,cache} >/dev/null 2>&1
    /usr/sbin/dhcpcd $DHCPCD_ARGS $INTERFACE
  else
    /sbin/ifconfig $IFOPTS
  fi

  if [[ -x /etc/conf.d/wireless-profiles/${1}/connected ]]; then
   /etc/conf.d/wireless-profiles/${1}/connected
  fi

  return $?
}

# wireless''down <profile''name>
wireless_down()
{
  if [[ ! -f /etc/conf.d/wireless-profiles/${1}/config ]]; then
    echo "Profile [[$1]] NOT found!"
    return 1
  fi

  . /etc/conf.d/wireless-profiles/${1}/config

  if [[ -n "$INFO" ]]; then
    stat_busy "Stopping Wireless Profile [[$INFO]] on $INTERFACE"
  else
    stat_busy "Stopping Wireless Profile [[$1]] on $INTERFACE"
  fi

  if [[ -f /etc/conf.d/wireless-profiles/${1}/wpa ]]; then
    /usr/bin/wpa_cli terminate >/dev/null 2>&1
  fi

  if [[ "$IFOPTS" = "dhcp" ]]; then
    if [[ -f /etc/dhcpc/dhcpcd-${INTERFACE}.pid ]]; then
      #thanks to MasonM for pointing this out!
      /sbin/dhcpcd -k
#      /bin/kill `cat /etc/dhcpc/dhcpcd-${INTERFACE}.pid`
    fi
  fi

  /sbin/ifconfig $INTERFACE down

  if [[ -x /etc/conf.d/wireless-profiles/${1}/disconnected ]]; then
   /etc/conf.d/wireless-profiles/${1}/disconnected
  fi

  return $?
}

case "$1" in
  start)
    for profile in ${WIRELESS_PROFILES[[@]]}; do
      if ! ck''daemon wireless''${profile}; then
        echo "Profile [[$profile]] is already up"
      else
        wireless_up $profile
        if [[ $? -eq 0 ]]; then
          add''daemon wireless''${profile}
          stat_done
        else
          stat_fail
        fi
      fi
    done
    ;;
  stop)
    for profile in ${WIRELESS_PROFILES[[@]]}; do
      if ck''daemon wireless''${profile}; then
        echo "Profile [[$profile]] is not up"
      else
        rm''daemon wireless''${profile}
        wireless_down $profile
        if [[ $? -eq 0 ]]; then
          stat_done
        else
          stat_fail
        fi
      fi
    done
    ;;
  restart)
    $0 stop
    sleep 2
    $0 start
    ;;
  profile)
    if [[ "$3" = "up" ]]; then
      if ! ck''daemon wireless''${2}; then
        echo "Profile [[$2]] is already up"
      else
        wireless_up $2
        if [[ $? -eq 0 ]]; then
          add''daemon wireless''${2}
          stat_done
        else
          stat_fail
        fi
      fi
    elif [[ "$3" = "down" ]]; then
      if ck''daemon wireless''${2}; then
        echo "Profile [[$2]] is not running"
      else
        wireless_down $2
        if [[ $? -eq 0 ]]; then
          rm''daemon wireless''${2}
          stat_done
        else
          stat_fail
        fi
      fi
    fi
    ;;
  *)
    echo "usage: $0 {start||stop||restart}"
    echo "usage: $0 profile <profile_name> {up||down}"
    ;;
esac

On the plus side everything else works if I do the rest of your post.

Offline

#8 2005-09-12 14:24:20

phydeaux
Member
Registered: 2005-06-13
Posts: 68

Re: WPA/IPW2200 help

I don't know whats going on with that.  The only time profile_name is even mentioned in that script is when it echo's the usage and I'm no where near competent enough with bash scripting to figure out why with out investing several hours into it.  My only guess would be that some how a syntax error got in there.  Unfortunately I deleted my script infavor of the new script in testing + a patch I wrote to add wpa support to it.  You can find info on that here: http://bbs.archlinux.org/viewtopic.php?t=14822.  I tried to remake the script from the wiki with my modification but I didn't want to change my laptop back to the old way to test it.  I posted it here: http://home.comcast.net/~phydeaux37/wireless if you'd like to give that one a shot.

andy

Offline

Board footer

Powered by FluxBB