Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Macchanger: interface up or not permission BCM4313 [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Fri Dec 30, 2011 2:17 am    Post subject: Macchanger: interface up or not permission BCM4313 [SOLVED] Reply with quote

I have macchanger in 2 systems and it works wel in one but not on the other.
Regardless of having the eth* up or down the error is always the same.

Code:
# macchanger -r eth1
Current MAC: 11:22:33:44:55:00 (unknown)
ERROR: Can't change MAC: interface up or not permission: Too many open files in system


However it does change the mac but does not show the change.

Trying to set the mac using ifconfig also outputs an error:
Code:
SIOCSIFHWADDR: Too many open files in system


I thought if this would be related to system limits but i get:
Code:
# ulimit
unlimited


I also found this similar topic but without a solution and i wonder if it might be related to this.

Package version:

Code:
# macchanger -V
GNU MAC changer 1.5.0
Written by Alvaro Lopez Ortega <alvaro@gnu.org>

Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Any suggestions ?
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244


Last edited by HeXiLeD on Sun Jul 29, 2012 2:53 am; edited 2 times in total
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 438

PostPosted: Fri Dec 30, 2011 8:15 am    Post subject: Reply with quote

For many of the network related ioctls and netlink commands, the usual error codes are "overloaded" to mean different things. For example, when tryign to add a route that exlready exists (or would conflict) the system returns -EEXIST ("File exists"). Unfortunately the tools blindly perror() the result, so the errors are often misleading.

In this case, the SIOCSIFHWADDR ioctl is returning -ENFILE (Too many open files in system). However, that's not one of the usual returns for that function, so the error may be coming from the NIC driver. What driver is the NIC using?
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Sat Dec 31, 2011 5:18 pm    Post subject: Reply with quote

Code:
*  net-wireless/broadcom-sta
      Latest version available: 5.100.82.112-r2
      Homepage:      http://www.broadcom.com/support/802.11/linux_sta.php
      Description:   Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver.
      License:       Broadcom

_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 438

PostPosted: Sat Dec 31, 2011 9:56 pm    Post subject: Reply with quote

Unfortunately that driver is just binary blob with Linux wrapping. Only Broadcom can help you with them.

However your wireless device MIGHT be supported by the linux open-source b43 driver: http://linuxwireless.org/en/users/Drivers/b43 or brcm80211: http://linuxwireless.org/en/users/Drivers/brcm80211 (in staging). You'll need to use lspci to find your chipset.
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Sat Dec 31, 2011 11:41 pm    Post subject: Reply with quote

I have tried another driver before but without much success. At the time some drivers seemed to work well for somethings but not for all. Maybe there is a new update now.

The nic is:
Code:
02:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)

Extra detailed hardware info can be seen here.
and the computer wiki page here.

It is an Asus eeepc 1015ped
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244


Last edited by HeXiLeD on Mon Jan 02, 2012 1:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 438

PostPosted: Sun Jan 01, 2012 12:32 am    Post subject: Reply with quote

That chipset (BCM4313) isn't currently supported by the b43 drivers (but it is being worked on), however it IS supported by brcm80211 (lshal shows a PCI ID of (14e4:4727).

This driver was only moved out of staging very recently - it occurred after 3.1 was released - in (3.2-rc1). So at this point you have 3 options:

1) Wait until 3.2 is released (very soon)
2) Use the latest 3.2-rcX kernel
3) Use the staging driver if have an older kernel (not recommended as this drivers has had many change to it since 3.0 was released)

