Jump to content

pi b+, hostapd, airbase-ng, AWUS036NHA... disconnect, reconnect...


i8igmac

Recommended Posts

2 cards for testing
wusb54g (does not suport master mode)
AWUS036NHA (just got this card yesterday)
kali 1.0.9 raspberry pi b+

i have 2 cards for testing... ill start with airbase-ng as it will support both cards...

upstream=eth0
phy=wlan0

service network-manager stop
rfkill unblock wlan

ifconfig $phy down
iwconfig $phy mode monitor
ifconfig $phy up
iwconfig $phy rate 5.5M fixed
airbase-ng $phy -c 6 -P -C 60&
sleep 5
ifconfig at0 10.0.0.1 netmask 255.255.255.0 up
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1

dhcpd -cf /etc/mana-toolkit/dhcpd.conf at0

echo '1' > /proc/sys/net/ipv4/ip_forward
iptables --policy INPUT ACCEPT
iptables --policy FORWARD ACCEPT
iptables --policy OUTPUT ACCEPT
iptables -F
iptables -t nat -F
iptables -t nat -A POSTROUTING -o $upstream -j MASQUERADE
iptables -A FORWARD -i at0 -o $upstream -j ACCEPT

so, you notice i have set rate to 5.5M fixed, from what i understand this will lighten the load (smaller chunks of data) with out this the usb device will dissconnect and reconnect do to (over-current)
with out a lower fixed rate, a client will connect and when data is sent over that is to large you will then see over-current happen
the script above works well with the old ugly wusb54g...

so, i got my new alfa card and figured all should run with out a problem... after the alfa card is placed into monitor mode, this error shows when you attempt to set a fixed rate

