Connecting to a wireless network (urgent)

Hi,

I need to connect to a wifi network but could not figure out how I should do it on my beagleboard-xm. When I scan for the network I can find it:

ubuntu@arm:~$ iwlist scan
lo Interface doesn’t support scanning.

usb0 Interface doesn’t support scanning.

wlan0 Scan completed :
Cell 01 - Address: EA:7D:EF:60:C9:0B
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=70/70 Signal level=-23 dBm
Encryption key:on
ESSID:“ghostrider”
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Ad-Hoc
Extra:tsf=000000005a1ab50e
Extra: Last beacon: 6242ms ago
IE: Unknown: 000A67686F73747269646572
IE: Unknown: 010882848B962430486C
IE: Unknown: 030101
IE: Unknown: 06020000
IE: Unknown: 2A0100
IE: Unknown: 2F0100
IE: Unknown: 32040C121860
IE: Unknown: 2D1A2C181BFF00000000000000000000000000000000000000000000
IE: Unknown: 3D16010800000000FF000000000000000000000000000000
IE: Unknown: DD09001018020000000000

Then, I edited /etc/network/interfaces file:

ubuntu@arm:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

The primary network interface

auto eth0
iface eth0 inet dhcp

Example to keep MAC address between reboots

#hwaddress ether DE:AD:BE:EF:CA:FE

WiFi Example

auto wlan0
iface wlan0 inet dhcp
wpa-ssid “ghostrider”
wpa-psk “34bddf67b1”

However I could not connect to my network:

ubuntu@arm:~$ iwconfig
lo no wireless extensions.

usb0 no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on

eth0 no wireless extensions.

What may be wrong? Does wpa-psk need to be in HEX format or should I edit some other files too?

Cheers,
Frank

if 34bddf67b1 is your password:

voodoo@hades:~$ wpa_passphrase ghostrider 34bddf67b1
network={
        ssid="ghostrider"
        #psk="34bddf67b1"
        psk=bd9f5cbedb4f7aca5ca8b595386e8679d82ee63bf380c544d34542acc21892a1
}

I believe you have to use that psk value for wpa-psk...

Regards,

Mr. Nelson thank you for your help.

However, I could not connect to the network again. Do I need to add any other information or should I use a command to connect to the network? I edited the /etc/network/interfaces again: (Should I add “” to the wpa-psk too?)

root@arm:/home/ubuntu# cat /etc/network/interfaces
auto lo
iface lo inet loopback

The primary network interface

auto eth0
iface eth0 inet dhcp

Example to keep MAC address between reboots

#hwaddress ether DE:AD:BE:EF:CA:FE

WiFi Example

auto wlan0
iface wlan0 inet dhcp
wpa-ssid “ghostrider”
wpa-psk=b34d373eb2fb836a43b0afffe783c7d0af694724506c9e77b06d1021302905bf

Frank

2012/10/10 Robert Nelson <robertcnelson@gmail.com>

Please do not consider the difference between the wpa-psk you told me to write and I have used. I was not remembering it right, so I corrected it.

2012/10/10 frank brewer <frankthebrewer@gmail.com>

Mr. Nelson thank you for your help.

However, I could not connect to the network again. Do I need to add any other information or should I use a command to connect to the network? I edited the /etc/network/interfaces
again: (Should I add "" to the wpa-psk too?)

How did you test this? by reboot?

If all you did was modify the '/etc/network/interfaces' file, you need
to manually start the wlan0 interface, e.g.
   # ifup wlan0

Yes, I rebooted my system to test it. Now I tried ifup wlan0

ubuntu@arm:~$ ifup wlan0
/etc/network/interfaces:14: option with empty value
ifup: couldn’t read interfaces file “/etc/network/interfaces”

Seems like line 14 is where the wpa-psk goes. What does it mean? Should I use quotation marks for the wpa-psk too?

2012/10/10 Gary Thomas <samoht.yrag@gmail.com>

Also now I tried with root permission:

/etc/network/interfaces:14: option with empty value
ifup: couldn’t read interfaces file “/etc/network/interfaces”

