View Single Post
Old 05-27-2009, 03:46 AM   #2
lowie
Member
lowie began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Apr 2008
Device: iLiad v.2
Quote:
Originally Posted by X. Trapnel View Post
4. Has anyone managed to edit the wireless settings to make it compatible with WPA (1 or 2) Enterprise (the sort that asks for user name & password, rather than just password)?
I have managed to set up a WPA-EAP wireless connection. The iLiad uses wpa_supplicant (http://hostap.epitest.fi/wpa_supplicant/), so most type of wireless connections should be possible, but are not accessible from the iLiad front end. What I did was the following:

- request shell access from iRex
- install a terminal emulator (giving you a command line), you can find one somewhere in this forum (I think it is mrxvt, https://www.mobileread.com/forums/showthread.php?t=8569)
- on your iLiad adjust the script /usr/sbin/wireless.sh such that for a WPA connection with a specific ssid an alternative wpa_supplicant.conf file is loaded (next step)
- create your custom wpa_supplicant.conf with the settings supplied by your system administrator; of course these are not uniform. The documentation of wpa_supplicant will help here.
- optionally (I had to do this), copy a certificate in (e.g.) /etc/certs/

Then, within the connection manager of the iLiad (the front end, not the terminal) you have to make a wireless WPA connection, specifying the correct ssid, and a bogus password. The latter will not be used. I replaced the following part in the script /usr/sbin/wireless.sh:

Code:
                 # Generate supplicant config file in /tmp
                 echo "# Auto-generated WPA Supplicant Configuration" > /tmp/wpa_supplicant.conf
                 echo "ctrl_interface=/var/run/wpa_supplicant" >> /tmp/wpa_supplicant.conf
                 echo "ctrl_interface_group=0" >> /tmp/wpa_supplicant.conf
                 echo "network={" >> /tmp/wpa_supplicant.conf
                 echo "  ssid=\"${ssid}\"" >> /tmp/wpa_supplicant.conf
                 echo "  key_mgmt=WPA-EAP WPA-PSK IEEE8021X" >> /tmp/wpa_supplicant.conf
                 echo "  pairwise=CCMP TKIP" >> /tmp/wpa_supplicant.conf
                 echo "  group=CCMP TKIP" >> /tmp/wpa_supplicant.conf
                 echo "  psk=\"${key}\"" >> /tmp/wpa_supplicant.conf
                 echo "  scan_ssid=1" >> /tmp/wpa_supplicant.conf 
                 echo "}" >> /tmp/wpa_supplicant.conf
                 # cat /tmp/wpa_supplicant.conf
                 wpa_supplicant -Dmarvell -i$ethIf -c/tmp/wpa_supplicant.conf -B
with this:

Code:
                 case "${ssid}"
                 in
                     "YOURSSID")
                         # YOURSSID ssid
                         # start wpa_supplicant with custom/static config file
                         wpa_supplicant -Dmarvell -i$ethIf -c/etc/wpa_supplicant.conf -Bw # -dd
                         ;;
                     *)
                         # default mode
                         # Generate supplicant config file in /tmp
                         echo "# Auto-generated WPA Supplicant Configuration" > /tmp/wpa_supplicant.conf
                         echo "ctrl_interface=/var/run/wpa_supplicant" >> /tmp/wpa_supplicant.conf
                         echo "ctrl_interface_group=0" >> /tmp/wpa_supplicant.conf
                         echo "network={" >> /tmp/wpa_supplicant.conf
                         echo "  ssid=\"${ssid}\"" >> /tmp/wpa_supplicant.conf
                         echo "  key_mgmt=WPA-EAP WPA-PSK IEEE8021X" >> /tmp/wpa_supplicant.conf
                         echo "  pairwise=CCMP TKIP" >> /tmp/wpa_supplicant.conf
                         echo "  group=CCMP TKIP" >> /tmp/wpa_supplicant.conf
                         echo "  psk=\"${key}\"" >> /tmp/wpa_supplicant.conf
                         echo "  scan_ssid=1" >> /tmp/wpa_supplicant.conf 
                         echo "}" >> /tmp/wpa_supplicant.conf
                         # cat /tmp/wpa_supplicant.conf
                         wpa_supplicant -Dmarvell -i$ethIf -c/tmp/wpa_supplicant.conf -B
                         ;;
                 esac
You need to change YOURSSID with, well, your ssid! You also need to be sure that wireless.sh is an executable file, or else it will not start. Also, make a backup of you original wireless.sh.

Perhaps there is someone on the forum who is able to automate this. That would be great.
lowie is offline   Reply With Quote