Jump to content

Why do I loose wlan0 when I connect wlan1 to wifi


Recommended Posts

out of curiosity how are the both of you powering your pineapple? It really really shouldn't be a power issue as in our testing all of that has been solved, but in the off chance the both of you are using a USB to barrel with a laptop that isn't supplying enough amperage, this *could* explain.

Still thinking its software. Can you guys post the contents of /etc/config/network and /etc/config/wireless ?

Link to comment
Share on other sites

/etc/config/network




config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0

config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 172.16.42.1
option netmask 255.255.255.0
option gateway 172.16.42.42
option dns 8.8.8.8

config interface wan
option ifname wlan1
option proto dhcp

config interface usb
option ifname usb0
option proto dhcp

config interface wan2
option ifname ' '
option proto ' '
option service ' '
option device ' '
option apn ' '
option username ' '
option password ' '
option defaultroute ' '
option ppp_redial ' '
option peerdns ' '
option dns ' '
option keepalive ' '
option pppd_options ' '

/etc/config/wireless



config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option macaddr 'C0:FE:C0:FE:C0:FE'
option disabled '0'

config wifi-iface
option device 'radio0'
option mode 'sta'
option hidden '1'
option encryption 'psk2+tkip+aes'
option ssid 'SomeAP'
option key 'nunya'
option network 'lan'

config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11ng'
option macaddr 'C0:FE:C0:FE:C0:FE''
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 'radio1'
option hidden '0'
option ssid 'BronyBox'
option mode 'ap'
option network 'lan'

Link to comment
Share on other sites

Having the same problem as you guys, powering mine off wall power. I go into the client tab and click on my AP to connect to and for some reason it shuts down my wlan0 interface.

Heres my /etc/config/network

config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0

config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 172.16.42.1
option netmask 255.255.255.0
option gateway 172.16.42.42
option dns 8.8.8.8

config interface wan
option ifname wlan1
option proto dhcp

config interface usb
option ifname usb0
option proto dhcp

config interface wan2
option ifname ' '
option proto ' '
option service ' '
option device ' '
option apn ' '
option username ' '
option password ' '
option defaultroute ' '
option ppp_redial ' '
option peerdns ' '
option dns ' '
option keepalive ' '
option pppd_options ' '

Edited by BOOB00
Link to comment
Share on other sites

/etc/config/network

config interface loopback

option ifname lo

option proto static

option ipaddr 127.0.0.1

option netmask 255.0.0.0

config interface lan

option ifname eth0

option type bridge

option proto static

option ipaddr 172.16.42.1

option netmask 255.255.255.0

option gateway 172.16.42.42

option dns 8.8.8.8

config interface wan

option ifname wlan1

option proto dhcp

config interface usb

option ifname usb0

option proto dhcp

config interface wan2

option ifname ' '

option proto ' '

option service ' '

option device ' '

option apn ' '

option username ' '

option password ' '

option defaultroute ' '

option ppp_redial ' '

option peerdns ' '

option dns ' '

option keepalive ' '

option pppd_options ' '

/etc/config/wireless

config wifi-device 'radio0'

option type 'mac80211'

option channel '11'

option hwmode '11g'

option macaddr 'C0:FE:C0:FE:C0:FE'

option disabled '0'

config wifi-iface

option device 'radio0'

option mode 'sta'

option hidden '1'

option encryption 'psk2+tkip+aes'

option ssid 'SomeAP'

option key 'nunya'

option network 'lan'

config wifi-device 'radio1'

option type 'mac80211'

option channel '11'

option hwmode '11ng'

option macaddr 'C0:FE:C0:FE:C0:FE''

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 'radio1'

option hidden '0'

option ssid 'BronyBox'

option mode 'ap'

option network 'lan'

Your radios are backwards in your wireless file and it has the same MAC for both radios! I'll try cleaning it up and reposting.

Try this with the proper MAC addresses put in the proper places…. And of course make sure the encryption is correct. Do it manually if you don't want to use my workaround or the unverified (by Seb or another Mod) fix. http://wiki.openwrt.org/doc/uci/wireless#wpa.modes

config wifi-device 'radio0'

option type 'mac80211'

option channel '11'

option hwmode '11ng'

