Why can't I connecto to my wifi AP?

1

I'm connecting to my machine via ssh. Trying to connect it my to my AP. The problem is that the wi fi is active but not connected to my AP.

It is Running Debian GNU/Linux 6.0

When I run the command iwconfig mlan0 essid MY_SSID I get the following error.

Error for wireless request "Set ESSID" (8B1A) :    
   SET failed on device mlan0 ; Bad address.

And checking in the log, it says:

kernel: Can not find ssid MY_SSID

I've already edited the /etc/network/interfaces file adding:

auto mlan0
iface mlan0 inet dhcp

What I did after that was trying to conect with a wpa_supplicand.conf file with this line:

/usr/bin/wpa_passphrase MY_SSID MY_Secret_Wifi_Password | tee -a /etc/wpa_supplicant.conf

And I've created a wpa_supplicant.conf file containing:

network={
        ssid="MY_SSID"
        #psk=MY_PASS
        psk=MY_CIPHERD_PASS17ce47de00e8ec55983b111a79ffefdabbe5a2ca645459
}

I test if this Works With the line:

wpa_supplicant -imlan0 -c/etc/wpa_supplicant.conf -d

But i get errors saying that an AP cannot be found.

I turned my interface up with:

linux:~# /sbin/wpa_supplicant wpa_supplicant -d wext -i mlan0 -c /etc/wpa_supplicant.conf -B

so the ifup mlan0 says that it is already up.

If I run the iwlist scanning command i can see my AP.

mlan0     Scan completed :
          Cell 01 - Address: 08:76:FF:C5:1B:20
                    ESSID:"MY_ESSID"
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Quality:5/5  Signal level:-25 dBm  Noise level:-96 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
                              18 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 12 Mb/s
                              24 Mb/s; 48 Mb/s
                    Extra:Beacon interval=100
                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00
                    IE: Unknown: DD07000C4300000000
                    IE: Unknown: DD1E00904C330C0017FF00000000000000000000000000000000000000000000
                    IE: Unknown: DD1A00904C3401000700000000000000000000000000000000000000
                    Extra:band=bg

Right now I'm connected to it via Ethernet And trying to keep the wifi connection only. Another thing is that the lspci command doesn't return a thing.

If another file is needed, ask me to upload it. I want to establish the wireless connection.

Thank you

AAlvz

Posted 2013-01-20T18:36:37.973

Reputation: 649

I would recommend on enabling squeeze-backports so you use a not too old kernel version. On linux 3.2 iwconfig and iwlist are deprecated. use iw dev wlan0 scan and iw dev wlan0 connect. Also, the output of readlink /sys/class/net/mlan0/device/driver would be nice. – BatchyX – 2013-01-20T18:44:04.433

@BatchyX It doesn't recognice the iw commands by default, right? .. I'll check the squeeze-backports ... and with the readlink command I get ../../../../../../../bus/sdio/drivers/wlan_sdio .. what does that mean? .. – AAlvz – 2013-01-20T19:36:59.880

iw is fairly recent and it's not surprising for it to not be available by default on OS that still ship Linux 2.6.38. As for the readlink command, it means your wlan driver is called wlan_sdio. – BatchyX – 2013-01-21T07:26:29.957

Answers

0

In /etc/network/interfaces put:

auto mlan0
iface mlan0 inet dhcp
        wpa-ssid MY_SSID
        wpa-psk MY_SHARED_KEY

then it will connect automatically when the interface comes up

parkydr

Posted 2013-01-20T18:36:37.973

Reputation: 2 074

Thanks. I used it and restarted the networking service, and it seems that its getting No DHCPOFFERS received... so i'll chek it out.. On log it says kernel: ADDRCONF(NETDEV_UP): mlan0: link is not ready – AAlvz – 2013-01-20T19:39:33.890

Are you sure your network device is mlan0? Mine is wlan0 on one machine and wlan1 on another. The first error message you show has wlan0. – parkydr – 2013-01-20T21:38:17.047

Yes, it is mlan0, srry I wrote it bad... let me correct the question.. but it is mlan0 .. it's showed also in the ifconfig -a command, but it says Link encap:Ethernet ... – AAlvz – 2013-01-20T21:41:56.610

Ok, I just wondered because that's the only difference with my working configuration. Mine's wlan0 but Link encap:Ethernet too. I also get ADDRCONF(NETDEV_UP): wlan0: link is not ready, but then it does the authentication and becomes ready. – parkydr – 2013-01-20T21:46:31.613

really ? .. where do you see it ready ? .. what do you suggest? .. if we have almost the same I should be connected by now.. – AAlvz – 2013-01-20T21:48:37.697

In the output of dmesg – parkydr – 2013-01-20T21:52:34.200

Yes... I keep getting Invalid SSID - aborting set_essid Can not find ssid MY_SSID ... and then it connect to the eth0 again.. – AAlvz – 2013-01-20T21:59:31.250

Are you sure the SSID is right? – parkydr – 2013-01-20T22:06:36.037

Yes. I thought i was misspelling too.. but I've checked several times... unless it can be named by another id or something.. – AAlvz – 2013-01-20T22:42:53.270