Howto: Siemens Simpad SL4 running Familiar 0.8.4 OPIE with WPA

Check your wlan's card firmware first:

 root@simpad:/# hostap_diag wlan0
 Host AP driver diagnostics information for 'wlan0'
 
 NICID: id=0x800c v1.0.0 (PRISM II (2.5) PCMCIA (SST parallel flash))
 PRIID: id=0x0015 v1.1.1
 STAID: id=0x001f v1.7.4 (station firmware)

If STA is not >= 1.7.4 or PRI is not >= 1.1.1 have a look at Firmware Update for a new firmware. My card is recent enough so I haven't done this yet.

Install a new wpa-supplicant first. I compiled the wpa-supplicant_0.4.9-r0 myself which you use. The out of the box wpa-supplicant supplied with Familiar 0.8.4 will not work.

New version of the wpa-supplicant:

Dependentcies as of Familiar 0.8.4:

Remove your WLAN card and install all three ipk files:

 ipkg install libcrypto0.9.7_0.9.7e-r1_arm.ipk libssl0.9.7_0.9.7e-r1_arm.ipk wpa-supplicant_0.4.9-r0_arm.ipk 

Edit /etc/wpa_supplicant.conf and insert your WLAN credentials:

 root@simpad:/# vi /etc/wpa_supplicant.conf
 network={
      ssid="YourSSID"
      psk="YourPassword"
      priority=5
 }

If the file is not empty remove the current contents before.

Create a new file /etc/network/if-pre-up.d/wpa-supplicant. If it exists remove it first or delete the whole file contents! Place in the following code. It will start the wpa-supplicant for you after you have inserted the card. It is a sligthly modified version from here.

 root@simpad:/# vi /etc/network/if-pre-up.d/wpa-supplicant 
 #!/bin/sh
 
 
 WPA_SUP_BIN="/usr/sbin/wpa_supplicant"
 WPA_SUP_PNAME="wpa_supplicant"
 WPA_SUP_PIDFILE="/var/run/wpa_supplicant.$IFACE.pid"
 WPA_SUP_OPTIONS="-B -w -P $WPA_SUP_PIDFILE -i $IFACE"
 
 VERBOSITY=0
 
 
 if [ -s "$IF_WPA_CONF" ]; then
         WPA_SUP_CONF="-c $IF_WPA_CONF"
 else
         exit 0
 fi
 
 if [ ! -x "$WPA_SUP_BIN" ]; then
 
         if [ "$VERBOSITY" = "1" ]; then
                 echo "$WPA_SUP_PNAME: binaries not executable or missing from $WPA_SUP_BIN"
         fi
 
         exit 1
 fi
 
 if [ "$MODE" = "start" ] ; then
         # driver type of interface, defaults to wext when undefined
         if [ -s "/etc/wpa_supplicant/driver.$IFACE" ]; then
                 IF_WPA_DRIVER=$(cat "/etc/wpa_supplicant/driver.$IFACE")
         elif [ -z "$IF_WPA_DRIVER" ]; then
 
                 if [ "$VERBOSITY" = "1" ]; then
                         echo "$WPA_SUP_PNAME: wpa-driver not provided, using \"wext\""
                 fi
 
                 IF_WPA_DRIVER="wext"
         fi
 
         # if we have passed the criteria, start wpa_supplicant
         if [ -n "$WPA_SUP_CONF" ]; then
 
                 if [ "$VERBOSITY" = "1" ]; then
                         echo "$WPA_SUP_PNAME: $WPA_SUP_BIN $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER"
                 fi
 
                 start-stop-daemon --start --quiet \
                         --name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE \
                         --  $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER
         fi
 
         # if the interface socket exists, then wpa_supplicant was invoked successfully
         if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then
 
                 if [ "$VERBOSITY" = "1" ]; then
                         echo "$WPA_SUP_PNAME: ctrl_interface socket located at $WPA_COMMON_CTRL_IFACE/$IFACE"
                 fi
 
                 exit 0
 
         fi
 
 elif [ "$MODE" = "stop" ]; then
 
         if [ -f "$WPA_SUP_PIDFILE" ]; then
 
                 if [ "$VERBOSITY" = "1" ]; then
                         echo "$WPA_SUP_PNAME: terminating $WPA_SUP_PNAME daemon"
                 fi
 
                 start-stop-daemon --stop --quiet \
                         --name $WPA_SUP_PNAME --pidfile $WPA_SUP_PIDFILE
 
                 if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then
                         rm -f $WPA_COMMON_CTRL_IFACE/$IFACE
                 fi
 
                 if [ -f "$WPA_SUP_PIDFILE" ]; then
                         rm -f $WPA_SUP_PIDFILE
                 fi
         fi
 
 fi
 
 exit 0

The last change you have to do is to edit the existing /etc/network/interfaces file. Comment out the current wlan0 entry and insert the new one for the wlan0 with wpa:

 # Wireless interfaces (WPA roaming!)
 iface wlan0 inet dhcp
        wpa-conf /etc/wpa_supplicant.conf
        wpa-driver hostap
 
 # Wireless interfaces
 #iface wlan0 inet dhcp
 #       wireless_mode managed
 #       wireless_essid myap
 #       wireless_key off

It is important that there is only one space between wpa-xxx and the setting as otherwise the current wpa_supplicant scripts will fail to start wpa_supplicant. These part was also taken from here.

Plug in your WLAN card and WPA should work now!

If you have trouble using it try to debug it with:

 ifdown -v wlan0 ; ifup -v wlan0

You will see the script output on the console.

Please send any questions or comments to me.

This page was last modified 07:32, 13 October 2007. | This page has been accessed 2,709 times. | About OpenSIMpad.org
Designed by Anna Boheim | Powerd by mediawiki