Just set essid (and wep key) and it will associate itself:
May 1 13:50:05 puter kernel: wlan0: Initial auth_alg=0
May 1 13:50:05 puter kernel: wlan0: authenticate with AP 00:18:39:c5:e7:e6
May 1 13:50:05 puter kernel: wmaster0: TX to low-level driver (len=30) FC=0x00b0 DUR=0x013a A1=00:18:39:c5:e7:e6 A2=00:13:02:e2:a9:9a A3=00:18:39:c5:e7:e6
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_mac_tx enter
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_mac_tx leave
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_rx_handle r = 186, i = 185, REPLY_TX, 0x1c
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_rx_handle r = 187, i = 186, REPLY_3945_RX, 0x1b
May 1 13:50:05 puter kernel: wlan0: RX authentication from 00:18:39:c5:e7:e6 (alg=0 transaction=2 status=0)
May 1 13:50:05 puter kernel: wlan0: authenticated
May 1 13:50:05 puter kernel: wlan0: associate with AP 00:18:39:c5:e7:e6
May 1 13:50:05 puter kernel: wmaster0: TX to low-level driver (len=50) FC=0x0000 DUR=0x013a A1=00:18:39:c5:e7:e6 A2=00:13:02:e2:a9:9a A3=00:18:39:c5:e7:e6
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_mac_tx enter
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_mac_tx leave
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_rx_handle r = 188, i = 187, REPLY_TX, 0x1c
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_rx_handle r = 189, i = 188, REPLY_3945_RX, 0x1b
May 1 13:50:05 puter kernel: wlan0: RX AssocResp from 00:18:39:c5:e7:e6 (capab=0x411 status=0 aid=1)
May 1 13:50:05 puter kernel: wlan0: associated
May 1 13:50:05 puter kernel: wmaster0: Added STA 00:18:39:c5:e7:e6
May 1 13:50:05 puter kernel: wmaster0: TX to low-level driver (len=42) FC=0x0040 DUR=0x013a A1=00:18:39:c5:e7:e6 A2=00:13:02:e2:a9:9a A3=00:18:39:c5:e7:e6
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_mac_tx enter
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_mac_tx leave
May 1 13:50:05 puter kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_rx_handle r = 190, i = 189, REPLY_TX, 0x1c
May 1 13:50:05 puter kernel: iwl3945: I iwl3945_rx_handle r = 191, i = 190, REPLY_3945_RX, 0x1b
May 1 13:50:05 puter kernel: iwl3945: U iwl3945_bg_post_associate Associated as 1 to: 00:18:39:c5:e7:e6
--
command line tool:
puter:/home/bond# iwconfig --help
Usage: iwconfig interface [essid {NN|on|off}]
[nwid {NN|on|off}]
[mode {managed|ad-hoc|...}
[freq N.NNNN[k|M|G]]
[channel N]
[ap {N|off|auto}]
[sens N]
[nick N]
[rate {N|auto|fixed}]
[rts {N|auto|fixed|off}]
[frag {N|auto|fixed|off}]
[enc {NNNN-NNNN|off}]
[power {period N|timeout N}]
[retry {limit N|lifetime N}]
[txpower N {mW|dBm}]
[commit]
Edit: according to this page -
http://www.intellinuxwireless.org/?p=iwlwi...n=howto-iwlwifi