iwconfig wlan0 rate 5.5M fixed
Sep 26 23:36:23 kali kernel: [ 5920.439195] ------------[ cut here ]------------
Sep 26 23:36:23 kali kernel: [ 5920.461808] WARNING: CPU: 0 PID: 4729 at net/mac80211/driver-ops.h:12 ieee80211_set_bitrate_mask+0x138/0x144 [mac80211]()
Sep 26 23:36:23 kali kernel: [ 5920.491352] wlan0:  Failed check-sdata-in-driver check, flags: 0x3
Sep 26 23:36:23 kali kernel: [ 5920.511385] Modules linked in: rt73usb rt2x00usb rt2x00lib ipt_MASQUERADE iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_filter ip_tables x_tables tun ipv6 evdev joydev dm_mod arc4 snd_soc_pcm512x snd_soc_wm8804 ath9k_htc ath9k_common ath9k_hw ath mac80211 cfg80211 rfkill snd_soc_bcm2708_i2s regmap_mmio snd_soc_core snd_compress regmap_i2c snd_pcm_dmaengine regmap_spi snd_pcm snd_page_alloc snd_seq snd_seq_device snd_timer leds_gpio led_class snd spi_bcm2708 i2c_bcm2708
Sep 26 23:36:23 kali kernel: [ 5920.586702] CPU: 0 PID: 4729 Comm: iwconfig Tainted: G        W    3.12.26 #1
Sep 26 23:36:23 kali kernel: [ 5920.601828] [<c001450c>] (unwind_backtrace+0x0/0xec) from [<c00117f0>] (show_stack+0x10/0x14)
Sep 26 23:36:23 kali kernel: [ 5920.619939] [<c00117f0>] (show_stack+0x10/0x14) from [<c001f98c>] (warn_slowpath_common+0x68/0x88)
Sep 26 23:36:23 kali kernel: [ 5920.636405] [<c001f98c>] (warn_slowpath_common+0x68/0x88) from [<c001f9dc>] (warn_slowpath_fmt+0x30/0x40)
Sep 26 23:36:23 kali kernel: [ 5920.655742] [<c001f9dc>] (warn_slowpath_fmt+0x30/0x40) from [<bf12cc48>] (ieee80211_set_bitrate_mask+0x138/0x144 [mac80211])
Sep 26 23:36:23 kali kernel: [ 5920.677358] [<bf12cc48>] (ieee80211_set_bitrate_mask+0x138/0x144 [mac80211]) from [<bf0f3f9c>] (cfg80211_wext_siwrate+0x128/0x17c [cfg80211])
Sep 26 23:36:23 kali kernel: [ 5920.699440] [<bf0f3f9c>] (cfg80211_wext_siwrate+0x128/0x17c [cfg80211]) from [<c0436f8c>] (ioctl_standard_call+0x60/0x474)
Sep 26 23:36:23 kali kernel: [ 5920.718229] [<c0436f8c>] (ioctl_standard_call+0x60/0x474) from [<c0437538>] (wext_handle_ioctl+0x198/0x234)
Sep 26 23:36:23 kali kernel: [ 5920.736694] [<c0437538>] (wext_handle_ioctl+0x198/0x234) from [<c03947c4>] (dev_ioctl+0x518/0x834)
Sep 26 23:36:23 kali kernel: [ 5920.754231] [<c03947c4>] (dev_ioctl+0x518/0x834) from [<c00f6b88>] (do_vfs_ioctl+0x408/0x5f4)
Sep 26 23:36:23 kali kernel: [ 5920.771443] [<c00f6b88>] (do_vfs_ioctl+0x408/0x5f4) from [<c00f6dac>] (SyS_ioctl+0x38/0x60)
Sep 26 23:36:23 kali kernel: [ 5920.788322] [<c00f6dac>] (SyS_ioctl+0x38/0x60) from [<c000df80>] (ret_fast_syscall+0x0/0x30)
Sep 26 23:36:23 kali kernel: [ 5920.806173] ---[ end trace dc57b6bd58a09bbf ]---
[B]#dissconnect[/B]
Sep 26 23:37:34 kali kernel: [ 5991.874808] hub 1-1:1.0: over-current change on port 2
Sep 26 23:37:34 kali kernel: [ 5992.134019] usb 1-1.4: USB disconnect, device number 36
Sep 26 23:37:35 kali kernel: [ 5992.981972] usb 1-1.4: ath9k_htc: USB layer deinitialized
Sep 26 23:37:36 kali kernel: [ 5993.251477] usb 1-1.4: new high-speed USB device number 38 using dwc_otg
Sep 26 23:37:36 kali kernel: [ 5993.382818] usb 1-1.4: New USB device found, idVendor=0cf3, idProduct=9271
Sep 26 23:37:36 kali kernel: [ 5993.395969] usb 1-1.4: New USB device strings: Mfr=16, Product=32, SerialNumber=48
Sep 26 23:37:36 kali kernel: [ 5993.410376] usb 1-1.4: Product: UB91C
Sep 26 23:37:36 kali kernel: [ 5993.420526] usb 1-1.4: Manufacturer: ATHEROS
Sep 26 23:37:36 kali kernel: [ 5993.431422] usb 1-1.4: SerialNumber: 12345
Sep 26 23:37:36 kali kernel: [ 5993.453788] usb 1-1.4: ath9k_htc: Firmware htc_9271.fw requested
Sep 26 23:37:36 kali kernel: [ 5993.478407] usb 1-1.2: USB disconnect, device number 33
Sep 26 23:37:36 kali kernel: [ 5993.763553] usb 1-1.4: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
Sep 26 23:37:36 kali kernel: [ 5993.901552] usb 1-1.2: new full-speed USB device number 39 using dwc_otg
Sep 26 23:37:36 kali kernel: [ 5994.008737] ath9k_htc 1-1.4:1.0: ath9k_htc: HTC initialized with 33 credits
Sep 26 23:37:36 kali kernel: [ 5994.028620] usb 1-1.2: New USB device found, idVendor=046d, idProduct=c52b
Sep 26 23:37:36 kali kernel: [ 5994.043904] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Sep 26 23:37:36 kali kernel: [ 5994.058656] usb 1-1.2: Product: USB Receiver
Sep 26 23:37:36 kali kernel: [ 5994.070618] usb 1-1.2: Manufacturer: Logitech
Sep 26 23:37:36 kali kernel: [ 5994.110763] input: Logitech USB Receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input20
Sep 26 23:37:36 kali kernel: [ 5994.139661] hid-generic 0003:046D:C52B.001F: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-bcm2708_usb-1.2/input0
Sep 26 23:37:37 kali kernel: [ 5994.213364] input: Logitech USB Receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.1/input/input21
Sep 26 23:37:37 kali kernel: [ 5994.249399] hid-generic 0003:046D:C52B.0020: input,hiddev0,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-bcm2708_usb-1.2/input1
Sep 26 23:37:37 kali kernel: [ 5994.301784] hid-generic 0003:046D:C52B.0021: hiddev0,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-bcm2708_usb-1.2/input2
Sep 26 23:37:37 kali kernel: [ 5994.571029] ath9k_htc 1-1.4:1.0: ath9k_htc: FW Version: 1.3
Sep 26 23:37:37 kali kernel: [ 5994.591476] ath: EEPROM regdomain: 0x833a
Sep 26 23:37:37 kali kernel: [ 5994.591541] ath: EEPROM indicates we should expect a country code
Sep 26 23:37:37 kali kernel: [ 5994.591570] ath: doing EEPROM country->regdmn map search
Sep 26 23:37:37 kali kernel: [ 5994.591583] ath: country maps to regdmn code: 0x37
Sep 26 23:37:37 kali kernel: [ 5994.591627] ath: Country alpha2 being used: GB
Sep 26 23:37:37 kali kernel: [ 5994.591641] ath: Regpair used: 0x37
Sep 26 23:37:37 kali kernel: [ 5994.608663] ieee80211 phy24: Atheros AR9271 Rev:1


