Qualcomm Atheros Open Powerline Toolkit

Qualcomm Atheros, Ocala FL USA

Edited by

Charles Maier

Andrew Barnes <abarnes@qca.qualcomm.com>
Marc Bertola <mbertola@qti.qualcomm.com>
Florian Fainelli <f.fainelli@gmail.com>
Nate Houghton <nhoughto@qca.qualcomm.com>
Mathieu Poullet <m.poullet@avm.de>
Stefan Wahren <stefan.wahren@i2se.com>
Bill Wike <bwike@qca.qualcomm.com>
Alejandro Vasquez <avasquez@qca.qualcomm.com>

open-plc-utils-0.0.4

Abstract

This document is the manual for the Qualcomm Atheros Open Powerline Toolkit. New users should read the first chapter before starting using the toolkit because it will answer many questions about toolkit installation, structure, content and application. New users may want to add this page and toolkit.html to their browser favorites for later reference.

HomePlug® AV is a registered trademark of the HomePlug Powerline Alliance. Linux™ is a trademark of Linus Tovalds. Windows® is a registered trademark of Microsoft Corporation. INT6000™, INT6300™, INT6400™, AR6410™, QCA7000™, AR7400™ and AR7420™ are powerline products from Qualcomm Atheros.


Table of Contents

1. Overview
Introduction
Background
Toolkit Distribution
Toolkit Installation on Linux
Toolkit Installation on GNU/Linux
Toolkit Documentation on GNU/Linux
Toolkit Removal on GNU/Linux
Toolkit Installation on Mac OS X
Toolkit Installation on Windows XP
Obtaining the Toolkit
Installing the Toolkit
Setting the PATH variable
Removing the Toolkit
Toolkit Installation on Windows 7
Obtaining the Toolkit
Installing the Toolkit
Setting the PATH variable
Removing the Toolkit
Toolkit Programs
INT6400 Device Management
INT6400 Device Monitoring
AR7400 Device Management
AR7400 Device Monitoring
AR7420 Device Configuration
Parameter File Management
Firmware File Management
Ethernet Traffic
Passwords and Keys
MDIO Programming
Serial Programming
Toolkit Folders
Packages
Toolkit Support
2. Hardware
Introduction
Device Form Factors
Device Communications
Device Configurations
Local Host to Local Device
Local Host to Remote Device
Local Host to Remote Host
Powerline Workstations
Host Hardware
Host Software
Network Configuration
Isolated Power-strip
Send-to-self Patch
3. Software
Introduction
Security Considerations
Platform Options
GNU/Linux
GNU/Linux with Libpcap
GNU/Linux with BPF
Mac OS X™ with BPF
Windows XP™ with Winpcap
GNU Makefiles on Linux
Stand-alone Compiling on GNU/Linux
Cross-Compiling on GNU/Linux
Compilation with Visual Studio .NET 2003
Microsoft Solution Files
Header Files
Compiler Constants
Platform Constants
Ethernet Constants
LibPcap, WinPcap and BPF
Structure Packing
Endian-ness
Packet Basics
Frame Encoding
4. Firmware
Introduction
Firmware Components
Bootloader
Softloader
Memory Configuration Parameters
Runtime Firmware (MAC Software)
Parameter Information Block (PIB)
Architecture Overview
Firmware Boot Process
Boot from Host Configuration
Things to Remember
Every Little Bit Hurts
Liar! Liar! Pants on Fire!
But wait! There's more ...
Upgrade Device (INT6000/INT6300/INT6400)
Update Local Host (INT6000/INT6300/INT6400)
Boot from Host (INT6000)
Boot from Host (INT6300)
Boot from Host (INT6400)
Boot from Host (AR7400)
Boot from Host (AR7420)
Flash Memory (AR6410/AR7420)
5. Procedures
Introduction
Select an Interface on Linux
Select an Interface on Windows
Identify a Device
Browse the Network
Forming a Network
Configuring a Device
Upgrading Firmware and PIB
Upgrading PIB Only
Starting a Device
Testing a Device
Programming NVRAM
Pairing UART Devices post PTS
Trouble-shooting Problems
SLAC Configuration
APCM_SET_CCO Primative
APCM_CONFIG_SLAC Primative
SLAC Demonstration
6. Scripting
Introduction
Linux Script Basics
Host Independence
Checking Device Connection
Random Device Identity
Actual Device Identity
Editing a PIB
Initialize a Device
Update a Device
Generating Powerline Traffic
Reading PHY Rates
User Interaction
7. Support Function Reference
Introduction
Command Line Functions
assist
basespec
bytespec
checkfilename
dataspec
error
expect
getoptv
ipv4spec
ipv6spec
lookup
putoptv
synonym
uintspec
version
Ethernet Functions
channel
closechannel
openchannel
readpacket
sendpacket
Network Functions
NetworkBridges
NetworkDevices
Generic Functions
binout
checksum32
checksum_32
chrout
decout
endian
fdchecksum32
fdchecksum_32
filepart
hexdecode
hexdump
hexencode
hexin
hexout
hexstring
hexview
memdecr
memincr
memout
memswap
strdecr
strfbits
strincr
todigit
typename
Message Debug Functions
MMECode
MMEMode
MMEName
MMEPeek
Key Generation Functions
MACPasswords
HPAVKeyDAK
HPAVKeyNMK
HPAVKeyNID
HPAVKeyOut
SHA256Block
SHA256Fetch
SHA256Ident
SHA256Match
SHA256Print
SHA256Reset
SHA256Write
XML Editing Functions
xmledit
xmlfree
xmlnode
xmlopen
xmlscan
xmlschema
xmltree
Download Functions
WriteExecuteApplet
WriteExecuteApplet1
WriteExecuteApplet2
Procrastination Functions
WaitForAssoc
WaitForAssoc1
WaitForAssoc2
WaitForReset
WaitForStart
Traffic Functions
CrossTraffic1
CrossTraffic2
LocalTraffic1
LocalTraffic2
NetworkTraffic1
NetworkTraffic2
Traffic1
Traffic2
SLAC Functions and Variables
The Session Variable
pev_cm_slac_param
evse_cm_slac_param
pev_cm_start_atten_char
evse_cm_start_atten_char
pev_cm_mnbc_sound
evse_cm_mnbc_sound
evse_cm_atten_char
pev_cm_atten_char
pev_cm_slac_match
evse_cm_slac_match
evse_cm_set_key
pev_cm_set_key
8. Serial Drivers
Introduction
Principles of Operation
SPI Serial Driver
qcaspi_spi_thread
qcaspi_qca7k_sync
Register Functions
qcaspi_read_register
qcaspi_write_register
qcaspi_tx_cmd
Interrupt Functions
disable_spi_interrupts
enable_spi_interrupts
qcaspi_intr_handler
Transmit Functions
qcaspi_transmit
qcaspi_tx_frame
qcaspi_flush_txq
Receive Functions
qcaspi_receive
DMA Functions
qcaspi_dma_read_burst
qcaspi_dma_read_legacy
qcaspi_dma_write_burst
qcaspi_dma_write_legacy
Support Functions
QcaFrmCreateHeader
QcaFrmCreateFooter
QcaFrmFsmInit
QcaFrmFsmDecode
Kernel Functions
qcaspi_netdev_xmit
qcaspi_netdev_tx_timeout
qcaspi_netdev_uninit
qcaspi_netdev_get_stats
qcaspi_netdev_change_mtu
qcaspi_netdev_set_mac_address
qcaspi_netdev_close
qcaspi_mod_exit