The config option you want is called BRCMSMAC . You also need the firmware files - emerge the linux-firmware packages (the BCM4313 firmware was added upstream April 26 2011, so the lastest stable - 20110731 should have the firmware you need.
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Fri Jan 13, 2012 4:58 pm    Post subject: Reply with quote

I upgraded to vanilla-sources 3.2.1 and recompiled with recommeded support however something seems not to be working:

Code:
 # lsmod
Module                  Size  Used by
brcmsmac              472818  0
brcmutil                2707  1 brcmsmac
crc8                     920  1 brcmsmac
cordic                   865  1 brcmsmac


Code:
*  sys-kernel/linux-firmware
      Latest version available: 20110818
      Latest version installed: 20110818
      Size of files: 15,648 kB
      Homepage:      http://www.kernel.org/pub/linux/kernel/people/dwmw2/firmware
      Description:   Linux firmware files
      License:       GPL-1 GPL-2 GPL-3 BSD freedist



Code:
# lspci -v

02:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)
        Subsystem: AzureWave Device 2047
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at fbffc000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [58] Vendor Specific Information: Len=78 <?>
        Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [d0] Express Endpoint, MSI 00
        Kernel driver in use: brcmsmac
        Kernel modules: wl, brcmsmac


Code:

 # ifconfig  eth1 up
eth1: ERROR while getting interface flags: No such device


Either this driver does not supports the nic or something may be missing.
Any ideas?
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 438

PostPosted: Sun Jan 15, 2012 2:00 am    Post subject: Reply with quote

is the device still eth1? With the new driver it might something else like wlan0. You can use 'ip link' to see the names of the adapters.
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Sun Jan 15, 2012 5:17 pm    Post subject: Reply with quote

Negative result with ip link. I also checked udev and net rules configuration files.
Perhaps some extra missing details.
I updated all my hardware infos
Check out dmesg and the latest kernel.
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 438

PostPosted: Wed Jan 18, 2012 4:52 am    Post subject: Reply with quote

Here's the problem:
Code:

ieee80211 phy0: Failed to select rate control algorithm
ieee80211 phy0: Failed to initialize rate control algorithm
ieee80211 phy0: brcms_attach: ieee80211_register_hw failed, status-2

Not sure why is doing it, though. Make sure you have the firmware in /lib/firmware, and blacklist any other Broadcomm drivers ( bcma,b43,b43legacy,brcm80211,ssb) /etc/modprobe.d/blacklist.conf; you may need to rebuild your initramfs (if you are using one) after blacklist as well.
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Fri Feb 24, 2012 8:22 pm    Post subject: Reply with quote

Kernel Vanilla sources 3.2.6
Code:

# lsmod

Module                  Size  Used by
brcmsmac              472882  0
mac80211              175526  1 brcmsmac
brcmutil                2707  1 brcmsmac
cfg80211              140086  2 brcmsmac,mac80211


Code:
# dmesg | grep ieee80211

ieee80211 phy0: Failed to select rate control algorithm
ieee80211 phy0: Failed to initialize rate control algorithm
ieee80211 phy0: brcms_attach: ieee80211_register_hw failed, status-2



Code:
# emerge -pv sys-kernel/linux-firmware

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] sys-kernel/linux-firmware-20110818  USE="-savedconfig" 0 kB


Code:
 ls /lib/firmware/ | grep brcm
brcm


Code:
 # ls /lib/firmware/brcm/       
bcm4329-fullmac-4.bin  bcm4329-fullmac-4.txt  bcm43xx-0.fw  bcm43xx_hdr-0.fw


Code:
/etc/modprobe.d/blacklist.conf

# This file lists modules which will not be loaded by udev,
# not at coldplugging and not on hotplug events.

# Add your own entries to this file
# in the format "blacklist <name of module>"

# Some examples:
# evbug is a debug tool and should be loaded explicitly
blacklist evbug

# Autoloading eth1394 most of the time re-orders your network
# interfaces, and with buggy kernel 2.6.21, udev persistent-net
# is not able to rename these devices, so you get eth?_rename devices
# plus an exceeded 30sec boot timeout
blacklist eth1394

# You probably want this to not get the console beep loud on every tab :)
#blacklist pcspkr

# these drivers are very simple, the HID drivers are usually preferred
#blacklist usbmouse
#blacklist usbkbd

# Sometimes loading a framebuffer driver at boot gets the console black
#install pci:v*d*sv*sd*bc03sc*i* /bin/true

# hplip and cups 1.4+ use raw USB devices, so it requires usblp not be loaded
#blacklist usblp

blacklist ieee80211
blacklist bcma                           
blacklist b43legacy
blacklist brcm8021
blacklist ssb



