[SOLVED]How to change wireless mac addresses of Fonera???

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2, 3  Next
Author Message
drpepperONE
DD-WRT Novice


Joined: 02 Dec 2007
Posts: 17
Location: http://www.wifi-ita.com/forum/

PostPosted: Sun Dec 02, 2007 20:17    Post subject: [SOLVED]How to change wireless mac addresses of Fonera??? Reply with quote
Hi to all.

I have a big problem.

I successfully installed the last dd-wrt release on Fonera but now I'm not able to change the defaults mac addresses.
I modified with the following command:

nvram set et0macaddr=00:05:BB:ED:AF:8C
nvram set lan_hwaddr=00:05:BB:ED:AF:8C
nvram set ath0_hwaddr=00:05:BB:ED:AF:8D
nvram set wl0_hwaddr=00:05:BB:ED:AF:8D
nvram commit

When I go in to web interface after reboot it seems good:

Router
Router Name
DD-WRT
Router Model
Fonera 2100/2200
LAN MAC
00:05:BB:ED:AF:8C
WAN MAC

Wireless MAC
00:05:BB:ED:AF:8D
WAN IP
Disabled
LAN IP
192.168.0.1


But if i try to connect with a wirelss client the wirless mac it's always the original default.

It seems that the default wirless mac it's write into the kernel or in hadcoded way.

Infact if I lunch the ifconfig command


ath0 Link encap:Ethernet HWaddr ORIGINAL
UP BROADCAST RUNNING MULTICAST MTU:2290 Metric:1
RX packets:14066 errors:0 dropped:0 overruns:0 frame:0
TX packets:11764 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:316879 (309.4 KiB) TX bytes:681023 (665.0 KiB)

br0 Link encap:Ethernet HWaddr ORIGINAL
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING ALLMULTI MULTICAST MTU:1500 Metric:1
RX packets:17596 errors:0 dropped:0 overruns:0 frame:0
TX packets:2610 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:588730 (574.9 KiB) TX bytes:1816579 (1.7 MiB)

br0:0 Link encap:Ethernet HWaddr ORIGINAL
inet addr:169.254.255.1 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING ALLMULTI MULTICAST MTU:1500 Metric:1

eth0 Link encap:Ethernet HWaddr ORIGINAL
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3517 errors:0 dropped:0 overruns:0 frame:0
TX packets:14092 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:517935 (505.7 KiB) TX bytes:2465060 (2.3 MiB)
Interrupt:4 Base address:0x1000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MULTICAST MTU:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wifi0 Link encap:Ethernet HWaddr ORIGINAL
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28447 errors:0 dropped:0 overruns:0 frame:2196739
TX packets:18518 errors:1524 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:399
RX bytes:1148410 (1.0 MiB) TX bytes:2127785 (2.0 MiB)
Interrupt:3 Memory:b0000000-b00ffffc

Infact if i check the device value it's setted to original:

cat /sys/devices/virtual/net/eth0/address

ORIGINAL MAC

cat /sys/devices/virtual/net/ath0/address

ORIGINAL MAC

From web i setted the starup script command with nvram but nevere changed.


I saw in the nvram settings these variables:

ath0_macmode1=disabled
wl_macmode=disabled
wl0_macmode=disabled
wl_macmode1=disabled
ath0_macmode=disabled

What they mean??

Could someone help me??


Thank u in advance!!!!!!!

_________________
http://www.wifi-ita.com/forum/



Use your Brain, don't be slave!!!!


Last edited by drpepperONE on Sun Feb 24, 2008 17:26; edited 3 times in total
Sponsor
Simon
DD-WRT Guru


Joined: 20 Jul 2007
Posts: 612

PostPosted: Mon Dec 03, 2007 9:05    Post subject: Reply with quote
It is probably stored in the bootloader, you may need jtag cable.
drpepperONE
DD-WRT Novice


Joined: 02 Dec 2007
Posts: 17
Location: http://www.wifi-ita.com/forum/

PostPosted: Mon Dec 03, 2007 9:32    Post subject: Reply with quote
You think ther's not a way to change it in non jtag mode??

For example uploading different code or using a flashing telnet mode RedBoot with fis ???

_________________
http://www.wifi-ita.com/forum/



Use your Brain, don't be slave!!!!


Last edited by drpepperONE on Sun Feb 24, 2008 17:26; edited 1 time in total
mazilo
DD-WRT User


Joined: 10 Jun 2006
Posts: 385

PostPosted: Mon Dec 03, 2007 15:18    Post subject: Reply with quote
I guess if the bootloader is on a partition, you probably will be able to retrieve its contents using a dd command, modify the contents, then use the dd command to upload to the partition to see if the MAC Addresses have changed.
_________________
Mazi
UK non-geo DID #: +447031942574
drpepperONE
DD-WRT Novice


