PineDominator Posted September 4, 2012 Share Posted September 4, 2012 (edited) OK so I made a script that you can run on firmware 2.6.3 up to disable karma on wlan0 and setup and enable karma on wlan1/alfa NHA, it must be an nha or compatable atheros chipset! v1.1 karma-wlan1.sh #!/bin/shkillall -9 hostapdwlan0MAC=`ifconfig wlan0 | awk '/HWaddr/ {print $5}'`wlan1MAC=`ifconfig wlan1 | awk '/HWaddr/ {print $5}'`ifconfig wlan0 downifconfig wlan1 downcp /var/run/hostapd-phy0.conf /var/run/hostapd-phy1.confsed -i 's/interface=wlan.*/interface=wlan1/g' /var/run/hostapd-phy1.confsed -i 's/bssid=00:c0:ca:.*/bssid='$wlan1MAC'/g' /var/run/hostapd-phy1.confrm /tmp/karma.loghostapd -f /tmp/karma.log -B -dd /var/run/hostapd-phy1.confsleep 5hostapd_cli -p /var/run/hostapd-phy0 karma_enable[/CODE]chmod +x karma-wlan1.sh./karma-wlan1.shI have tested this and confirmed working, but if you have any input that would be cool:-)I was getting some stderr stuff in the ssh session so I piped it to /dev/null. those error msgs might be important? Edited September 5, 2012 by petertfm Quote Link to comment Share on other sites More sharing options...
itsm0ld Posted September 4, 2012 Share Posted September 4, 2012 (edited) EDIT: Seems I need to test a bit more, after a reboot my AWUS036H does NOT work. Edited September 4, 2012 by itsm0ld Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 4, 2012 Author Share Posted September 4, 2012 (edited) Verified on my MK4 running 2.6.3. Nice work! EDIT: FYI was using a AWUS036H what the??? I thought the karma pached hostapd only worked with atheros chipsets? I will have to try out when I get the time. EDIT: It seemed to be working but after a restart I could not get the AWUS036H to function like the NHA. Edited September 4, 2012 by petertfm Quote Link to comment Share on other sites More sharing options...
Neworld Posted September 4, 2012 Share Posted September 4, 2012 Does this turn the internal wifi into wlan1? If so, this is terrific!! Is there any problems with other modules ect. ?? Quote Link to comment Share on other sites More sharing options...
itsm0ld Posted September 4, 2012 Share Posted September 4, 2012 Petertfm, after rebooting the pineapple it seems to not be working. When I first posted I had not rebooted the pineapple, its possible I was seeing requests from before I switched interfaces? Either it may have been too quick of an all clear on my previous message, I have edited until I can validate tomorrow. Sorry for the excitement, note to self always reboot! Quote Link to comment Share on other sites More sharing options...
NullNull Posted September 4, 2012 Share Posted September 4, 2012 This should be add it at the frimware so the user could choose every time which interface he want to use through the UI. Speed and range of the "KarmaNetwork" will increase! Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 4, 2012 Author Share Posted September 4, 2012 (edited) Petertfm, after rebooting the pineapple it seems to not be working. When I first posted I had not rebooted the pineapple, its possible I was seeing requests from before I switched interfaces? Either it may have been too quick of an all clear on my previous message, I have edited until I can validate tomorrow. Sorry for the excitement, note to self always reboot! itsm0ld I think it may have worked to a point, maybe it's to do with the file hostapd-phy1.conf? the script copies it from hostapd-phy0.conf and many of the settings/options are for the internal interface and not compatable with a ralink, will have to mess with this to confirm, I swear it did seem to be working, the led on the pineapple for wlan0 was off but also the led for the alfa card was off as well? I did connect and had internet? weird. maybe not fully compatable? edit: the second time I tried the alfa card messed with the internal card and I had to insert it after a full boot the third try. but I don't remember this on the firs try, I think the first time you insert a new wifi card it gets setup, you can tell because /etc/config/wireless adds more radios, I now have radio0 through radio2. radio0 internal, radio1 NHA and radio2 H, I will try removing those lines for radio2 and try again. Edited September 4, 2012 by petertfm Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted September 4, 2012 Share Posted September 4, 2012 Hey everyone, While this works, this isn't the best way to do it. In the next release (hopefully) it will be possible to choose which wifi device is used for karma. Remember, Karma could only run on a prism / atheros chipset - and we currently only support atheros. Best Regards, Sebkinne Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 5, 2012 Author Share Posted September 5, 2012 script has been updated Quote Link to comment Share on other sites More sharing options...
01000010 Posted September 5, 2012 Share Posted September 5, 2012 (edited) I am not quite sure where to put this but why should karma only work on atheros? I rushed thru the patch and didnt not see anything that seemed atheros only but I am a horrid programmor When digininja set up the first set up the patches they where for madwifi -- which only worked with prism and atheros cards then patched hostapd 0.7.2, so people could move away from madwifi and into atk5 and atk9 -- At that point I feel he opened it up to any chip that works with the nl80211 driver but there was no testing due to lack of chipset that could go to ap mode with that driver, (mainly being only prism and atheros chips that supported ap mode) Then the linux 3.0 kernel came out and that intergated more of the mac80211 stack into the wifi setup -- which then allowed the atk9_htc driver to be put in ap mode along with a few others. So i say any thing that supports hostapd should run karma. I am testing with my alfa awus036neh everything seems to work ok but i get this error meassage after the auth reassociation request: STA=00:00:00:00:00:00 capab_info=0x21 listen_interval=10 current_ap=00:00:00:00:00:00 KARMA: Checking SSID for start of association, pass through ralinkkarma new AID 1 wlan0: STA 00:00:00:00:00:00 IEEE 802.11: association OK (aid 1) mgmt::reassoc_resp cb wlan0: STA 00:00:00:00:00:00 IEEE 802.11: did not acknowledge association response Data/PS-poll frame from not associated STA 00:00:00:00:00:00 Association Response to the STA has already been sent, but no TX status yet known - ignore Class 3 frame issue with 00:00:00:00:00:00 which I have looked up and seems to be a race condition that exist in the stock hostapd with the rt2800 stuff And I have tested and receive the same error with the standard hostapd from apt-get . association request: STA=00:00:00:00:00:00 capab_info=0x21 listen_interval=10 new AID 1 wlan0: STA 00:00:00:00:00:00 IEEE 802.11: association OK (aid 1) Add randomness: count=243 entropy=242 Data/PS-poll frame from not associated STA 00:00:00:00:00:00 Association Response to the STA has already been sent, but no TX status yet known - ignore Class 3 frame issue with 00:00:00:00:00:00 mgmt::assoc_resp cb wlan0: STA 00:00:00:00:00:00 IEEE 802.11: associated (aid 1) wlan0: AP-STA-CONNECTED 00:00:00:00:00:00 Both times my mac connects to a fake access point. But since there is no backend setup it just stops after that so before I set all that stuff up. I have to ask 2 question before i set up the rest of the stuff to test this 1. Does anyone have a usb wifi card that works in ap mode that is not and atheros and works in hostapd 2. On digininja site, in the karma area it says "After some prodding from Zero_Chaos I've finally patched hostapd allowing Atheros users to move away from Madwifi-ng and into ath5k and ath9k. It should also open the field to users of Prism54 and various other cards but these are yet to be tested." Is this the first test? Hey digininja you are the man for coding this sweet program -- can you save me time by just telling me I am crazy or just wishing for something? Edited September 5, 2012 by leapole Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.