Code:
 # iwconfig
lo        no wireless extensions.

usb0      no wireless extensions.

tunl0     no wireless extensions.

eth0      no wireless extensions.



initramfs does not exist or is used and the current kernel config is here.
The current loaded drivers are what a friend of mine has on his system and works.
I am out of ideas.
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Sun Feb 26, 2012 12:10 am    Post subject: Reply with quote

I found someone with a similar problem and some workaround. However it does not work for me.

salahx wrote:
Not sure why is doing it, though. Make sure you have the firmware in /lib/firmware, and blacklist any other Broadcomm drivers ( bcma,b43,b43legacy,brcm80211,ssb) /etc/modprobe.d/blacklist.conf


I also found that my kernel 3.2.7 config insists in the following:

Code:
# cat /usr/src/linux/.config| grep BCMA
CONFIG_BCMA_POSSIBLE=y
# CONFIG_BCMA is not set


I unselected all Broadcom Specific AMBA options but that setting persists no matter what. Even when editing the config manually and saving it does not work once make is executed the config changes and sets that option again.

However this says

Code:
The driver is also available in the 3.2 and newer kernels. When using 'make menuconfig' it can be accessed:

Location: -> Device Drivers
-> Network device support
-> Wireless LAN
-> < > Broadcom IEEE802.11n PCIe SoftMAC WLAN driver
-> < > Broadcom IEEE802.11n embedded FullMAC WLAN driver
-> [ ] SDIO bus interface support for FullMAC driver
-> [ ] USB bus interface support for FullMAC driver


For the PCIe SoftMAC WLAN driver (brcmsmac) you need to enable select the BCMA bus driver as well:

Code:
Location: -> Device Drivers

-> Broadcom specific AMBA
-> <M> BCMA support
-> [*] Support for BCMA on PCI-host bus


I will try a few compiles and then post the results as well as a working kernel.
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Sun Feb 26, 2012 2:42 am    Post subject: Reply with quote

Finally i was able to get the driver to work.
The working config is here

I added the kernel support that is related to minstrel_ht rate algorithm

The wlan interface is now up and running; however i cant macchage it as the errors still persist. In fact now the mac does not even change at all.

Code:
ERROR: Can't change MAC: interface up or not permission: Device or resource busy


Any ideas?
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15984

PostPosted: Sun Feb 26, 2012 5:15 am    Post subject: Reply with quote

HeXiLeD wrote:
The wlan interface is now up and running
Code:
ERROR: Can't change MAC: interface up or not permission: Device or resource busy
Any ideas?
Most drivers refuse to change their interface MAC address when the interface is up. You stated you have the interface up, so it is likely that this is the cause.
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Sun Feb 26, 2012 7:23 am    Post subject: Reply with quote

Yes you are correct i was just recompiling to troubleshoot details and saw that.

Code:
ifconfig wlan0 down
macchanger -r
ifconfig wlan0 up


Topic is SOLVED
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
darktowermage
n00b
n00b


Joined: 31 Jul 2012
Posts: 1

PostPosted: Wed Aug 01, 2012 3:02 pm    Post subject: Reply with quote

I have also been trying to get my bcm4313 card to allow mac changing but don't follow what exactly resolved the problem for you. Would you be willing to walk me through the steps that worked. Any and all help is greatly appreciated!!

Here's my error, which looks like your original.

macchanger -r eth1
Permanent MAC: 00:00:00:00:00:00 (Xerox Corporation)
Current MAC: c0:cb:38:18:03:43 (Hon Hai Precision Ind. Co.,ltd.)
ERROR: Can't change MAC: interface up or not permission: Operation not permitted

And some additional info:

-Version-
Kernel : Linux 3.2.0-27-generic (x86_64)
Compiled : #43-Ubuntu SMP Fri Jul 6 14:25:57 UTC 2012
C Library : Unknown
Default C Compiler : GNU C Compiler version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Distribution : Ubuntu 12.04 LTS
Desktop Environment : Unity (ubuntu)


