Page 1 of 1

WiPi failing to get IP Address

Posted: Wed Mar 13, 2013 9:38 pm
by biblet
Hi,
I have a WiPi adapter from CPC. It is on a powered USB2 hub. Rasbian latest OS. Blue LED is on. Wpa-gui reports status 'completed (station)' but with no IP address. The ssid is good, encryption is ccmp+tkip (it is a BT home hub 3 with good connections to other devices.)
How can I diagnose this?
Where are the log files?
What is the equivalent of ipconfig/renew?
I have seen similar posts, but no real answer yet. Please can anyone help?
Steve

Re: WiPi failing to get IP Address

Posted: Thu Mar 14, 2013 9:13 am
by DBryant
Log files are in /var/log. The most general one in that directory is messages. In relation to WiFi you will see wpa_supplicant.log, assuming it has been enabled.

The Unix equivalent to ipconfig is ifconfig; You may also find iwconfig is the relevent package has been installed.

My supplicant config, for this same BT router is (ssid and psk changed to protect the innocent)
sudo more wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="mySSID"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="myLongPassphrase"
}

Analyse the logs and see if that sheds any light. Ensure the wireless-tools packages is installed; you can then try things like

Code: Select all

iwlist wlan0 scanning
to see the local wireless environment.

HTH and gets gets you moving forward.

Re: WiPi failing to get IP Address

Posted: Thu Mar 14, 2013 3:23 pm
by biblet
Thanks DBryant. I will try (when the family let me!) and post back.
S

Re: WiPi failing to get IP Address

Posted: Fri Mar 15, 2013 5:28 pm
by biblet
Hi,
Thanks for the advice. It is working now. Hopefully it will stay that way. I could not find a log file - and I did not know how to turn logging on. After some hunting I found the config file you listed in /etc/wpa-supplicant, and used sudo nano to edit it.
I added TKIP after 'pairwise' and added the 'group' line. I don't know why they were missing. After a reboot the IP address appeared.
Kind regards,
Steve

Re: WiPi failing to get IP Address

Posted: Fri Mar 15, 2013 6:21 pm
by DBryant
Good news. Well done.

For future reference, to see all logs files

Code: Select all

cd /var/log
ls
To which the response will be something like

Code: Select all

alternatives.log  dmesg           kern.log.1  regen_ssh_keys.log
apt               dmesg.0         lastlog     samba
auth.log          dmesg.1.gz      lpr.log     syslog
auth.log.1        dmesg.2.gz      mail.err    syslog.1
bootstrap.log     dmesg.3.gz      mail.info   user.log
btmp              dmesg.4.gz      mail.log    user.log.1
ConsoleKit        dpkg.log        mail.warn   wtmp
daemon.log        faillog         messages    Xorg.0.log
daemon.log.1      fontconfig.log  messages.1  Xorg.0.log.old
debug             fsck            news
debug.1           kern.log        ntpstats
Quite a long list from various sources; messages is a common starting point for debugging all manner of things. You might observe it with the tail command

Code: Select all

tail -f /var/log/messages
the -f ensures the file is followed i.e.you see updates as they are added.
Some entries, like samba, are directories which contain more files. The gz files are compressed, zip archive files.

There is no log related to wpa_supplicant in my listing. This is not uncommon. The wpa_supplicant runs as a daemon and will not include debug options usually. The man-page http://linux.die.net/man/8/wpa_supplicant shows all options, you can run the wpa_supplicant from the command line and read the output generated. When everything is working its a good idea to remove any debugging to save space and 'wear and tear' on the SD card.

Good luck.