option macaddr 'C0:FE:C0:FE:C0:FE''

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 hidden '0'

option ssid 'BronyBox'

option mode 'ap'

option network 'lan'

config wifi-device 'radio1'

option type 'mac80211'

option channel '11'

option hwmode '11g'

option macaddr 'Proper MAC 2'

option disabled '0'

config wifi-iface

option device 'radio1'

option mode 'sta'

option hidden '1'

option encryption 'psk2+tkip+aes'

option ssid 'SomeAP'

option key 'nunya'

option network 'wan'

Edited the spoiler… Somehow the config wifi-device for radio0 was chopped. Now you should be able to just manually edit that in SSH. Reboot and see what happens. When you go to the Network Tile: Client Mode Tab and select your network it should just edit the radio1 section of wifi-iface.

Edited by thesugarat
Link to comment
Share on other sites

@thesugarat notice anything in particular about those Mac addresses......anything? I'll give you a hint, they arent my real id's, they were modified to protect the innocent, but only personal information, the radios and such were left alone, only the Mac's, keys and ssid's were changed :)

Here's the real MAC addresses

M0:CA:M0:CA:M0:CA
CA:FF:IN:AT:ED:JK

Edited by leathalinjexion
Link to comment
Share on other sites

@thesugarat even if they are swapped it would still seem that the network configuration tab is programmatically referring to wlan0 so regardless of which configuration is setup the information is going to be updated when I click the drop down to choose what AP I want to connect to anyway. I could be wrong (i usually am) but I'm thinking this is likely an issue in the network configuration methods/routines.

Looking at /pineapple/components/system/network/functions.php

I see the following in the connect routine which looks like it is specifically shutting down wlan1 when attempting to connect.

if(isset($_GET['connect'])){

set_time_limit(60*10);
$ap = json_decode($_GET['connect']);
$ssid = $ap->ESSID;

exec("ifconfig wlan1 down");

then a little further down I see this which im not sure but I believe its using wlan0 to connect which boots you off if your connected to wlan0

exec("uci commit wireless");
exec("wifi");
echo "done";

I havent looked through all the code so Im not 100% sure but that would make more sense to me as to the cause of the network configuration tab trying to use wlan0 instead of wlan1 unless the intended action is to use wlan0 but that doesnt make sense since it boots you off if your connected via wifi

Am I in left field here or does this make sense to anyone else?

Edited by leathalinjexion
Link to comment
Share on other sites

Can you post your dmesg output? That will tell us what phy0 and phy1 are tied to physically. I could be wrong here but to me phy0=radio0=wlan0 and phy1=radio1=wlan1 and phy0 should be tied to the Atheros and phy1 to the 8187. To me it looked like your /wireless file was pointing to the wrong physical cards when trying to execute that code. As far as your interpretation of the code in functions.php that looks right to me but I'm far from any kind of expert on php.

Link to comment
Share on other sites

Until we get this worked out, those of you who are experiencing the same thing, if you are connecting to an AP using the network tab and it seems that if it does indeed connect which for me it is (just not on the radio that I want it to connect with), then you can access the admin control using the IP which your AP assigns to it, for me it's 192.168.1.38:1471 check your logs to see what its connecting as.

Link to comment
Share on other sites

Can you post your dmesg output? That will tell us what phy0 and phy1 are tied to physically. I could be wrong here but to me phy0=radio0=wlan0 and phy1=radio1=wlan1 and phy0 should be tied to the Atheros and phy1 to the 8187. To me it looked like your /wireless file was pointing to the wrong physical cards when trying to execute that code. As far as your interpretation of the code in functions.php that looks right to me but I'm far from any kind of expert on php.

I am facing the same problem however, if you look in the screenshot it seems radio0=wlan1 and radio1=wlan0

Screen_Shot_2013_10_24_at_04_19_16.png

Link to comment
Share on other sites

ahh @thesugarat i found out the problem, it was with the /etc/config/wireless file, now I am able to connect wlan1 in client mode and wlan0 with access point mode and everything seems to be working great ! have some small issues with dnsspoofing i will open a new thread for that i guess

-EDIT-

right now WiFi Manager says radio0=wlan0 and radio1=wlan1

Edited by Subho Halder
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...