digitaladdictions Posted June 10, 2012 Share Posted June 10, 2012 Just received my Pineapple Mk4 yesterday. My first experiment was the "typical" setup where I had it hardwired to my laptop (well actually a VM) that was acting as a router. Other than having some problems with Ubuntu's network-manager insisting overwriting my default gateway with the ip of the pineapple every few minutes (I eventually removed network manager and set the networking up manually) everything worked well. Still this all seems rather pointless if your using a laptop since you can almost just as easily do all this without any additional hardware that needs to be powered. I really want to make this stand alone with a spare ALFA USB WiFi AWUS036NHA I bought at the same time but am having problems. I am a Linux admin and Linux is not a problem for me but I am completely new to OpenWRT and busybox. I can get the Alfa to connect briefly but it immediately disconnects. I believe the problem is with the network interface I am using. I think I need to define a new physical interface in /etc/config/network but I am not sure what that would be. config wifi-device radio0 option type mac80211 option channel 11 option macaddr 00:c0:ca:60:ef:62 option hwmode 11ng 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 # REMOVE THIS LINE TO ENABLE WIFI: # option disabled 1 config wifi-iface option device radio0 option network lan option mode ap option ssid "pineapple" option encryption none config wifi-device radio1 option type mac80211 option channel 1 option macaddr 00:c0:ca:57:24:b5 option hwmode 11ng 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 # REMOVE THIS LINE TO ENABLE WIFI: # option disabled 1 config wifi-iface option device radio1 option network wan option mode sta option ssid MyNetwork option encryption psk2+tkip+aes option key *********** Followed by: wifi ifup wan At this point it will connect and associate with my wireless network but within a few seconds disconnect. Here are the last several lines of my system log. 00:01:08 Pineapple kern.debug kernel: [ 68.940000] wlan1: deauthenticating from 00:1d:7e:38:ca:2b by local choice (reason=3) 00:01:08 Pineapple kern.debug kernel: [ 68.730000] wlan1: associated 00:01:08 Pineapple kern.debug kernel: [ 68.730000] wlan1: associate with 00:1d:7e:38:ca:2b (try 1/3) 00:01:08 Pineapple kern.debug kernel: [ 68.730000] wlan1: RX AssocResp from 00:1d:7e:38:ca:2b (capab=0x431 status=0 aid=6) 00:01:08 Pineapple kern.debug kernel: [ 68.670000] wlan1: send auth to 00:1d:7e:38:ca:2b (try 1/3) 00:01:08 Pineapple kern.debug kernel: [ 68.670000] wlan1: authenticated 00:01:08 Pineapple kern.debug kernel: [ 68.580000] wlan1: authenticate with 00:1d:7e:38:ca:2b 00:01:06 Pineapple kern.info kernel: [ 66.230000] ieee80211 phy3: Atheros AR9271 Rev:1 00:01:06 Pineapple kern.info kernel: [ 66.230000] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3 00:01:06 Pineapple kern.info kernel: [ 66.040000] br-lan: port 2(eth0) entering forwarding state 00:01:06 Pineapple kern.info kernel: [ 66.030000] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits 00:01:06 Pineapple kern.debug kernel: [ 66.240000] Registered led device: ath9k_htc-phy3 00:01:06 Pineapple kern.debug kernel: [ 66.230000] ath: doing EEPROM country->regdmn map search 00:01:06 Pineapple kern.debug kernel: [ 66.230000] ath: country maps to regdmn code: 0x37 00:01:06 Pineapple kern.debug kernel: [ 66.230000] ath: Regpair used: 0x37 00:01:06 Pineapple kern.debug kernel: [ 66.230000] ath: EEPROM regdomain: 0x833a 00:01:06 Pineapple kern.debug kernel: [ 66.230000] ath: EEPROM indicates we should expect a country code 00:01:06 Pineapple kern.debug kernel: [ 66.230000] ath: Country alpha2 being used: GB 00:01:05 Pineapple user.notice usb-modeswitch: 1-1:1.0: Manufacturer=ATHEROS Product=UB91C Serial=12345 00:01:05 Pineapple kern.info kernel: [ 65.790000] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272 00:01:05 Pineapple kern.info kernel: [ 65.400000] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested 00:01:00 Pineapple kern.info kernel: [ 60.220000] usb 1-1: new high-speed USB device number 4 using ath79-ehci 00:00:59 Pineapple user.info sysinit: sh: write error: Invalid argument 00:00:59 Pineapple user.info sysinit: sh: write error: Invalid argument 00:00:59 Pineapple user.info sysinit: setting up led WLAN 00:00:59 Pineapple user.info sysinit: setting up led WAN 00:00:59 Pineapple user.info sysinit: setting up led USB 00:00:59 Pineapple user.info sysinit: setting up led LAN 00:00:59 Pineapple user.info sysinit: OK 00:00:59 Pineapple user.info sysinit: /etc/rc.common: eval: line 1: can't create /sys/class/leds/alfa:blue:wan/mode: nonexistent directory 00:00:59 Pineapple user.info sysinit: /etc/rc.common: eval: line 1: can't create /sys/class/leds/alfa:blue:wan/device_name: nonexistent directory 00:00:59 Pineapple user.info sysinit: /etc/rc.common: eval: line 1: can't create /sys/class/leds/alfa:blue:lan/mode: nonexistent directory 00:00:59 Pineapple user.info sysinit: /etc/rc.common: eval: line 1: can't create /sys/class/leds/alfa:blue:lan/device_name: nonexistent directory 00:00:59 Pineapple kern.info kernel: [ 59.940000] usb 1-1: ath9k_htc: USB layer deinitialized 00:00:59 Pineapple kern.info kernel: [ 59.870000] usb 1-1: USB disconnect, device number 3 00:00:59 Pineapple kern.err kernel: [ 59.910000] ath: Failed to wakeup in 500us 00:00:59 Pineapple kern.err kernel: [ 59.900000] ath: Failed to wakeup in 500us 00:00:59 Pineapple kern.err kernel: [ 59.890000] ath: Failed to wakeup in 500us Any suggestions? I did not see any guide guide on doing this so I have just been piecing stuff together. Quote Link to comment Share on other sites More sharing options...
PineDominator Posted June 10, 2012 Share Posted June 10, 2012 are you by chance powering the pineapple with usb 5 volts? Quote Link to comment Share on other sites More sharing options...
digitaladdictions Posted June 10, 2012 Author Share Posted June 10, 2012 No; its plugged into the wall. Quote Link to comment Share on other sites More sharing options...
PineDominator Posted June 10, 2012 Share Posted June 10, 2012 No; its plugged into the wall. I was trying to rule out power/amperage but from my experience when using the 12 volt wall plug there is enough amperage in the pineapples usb port to operate a NHA If you want you could lower the txpower to see if it is a power draw issue. Quote Link to comment Share on other sites More sharing options...
digitaladdictions Posted June 10, 2012 Author Share Posted June 10, 2012 (edited) I was trying to rule out power/amperage but from my experience when using the 12 volt wall plug there is enough amperage in the pineapples usb port to operate a NHA If you want you could lower the txpower to see if it is a power draw issue. It looks like you where right. I did not think you where to be honest since I was plugged into the wall and the adapter in question is designed to be powered from USB but you where. I also upgraded to the latest firmware and added the country code to the configuration which seemed to help a bit by itself but it still would disconnect in 1-2min on its own and immediately when I tried to get a DHCP lease. After dropping the power down to 5 dBm (just went real low to test) it has stayed up for about 10min so far and I was able to request a DHCP lease and do several pings. I still need to slowly bring that value up and see where it starts to have problems. The driver default was 20 dBm. The pineapples built in adapter is running at 18 dBm. Thanks === UPDATE === 18 dBm seems to be reliable so far. It just was having trouble with the default 20 dBm. === UPDATE === I spoke to soon at 18 dBm it disassociated after about 30min. I tried 16 and it immediately disconnected with the DHCP request. I am now at 14 dBm. I will see how this goes. Edited June 10, 2012 by digitaladdictions Quote Link to comment Share on other sites More sharing options...
telot Posted June 10, 2012 Share Posted June 10, 2012 === UPDATE === I spoke to soon at 18 dBm it disassociated after about 30min. I tried 16 and it immediately disconnected with the DHCP request. I am now at 14 dBm. I will see how this goes. Please keep us updated regarding this. The topic is near and dear to my heart and I'm very curious how it pans out, as the same thing is happening with my raspberry pi (too much draw). I'll add any data I gather as well. Thanks digitaladdictions! telot Quote Link to comment Share on other sites More sharing options...
traffic Posted June 10, 2012 Share Posted June 10, 2012 ok, so using your earlier config i was able to connect to my wpa network and keep everything running. i had an earlier post about a creative wiring solution to have a portable jasager /alfa backpack: the key to this setup is a Y usb cable for the alfa the miniusb port into the alfa the main data into the usb hub and then the secondary power into the 1a port on my battery pack the pineapple gets connected to the 2a port and then the hub is plugged into the pineapple usb. i can run the 4gb sandisk cruzer and the alfa under load for an extended period of time (2 hours now) this seems to get around the heavy draw that the alfa puts on the pineapple/hub port Quote Link to comment Share on other sites More sharing options...
digitaladdictions Posted June 11, 2012 Author Share Posted June 11, 2012 Im not 100% sure power draw is the only problem. I took it out in the field today and no mater what power settings I had it at it would disassociate after 10-15min. It seemed like when I started up something that would be a bit more CPU intensive like part of the dsniff suite it would happen quicker. Although the CPU load itself was still only 0.40 to 0.50. Sometimes it even kicked me of the karma side when it happened and required a reboot. If it is purely power related I think the device itself is close to the max power the USB can provide before you even take into consideration transmit power. I do not have a powered hub available at the moment but that will be the next thing I try. ok, so using your earlier config i was able to connect to my wpa network and keep everything running. Yesterday was the first day I ever looked at OpenWRT so what I posted may not be optimal. I already tweaked that config in that I removed option network wan and I added option bssid 00:01:02:03:04:05 There where two identical SSID's for two different networks and despite the desired one being 10dBm stronger 9 times out of 10 it would connect to the wrong one without that or worse change to the wrong on its own after being all setup properly. I then added this to the startup script udhcpc -i wlan1 -b iptables -A FORWARD -i wlan0 -o wlan1 -s 172.16.42.0/24 -m state --state NEW -j ACCEPT iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A POSTROUTING -t nat -j MASQUERADE Again yesterday was the first time I ever looked at OpenWRT so take my configs with a grain of salt. Quote Link to comment Share on other sites More sharing options...
Whistle Master Posted June 12, 2012 Share Posted June 12, 2012 (edited) I'm facing similar issue with my AWUS036NHA. Even with a powered hub, the USB port of the pineapple seems to be at the maximum it can deliver :( Example: I start monitor on the wlan1 and try to deauth an AP. At first try, the AWUS036NHA's light goes off and the USB stack restarts... root@Pineapple:~# airmon-ng start wlan1 root@Pineapple:~# aireplay-ng --deauth 10 -a XX:XX:XX:XX:XX:XX mon0 21:48:07 Waiting for beacon frame (BSSID: XX:XX:XX:XX:XX:XX) on channel XX NB: this attack is more effective when targeting a connected wireless client (-c <client's mac>). 21:48:07 Sending DeAuth to broadcast -- BSSID: [XX:XX:XX:XX:XX:XX] write failed: Network is down wi_write(): Network is down root@Pineapple:~# EDIT Managed to keep it running by lowering transmit power to 10 dBm (Tx-Power=10 dBm) on the powered hub. EDIT 2 On advises from Petertfm, I changed the USB cable used for the AWUS036NHA, and Tada ! It works even at full Tx-Power of 20 dBm ! Thanks mate ;) Edited June 12, 2012 by Whistle Master Quote Link to comment Share on other sites More sharing options...
Molotof Posted June 13, 2012 Share Posted June 13, 2012 EDIT 2 On advises from Petertfm, I changed the USB cable used for the AWUS036NHA, and Tada ! It works even at full Tx-Power of 20 dBm ! Thanks mate ;) Was it the length of the USB cable or something else ? Quote Link to comment Share on other sites More sharing options...
tisker Posted June 19, 2012 Share Posted June 19, 2012 (edited) I now have the 2 female USB to 1 male mini-usb plugged into the Alfa AWUS036NHA, and it is listed as wlan1 interface, but when I issue "ifconfig wlan1 up" that command hangs indefinitely .. the SSH session remains open. Any thoughts? How is everyone else getting this interface up and running? Cheers Oh, and this is plugged in 12 V. to the Pineapple. OK, I think I found the issue - I was running my setup through the powered USB from the hackshop. I didn't supply any power to the powered end of the usb since power was flowing through on the data cable anyway. That might be the issue. Interestingly, I can power the pineapple completely via the USB port via the data input end of the aforementioned powered usb. Edited June 19, 2012 by tisker Quote Link to comment Share on other sites More sharing options...
AxelWiresmith Posted November 25, 2012 Share Posted November 25, 2012 (edited) I have noticed this issue(disassociation after 10-15mins), and have wondered if perhaps there is a discrepancy with the 'ALFA' Firmware? Mine doesn't have the ALFA markings on it anywhere (newer version perhaps?) If anyone solves this let me know. I dont believe it can be due to excessive current draw, as the math indicates a small difference... mind-you the pineapple's USB is probably not really desgined for much more than a USB flash-stick (in terms of the 5v reg it probably has: I will have to check one of these days, but right now I have no desire to crack-mine open as I too am trying to come to grips with OpenWRT/.Jasager in what little spare-time I have) (BTW) Most netbooks (I should say :many netbooks <AFAIK>) have USB ports rated at 500ma(USB standard is 1A), the Pineapple suggests 1A at peak output (etc) But I'm pretty sure under most loads you wouldn't notice powering from 500ma (the voltage may drop a little, but the internals can probably work fine down to 3v <with perhaps the exception of the USB port, which is most likely using a lo-drop regulator , so it could overheat under the above circumstance... just a theory) At any-rate the wal-wart is 1A, but the internal regulator may not be able to sustain the load (If this turns-out to be the issue& not FW, then let me know& I'll do a tut on how to upgrade to v-reg- or make use of a small powered hub ;-) I seem to get drop-outs just using the pineapple on it's own as ICS (with network manager) sometimes (though I suspect these are more to do with time-out than straight drop-out) I'm running 2.7.0 and Wlan1 seems to break with some modules (or rather just not do anything/hang) My initial impressions of the pineapple are good, (I have a few other gripes like with the web-GUI the quick-start/menu bar gets partially covered under some circumstances eg; clicking detailed report etc..) But It's well-supported & I love the whole idea of it (&hak5 generally :D ) Linux and OpenWRT are not my strong-suit but HW is, so like I said let me know if I can help-out, as I want to do it all with this bad-boy (not to mention my boss wants me to do pen-testing demos >_< ) @Tisker (as is mentioned somewhere in the pineapple doco) It's not a good idea to back-flow power through the USB-port on the device, like I always tell ppl: 'Just because you can, doesn't mean you should' It will run the regulators hot (more than likely) and may bypass some of the filtering etc.. EDIT: Man, do I feel like a douche (more than usual) In my speed-reading I somehow missed the post about it being the USB-cable! It totally makes sense (the USB cable has thinner copper in it hence cannot carry the current <or has bad shielding> Both are common problems with those type of cables, often the older-ones are better, I have had this issue many-times before with other similar types of issues, so I should of known :P ) Edited November 25, 2012 by AxelWiresmith 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.