root@arm:/etc/network# ls -la
total 28
drwxr-xr-x 6 root root 4096 Dec 31 1969 .
drwxr-xr-x 74 root root 4096 Dec 31 18:00 …
drwxr-xr-x 2 root root 4096 Sep 27 2012 if-down.d
drwxr-xr-x 2 root root 4096 Sep 27 2012 if-post-down.d
drwxr-xr-x 2 root root 4096 Sep 27 2012 if-pre-up.d
drwxr-xr-x 2 root root 4096 Sep 27 2012 if-up.d
-rwxrwxrwx 1 root root 335 Dec 31 1969 interfaces
lrwxrwxrwx 1 root root 12 Sep 27 2012 run → /run/network

2012/10/10 frank brewer <frankthebrewer@gmail.com>

Yes, I rebooted my system to test it. Now I tried ifup wlan0

ubuntu@arm:~$ ifup wlan0
/etc/network/interfaces:14: option with empty value
ifup: couldn't read interfaces file "/etc/network/interfaces"

Seems like line 14 is where the wpa-psk goes. What does it mean? Should I use quotation marks for the wpa-psk too?

I would think that it should be written like this:
   wpa-psk "b34d373eb2fb836a43b0afffe783c7d0af694724506c9e77b06d1021302905bf"

Unfortunately:

ubuntu@arm:~$ ifup wlan0
ifup: failed to open statefile /run/network/ifstate: Permission denied
ubuntu@arm:~$ sudo su
sudo: timestamp too far in the future: Jan 1 00:00:00 1985
[sudo] password for ubuntu:

root@arm:/home/ubuntu# ifup wlan0
ifup: interface wlan0 already configured

root@arm:/home/ubuntu# iwconfig
lo no wireless extensions.

usb0 no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on

eth0 no wireless extensions.

Now, something strange is going on:

I wrote ifup wlan0, it has been about 15 minutes and nothing was happening, so I typed something random like: asjdalsdjalksdj then pressed enter. Now when I write ifup wlan0 it say:

root@arm:/etc/network# ifup wlan0
ifup: interface wlan0 already configured

Is it usual??

2012/10/10 frank brewer <frankthebrewer@gmail.com>

Unfortunately:

ubuntu@arm:~$ ifup wlan0
ifup: failed to open statefile /run/network/ifstate: Permission denied
ubuntu@arm:~$ sudo su
sudo: timestamp too far in the future: Jan 1 00:00:00 1985
[sudo] password for ubuntu:
root@arm:/home/ubuntu# ifup wlan0
ifup: interface wlan0 already configured

If you get this error and want to retry, use these commands:
   # ifdown wlan0
   # ifup wlan0

It seem like that cursor can stay there all life long: (check the attachment)

2012/10/10 frank brewer <frankthebrewer@gmail.com>

strange.png

I found this link for connecting to Wifi NW with WPA

http://caleudum.com/how-to-connect-wifi-using-command-line-on-ubuntubacktrack/

regards

Abhi

Allright, I waited for a long time and here is the output: (at least it makes sense)

root@arm:~# ifup wlan0
Failed to bring up wlan0.

@ksonly@ks, I do not know if wpasupplicant is installed on my system. How can I check for that? Because if it is not installed, I have no internet connection to install it. Also, I think it must not be that much complicated to connect to a wireless network. Me and my friend did it on a beaglebone running ubuntu 12.04 armhf, we were only doing some changes in the /etc/network/interfaces file. Nothing else. But I cannot exactly remember what we were doing.

Cheers,
Frank

2012/10/10 @ksonly@ks <aksonlyaks@live.com>

If you don’t have WPA wireless connection then I think it would be a bit simpler. Even with WEp you don’t require WPA_SUPPLICANT . So, just to start relishing the WIFI connection, you can start with OPEn WIFI connection and gradually go to WEP and then WPA. With this you can at least know what is needed when we increase the security.

I’ll give a try tomorrow. If it succeds in my case I’ll reply with all the details.

Regards

Abhi

I will be waiting to hear from you @ksonly@ks.

Thank you all for your help. If anyone has any other solution suggestion, please feel free to say.

2012/10/10 @ksonly@ks <aksonlyaks@live.com>

What I cannot understand is:

Ok, maybe I cannot connect automatically but I cannot even connect manually:

iwconfig wlan0 essid ghostrider key s:34bddf67c2
or
iwconfig wlan0 essid ghostrider key b34d373eb2fb836a43b0afffe783c7d0af694724506c9e77b06d1021302905bf