Flashing Cisco AIR-AP1142N / AIR-LAP1142N

Upgrade, downgrade or crossflash from LAP to AP style firmware on Cisco APs with serial bootloader commands.

The following procedure will format the flash entirely, set up IP address for the bootloader, restart bootloader with newly set IP address, tftp transfer and unpack the image and finally boot up the image and do initial configuration (set onboard ethernet to DHCP).

I used AIR-LAP1142N’s to test with. Your mileage may wary. 🙂

Prepare Linux computer with: tftp-server providing the image you want to flash to the AP (I used c1140-k9w7-mx viagra a acheter en ligne.153-3.JAB.tar), minicom terminal emulator, serial port, wired ethernet with fixed IP-address 10.0.0.1

Connect AP to serial port. Connect power.

You will probably need to start up minicom manually first, and disable hardware flow control (Ctrl-A, O – then F), then save defaults.

Check that you get some output from the AP on the serial line. I used an USB-to-serial adapter, but your device name might be different.

Disconnect power.

Fire up the terminal:

minicom -b 9600 -D /dev/ttyUSB0 -S upgrade-ap.script

Minicom should start and give a banner stating “Ready to intialize AP”. Press and HOLD the mode button, and connect power to the AP. Keep holding the mode button until the bootloader tells you to release it. Then the AP tries to TFTP transfer an image using the built in defaults – this fails, and then the script takes over.

Minicom script (prepare-ap.script):

timeout 1200
#goto arg
start:
print "##########################################"
print "##        Ready to initialize AP        ##"
print "##########################################"
expect "ap: "
send "format flash:"	
expect "lost) (y/n)?"
sleep 1
send "y"
expect {
  "ap: "
  timeout 600
}
send "set IP_ADDR 10.0.0.10"
expect "ap: "
send "set NETMASK 255.255.255.0"
expect "ap: "
send "set DEFAULT_ROUTER 10.0.0.1"
expect "ap: "
send "reset"
expect "system (y/n)?"
sleep 1
send "y"
noreset:
expect "ap: "
send "tftp_init"
expect "ap: "
send "flash_init"
expect "ap: "
send "ether_init"
expect "ap: "
send "tar -xtract tftp://10.0.0.1/c1140-k9w7-mx.153-3.JAB.tar flash:"
expect "extracting"
expect {
  "ap: "
  timeout 900
}
send "set BOOT flash:/c1140-k9w7-mx.153-3.JAB/c1140-k9w7-mx.153-3.JAB"
expect "ap: "
send "boot"
expect {
  "Press RETURN to get started"
  timeout 300
}
send ""
arg:
expect "ap>"
send "enable"
expect "Password:"
send "Cisco"
expect "ap#"
send "configure"
expect "[terminal]? "
send "terminal"
expect "ap(config)#"
send "interface GigabitEthernet 0"
expect "ap(config-if)#"
send "ip address dhcp"
expect "ap(config-if)#"
send "exit"
expect "ap(config)#"
send "exit"
expect "ap#"
send "write"
expect "[OK]"
print "########################################"
print "##  AP initialized with new firmware  ##"
print "########################################"
exit

Good luck!

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*