You'll get that if the configuration is invalid (Such as not getting a valid IP Address from the router)
It can also happen with WEP connections if you enter the wrong password - you connect but don't get an IP address so you don't get the connected icon
Is it giving you an IP Address beginning 169.154? If so, it's a self-assigned IP address. Are you connecting via WEP or WPA? Also, is there any MAC address filtering on the router?