Jump to content

wlan0 ap & wlan1 client mode not working


EightBall

Recommended Posts

When I turn on both wlan interfaces and turn one on for client mode (wlan1) set the pre-shared key, save and then commit - after I commit the changes the client (wlan1) interface becomes disabled and the pre-shared key field is blank. Radio0 is still enabled but no longer linked to wlan1. Wlan0 and radio1 is still turned on.

I've tried doing a factory reset and only configuring client mode and it still exhibits the same behavior.

I'm trying to create an access point on one interaface and internet connection share the client connected interface that's connected to my mobile device.

Maybe I'm missing something? Is what I'm trying to accomplish not possible? I'm fully updated and using Wi-fi Manager to configure the interfaces.

Link to comment
Share on other sites

EightBall,

Please post the contents of your /etc/config/wireless file.

And if you are using the ICS tab in wifi manager without having a good grasp on the normal bridged functions of the pineapple you could be introducing problems. Since the release of the fixes to the encryption problem on wlan1 you should have no issues using the Client mode tab under the Network Tile.

Link to comment
Share on other sites

I don't have ICS enabled. Here's the config file after doing a factory reset, running the commands jdoe suggested, updating, then configuring wifi via wifi manager.

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11ng'
        option macaddr '00:13:37:**:**:**'
        option htmode 'HT20'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'RX-STBC1'
        list ht_capab 'DSSS_CCK-40'
        option disabled '0'

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'Guest Network'
        option hidden '0'

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11g'
        option macaddr '00:13:37:**:**:**'
        option channel '6'
        option disabled '0'

config wifi-iface
        option device 'radio1'
        option network 'lan'
        option ssid 'Test'
        option mode 'sta'
        option hidden '0'
        option encryption 'psk2+tkip+aes'
Edited by EightBall
Link to comment
Share on other sites

EightBall,

Have you tried using the updated network tile? That will work for your setup.

But you seem to be missing the key for the network, unless you removed it?

Either way, the best way to configure clientmode is using the built in clientmode (as long as you have updated through the bar.)

Best Regards,

Sebkinne

Link to comment
Share on other sites

okay so doing more digging - I've tried using the built-in network tile and I get the same behavior - I try to connect in client mode - the connection doesn't happen. If I go back to the main network tile and do a refresh it says that wlan1 is now disabled. Doing ifconfig shows that wlan1 is gone. I run "ifconfig wlan1 up" it comes back and doing a new refresh on the network tile again shows it as enabled. I go through the same process again and wlan1 gets disabled as before. I started trying to use wifi-manager because I couldn't get the built-in network tile to work. Also I've never seen the red led (wlan1) turn on except quick flashes during boot or factory reset.

Here's the /etc/config/wireless after trying to use the network tile.

root@Pineapple:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11ng'
        option macaddr '00:13:37:**:**:**'
        option htmode 'HT20'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'RX-STBC1'
        list ht_capab 'DSSS_CCK-40'
        option disabled '0'

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'Guest Network'
        option hidden '0'

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11g'
        option macaddr '00:13:37:**:**:**'
        option channel '6'
        option disabled '0'

config wifi-iface
        option device 'radio1'
        option ssid 'Test'
        option mode 'sta'
        option hidden '0'
        option network 'wan'
        option encryption 'psk2+ccmp'

Here's my ifconfig output before and after.

br-lan    Link encap:Ethernet  HWaddr 00:13:37:**:**:**
          inet addr:172.16.42.1  Bcast:172.16.42.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10018 errors:0 dropped:44 overruns:0 frame:0
          TX packets:10472 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1027580 (1003.4 KiB)  TX bytes:4418408 (4.2 MiB)

