Home | About | rss

TX1XP - Wireless

 
LOOKING FOR UBUNTU OR KUBUNTU ANSWERS OR HELP ? This page was created 12th November 2005 and last Updated 2nd March 2006. Four known people with this laptop running linux ... Drop us a line if you are another.

This is one of a number of pages about installing Kubuntu Linux on a Sony TX1XP laptop. To see the other pages go here


To get the wireless working:

 sudo iwconfig eth1 essid "xxxxxxx" key s:yourwepkey

without wep, you'd want:

 sudo iwconfig eth1 essid "xxxxxxx"

then

  sudo ifconfig eth1 192.168.1.11 netmask 255.255.255.0 up
  sudo route add default gw 192.168.1.1

note that you need to replace 192.168.1.11 in the first line with a suitable ip address for your network, and 192.168.1.1 in the second line with whatever your default gateway is (most likely the ip address of your wireless access point - the ip on the wireless side, not the wired side).

then first time only, you may need to add

 nameserver 192.168.1.1

to

 /etc/resolv.conf

replacing the ip with whatever you use as your dns server.

On other laptops, I have used the following lines in /etc/network/interfaces

 iface eth1 inet dhcp
   pre-up iwconfig eth1 essid "xxxxxxx" key s:yourwepkey

and then from the commandline

 ifconfig eth1 up

I suspect that the pre-up command isn't working because of the sudo permissions setup in kubuntu, but this is only a guess. I'll probably create a shell script with the commands I need to enable the wireless and use that.

wireless at startup

I found that with no network cable, the laptop would hang at startup while trying to establish a network connection:

 Configuring network interfaces....
 Waiting for network interfaces to come up...

Hitting Ctrl-C would let it skip over these and continue to boot, but you don't want to have to do that each time you start the machine.

 sudo -s
 cd /etc/init.d/
 vi networking

then replace this section:

 start)
   doopt spoofprotect yes
   doopt syncookies no
   doopt ip_forward no

with this section, replacing the essid, wep key, ip address and gateway details as appropriate:

 start)
   /sbin/iwconfig eth1 essid "xxxxx" key s:xxxx
   /sbin/ifconfig eth0 down
   /sbin/ifconfig eth1 192.168.xxx.xxx netmask 255.255.255.0 up
   /sbin/route add default gw 192.168.xxx.xxx
   doopt spoofprotect yes
   doopt syncookies no
   doopt ip_forward no

this doesn't actually prevent the hangs at startup, but it does bring the wireless network up. To prevent the hangs at boot

 if [ "$VERBOSE" != no ]; then
  #ifup -a
 else
  #ifup -a >/dev/null 2>&1
 fi

this more or less stops the boot up processing trying to establish a network at all, and leaves this to be setup manually once booting has finished.

WPA Wireless

This is a (more secure) alternative to WEP. You don't need to do this unless you are after WPA (PSK) support. The link at the end of this section has more details (and is where I got most of the info from).

Unpack the firmware

 sudo tar xvzf ipw2200-fw*.tgz
 sudo cp ipw-*.fw /usr/lib/hotplug/firmware/

Remove old ieee80211 drivers

 sudo tar xvzf ieee80211*.tgz
 cd ieee80211-1.1.13
 sudo sh remove-old

Remove old ipw2200 drivers

 cd ..
 sudo tar xvzf ipw2200*.tgz
 cd ipw2200-1.1.0
 sudo sh remove-old

Make the new ieee80211 drivers

 cd ..
 cd ieee80211-1.1.13
 make
 sudo make install

Make the ipw2200 drivers

 cd ..
 cd ipw2200-1.1.0
 make
 sudo make install

Get wpa_supplicant

 sudo apt-get install wpasupplicant

Edit the configuration

 sudo vi /etc/wpa_supplicant.conf

I have

 ctrl_interface=/var/run/wpa_supplicant
 ap_scan=1
 network={
   ssid="your_network_name"
   psk="your_secret_key"
   priority=5
 }

More info on the configuration is at

 /usr/share/doc/wpasupplicant/examples/wpa_supplicant.conf.gz

Then reboot to make sure the new drivers are loaded.

Now to try and connect to your (WPA protected) network

 sudo wpa_supplicant -i eth1 -c /etc/wpa_supplicant.conf -D ipw -w -dd

Assuming that works, running iwconfig should show you your network. For future use, adding -B to the above call will run it as a background process, and removing -dd will make it a lot more quiet.

If there are problems, check the messages - I hit a problem with having an old /var/run/wpa_supplicant/eth1 file that it wouldn't remove itself. It wasn't until I removed the -B option that I saw the error message displayed.

Top get a DHCP lease

 dhclient3 -pf /var/run/dhclient.eth1.pid -lf /var/run/dhclient.eth1.leases eth1

I stole most of this from http://www.ubuntuforums.org/showthread.php?t=26623

However the above is (a) briefer, which as a reference for myself helps, (b) has the newer version numbers that are thus known to work on this machine.

next