LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Can't change MAC addres - ndiswrapper (https://www.linuxquestions.org/questions/linux-wireless-networking-41/cant-change-mac-addres-ndiswrapper-561015/)

bjeuk 06-11-2007 06:22 PM

Can't change MAC addres - ndiswrapper
 
Hi there..

I have successfully installed ndiswrapper v1.46 but, i can't change MAC address of my wireless card.First i tried to put NetworkAddress|0016E5BAFE82 in the config file,then 'modprobe -r ndiswrapper' and 'modprbe ndiswrapper'.This is the output of ifconfig
Code:

wlan0    Link encap:Ethernet  HWaddr 00:13:«»D4:«»D1:EE:62< my original MAC address
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:10 Memory:ed000000-ed010000

nothing happens only i got [code:1]Interrupt:10 Memory:ed000000-ed010000[/code:1]
Also, ifconfig wlan0 hw ether 00:00:00:00:00:01, for example, not work,the same ouput i got again... from dmesg
Code:

ndiswrapper: using IRQ 10
ndiswrapper (NdisFreeBuffer:1176): invalid buffer
ndiswrapper (NdisFreeBuffer:1176): invalid buffer
ndiswrapper (NdisFreeBuffer:1176): invalid buffer
ndiswrapper: device wlan0 removed
ACPI: PCI interrupt for device 0000:00:0e.0 disabled
usbcore: deregistering interface driver ndiswrapper
ndiswrapper version 1.46 loaded (smp=no)
ndiswrapper: driver mrv8ka51 (Marvell,05/20/2004,2.3.0.19) loaded
ACPI: PCI Interrupt 0000:00:0e.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10
PCI: Setting latency timer of device 0000:00:0e.0 to 64
ndiswrapper: using IRQ 10
wlan0: ethernet device 00:13:d4:d1:ee:62 using NDIS driver: mrv8ka51, version: 0x2030006, NDIS version: 0x501, vendor: 'Marvell 802.11 Driver', 11AB:1FA6.5.conf
ndiswrapper (set_encr_mode:673): setting encryption mode to 6 failed (C00000BB«»)
wlan0: encryption modes supported: WEP; TKIP with WPA
usbcore: registered new interface driver ndiswrapper
ndiswrapper (mp_set_power_state:410): wlan0 does not support power management; halting the device
ndiswrapper: using IRQ 10
ndiswrapper (mp_set_power_state:410): wlan0 does not support power management; halting the device
PCI: Setting latency timer of device 0000:00:0e.0 to 64
ndiswrapper: using IRQ 10
ndiswrapper (mp_set_power_state:410): wlan0 does not support power management; halting the device
PCI: Setting latency timer of device 0000:00:0e.0 to 64
ndiswrapper: using IRQ 10
ndiswrapper (mp_set_power_state:410): wlan0 does not support power management; halting the device
PCI: Setting latency timer of device 0000:00:0e.0 to 64
ndiswrapper: using IRQ 10

Debian Etch,kernel 2.6.20...any idea what to do?

camh 06-11-2007 10:38 PM

To use ifconfig to change it, i think you have to bring the device down, then back up. eg.
Code:

ifconfig wlan0 hw ether <mac> down && ifconfig wlan0 up

bjeuk 06-12-2007 02:55 AM

Quote:

Originally Posted by camh
To use ifconfig to change it, i think you have to bring the device down, then back up. eg.
Code:

ifconfig wlan0 hw ether <mac> down && ifconfig wlan0 up

thank you,but still nothing..

raalynthslair 06-24-2007 11:40 PM

Hello. I don't know if this will help or not but I googled the error message your dmesg log shows (the power management comment) and found a somewhat similar error from an Ubunutu Linux user on one of their forums. There was a pretty step-by-step helpful post that may help you some (there may be some differences (mainly where some files are located, from what I've seen playing with Debian-based distros in the past) but the bulk of the info should be relevant and hopefully helpful).

