Fluxion: Device or resource busy after seconds

Created on 20 Aug 2017  路  35Comments  路  Source: FluxionNetwork/fluxion

Do you want to request a feature or report a bug?

-> Bug

What is the current behavior?

-> Get error about interface down after seconds.

If the current behavior is a bug, please provide the steps to reproduce.

ifconfig wlan1 down
export FLUXIONDebug=1; ./fluxion.sh

selected wlan1 and search all channels. After seconds, get error "Device or resource busy"
screenshot from 2017-08-20 10-06-35

After that, I run fluxion again, but select interface FXan1AP. Now its works.
screenshot from 2017-08-20 10-18-36

What is the expected behavior?

->

If this is a feature request, what is motivation or use case for changing the behavior?

Specs

Wireless adapter:

Bus 002 Device 002: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 255 Vendor Specific Protocol
bMaxPacketSize0 64
idVendor 0x0cf3 Atheros Communications, Inc.
idProduct 0x9271 AR9271 802.11n
bcdDevice 1.08
iManufacturer 16 ATHEROS
iProduct 32 UB91C
iSerial 48 12345
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 60
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 6
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 255 Vendor Specific Protocol
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)

Does it support injection?

root@hostname:~/github/fluxion# aireplay-ng -9 wlan1
ioctl(SIOCSIWMODE) failed: Device or resource busy
10:40:02 Trying broadcast probe requests...
10:40:02 Injection is working!

Fluxion version:

root@hostname:~/github/fluxion# cat fluxion.sh | grep revision
FLUXIONOnlineInfo=("version=?\n" "revision=?\n")
FLUXIONOnlineRevision=$(echo "${FLUXIONOnlineInfo[@]}" | awk -F= 'tolower($1)~/revision/{print $2}')
echo -ne $CRed" New revision found! "$CYel

Linux version:

Linux version 4.9.0-kali4-amd64 ([email protected]) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2kali1 (2017-06-22)

Specifications:

root@hostname:~/github/fluxion# grep -E 'FLUXIONVersion=|FLUXIONRevision=' fluxion.sh && cat /proc/version && airmon-ng && aireplay-ng wlan1 -9
FLUXIONVersion=3
FLUXIONRevision=1
Linux version 4.9.0-kali4-amd64 ([email protected]) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2kali1 (2017-06-22)

PHY Interface Driver Chipset

phy1 FXan1AP ath9k_htc Atheros Communications, Inc. AR9271 802.11n
phy1 FXan1APAP ath9k_htc Atheros Communications, Inc. AR9271 802.11n
phy0 wlan0 iwlwifi Intel Corporation Centrino Wireless-N + WiMAX 6150 (rev 67)
phy1 wlan1 ath9k_htc Atheros Communications, Inc. AR9271 802.11n

ioctl(SIOCSIWMODE) failed: Device or resource busy
10:42:26 Trying broadcast probe requests...
10:42:26 Injection is working!

Most helpful comment

@marcusguita If you don't want to be typing export FLUXIONWIKillProcesses=1 every time, do this:
Make a file called preferences.sh on the fluxion directory, and add the following to it:

#!/bin/bash
export FLUXIONWIKillProcesses=1

Then make it executable with:

chmod u+x preferences.sh

Now you'll be able to just call fluxion normally: ./fluxion.sh

All 35 comments

Install drivers properly and try it again.

https://github.com/FluxionNetwork/fluxion/wiki/Patch-driver

@deltaxflux I patched drivers but get same behavior... How can I check if drivers is it ok? I didnt get error on make and make install drivers. I rebooted after install. Thanks!

It seems like there's a process interfering with the interface, try this:

export FLUXIONDropNet=1; ./fluxion.sh

@MPX4132 I started with:

  • ifconfig wlan1 down
  • export FLUXIONDropNet=1; ./fluxion.sh

result after choice interface: "Unable to determine interface's physical device!"

screenshot from 2017-08-20 16-19-39

Try running it with even more flags:

export FLUXIONAirmonNG=1; export FLUXIONDropNet=1; ./fluxion.sh

edit: I'm pretty sure your issue has to do with a process interfering, or the wireless card is failing. I use the exact same chipset for testing. That means yours should work perfectly fine as well.

By the way, why are you doing ifconfig wlan1 down at the beginning?

With command:

  • export FLUXIONAirmonNG=1; export FLUXIONDropNet=1; ./fluxion.sh

I have same error ("Unable to determine interface's physical device!")

screenshot from 2017-08-20 16-33-38

Without "ifconfig wlan1 down" I can't choice interface... I have a loop:

screenshot from 2017-08-20 16-45-20