Joined: 02 Dec 2007
Posts: 17
Location: http://www.wifi-ita.com/forum/

PostPosted: Mon Dec 03, 2007 18:21    Post subject: Reply with quote
mazilo wrote:
I guess if the bootloader is on a partition, you probably will be able to retrieve its contents using a dd command, modify the contents, then use the dd command to upload to the partition to see if the MAC Addresses have changed.


Nice...it could be a good idea I may tray .... Very Happy

_________________
http://www.wifi-ita.com/forum/



Use your Brain, don't be slave!!!!


Last edited by drpepperONE on Sun Feb 24, 2008 17:27; edited 1 time in total
mazilo
DD-WRT User


Joined: 10 Jun 2006
Posts: 385

PostPosted: Tue Dec 04, 2007 0:33    Post subject: Reply with quote
drpepperONE wrote:
Nice...it could be a good idea I may tray .... Very Happy

Please kindly report back to let's know.

_________________
Mazi
UK non-geo DID #: +447031942574
drpepperONE
DD-WRT Novice


Joined: 02 Dec 2007
Posts: 17
Location: http://www.wifi-ita.com/forum/

PostPosted: Tue Dec 04, 2007 9:47    Post subject: Reply with quote
I'm thinking to use the redboot prompt.

But i'm not sure that in dd-wrt installed it works....

Normaly it works in installation/flashing phase, after the reboot the first 10 second the fon dd-wrt listen on special tcp port .

I'll try with finally dd-wrt installation ..to see if I'll able to go in telnet in redboot.

_________________
http://www.wifi-ita.com/forum/



Use your Brain, don't be slave!!!!


Last edited by drpepperONE on Sun Feb 24, 2008 17:27; edited 1 time in total
drpepperONE
DD-WRT Novice


Joined: 02 Dec 2007
Posts: 17
Location: http://www.wifi-ita.com/forum/

PostPosted: Tue Dec 11, 2007 16:52    Post subject: Reply with quote
I tried to change de original default macaddress in Redboot, but i dont saw anithing to do it.

With the bdshow command it display the origial mac.

Is there any Redboot command to modify the mac address??

_________________
http://www.wifi-ita.com/forum/



Use your Brain, don't be slave!!!!


Last edited by drpepperONE on Sun Feb 24, 2008 17:27; edited 1 time in total
Simon
DD-WRT Guru


Joined: 20 Jul 2007
Posts: 612

PostPosted: Tue Dec 11, 2007 19:19    Post subject: Reply with quote
Try hex editing the bootloader (VERY VERY CAREFULLY!).
goldserve
DD-WRT User


Joined: 07 Jun 2006
Posts: 115

PostPosted: Wed Dec 12, 2007 8:13    Post subject: Reply with quote
I believe the atheros calibration and mac addresses are stored in an area marked off as not accessible by the bootloader.
drpepperONE
DD-WRT Novice


Joined: 02 Dec 2007
Posts: 17
Location: http://www.wifi-ita.com/forum/

PostPosted: Wed Dec 12, 2007 10:11    Post subject: Reply with quote
goldserve wrote:
I believe the atheros calibration and mac addresses are stored in an area marked off as not accessible by the bootloader.


I agree with you.

But I think that ther's must be a way to change the default mac address, it's not possibile that thers'not.

Is there some dd-wrt developper that can help me??

I remeber that when I installed the open-wrt on the linksys devices by default open-wrt changed the default mac with one that was always the same for all.

_________________
http://www.wifi-ita.com/forum/



Use your Brain, don't be slave!!!!


Last edited by drpepperONE on Sun Feb 24, 2008 17:29; edited 1 time in total
maybeme
DD-WRT Novice


Joined: 21 Apr 2007
Posts: 15

PostPosted: Wed Dec 12, 2007 11:34    Post subject: Reply with quote
I saw there were changes in SVN regarding MAC's. Maybe you should check it out:

especially the changes on 12/05/2007
http://svn.dd-wrt.com:8000/dd-wrt/timeline
drpepperONE
DD-WRT Novice


Joined: 02 Dec 2007
Posts: 17
Location: http://www.wifi-ita.com/forum/

PostPosted: Wed Dec 12, 2007 14:54    Post subject: Reply with quote
I opened a ticket.

http://svn.dd-wrt.com:8000/dd-wrt/ticket/284

_________________
http://www.wifi-ita.com/forum/



Use your Brain, don't be slave!!!!


Last edited by drpepperONE on Sun Feb 24, 2008 17:28; edited 1 time in total
drpepperONE
DD-WRT Novice


