# SLAC Demonstration

This page explains how to install and use two Qualcomm Atheros Powerline Toolkit programs, pev and evse, to demonstrate the HomePlug AV Signal Level Attenuation Characterization (SLAC) protocol.

On Microsoft Windows, the two programs are distributed in a seperate Microsoft installation file `slac-utils-x.x.x.msi`. To install them on Microsoft Windows, double-click on the installation file. The programs will be installed in folder `c:\Program Files (x86)\Qualcomm Atheros\Powerline Toolkit` unless the user overrides the default settings durin installation. New users should add this folder to the `PATH` environment variable and define environment variable `PLC` to reference the Ethernet interface connected to their PLC device.

On Linux, the two programs are distibuted inside the full toolkit tarball `plc-utils-x.x.x`. To install them on Linux, unpack the tarball and change directory to the package folder. Type "`sudo make install`" to compile and install the toolkit. Type type "`sudo make manuals`" to install man pages. New users should define environment variable `PLC` to reference the inteface connected to their PLC device.

## Exception!

In some cases QCA will distribute two Windows `.exe` files and two monolithic `.c` files. On Windows, copy the executable files to folder `c:\Program Files (x86)\Qualcomm Atheros\Powerline Toolkit` and update the system `PATH` and `PLC` environment variables. On Linux, compile the two source files using "`gcc -o pev pev.c`" and "`gcc -o evse evse.c`" and copy the two binary files to `/usr/local/bin` then update the system `PLC` environment variable. You will need root priviledge to copy the binary files to the system folder and you must change the binary file permissions to `4555` in order to execute them as a non-root user.

Each program reads an optional configuration file on start-up. Program pev reads `pev.ini` and program evse reads `evse.ini`. Qualcomm Atheros does not provide these files but option `-c`, on each program, can be used to print a template configuration file on stdout. Once a user settles on a convenient working folder, they should run command "`pev -c > pev.ini`" to create the configuration file for program pev and "`evse -c > evse.ini`" to create the configuration file for program evse.

A SLAC demonstration can be setup using two Qualcomm Atheros PL16 boards, two personal computers, a power strip and a powerline impairment of some kind. One PL16 board must be configured as a PEV and the other must be configured as an EVSE. Plug both PL16 boards into the powerstrip and connect each board to a different computer via Ethernet. Run program pev on the computer connected to the PEV configured board. Run program evse on the computer connected to the EVSE configured board. Program evse runs continuously waiting to service pev programs running on other computers. Program pev runs until charging occurs then exits.

On the EVSE host, start program evse as shown below. It will run until cancelled.

    # evse
    evse: UnoccupiedState: Listening ...

Messages will appear on the console as events occur. The first field is the program name, in this case evse. The second field is the function name, in this case UnoccupiedState. In this case, program evse does nothing until some PEV trys to associate.

On the EVSE host, run program evse as shown below. It will run until it detects and connects to an available EVSE-HLE. Use option `-w` to vary probe timeouts.

    # pev
    pev: DisconnectedState: Probing ...
    pev: pev_cm_slac_param: --> CM_SLAC_PARAM.REQ
    pev: pev_cm_slac_param: <-- CM_SLAC_PARAM.CNF

Messages will appear on the console as events occur. The first field is the program name, in this case pev. The second field is the function name, in this case `DisconnectedState` and `pev_cm_slac_param`. The right arrow indicates that function `pev_cm_slac_param` is sending a `CM_SLAC_PARAM.REQ` message. If things work properly, you will see a another message indicating that function `pev_cm_slac_param` is receiving a `CM_SLAC_PARAM.CNF` message.

IMG_20130227_145749.jpg

Unimpaired SLAC configuration. Result should be below threshold and PEV should connect.

IMG_20130227_151458.jpg

Impaired SLAC configuration. Result should be above threshold and PEV should not connect.