If anybody else comes across this problem, the solution (tested in Lucid and Maverick so far) is to take the instructions at:

http://ubuntuforums.org/showpost.php...48&postcount=6

...and tweak 'em for the ID for the TEW-645UB, which is "157e:3013" per lsusb at the command line.

So where that page says:

Code:
echo 'install rt2870sta modprobe --ignore-install rt2870sta ; /bin/echo "1737 0078" > /sys/bus/usb/drivers/rt2870/new_id' | sudo tee /etc/modprobe.d/rt2870sta.conf
sudo modprobe -rf rt2870sta
sudo modprobe rt2870sta
dmesg | egrep 'rt28|usb|Phy'
iwconfig
...you do:

Code:
echo 'install rt2870sta modprobe --ignore-install rt2870sta ; /bin/echo "157e 3013" > /sys/bus/usb/drivers/rt2870/new_id' | sudo tee /etc/modprobe.d/rt2870sta.conf
sudo modprobe -rf rt2870sta
sudo modprobe rt2870sta
dmesg | egrep 'rt28|usb|Phy'
iwconfig
There's a second solution on that page under "alternativ automatic driver load" that didn't work for me. If you try it, tweak the ID numbers along the same lines.