(K)ubuntu's NetworkManager is not good enough when the APs are half-broken (e.g., don't associate, don't give DHCP leases or don't route). Too often it simply stops responding, when the user clearly sees that the network is not working.
Manual (open) wireless network configuration is simple:
iwconfig (iface) essid (essid) ap (mac) dhclient (iface)
... except that you need to parse iwlist (iface) scan for the relevant data identifying the AP. This quickly becomes tedious when there are n-teen cells in the scan results and most of them are broken.
Here is a really shoddy script that replaces NetworkManager with a trivial interactive loop to attempt to connect to one of the detected AP. read more