with out lowering the rate. a client connects and when large data passes threw almost instatly the device is disconnected.

So now since my new card suports master mode i get to test hostapd ,-) but almost the same symptoms exist

/root/projects/mana/run-mana/start-nat-simple.sh

./start-nat-simple.sh

So, the thing is up and running, the symptom is almost the same as i explain with airbase...
my phone connects to this new access point, if i quickly refresh a webpage data begins to pass threw, i must click quickly or else dissconnect and reconnect happens with this slightly new error
ath: phy24: Failed to wakeup in 500us

Sep 26 23:50:10 kali kernel: [ 6747.690006] usb 1-1.4: USB disconnect, device number 38
Sep 26 23:50:11 kali kernel: [ 6748.954770] ath: phy24: Failed to wakeup in 500us
Sep 26 23:50:11 kali kernel: [ 6748.975230] ath: phy24: Failed to wakeup in 500us
Sep 26 23:50:11 kali kernel: [ 6749.112046] usb 1-1.4: ath9k_htc: USB layer deinitialized
Sep 26 23:50:12 kali kernel: [ 6749.391495] usb 1-1.4: new high-speed USB device number 40 using dwc_otg
Sep 26 23:50:12 kali kernel: [ 6749.522866] usb 1-1.4: New USB device found, idVendor=0cf3, idProduct=9271
Sep 26 23:50:12 kali kernel: [ 6749.535101] usb 1-1.4: New USB device strings: Mfr=16, Product=32, SerialNumber=48
Sep 26 23:50:12 kali kernel: [ 6749.548526] usb 1-1.4: Product: UB91C
Sep 26 23:50:12 kali kernel: [ 6749.557935] usb 1-1.4: Manufacturer: ATHEROS
Sep 26 23:50:12 kali kernel: [ 6749.567854] usb 1-1.4: SerialNumber: 12345
Sep 26 23:50:12 kali kernel: [ 6749.592176] usb 1-1.4: ath9k_htc: Firmware htc_9271.fw requested
Sep 26 23:50:12 kali kernel: [ 6749.899058] usb 1-1.4: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
Sep 26 23:50:12 kali kernel: [ 6750.144463] ath9k_htc 1-1.4:1.0: ath9k_htc: HTC initialized with 33 credits
Sep 26 23:50:13 kali kernel: [ 6750.583687] ath9k_htc 1-1.4:1.0: ath9k_htc: FW Version: 1.3
Sep 26 23:50:13 kali kernel: [ 6750.594294] ath: EEPROM regdomain: 0x833a
Sep 26 23:50:13 kali kernel: [ 6750.594374] ath: EEPROM indicates we should expect a country code
Sep 26 23:50:13 kali kernel: [ 6750.594405] ath: doing EEPROM country->regdmn map search
Sep 26 23:50:13 kali kernel: [ 6750.594418] ath: country maps to regdmn code: 0x37
Sep 26 23:50:13 kali kernel: [ 6750.594463] ath: Country alpha2 being used: GB
Sep 26 23:50:13 kali kernel: [ 6750.594478] ath: Regpair used: 0x37
Sep 26 23:50:13 kali kernel: [ 6750.616382] ieee80211 phy25: Atheros AR9271 Rev:1


can this wakeup script be disabled? Edited by i8igmac
Link to comment
Share on other sites

The way I'm looking at it, the internal USB hub on your Pi seems to be a complete POS. Are your wifi adapters demanding more current from the USB port than the Pi can provide? Did you consider connecting everything up via a powered USB hub to see if the problems go away?

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...