Opened 3 years ago

Closed 10 months ago

#1754 closed (fixed)

Start-up Script Failure On DIR-825 B1 Using Build 15407 Firmware

Reported by: Magnetron1 Owned by:
Keywords: DIR-825B1 dupmacs Cc:

Description (last modified by Magnetron1)

Problem: Start-up script fails to successfully execute all the commands in the script.
See ticket:1604 for script.
Router: D-Link DIR-825 B1
Firmware: DD-WRT v24-sp2 (10/09/10) std - build 15407

Discussion: To make a long story short -- executing the ifconfig ath1 hw ether xx:xx:xx:xx:xx:xx command from a CLI now produces a ifconfig: SIOCSIFHWADDR: Operation not supported message. This does not occur on Build 14948. Oddly enough issuing the same command for the wifi1 interface works as intended.

Edit: 9 Oct 2010: Unfortunately changeset:15405 and changeset:15406 fail to fix the 5GHz MAC Address problem on the DIR-825B router.
Edit: 9 Oct 2010: Here is a new start-up script that solves the problem: (See ticket:1604 for installation instructions.)

#!/bin/sh

###############################################################################
#        5GHz Radio MAC Address Fixer - Version 2.0 Beta - 9 Oct 2010         #
#           For the D-Link DIR-825 B1 Router Using DD-WRT Firmware            #
#                         Builds 15314 And Up Only                            #
#                                                                             #
# The purpose of this startup script is to eliminate the random and intermit- #
# tant problems caused by both the 2.4GHz and the 5GHz radios using the same  #
# MAC address.                                                                #
#                                                                             #
# The ath1 (5GHz radio) MAC is computed by adding 1 to the least significant  #
# digit of the MAC ID listed on the sticker on the bottom of the router.      #
#                                                                             #
# The AWK Programming Language is used for string manipulation and hexadecimal#
# math. This language is embedded in the BusyBox software which is part of    #
# the firmware load.                                                          #
#                                                                             #
# There is no implied warranty for this script. If *YOU* modify this script   #
# then *YOU* assume responsibility for what happens.                          #
#                                                                             #
# - Magnetron1                                                                #
###############################################################################

killall process_monitor
while [ $? -ne 0 ]
   do
      sleep 5
      killall process_monitor
   done
      
if [ `nvram get restart_loop_control` -eq 0 ]
   then
      ifconfig ath1 down
      nvram_wan_mac=`nvram get wan_hwaddr`

########## Beginning of AWK Processing ##########
      
      ath1_new_mac=`awk -v wan_mac=$nvram_wan_mac \
         'BEGIN {ieee_mac_assn=substr(wan_mac,1,9);\
                 mfg_mac_assn=substr(wan_mac,10,8);\
                 split(mfg_mac_assn,mac_array,":");\
                 hexstring=sprintf("%s%s%s",mac_array[1],mac_array[2],\
                                   mac_array[3]);\
                 hexformat=sprintf("%s%s","0x",hexstring);\
                 nu_hex_mac=sprintf("%X",hexformat+1);\
                 mfg_nu_octet4=substr(nu_hex_mac,1,2);\
                 mfg_nu_octet5=substr(nu_hex_mac,3,2);\
                 mfg_nu_octet6=substr(nu_hex_mac,5,2);exit \
                } \
          END {printf("%s%s:%s:%s",ieee_mac_assn,mfg_nu_octet4,\
                      mfg_nu_octet5,mfg_nu_octet6)\
              }'`
              
##^^^^^^^^^^^ End of AWK Processing ^^^^^^^^^^^##
                                                
      nvram set ath1_hwaddr=$ath1_new_mac
      ifconfig wifi1 hw ether $ath1_new_mac
      80211n_wlanconfig ath1 destroy
      sleep 4
      80211n_wlanconfig ath1 create wlandev wifi1 wlanmode ap bssid
      nvram set restart_loop_control=1
      ifconfig ath1 up
      rc restart
   else
      nvram set restart_loop_control=0
      ifconfig ath1 down
      sleep 3
      ifconfig ath1 up
fi

Change History (7)

comment:1 Changed 3 years ago by Magnetron1

  • Description modified (diff)
  • Keywords DIR-825B1 dupmacs added
  • Summary changed from Start-up Script Failure on DIR-825 B1 Using Build 15334 Firmware to Start-up Script Failure On DIR-825 B1 Using Build 15362 Firmware

comment:2 Changed 3 years ago by Magnetron1

  • Description modified (diff)
  • Summary changed from Start-up Script Failure On DIR-825 B1 Using Build 15362 Firmware to Start-up Script Failure On DIR-825 B1 Using Build 15407 Firmware

comment:3 Changed 3 years ago by Magnetron1

  • Description modified (diff)

comment:4 Changed 3 years ago by Magnetron1

  • Description modified (diff)

comment:5 Changed 3 years ago by Magnetron1

  • Description modified (diff)

comment:6 Changed 3 years ago by Magnetron1

  • Description modified (diff)

comment:7 Changed 10 months ago by LOM

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.