There's your problem. They're both purple because another process is using them. You need to stop whatever's using them. Bringing the interfaces down with ifconfig wlan1 down won't fix that problem. You found a bug, though, so I'll mark it as a bug.

You shouldn't have the first two interfaces:

phy1 FXan1AP ath9k_htc Atheros Communications, Inc. AR9271 802.11n
phy1 FXan1APAP ath9k_htc Atheros Communications, Inc. AR9271 802.11n
phy0 wlan0 iwlwifi Intel Corporation Centrino Wireless-N + WiMAX 6150 (rev 67)
phy1 wlan1 ath9k_htc Atheros Communications, Inc. AR9271 802.11n

Delete them with

iw dev FXan1AP del
iw dev FXan1APAP del

Interfaces FXan1AP shows after "fluxion scanner breaks" (first exec) and I start ./fluxion again...

I ran this commands (no interface found):
screenshot from 2017-08-20 17-06-46

complement:

root@hostname:~/github/fluxion# grep -E 'FLUXIONVersion=|FLUXIONRevision=' fluxion.sh && cat /proc/version && airmon-ng && aireplay-ng wlan1 -9
FLUXIONVersion=3
FLUXIONRevision=1
Linux version 4.9.0-kali4-amd64 ([email protected]) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2kali1 (2017-06-22)

PHY Interface Driver Chipset

phy0 wlan0 iwlwifi Intel Corporation Centrino Wireless-N + WiMAX 6150 (rev 67)
phy2 wlan1 ath9k_htc Atheros Communications, Inc. AR9271 802.11n

ioctl(SIOCSIWMODE) failed: Device or resource busy
17:10:15 Trying broadcast probe requests...
17:10:15 Injection is working!
17:10:16 Found 9 APs

Check if the latest commit still gives you the "Unable to determine interface's physical device" error.

The "FXan1AP" thing is fine, I think fluxion already got rid of it.

Show this now:

Syntax error after open:
screenshot from 2017-08-20 17-14-57

command not found (not show interfaces now)
screenshot from 2017-08-20 17-15-18

Since you're having trouble with interfering processes, just keep running fluxion with:

FLUXIONDropNet=1; ./fluxion.sh

When you use that flag you can select the purple interfaces. When the flag is used, fluxion aggressively loads and unloads the interface, killing all processes that try to interfere.

I'm sorry, I left outdated code in the program. Let me fix it.

Go ahead and try the latest commit.

Now, "error on line" is red...

screenshot from 2017-08-20 17-32-02

Ignore the Error on line message, it came up because you probably did export FLUXIONDebug=1; ./fluxion.sh and the killing services couldn't find avahi-daemon-ch.

Run the following and post the output:

ls -lAR /sys/class/net/wlan1/
root@hostname:~/github/fluxion# ls -lAR /sys/class/net/wlan1/
/sys/class/net/wlan1/:
total 0
-r--r--r-- 1 root root 4096 Aug 20 17:31 addr_assign_type
-r--r--r-- 1 root root 4096 Aug 20 17:31 address
-r--r--r-- 1 root root 4096 Aug 20 17:50 addr_len
-r--r--r-- 1 root root 4096 Aug 20 17:50 broadcast
-rw-r--r-- 1 root root 4096 Aug 20 17:50 carrier
-r--r--r-- 1 root root 4096 Aug 20 17:50 carrier_changes
lrwxrwxrwx 1 root root    0 Aug 20 17:31 device -> ../../../1-2:1.0
-r--r--r-- 1 root root 4096 Aug 20 17:34 dev_id
-r--r--r-- 1 root root 4096 Aug 20 17:31 dev_port
-r--r--r-- 1 root root 4096 Aug 20 17:50 dormant
-r--r--r-- 1 root root 4096 Aug 20 17:50 duplex
-rw-r--r-- 1 root root 4096 Aug 20 17:50 flags
-rw-r--r-- 1 root root 4096 Aug 20 17:50 gro_flush_timeout
-rw-r--r-- 1 root root 4096 Aug 20 17:50 ifalias
-r--r--r-- 1 root root 4096 Aug 20 17:31 ifindex
-r--r--r-- 1 root root 4096 Aug 20 17:31 iflink
-r--r--r-- 1 root root 4096 Aug 20 17:50 link_mode
-rw-r--r-- 1 root root 4096 Aug 20 17:50 mtu
-r--r--r-- 1 root root 4096 Aug 20 17:50 name_assign_type
-rw-r--r-- 1 root root 4096 Aug 20 17:50 netdev_group
-r--r--r-- 1 root root 4096 Aug 20 17:31 operstate
lrwxrwxrwx 1 root root    0 Aug 20 17:50 phy80211 -> ../../ieee80211/phy2
-r--r--r-- 1 root root 4096 Aug 20 17:34 phys_port_id
-r--r--r-- 1 root root 4096 Aug 20 17:31 phys_port_name
-r--r--r-- 1 root root 4096 Aug 20 17:50 phys_switch_id
drwxr-xr-x 2 root root    0 Aug 20 17:50 power
-rw-r--r-- 1 root root 4096 Aug 20 17:50 proto_down
drwxr-xr-x 7 root root    0 Aug 20 17:31 queues
-r--r--r-- 1 root root 4096 Aug 20 17:50 speed
drwxr-xr-x 2 root root    0 Aug 20 17:50 statistics
lrwxrwxrwx 1 root root    0 Aug 20 17:31 subsystem -> ../../../../../../../../../class/net
-rw-r--r-- 1 root root 4096 Aug 20 17:50 tx_queue_len
-r--r--r-- 1 root root 4096 Aug 20 17:31 type
-rw-r--r-- 1 root root 4096 Aug 20 17:31 uevent
drwxr-xr-x 2 root root    0 Aug 20 17:50 wireless