Here is the site address for the forum and the specific post I found.
http--ubuntuforums.org/archive/index.php/t-9454.html (had to hack the colon,slash,slash b/c I need to post here more to be able to put URL's in my posts - sorry forgot my old user name and created this one to replace it... *g*)

Winter Knight 10-07-2007 12:41 AM

Mac address changing has been broken in ndiswrapper for a long time. I use version 1.28. This version doesn't work with recent kernels, though.

I am using Debian Testing. Kernel 2.6.18-5 (latest Etch kernel). Ndiswrapper 1.28. And mac address changing works. Make sure you include the colons in the NetworkAddress line.

pappy_mcfae 10-22-2007 02:28 AM

first of all...
 
...I want to thank you for the question. It seems that every time I am at a point where I want to do something in Linux, I find that someone else has asked the question. I wanted to spoof my MAC address, just to say I could...so I started reading here, went to the ndiswrapper home page, and I did a quick RTFM. It is there I found this tidbit...
Quote:

You can change the MAC address used by the card by changing the setting ‘NetworkAddress’ in .conf files in /etc/ndiswrapper/driver. You can either edit all .conf files there or edit the file used by your card which is printed when the driver is loaded. If the .conf file(s) don’t already have ‘NetworkAddress’ setting, add one. For example, if you want MAC address to be, say, 00:16:E5:BA:FE:82, add/change the line NetworkAddress|0016E5BAFE82 and reload the module (NOTE: there are no ‘:’s in the setting). This will change the MAC address for every use. If you want to change the MAC address temporarily, run ‘ifconfig wlan0 hw ether 00:16:E5:BA:FE:82’.
I did just that, and it worked flawlessly. I have two laptops. They are both equipped with Broadcom adapters. I use ndiswrapper and wpa_supplicant to get things running.

Both machines are running ndiswrapper 1.47, wpa_supplicant-0.5.8, and Slackware-12. I compiled both ndiswrapper and wpa_supplicant from source. Since you don't mention whether you are using the Debian pre-compiled version (according to the Debian site, there are five different ndiswrapper packages available), or the source version, it is hard to tell whether your problem is related to missing a needed file from one of those packages, or something else entirely.

My strong suggestion is to get ndiswrapper version 1.47 as source. Don't try 1.48 unless you have kernel version 2.6.23.x. It locked both my machines. Compile it, and continue to use the .conf file you have been using. For your edification, here is the .conf file I use for this machine. It definitely works!

Code:

NdisVersion|0x50001
Environment|1
class_guid|4d36e972-e325-11ce-bfc1-08002be10318
mac_address|
NetworkAddress|00BB9AD2CDAB
driver_version|Broadcom,10/12/2006, 4.100.15.5
BusType|5
SlotNumber|01

Afterburner|1
BTCoexist|1
BadFramePreempt|0
Chanspec|6
Country|US
EFCEnable|0
EnableAutoConnect|0
EnableSoftAP|0
FrameBursting|1
HelpText|The Broadcom 802.11 Network Adapter provides wireless local area networking.
IBSSGProtection|2
IBSSMode|0
Interference_Mode|-1
MPC|1
Managed|0
MixedCell|0
NetworkAddress|
NetworkType|-1
PLCPHeader|0
PowerSaveMode|0
PwrOut|100
Rate|0
RoamTrigger|0
SSID|
Service|BCM43XX
WEP|
WME|-1
WZCCoexist|0
ccx_rm_limit|300
ccx_rm|1
frag|2346
ledbh0|-1
ledbh1|-1
ledbh2|-1
ledbh3|-1
leddc|0xa0000
rts|2347
scan_channel_time|-1
scan_home_time|-1
scan_passes|-1
scan_unassoc_time|-1
ssid_auto_promote|0
vlan_mode|-1

Hope that helps. Sorry I am not too up on Debian, but I only run it on my print server. That machine isn't equipped with a wireless adapter (yet).

Blessed be!
Pappy

Winter Knight 01-15-2008 11:38 PM

ndiswrapper fixed some MAC address changing bugs.
 
How is this going for you? Have you got it to work, yet? Like I said earlier, mac address changing had been broken in ndiswrapper for a long time.

The good news is that ndiswrapper fixed some mac address related bugs in version 1.50. 1.50 works for me. Maybe it will work for you, too.

werewolfy 02-02-2010 01:28 PM

Take a look at the 3rd post here:
 
http://www.damnsmalllinux.org/dsl-n/f/viewpost/969.html

agricolae 02-03-2010 05:15 PM

The key step to changing the MAC address is to first bring your card down: "ifconfig wlan0 down". Then, use whatever method you find most convenient:
Code:

ifconfig wlan0 hw ether M:A:C:A:D:D:R:E:S:S:X:X && ifconfig wlan0 up
or

Code:

ifconfig wlan0 down && macchanger -a wlan0 && ifconfig wlan0 up
The macchanger utility with the '-a' flag will generate a random MAC. Read the 'man' file for other options. One may also do this in a startup script with an alternate permanent MAC address of choice.

Of course, with ndiswrapper, for a permanent alternate MAC address there is an additional step of adding the desired MAC address to the ndiswrapper driver configuration file & since it's been over 10 years since I've used the ndiswrapper utility, the details are a little foggy to me.

~A~


All times are GMT -5. The time now is 02:14 AM.