Thread: [Madwifi-users] Change MacAddr through madwifi sources?
Status: Beta
Brought to you by:
otaku
From: fronteiradigital <fro...@gm...> - 2008-10-24 18:13:23
|
Hi, I need to change my MacAddr and every single method i tryed failed (including the wiki instructions on this issue). So, i was wondering if anyone knows how to change it through the source code... Thx |
From: Jason <ma...@la...> - 2008-10-24 18:26:13
|
fronteiradigital wrote: > I need to change my MacAddr and every single method i tryed failed > (including the wiki instructions on this issue). > So, i was wondering if anyone knows how to change it through the source > code... Shouldn't be necessary. Did you try the following? # kill wpa_supplicant, dhcp, that are running on ath0, then ifconfig ath0 down wlanconfig ath0 destroy macchanger -r wifi0 --OR-- macchanger -m $MAC wifi0 --OR-- ifconfig wifi0 hw ether $MAC wlanconfig ath0 create wlandev wifi0 ifconfig ath0 up Should be changed. hth, Jason. |
From: Jason <ma...@la...> - 2008-10-24 18:48:36
|
Please make sure to CC the list... fronteiradigital wrote: > Yes. I tried every method including the wiki instructions about this issue. > > wlanconfig ath0 destroy > ip link set dev wifi0 down > macchanger -m 00:01:02:03:04:05 wifi0 > sysctl -w dev.wifi0.ledpin=3 (This will enable the blinking leds) > sysctl -w dev.wifi0.softled=1 (The same) > ip link set dev wifi0 up > wlanconfig ath0 create wlandev wifi0 wlanmode sta > > Didn't work. > Changing it in the source would solve it for sure, but, there is SO MUCH > CODE... (where should i start?) How are you confirming the change (or lack thereof)? I do it every day and for years now on most versions of madwifi. It definitely works. Changing it in the source is not the answer (although it would work). Something else is wrong. How about a little more info? What distro are you using, version of madwifi? Version of the kernel? mods you have made? Jason. |
From: fronteiradigital <fro...@gm...> - 2008-10-24 19:17:28
|
Jason wrote: > Please make sure to CC the list... > > fronteiradigital wrote: > >> Yes. I tried every method including the wiki instructions about this issue. >> >> wlanconfig ath0 destroy >> ip link set dev wifi0 down >> macchanger -m 00:01:02:03:04:05 wifi0 >> sysctl -w dev.wifi0.ledpin=3 (This will enable the blinking leds) >> sysctl -w dev.wifi0.softled=1 (The same) >> ip link set dev wifi0 up >> wlanconfig ath0 create wlandev wifi0 wlanmode sta >> >> Didn't work. >> Changing it in the source would solve it for sure, but, there is SO MUCH >> CODE... (where should i start?) >> > > How are you confirming the change (or lack thereof)? I do it every day > and for years now on most versions of madwifi. It definitely works. > Changing it in the source is not the answer (although it would work). > Something else is wrong. > > How about a little more info? What distro are you using, version of > madwifi? Version of the kernel? mods you have made? > > Jason. > > ------------------------------------INFO------------------------------------ lspci -nn Ethernet controller [0200]: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01) madwifi version /usr/src/madwifi-hal-0.10.5.6-r3861-20080903 Ubuntu 8.04 original kernel version 2.6.24-21-generic wpa_supplicant version 0.5.8 ---------------------------------PROBLEMS--------------------------------- Connection with unecncrypted AP works perfetctly. (In fact, it's the best wifi card I ever got) Connection with WPA protected and MAC addr filtering don't. Couldn't test WPA without MAC filtering, so, i really don't know if it is a problem with wpa_supplicant, but i am quite sure it is not. It's the same behaviour when i don't change my Mac addr and try to connect. CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys I want to make sure my Mac addr is changed by hardcoding to the source. So, i found this comment inside ". Looks interesting. /* * Define the scheme that we select MAC address for multiple BSS on the same radio. * The very first VAP will just use the MAC address from the EEPROM. * For the next 3 VAPs, we set the U/L bit (bit 1) in MAC address, * and use the higher bits as the index of the VAP. */ I want to use the MAC addr from my old laptop so I don't have to wait weeks for the crazy burocracy. |
From: Jason <ma...@la...> - 2008-10-24 20:37:41
|
fronteiradigital wrote: > > > Jason wrote: >> Please make sure to CC the list... >> >> fronteiradigital wrote: >> >>> Yes. I tried every method including the wiki instructions about this >>> issue. >>> >>> wlanconfig ath0 destroy >>> ip link set dev wifi0 down >>> macchanger -m 00:01:02:03:04:05 wifi0 >>> sysctl -w dev.wifi0.ledpin=3 (This will enable the blinking >>> leds) >>> sysctl -w dev.wifi0.softled=1 (The same) >>> ip link set dev wifi0 up >>> wlanconfig ath0 create wlandev wifi0 wlanmode sta >>> >>> Didn't work. >>> Changing it in the source would solve it for sure, but, there is SO MUCH >>> CODE... (where should i start?) >>> >> >> How are you confirming the change (or lack thereof)? I do it every day >> and for years now on most versions of madwifi. It definitely works. >> Changing it in the source is not the answer (although it would work). >> Something else is wrong. >> >> How about a little more info? What distro are you using, version of >> madwifi? Version of the kernel? mods you have made? >> >> Jason. >> >> > ------------------------------------INFO------------------------------------ > > lspci -nn > Ethernet controller [0200]: Atheros Communications Inc. AR242x > 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01) > > madwifi version > /usr/src/madwifi-hal-0.10.5.6-r3861-20080903 > > Ubuntu 8.04 original kernel version > 2.6.24-21-generic > > wpa_supplicant version > 0.5.8 > ---------------------------------PROBLEMS--------------------------------- > Connection with unecncrypted AP works perfetctly. (In fact, it's the > best wifi card I ever got) > Connection with WPA protected and MAC addr filtering don't. > I'll bet this is your problem. I've noticed that madwifi/Atheros sometimes fubar's the mac like so. If I think it is 00:11:22:33:44:55, what is in the air is 06:11:22:33:44:55. Or vice versa. I'm not sure why it happens... Try changing that first octet in your mac. You may have to OR it. > Couldn't test WPA without MAC filtering, so, i really don't know if it > is a problem with wpa_supplicant, but i am quite sure it is not. It's > the same behaviour when i don't change my Mac addr and try to connect. > Why can't you apply the mac filter on the AP without WPA? Nevermind, see below. As an aside, you may want to set up another machine with kismet or wireshark running to confirm the address change. > I want to use the MAC addr from my old laptop so I don't have to wait > weeks for the crazy burocracy. Ahhh... I see. You don't have access to the AP. Try the hint I suggested above. I like where your going in the code. I'll take a look at it tonight and see if I can dig up anything... Jason. |
From: fronteiradigital <fro...@gm...> - 2008-10-29 18:43:33
|
Jason wrote: > fronteiradigital wrote: > >> Jason wrote: >> >>> Please make sure to CC the list... >>> >>> fronteiradigital wrote: >>> >>> >>>> Yes. I tried every method including the wiki instructions about this >>>> issue. >>>> >>>> wlanconfig ath0 destroy >>>> ip link set dev wifi0 down >>>> macchanger -m 00:01:02:03:04:05 wifi0 >>>> sysctl -w dev.wifi0.ledpin=3 (This will enable the blinking >>>> leds) >>>> sysctl -w dev.wifi0.softled=1 (The same) >>>> ip link set dev wifi0 up >>>> wlanconfig ath0 create wlandev wifi0 wlanmode sta >>>> >>>> Didn't work. >>>> Changing it in the source would solve it for sure, but, there is SO MUCH >>>> CODE... (where should i start?) >>>> >>>> >>> How are you confirming the change (or lack thereof)? I do it every day >>> and for years now on most versions of madwifi. It definitely works. >>> Changing it in the source is not the answer (although it would work). >>> Something else is wrong. >>> >>> How about a little more info? What distro are you using, version of >>> madwifi? Version of the kernel? mods you have made? >>> >>> Jason. >>> >>> >>> >> ------------------------------------INFO------------------------------------ >> >> lspci -nn >> Ethernet controller [0200]: Atheros Communications Inc. AR242x >> 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01) >> >> madwifi version >> /usr/src/madwifi-hal-0.10.5.6-r3861-20080903 >> >> Ubuntu 8.04 original kernel version >> 2.6.24-21-generic >> >> wpa_supplicant version >> 0.5.8 >> ---------------------------------PROBLEMS--------------------------------- >> Connection with unecncrypted AP works perfetctly. (In fact, it's the >> best wifi card I ever got) >> Connection with WPA protected and MAC addr filtering don't. >> >> > > I'll bet this is your problem. I've noticed that madwifi/Atheros > sometimes fubar's the mac like so. If I think it is 00:11:22:33:44:55, > what is in the air is 06:11:22:33:44:55. Or vice versa. I'm not sure > why it happens... Try changing that first octet in your mac. You may > have to OR it. > > >> Couldn't test WPA without MAC filtering, so, i really don't know if it >> is a problem with wpa_supplicant, but i am quite sure it is not. It's >> the same behaviour when i don't change my Mac addr and try to connect. >> >> > > Why can't you apply the mac filter on the AP without WPA? Nevermind, > see below. > > As an aside, you may want to set up another machine with kismet or > wireshark running to confirm the address change. > > >> I want to use the MAC addr from my old laptop so I don't have to wait >> weeks for the crazy burocracy. >> > > Ahhh... I see. You don't have access to the AP. Try the hint I > suggested above. I like where your going in the code. I'll take a look > at it tonight and see if I can dig up anything... > > Jason. > > > > Good news, my problem is solved. After days of source-code reading I gave up, and went to a different approach. I rebuilt both madwifi and wpa_supplicant from source, and it is working perfectly!!! So, it turns out that my problem was with wpa_supplicant and the macaddr change was ok (Well, almost, it still inserts one crazy 6 in the beginning of the macaddr, but it's just a matter of ifconfig ath0 down->macchanger->ifconfig ath0 up) Thx Jason Mark |
From: Jason <ma...@la...> - 2008-10-29 19:07:27
|
fronteiradigital wrote: [...] > Good news, my problem is solved. After days of source-code reading I > gave up, and went to a different approach. > I rebuilt both madwifi and wpa_supplicant from source, and it is working > perfectly!!! > So, it turns out that my problem was with wpa_supplicant and the macaddr > change was ok (Well, almost, it still inserts one crazy 6 in the > beginning of the macaddr, but it's just a matter of ifconfig ath0 > down->macchanger->ifconfig ath0 up) > > Thx Jason No problem. I'm glad you didn't have to change the driver. I wonder what the issue with wpa_supplicant was... Jason. |