Server Infrastructure Required

This lab can be completed if you have access to the server infrastructure in a private lab or if you are at an event such as Cisco Live!

Getting started with the ExCap Learning Lab

The Cisco Meraki ExCap API provides a flexible way of creating a custom WiFi Hotspot splash page.

This lab guide consists of the DevNet lab setup and the Click-through & Sign-on splash page learning labs.

Prerequisites

  • Cisco Meraki access point
  • NodeJS
  • MongoDB
  • Basic JavaScript knowledge

Note: The access point, NodeJS and MongoDB will be pre-installed for the DevNet lab

Working with the Meraki Dashboard

For this lab, a Meraki Dashboard as been preconfigured. By logginging into the Dashboard, you should be able to configure the WiFi network SSID, Splash Page URL and additional settings to test the application.

Meraki Dashboard: https://n149.meraki.com/Learning-Lab/n/4O0byavc/manage/dashboard

Username: LearningLab@meraki.com

Password: ikarem123!

Once logged in, you will have access to the lab network.

Configure SSID

Navigate to Wireless --> Configure --> SSIDs

A list of SSIDs will be avaiable to enable/rename for this lab.

Select a disabled SSID, rename it to "excap-yourname", and enable the SSID.

This is a shared lab/access point so please disable your SSID once completed.

Configure Access Control

Navigate to Wireless --> Configure --> Access Control : select your SSID from the dropdown menu

Set the Splash Page to either Click-through or Sign-on (depending on the lab section)

Set the Walled Garden to 127.0.0.1

Set the IP Assignment to bridge mode

Configure Splash Page

Navigate to Wireless --> Configure --> Splash Page

Set the URL to: http://127.0.0.1:8181/click or http://127.0.0.1:8181/signon (depending on the lab section)

Installing the Source Code

Download the source code from GitHub to your lab station.

git clone https://github.com/dexterlabora/excap.git
cd excap
npm install

Note: The NodeJS and MongoDB dependencies should already be installed on the lab machine.

You can verify this by typing node --version and mongo --version to see the currently installed version.

Running the Application

Make sure you are in the excap directory created by the git clone operation.

node app.js

Verify the Application is running

~/github/excap ] $ node app.js

Server listening on port 8181

Troubleshooting

If the application fails to start and any mention of MongoDB is in the error, there is a good chance that MongoDB is not running.

/Users/dexter/github/excap/node_modules/connect-mongodb-session/node_modules/mongodb/lib/server.js:235
        process.nextTick(function() { throw err; })
                                            ^
ReferenceError: assert is not defined
    at EventEmitter.app.use.require.secret (/Users/dexter/github/excap/app.js:64:3)
    at EventEmitter.emit (events.js:95:17)
    at Store.handleError (/Users/dexter/github/excap/node_modules/connect-mongodb-session/index.js:168:19)
    at /Users/dexter/github/excap/node_modules/connect-mongodb-session/index.js:46:22
    at /Users/dexter/github/excap/node_modules/connect-mongodb-session/node_modules/mongodb/lib/mongo_client.js:269:20
    at /Users/dexter/github/excap/node_modules/connect-mongodb-session/node_modules/mongodb/lib/db.js:226:14
    at null.<anonymous> (/Users/dexter/github/excap/node_modules/connect-mongodb-session/node_modules/mongodb/lib/server.js:233:9)
    at g (events.js:180:16)
    at EventEmitter.emit (events.js:98:17)
    at null.<anonymous> (/Users/dexter/github/excap/node_modules/connect-mongodb-session/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:269:68)

This can usually be fixed by just typing mongod or sudo mongod at the command prompt to start the database service.