eth0      Link encap:Ethernet  HWaddr 00:13:37:**:**:**
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21983 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18329 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:17195808 (16.3 MiB)  TX bytes:5100672 (4.8 MiB)
          Interrupt:4

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:544 errors:0 dropped:0 overruns:0 frame:0
          TX packets:544 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:40269 (39.3 KiB)  TX bytes:40269 (39.3 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:13:37:**:**:**
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1955 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3423 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:149519 (146.0 KiB)  TX bytes:4305874 (4.1 MiB)

running ifconfig wlan1 up adds wlan1 adapter and shows wlan1 enabled on the network tile - same output as above except with the wlan1 adapter at the end

wlan1     Link encap:Ethernet  HWaddr 00:13:37:**:**:**
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

dmesg shows virtually no wlan1 info

root@Pineapple:~# dmesg | grep wlan1
[    3.630000] Registered led device: mk5:red:wlan1
Link to comment
Share on other sites

The encryption type changed. I'm just going to guess that you haven't done the update from the pineapple bar that fixes that issue for Client mode... You can manually change it. Or use the wifi manager to change it. Then save and commit and then just reboot. Once it's working do the updates.

Link to comment
Share on other sites

From my perspective even with the network encryption patch, there is still a problem with the pineapple detecting the encryption type of some APs. After some tinkering, I determined that my problem with slow connection speed using wireless connection sharing, was due to the pineapple selecting the wrong encryption type and channel. When using the network tile, with the client tab. I was connected using channel 11 (same as wlan0) and AES, despite my AP being on channel 6 with TKIP + AES. Its not a big deal fixing it using the wireless manager infusion, once you realize the problem (took me a week).

Link to comment
Share on other sites

From my perspective even with the network encryption patch, there is still a problem with the pineapple detecting the encryption type of some APs. After some tinkering, I determined that my problem with slow connection speed using wireless connection sharing, was due to the pineapple selecting the wrong encryption type and channel. When using the network tile, with the client tab. I was connected using channel 11 (same as wlan0) and AES, despite my AP being on channel 6 with TKIP + AES. Its not a big deal fixing it using the wireless manager infusion, once you realize the problem (took me a week).

I'll have to take a closer look at this then. We parse iwlist's output to get encryption types. I'll take a look in the morning.

Link to comment
Share on other sites

From my perspective even with the network encryption patch, there is still a problem with the pineapple detecting the encryption type of some APs. After some tinkering, I determined that my problem with slow connection speed using wireless connection sharing, was due to the pineapple selecting the wrong encryption type and channel. When using the network tile, with the client tab. I was connected using channel 11 (same as wlan0) and AES, despite my AP being on channel 6 with TKIP + AES. Its not a big deal fixing it using the wireless manager infusion, once you realize the problem (took me a week).

Could you do me a favor? Post your result of iwlist wlan1 scanning (via pastebin)? You only need to provide your access point. You can of course change the ESSID and MAC. But keep the rest intact. Then please also state what the actual security type should be. I'll fix the channel issue.

Link to comment
Share on other sites

http://pastebin.com/DUuAS7S1

My AP is using WPA2-PSK / AES encryption on channel 1

Thanks - I hope this helps

Looks like mixed mode to me: Note the WPA2 (line 20) and WPA (line 29). Looking at the encryption, I can only see ccmp (aes). So the correct /etc/config/wireless encryption type SHOULD be set to mixed-psk+ccmp..

Earlier you stated it's aes+tkip? Either way, if you use the network tile, what does your /etc/config/wireless file look like? would you back your up, execute a "wifi detect > /etc/config/wireless &&reboot" and use the network tile to connect? Make sure you are using the most up-to-date network tile, updatable through the pineapple bar.

Thanks for the help debugging this.

Link to comment
Share on other sites

I changed the setting on my AP to PSK + AES last night when I was testing my device to simplify the process. I will post the configs later tonight.

Thanks again

Thanks!

Would be awesome if you could go back to the configuration you had issues with so we can see what's happening. If you reset your router to whatever you had before, please also show us the output of the iwlist command above, along with the newly generated /etc/config/wireless after using the up-to-date network tile for clientmode.

That'll help a lot!

Best Regards,

Sebkinne

Link to comment
Share on other sites

For accuracy I changed my AP back to AES + TKIP.

Here is my etc/config/wireless after running "wifi detect > /etc/config/wireless && reboot" and configuring wlan1 with network tile/ client tab.

http://pastebin.com/XYb418fg

Here is my iwlist wlan1 scanning results made after changing the encryption to AES + TKIP.

http://pastebin.com/JtGtC503

Link to comment
Share on other sites

For accuracy I changed my AP back to AES + TKIP.

Here is my etc/config/wireless after running "wifi detect > /etc/config/wireless && reboot" and configuring wlan1 with network tile/ client tab.

http://pastebin.com/XYb418fg

Here is my iwlist wlan1 scanning results made after changing the encryption to AES + TKIP.

http://pastebin.com/JtGtC503

That all looks correct. Your AP is still in mixed mode+ccmp. At least that is what it reports itself..

Just looking at the two pastes you supplied, it looks like the /etc/config/wireless is set up correctly for that AP. And you are saying it doesn't connect?

Edit: Looking at the two pastebins of your iwlist scan, I see no differences at all. Are you sure you pasted the correct one?

Link to comment
Share on other sites

Yeah I am pretty sure they are different. The encryption was configured correctly this time, however the channel was set to 11 (the AP was broadcasting on 1). That may have been the problem all along. To be honest having made all the changes, trying to fix the problem originally, I may have changed the encryption manually? However the channel issue is real. If you look at the most resent etc/config/wireless, you can see that the network tile picked the wrong one.

Link to comment
Share on other sites

Yeah I am pretty sure they are different. The encryption was configured correctly this time, however the channel was set to 11 (the AP was broadcasting on 1). That may have been the problem all along. To be honest having made all the changes, trying to fix the problem originally, I may have changed the encryption manually? However the channel issue is real. If you look at the most resent etc/config/wireless, you can see that the network tile picked the wrong one.

True, but I want to say it doesn't matter. At least it didn't when I tested. While my config says channel 11, it is connected right now to a channel 1 wireless.. the wifi script is smart enough to fix all this for you.

Link to comment
Share on other sites

Maybe so..... On mine, up until I changed the wireless settings to the correct channel using the wireless manager infusion, the connection was terrible (last week & tonight). It connected, I got an ip from my AP, but clearly something was wrong. Maybe it was the combo TKIP + AES that was causing the issue ( I also changed it back to straight AES).

I don't want to sound ungrateful. I really appreciate the work you, and everyone else at Hak5 do for this community. Thank You!

Link to comment
Share on other sites

Maybe so..... On mine, up until I changed the wireless settings to the correct channel using the wireless manager infusion, the connection was terrible (last week & tonight). It connected, I got an ip from my AP, but clearly something was wrong. Maybe it was the combo TKIP + AES that was causing the issue ( I also changed it back to straight AES).

I don't want to sound ungrateful. I really appreciate the work you, and everyone else at Hak5 do for this community. Thank You!

I had the same issue with wlan1 in client mode and wlan0 in AP. Horrible throughput. something like 0.5 meg down and 2 megs up. Dorking around with the channel didn't seem to help.

I pulled out the Alfa card I use with the MKIV and set that one up as an AP (wlan2), and used wlan0 in client mode. So far that is running groovy, as fast as I would expect. SSL strip and ettercap seem to crash it but I'm sure thats just an ID10T error on my end. My router is using WPA2 AES as well. I'm seeing if I can get wlan1 to do anything useful.

Now if I can just get my autossh keep alive script running correctly I'll be able to play with this thing.

Link to comment
Share on other sites

I have updated the network tile to change the channel. The encryption detection is working fine from what I can see, with the logs you provided.

Other updates are that disconnect now doesn't re-connect at times and that you can choose your default route.

Hope this helps.

Best Regards,

Sebkinne

Link to comment
Share on other sites

So I got it working somehow, not too sure exactly what I did. All I can deduce is that I connected to an open network in client mode with the network tile, which worked, then connected to an auth required network which worked after that.

Edited by EightBall
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...