Joined: 02 Dec 2007
Posts: 17
Location: http://www.wifi-ita.com/forum/

PostPosted: Tue Jan 01, 2008 13:37    Post subject: Reply with quote
No news from the ticket!!

I installed the new RC6.1 firmware but the problem remain the same.

I changed other values in nvram but nothing changed!!

nvram set def_whwaddr="00:01:02:03:04:2D"
nvram set wl_ap_mac="00:01:02:03:04:2D"
nvram set def_whwaddr="00:01:02:03:04:2D"
nvram set et0macaddr="00:01:02:03:04:2C"
nvram set lan_hwaddr="00:01:02:03:04:2C"
nvram set il0macaddr="00:01:02:03:04:2D"
nvram set ath0_hwaddr="00:01:02:03:04:2D"
nvram set wl0_hwaddr="00:01:02:03:04:2D"
nvram set et0macaddr="00:01:02:03:04:2C"
nvram set lan_hwaddr="00:01:02:03:04:2C"
nvram set ath0_hwaddr="00:01:02:03:04:2D"
nvram set wl0_hwaddr="00:01:02:03:04:2D"
nvram set wl_hwaddr="00:01:02:03:04:2D"
nvram set wl_active_mac=00:01:02:03:04:2D"
nvram commit

When i try to connect with a wireless client the MAC ADDRESS shown is the original!!

My gooooddddd!!!!!

_________________
http://www.wifi-ita.com/forum/



Use your Brain, don't be slave!!!!


Last edited by drpepperONE on Sun Feb 24, 2008 17:28; edited 1 time in total
drpepperONE
DD-WRT Novice


Joined: 02 Dec 2007
Posts: 17
Location: http://www.wifi-ita.com/forum/

PostPosted: Tue Jan 01, 2008 14:00    Post subject: Reply with quote
these are the getWANMac, getLANMac, getWirelesMac function that get the mac adress:


Code:
      }
      
       char *getLANMac (void)
       {
         unsigned char mac[20];
                
               strcpy (mac, nvram_safe_get ("et0macaddr"));
          
               if (nvram_match ("port_swap", "1"))
                       {
                       if (strlen(nvram_safe_get ("et1macaddr")) != 0) //safe: maybe et1macaddr not there?
                               {
                               strcpy (mac, nvram_safe_get ("et1macaddr"));
                               }
                       else
                               {
                               MAC_ADD(mac);  //et0macaddr +1
                               }
                       }
                
               return mac;
       }
       
       char *getWirelessMac (void)
       {
         unsigned char mac[20];
       
               if (strlen(nvram_safe_get ("il0macaddr")) != 0)
                       {
                       strcpy (mac, nvram_safe_get ("il0macaddr"));
                       }
               else
                       {
                       if (nvram_match ("port_swap", "1"))
                               {
                               if (strlen(nvram_safe_get ("et1macaddr")) != 0) //safe: maybe et1macaddr not there?
                                       {
                                       strcpy (mac, nvram_safe_get ("et1macaddr"));
                                       MAC_ADD (mac);  //et1macaddr +2
                                       MAC_ADD (mac);           
                                       }
                               else
                                       {
                                       strcpy (mac, nvram_safe_get ("et0macaddr"));
                                       MAC_ADD (mac);  //et0macaddr +3
                                       MAC_ADD (mac);
                                       MAC_ADD (mac);                           
                                       }
                               }
                       else
                               {
                               strcpy (mac, nvram_safe_get ("et0macaddr"));
                               MAC_ADD (mac);  //et0macaddr +2
                               MAC_ADD (mac);
                               }
                       }
                
               return mac;             
       }
       
       char *getWANMac (void)
       {
         unsigned char mac[20];
                
               strcpy (mac, nvram_safe_get ("et0macaddr"));
               MAC_ADD (mac);  //et0macaddr +1
          
               if (nvram_match ("port_swap", "1"))
                       {
                       if (strlen(nvram_safe_get ("et1macaddr")) != 0) //safe: maybe et1macaddr not there?
                               {
                               strcpy (mac, nvram_safe_get ("et1macaddr"));
                               MAC_ADD (mac);  //et1macaddr +1                 
                               }
                       else
                               {
                               MAC_ADD (mac);  //et0macaddr +2
                               }
                       }
                
               return mac;     
       }
       


so the vairable to change are :

et0macaddr
il0macaddr

But after editing them in nvram, never changed!!!

_________________
http://www.wifi-ita.com/forum/



Use your Brain, don't be slave!!!!


Last edited by drpepperONE on Sun Feb 24, 2008 17:28; edited 1 time in total
Goto page 1, 2, 3  Next Display posts from previous:    Page 1 of 3
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
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
You cannot attach files in this forum
You cannot download files in this forum