List of Figures

1.1. Windows Installer Dialogue
1.2. Control Panel System Dialogue
1.3. Control Panel Add/Remove Dialogue
1.4. Windows Installer Dialogue
1.5. Control Panel System Dialogue
1.6. Control Panel Add/Remove Dialogue
4.1. Simple Network
4.2. Upgrade Device (INT6000/INT6300/INT6400)
4.3. Update Local Host (INT6000/INT6300/INT6400)
4.4. Boot from Host (INT6000)
4.5. boot-from-host (INT6300)
4.6. Boot from Host (INT6400)
4.7. Boot from Host (AR7400)
4.8. Boot from Host (AR6410/AR7420)
4.9. Flashing the Softloader (AR7420)
4.10. Flash Parameters and Firmware (AR7420)

List of Tables

1.1. Program/Package Matrix
4.1. Softloader/Bootloader MMEs
4.2. Legacy Device Identification
4.3. Device Identification
5.1. PEV-PLC PIB Settings
5.2. PEV-EVSE PIB Settings
8.1. SPI Transmit Frame
8.2. SPI Receive Frame

List of Examples

1.1. Toolkit Installation on GNU/Linux
1.2. Toolkit Removal on GNU/Linux
1.3. Setting the PATH variable on OS X
1.4. Removing the Toolkit from Mac OS X
2.1. send-to-self Patch Description
2.2. send-to-self Patch Application
2.3. send-to-self Patch Installation
2.4. send-to-self Patch Listing
3.1. The MAKEFILE constant
3.2. Stand-alone Compiling on GNU/Linux
3.3. Cross-compiling with make.def
3.4. Microsoft Visual Studio .NET 2003
3.5. Packing Structures with keyword __packed
3.6. Packing Structures with Attribute packed
3.7. Packing Structures with the Pragma pack
3.8. Packing Structures the Atheros Way
3.9. Frame Encoding by Offset
3.10. Frame Encoding by Address
5.1. Selecting another Interface on Linux
5.2. Changing the Default Interface on Linux
5.3. Finding Interfaces on Linux
5.4. Selecting another Interface on Windows
5.5. Finding Interfaces on Windows
5.6. Device Identification
5.7. Inspecting Device Configuration
5.8. Display Network Information
5.9. Setting the Network Membership Key
5.10. Forming a Custom Network
5.11. Remote Network Configuration
5.12. Read a PIB File
5.13. Modify a PIB File
5.14. Save a PIB File
5.15. Upgrade Firmware and PIB
5.16. Upgrade local device PIB
5.17. Upgrade remote PIB
5.18. Start Firmware on INT6000
5.19. Start Firmware on INT6300™ and INT6400
5.20. Start Firmware on AR7400
5.21. Start Firmware on AR7420
5.22. Flash NVRAM with int6kf
5.23. Flash NVRAM with int6k
6.1. hardware.sh
6.2. firmware.sh
7.1. Enumerating Local Devices
7.2. Enumerating Network Devices
7.3. SHA256 Digest Computation
7.4. XML Source File
7.5. XML Edit Schema
7.6. XML Parse Tree