macchanger -V
GNU MAC changer 1.5.0
Written by Alvaro Lopez Ortega <alvaro@gnu.org>

Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

sudo lsmod
lib80211_crypt_tkip 17390 0
lib80211 14381 2 lib80211_crypt_tkip,wl
wl 2568210 0


lshw

*-pci:1
description: PCI bridge
product: 5 Series/3400 Series Chipset PCI Express Root Port 2
vendor: Intel Corporation
physical id: 1c.1
bus info: pci@0000:00:1c.1
version: 06
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:41 ioport:2000(size=4096) memory:fbe00000-fbefffff ioport:d0a00000(size=2097152)
*-network
description: Wireless interface
product: BCM4313 802.11b/g/n Wireless LAN Controller
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:12:00.0
logical name: eth1
version: 01
serial: c0:cb:38:18:03:43
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=wl0 driverversion=5.100.82.38 ip=172.20.238.119 latency=0 multicast=yes wireless=IEEE 802.11
resources: irq:17 memory:fbe00000-fbe03fff
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Wed Aug 01, 2012 9:03 pm    Post subject: Reply with quote

Reading the topic with attention instead of sending private messages crying for help or post almost irrelevant information about your problem will get you better results solving the problem for you. (That is if on ubuntu people were taught how to think using the terminal)

salahx wrote:
Unfortunately that driver is just binary blob with Linux wrapping. Only Broadcom can help you with them.

However your wireless device MIGHT be supported by the linux open-source b43 driver: http://linuxwireless.org/en/users/Drivers/b43 or brcm80211: http://linuxwireless.org/en/users/Drivers/brcm80211 (in staging). You'll need to use lspci to find your chipset.


The brcm80211 is out of staging and has now been enhanced in the latest stable kernel. (Assuming you know what is the "latest kernel").

You are using Broadcom.

Code:
wl 2568210 0


Typical from an ubuntu user. Does not read, does not care to read, does not make an effort to read or to be useful to his community (or others; hence why sending private messages) and uses ubuntu because it "reminds him of windows" and the mouse is all he/she needs. What happened to your forums ? People lost the terminal ? compiling too *hard* ?

Read the topic carefully. You might have to recompile the kernel *SCARY*

Note: This is a gentoo forum. People know what they use and the tools to troubleshoot it. You may want to stay out of it or change your distro if you intend to seriously learn. We help in community means for all to benefit and NOT on private messages.
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1092
Location: Online

PostPosted: Sun Aug 05, 2012 2:34 pm    Post subject: Reply with quote

Flawlessly working with brcmsmac opensource driver.

kernel using Broadcom brcmsmac opensource (PCIe) driver:
Code:
[*] Networking support  --->
 -*-   Wireless  --->
  <M>   cfg80211 - wireless configuration API
  [*]     enable powersave by default (optional)
  [*]     cfg80211 wireless extensions compatibility
  [*]   Wireless extensions sysfs files
  <M>   Generic IEEE 802.11 Networking Stack (mac80211)
  [*]   Minstrel
  [*]     Minstrel 802.11n support
  [*]   Enable mac80211 mesh networking (pre-802.11s) support '(optional/for mesh networks)
 <*>   RF switch subsystem support  --->
  [*]   RF switch input support
Device Drivers  --->
 [*] Network device support  --->
   [*]   Wireless LAN  --->
    <M>   Broadcom IEEE802.11n PCIe SoftMAC WLAN driver
 Broadcom specific AMBA  --->
  <*> BCMA support
  [*]   Support for BCMA on PCI-host bus


Driver instalation:
Code:
# echo modules="brcmsmac brcmutil mac80211 cfg80211" >> /etc/conf.d/modules

Driver name brcmsmac

Code:
# emerge linux-firmware


Code:
# lsmod
Module                  Size  Used by
brcmsmac              456307  0
mac80211              207812  1 brcmsmac
brcmutil                2432  1 brcmsmac
cfg80211              140101  2 brcmsmac,mac80211


Fully tested with EEEPC 1015PED
Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01) Subsystem: AzureWave Device 2047 BCM4313 802.11b/g/n Wireless LAN Controller
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum