SemFio Networks

  • Home
  • About
  • Services
    • Wi-Fi DevOps with Mist
  • Partners
    • Mist
  • Training
  • Contacts
  • Blog
  • Home
  • About
  • Services
    • Wi-Fi DevOps with Mist
  • Partners
    • Mist
  • Training
  • Contacts
  • Blog

Configure a Cisco IOS-XE AP for an APoS Site Survey using Python

7/14/2020

0 Comments

 
Picture
I wanted to play around and see how I could automate the process of preparing a Cisco AP for an APoS site survey. So I decided to try it out on a Catalyst 9120 running IOS-XE. In this article, I will explain how to use the script.

You can find the script on my GitHub: https://github.com/francoisverges/semfio-cisco/tree/master/Setup-APoS-EWC
You can find the documentation of the script here: https://github.com/francoisverges/semfio-cisco/wiki/How-to-use-%22Setup-APoS-EWC%22
​
In order to make this work within a python script, we need to leverage a python library called pyserial which allows us to interact with the AP over a console connection.

Description

This script can be used to configure an Cisco AP for an APoS site survey.
This will only work if the AP is running IOS-XE (Tested with v16.12.02).
This will only work if the AP is running the EWC image with factory configurations.
​This script will rely on you to setup a console connection to the AP in order to work properly.

The set of configurations used to configure the AP can be found here: config-apos-c9120.txt

Note: this script has only been tested on macOS using an AirConsole.

Prerequisites

This script require you to have the following modules installed in your Python environment:
  • pyserial
If the module is not installed, run the following command to install it: pip install pyserial
I cannot guarantee that this script will work if the AP has already been configured. If it is the case, before running this script, please reset the AP to its factory configuration using this command: wireless ewc-ap factory-reset
Before running the script, make sure that you perform the following:
  1. Make sure that the AP is running the EWC code
  2. Connect the AP to the network (and provide power via PoE)
  3. Wait for the AP to go through its initial booting sequence (this initial boot sequence lasts about 5mins, you should see a solid green LED when it is completed).
  4. Connect your console cable to the console port of the AP
  5. Connect the other end of the console cable to your computer
Picture

Script Configurations

All the configurations are located into the config.json file and it is used to configure the following settings:
  • Your console connection details:
    • YYT used by the serial connection (Ex: /dev/tty.AirConsole-68-raw-serial)
  • Settings related to the Embedded Wireless Controller:
    • Name
    • IP address
    • Netmask
    • Username
    • Password
  • Settings related to the SSIDs you want the AP to broadcast:
    • Name of the WLAN profile
    • Name of the SSID
    • PSK
    • Frequency band
  • Settings related to the AP we are using:
    • MAC address (can be found at the back of the AP. Make sure to use the "XXXXXXXXXXXX" format)
    • FRA AP (Dual-5GHz compatible AP)
    • Name
    • IP address
    • Netmask
    • Gateway
  • Configurations of the 5GHz radio settings:
    • Channel
    • Tx Power (using the Cisco Index value)
    • Channel Width
  • Configurations of the 2.4GHz radio settings:
    • Channel
    • Tx Power (using the Cisco Index value)
  • Configuration of the FRA radio setting:
    • Channel
    • Tx Power (using the Cisco Index value)
    • Channel Width
​
Here is an example:

    
Make sure that you set the proper variables in this config.json file before running the script.

Download from macOS Terminal


​Here is how to install the script to use it on your own machine: 
git clone https://github.com/francoisverges/semfio-cisco.git

Then you can navigate to the script directory: 
​cd semfio-mist/Setup-APoS-EWC

Usage

Configure the config.json file with the proper parameters (as defined earlier)
In order to use the script, all you have to do is the following: 
python3 setup-AP0S-EWC.py config.json
Here is what the output will look like if everything goes well:

    
Note: if you see the following output, juste validate your console connection and re-run the script:

    
Once the script is done, the AP will reboot. Wait for the reboot process to finish. The AP will then be ready for you to use for your APoS site survey.
​
You can connect it to your favourite PoE battery, wait for it to boot (it takes a while... wait for the LED to be green) and validate that the AP is broadcasting the survey SSID(s):
Picture
Picture

Resources

  • GitHub to use see the code: github.com/francoisverges/semfio-cisco/tree/master/Setup-APoS-EWC 
  • GitHub wiki for this script: github.com/francoisverges/semfio-cisco/wiki/How-to-use-%22Setup-APoS-EWC%22
  • Pyserial Documentation: https://pyserial.readthedocs.io/en/latest/
  • Cisco 802.11ax site survey by Samuel Clements: sc-wifi.com/2019/12/03/cisco-802-11ax-site-survey-single-ap-method/
  • Embedded Wireless Controller Conversion on C9100 Access Points from Cisco: www.cisco.com/c/en/us/support/docs/wireless/embedded-wireless-controller-on-catalyst-access-points/215303-embedded-wireless-controller-conversion.html#anc18
  • From Shelf to Survey - Cisco 9100AX EWC Conversion by Jeremy Sharp: howiwifi.com/2020/03/19/from-shelf-to-survey-cisco-9100ax-ewc-conversion/
  • Easily use AirConsole on MacOSX: www.semfionetworks.com/blog/easily-use-airconsole-on-macosx
0 Comments



Leave a Reply.

    Picture

    François Vergès

    François Vergès is the founder of SemFio Networks. As a Network Engineer, he has a real passion for Wi-Fi.

    Picture Picture Picture

    Categories

    All
    5G
    5GHz
    6GHz
    802.11
    802.11ax
    802.11v
    802.1X
    AirConsole
    Aruba
    ArubaOS
    AutoCAD
    Automation
    Brand
    Capture
    Cisco
    Cisco WLC
    CLI
    Cloud
    Co-Channel Contention
    Controller Upgrade
    Course
    CWNE
    CWNP
    Design
    DFS
    Diagrams
    Ekahau
    FreeRADIUS
    Frequencies
    FSPL
    Hotspot
    Ideas
    Industry Canada
    Interference
    ISED
    Jetson Nano
    KRACK
    London
    MagicQuadrant
    MakeWi FiVisible
    MakeWi-FiVisible
    Market
    Meetup
    Mobility Express
    News
    Packet Analysis
    Programming
    Python
    Reference Guide
    Script
    Security
    SemFio
    Site-survey
    Site-survey
    Spectrum-analysis
    Technology
    Timeline
    Tip
    Training
    Validation
    Video
    Warehouse
    WiFi
    Wi-FI
    Wi-Fi
    Wi Fi 6
    Wi-Fi 6
    Wifitraining
    Wi Fi Troubleshooting
    Wi-Fi Troubleshooting
    Wireshark
    WLAN Pi
    WLPC
    WPA2

    Archives

    July 2020
    March 2020
    February 2020
    January 2020
    December 2019
    October 2019
    August 2019
    July 2019
    June 2019
    April 2019
    January 2019
    December 2018
    November 2018
    August 2018
    May 2018
    April 2018
    March 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    May 2017
    April 2017
    February 2017
    January 2017
    November 2016
    September 2016
    August 2016
    May 2016
    April 2016
    March 2016
    February 2016
    December 2015
    November 2015
    September 2015
    August 2015
    July 2015
    April 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    June 2014
    May 2014

    RSS Feed

SemFioNetworks-EmailContact SemFioNetworks-LinkedInProfile SemFioNetworks-YoutubeChannel

Let's Talk

Please get in touch with us if you have any questions. We offer a wide variety of professional Wi-Fi services that can help your wireless environment becoming faster, more secure and more efficient!
Get in touch
SemFioNetworks-Logo
Copyright © 2020 by SemFio Networks Inc.