Wednesday, June 6, 2007

WPA using the WPC54G v3 wireless card in Ubuntu Feisty

OK, this is more of a pense-bete to myself than anything else. To get WPA v1 working under Xubuntu Feisty with my WPC54G v3 wireless card, I used the following guides:

To install the wireless card: http://ubuntuforums.org/showthread.php?t=197102
To add WPA: http://ubuntuforums.org/showthread.php?t=202834

The step by step version is as follows.

Installing the wireless card
1. Download this file to the desktop: http://ubuntuforums.org/attachment.php?attachmentid=30908&d=1177587401

2. Extract the file and run the setup:

cd ~/Desktop
tar -xf bcm4318*.tar.gz
sudo ./ndiswrapper_setup

At this point, the wireless card should be installed correctly. This can be verified as follows:

3. This should display some info about your wireless network interface, probably called ‘wlan0′

nick@nick-laptop:~$ iwconfig
wlan0     IEEE 802.11g  ESSID:xxx
Mode:Managed  Frequency:2.437 GHz  Access Point: 00:14:BF:3D:xx:xx
Bit Rate=54 Mb/s   Tx-Power:25 dBm
RTS thr=2347 B   Fragment thr=2346 B
Power Management:off
Link Quality:73/100  Signal level:-49 dBm  Noise level:-96 dBm
Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
Tx excessive retries:0  Invalid misc:0   Missed beacon:0

4. This should return a list of wireless networks in your vicinity, including the one you want to connect to:

nick@nick-laptop:~/Desktop$ iwlist scan
wlan0     Scan completed :
Cell 01 - Address: 00:11:50:84:1F:F4
Protocol:IEEE 802.11g
Frequency:2.462 GHz (Channel 11)
Quality:60/100  Signal level:-57 dBm  Noise level:-96 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 22 Mb/s
6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
36 Mb/s; 48 Mb/s; 54 Mb/s

Adding WPA
1. From the wireless access point, make sure of the following:

  • WPA security is enabled using WPA-Personal Shared Key (WPA-PSK)
  • The WPA encryption algorithm is set to TKIP (not AES)
  • You have a note of the SSID (wireless network name) and the PSK (shared key) - here, we will use ‘expresso’ for the SSID and ‘hohohoho’ as an (insecure) PSK example

2. Make sure wpasupplicant is installed:

sudo apt-get install wpasupplicant

3. Convert your PSK as follows:

wpa_passphrase 'your essid' 'your ascii PSK key'

In our example:

nick@nick-laptop:~/Desktop$ wpa_passphrase 'expresso' 'hohohoho'

4. Open /etc/network/interfaces for editing:

sudo mousepad /etc/network/interfaces

5. Find the lines that look as follows:

auto wlan0
iface wlan0 inet dhcp

Replace as follows:

auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid <your ssid>
wpa-ap-scan 1 #this assumes SSID broadcast is enabled - set to 2 if SSID broadcast is disabled
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk <your hex key>

In our example:

auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid expresso
wpa-ap-scan 1
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk 57245dfdd9663e8c9792bfe9a15f41f07cc34a57bd1fc91f2820e3302dbfa7d1

6. Make sure any ethernet cables are unplugged, and restart the network interfaces:

sudo /etc/init.d/networking restart

At this point, WIFI should be working with WPA enabled… For further reference regarding different WPA configurations, the WPA guide on the Ubuntu forums is excellent.

posted by Nick at 12:49 am - filed in linux  

Friday, June 1, 2007

Microsoft and Ruby

Martin Fowler’s post on Microsoft and Ruby reflects some of my recent thoughts on MS closely. As he points out, MS is a large company made up of individuals rather than single-minded giant; and as such, there are bound to be differences of opinion within the company as to the direction it should be taking, and how it should approach different situations.

My impressions is that there are two main currents within Microsoft at the moment: those who favour openness and dialogue, who show an understanding of developers’ concerns and who think that discussing these issues and their solutions openly will help Microsoft stay ahead of the pack; and those who seem more intent on responding to managers’ concerns, and who think that Microsoft’s innovations are precious IP and should be kept as far from potential competitors as possible.

Microsoft at the moment seems torn between these two currents, as the difficulties in the inception of Channel 9 (for example) illustrates. The problem for Ruby developers is to figure out which side is going to prevail; if the “open” side does, the result of collaboration with Microsoft could be a strong Ruby implementation on the Windows platform and possibly also good integration with MS’s own technologies, both of which would help further Ruby cause; if it doesn’t on the other hand, the result could be a lot of wasted time and effort which could have been spent more productively elsewhere, and possibly also a dilution of Ruby in a similar way that happened to Java with the MS Java Runtime and J#, which Ruby could take a while to recover from.

So, what to do from Ruby’s point of view? In the current situation, it’s hard to say; ideally, the best would probably be to wait for Microsoft to make its intentions clearer, which it could to by committing to implement a Ruby interpreter fully compatible with the MRI, by opening up the source code for the Iron Ruby implementation, or perhaps by issuing a Patent Non-Assertion Covenant on any Ruby-related technologies it develops. None of these may be realistic for Microsoft in the short term; efforts at openness are still relatively new at MS, and pushing through this type of measure internally probably takes a lot of time and determination. Perhaps the competition from Sun (one of MS’s traditional rivals) via JRuby combined with a better understanding of how Ruby could benefit MS could help move things forwards.

Update 4/7/2007: Martin Fowler’s post seems to have gotten those involved in Ruby implementations talking:
John Lam (IronRuby lead): Microsoft and IronRuby
Ola Bini (JRuby committer): There can be only one, a tale about Ruby, IronRuby, MS and whatnot
Charles O. Nutter (JRuby lead): A Response to Ola’s IronRuby Post

posted by Nick at 10:12 am - filed in ruby