Try editing/making your /etc/sysconfig/network-scripts/ifcfg-interfacename file to something like;
DEVICE=device name here
GATEWAY=ap's ip address here
ONBOOT=yes (if you want it to try and connect at boottime)
USERCTL=yes (Allows all users to start/stop the connection)
ESSID=The Ap's SSID here.
CHANNEL=<the default AP channel here>
BTW, What distro and hardware are you using?
Cheers, and good luck.