/sys/class/net/wlan1/power:
total 0
-rw-r--r-- 1 root root 4096 Aug 20 17:50 async
-rw-r--r-- 1 root root 4096 Aug 20 17:50 autosuspend_delay_ms
-rw-r--r-- 1 root root 4096 Aug 20 17:50 control
-r--r--r-- 1 root root 4096 Aug 20 17:50 runtime_active_kids
-r--r--r-- 1 root root 4096 Aug 20 17:50 runtime_active_time
-r--r--r-- 1 root root 4096 Aug 20 17:50 runtime_enabled
-r--r--r-- 1 root root 4096 Aug 20 17:50 runtime_status
-r--r--r-- 1 root root 4096 Aug 20 17:50 runtime_suspended_time
-r--r--r-- 1 root root 4096 Aug 20 17:50 runtime_usage

/sys/class/net/wlan1/queues:
total 0
drwxr-xr-x 2 root root 0 Aug 20 17:31 rx-0
drwxr-xr-x 3 root root 0 Aug 20 17:31 tx-0
drwxr-xr-x 3 root root 0 Aug 20 17:31 tx-1
drwxr-xr-x 3 root root 0 Aug 20 17:31 tx-2
drwxr-xr-x 3 root root 0 Aug 20 17:31 tx-3

/sys/class/net/wlan1/queues/rx-0:
total 0
-rw-r--r-- 1 root root 4096 Aug 20 17:50 rps_cpus
-rw-r--r-- 1 root root 4096 Aug 20 17:50 rps_flow_cnt

/sys/class/net/wlan1/queues/tx-0:
total 0
drwxr-xr-x 2 root root    0 Aug 20 17:50 byte_queue_limits
-rw-r--r-- 1 root root 4096 Aug 20 17:50 tx_maxrate
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_timeout
-rw-r--r-- 1 root root 4096 Aug 20 17:50 xps_cpus

/sys/class/net/wlan1/queues/tx-0/byte_queue_limits:
total 0
-rw-r--r-- 1 root root 4096 Aug 20 17:50 hold_time
-r--r--r-- 1 root root 4096 Aug 20 17:50 inflight
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit_max
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit_min

/sys/class/net/wlan1/queues/tx-1:
total 0
drwxr-xr-x 2 root root    0 Aug 20 17:50 byte_queue_limits
-rw-r--r-- 1 root root 4096 Aug 20 17:50 tx_maxrate
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_timeout
-rw-r--r-- 1 root root 4096 Aug 20 17:50 xps_cpus

/sys/class/net/wlan1/queues/tx-1/byte_queue_limits:
total 0
-rw-r--r-- 1 root root 4096 Aug 20 17:50 hold_time
-r--r--r-- 1 root root 4096 Aug 20 17:50 inflight
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit_max
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit_min

/sys/class/net/wlan1/queues/tx-2:
total 0
drwxr-xr-x 2 root root    0 Aug 20 17:50 byte_queue_limits
-rw-r--r-- 1 root root 4096 Aug 20 17:50 tx_maxrate
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_timeout
-rw-r--r-- 1 root root 4096 Aug 20 17:50 xps_cpus

/sys/class/net/wlan1/queues/tx-2/byte_queue_limits:
total 0
-rw-r--r-- 1 root root 4096 Aug 20 17:50 hold_time
-r--r--r-- 1 root root 4096 Aug 20 17:50 inflight
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit_max
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit_min

