Question

I am trying to use a expect script to stop the loading of the flash on a Cisco Autonomous AP so that I can get into the rommon.

Loading "flash:/ap3g1-k9w7-mx.124-25d.JA/ap3g1-k9w7-mx.124-25d.JA"...###

If you are sitting a keyboard pressing the escape key at this point will stop the process and give you the option to abort and put you to a rommon prompt.

With the expect script I have tried:

  • Sending an escape

    send "\x1B"
    

    this is sending the hex value for Esc. This is ignored and the process continues. However this works on a WLC device so I know the value is valid.

  • Sending a break

    send "\x1D"
    expect "telnet>"
    send "send Break\r"
    

    this is sending the hex value for Ctrl+] which is the escape character for but it puts it to telnet> prompt. Sending the break comes back from the telnet and continues loading the flash. On another device that stops the load and puts the device in rommon.

I have also tried the hex for the F1 key and for an arrow key because those work from the keyboard also.

Was it helpful?

Solution

The send "\x1B" will work on an AP as long as the device is set up to allow password recovery.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top