/sys/class/net/wlan1/queues/tx-3:
total 0
drwxr-xr-x 2 root root    0 Aug 20 17:50 byte_queue_limits
-rw-r--r-- 1 root root 4096 Aug 20 17:50 tx_maxrate
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_timeout
-rw-r--r-- 1 root root 4096 Aug 20 17:50 xps_cpus

/sys/class/net/wlan1/queues/tx-3/byte_queue_limits:
total 0
-rw-r--r-- 1 root root 4096 Aug 20 17:50 hold_time
-r--r--r-- 1 root root 4096 Aug 20 17:50 inflight
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit_max
-rw-r--r-- 1 root root 4096 Aug 20 17:50 limit_min

/sys/class/net/wlan1/statistics:
total 0
-r--r--r-- 1 root root 4096 Aug 20 17:50 collisions
-r--r--r-- 1 root root 4096 Aug 20 17:50 multicast
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_bytes
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_compressed
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_crc_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_dropped
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_fifo_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_frame_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_length_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_missed_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_nohandler
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_over_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 rx_packets
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_aborted_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_bytes
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_carrier_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_compressed
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_dropped
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_fifo_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_heartbeat_errors
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_packets
-r--r--r-- 1 root root 4096 Aug 20 17:50 tx_window_errors

/sys/class/net/wlan1/wireless:
total 0
root@hostname:~/github/fluxion# 

Thanks, now run these commands and post their output:

cat "/sys/class/net/wlan1/phy80211/name" && ls -l "/sys/class/net/wlan1/phy80211" | sed 's/^.*\/\([a-zA-Z0-9_-]*\)$/\1/'
root@hostname:~/github/fluxion# cat "/sys/class/net/wlan1/phy80211/name" && ls -l "/sys/class/net/wlan1/phy80211" | sed 's/^.*\/\([a-zA-Z0-9_-]*\)$/\1/'
phy2
phy2
root@hostname:~/github/fluxion# 

Hmm that's pretty weird. It's all working fine...

I dont know if its help, but, in old fluxion (https://fluxion.tk/fluxion-stable.zip) works without problem this part...

Ok, I just ran a small test. It seems like there's two possibilities:

  • Processes are still interfering somehow.
  • Your wireless device is disconnecting.

Your device could be failing, making it unstable. If you're using a device that has a USB cord, the cord might be going bad. The USB port might be going bad, or the device's USB port might be going bad. The results you gave are consistent with random device disconnections.

This doesn't seem to be a problem with fluxion.

As a last effort, check that fluxion's interface library is working. Go into the fluxion directory (not the lib directory), and run:

source lib/InterfaceUtils.sh; interface_physical "wlan1"; echo "$InterfacePhysical"

That should give you something like "phy#" where '#' is a number. If it does in fact give you what I said, your issue isn't related to fluxion.

@marcusguita I just found an issue with FLUXIONDropNet, give me a couple of minutes to check it out.
edit: The problem is caused by FLUXIONDropNet not waiting for the interface to get ready. Give me a moment to see if I can come up with a decent solution.

about command: source lib/InterfaceUtils.sh; interface_physical "wlan1"; echo "$InterfacePhysical"

screenshot from 2017-08-20 18-51-02

Try the latest commit, but run it with the FLUXIONDropNet flag:

export FLUXIONDropNet=1; ./fluxion.sh

Now stops here: "Waiting for interface "wlan1"..."

screenshot from 2017-08-20 19-07-33

Try the latest commit with the new flag, FLUXIONDropNet was removed:

export FLUXIONWIKillProcesses=1; ./fluxion.sh

edit: If that doesn't work, restart your computer and try again.

@MPX4132 You are the best!!!! Its perfect now. Many thanks!!!

@marcusguita I wouldn't download the program from that site (https://fluxion.tk/fluxion-stable.zip). @deltaxflux do you know anything about it, is it safe for people to download things from that site? I don't think I've seen any mentions of that domain in this repository, leading me to believe it's a third party.

edit: The site is safe.

@marcusguita If you don't want to be typing export FLUXIONWIKillProcesses=1 every time, do this:
Make a file called preferences.sh on the fluxion directory, and add the following to it:

#!/bin/bash
export FLUXIONWIKillProcesses=1

Then make it executable with:

chmod u+x preferences.sh

Now you'll be able to just call fluxion normally: ./fluxion.sh

@MPX4132 it is my site. I use it after I removed my fluxion.git earlier.

@deltaxflux Oh ok, I updated my comment.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brunoaduarte picture brunoaduarte  路  7Comments

christiantokevin picture christiantokevin  路  16Comments

SyntaxError843 picture SyntaxError843  路  9Comments

Eladtopaz picture Eladtopaz  路  8Comments

kandarpgautam picture kandarpgautam  路  15Comments