plcID(1) | Qualcomm Atheros Open Powerline Toolkit | plcID(1) |
plcID - Echo Device Key
plcID [options] [device] [device] [ ... ]
This program prints a single powerline device key or HFID on stdout. It can be used to dynamically define environment variables or insert command line arguments in scripts at runtime. It is intended to echo a specific key read from a single device but it can be used to echo a specific key type read from several devices by specifying either the Qualcomm Atheros Local Management Address or a broadcast address.
This program is, in some sense, the inverse of modpib but it reads the key and HFID directly from the powerline device instead of reading from a PIB file.
This program is part of the Qualcomm Atheros Powerline Toolkit. See the plc man page for an overview and installation instructions.
Powerline devices use Ethernet Media Access Control (MAC) addresses. A MAC address is a 48-bit value entered as 12 hexadecimal digits in upper, lower or mixed character case. Octets may be separated with colons for clarity. For example, "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
The following MAC addresses are special and may be entered by name instead of number.
See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros, Ocala FL USA. Consequently, public information may not be available. Qualcomm Atheros reserves the right to modify message structure and content in future firmware releases without any obligation to notify or compensate users of this program.
The following example prints the DAK of the local device on stdout. The local device is interrogated because no MAC address was specified. The default interface, eth1 on Linux and 2 on Windows, is used unless environment variable PLC is defined. The DAK is always printed by default. Depending on your system, you may want to use option -n when using this program interactively.
# plcID
00:11:22:33:44:55:66:77:88:99:AA:DD:CC:DD:EE:FF
The following example prints the NMK of device 00:B0:52:DA:DA:57 connected to interface eth2 on a Linux system. Several devices could be specified but that is not a common request.
# DAK -Mi eth2 00:B0:52:DA:DA:57
F4:23:71:4A:51:39:C2:2D:E5:EA:87:43:99:A1:37:81
The following example dynamically inserts the DAK and NMK of the previous device on the command line of another program. In this example, we want to insert the DAK and NMK into PIB file abc.pib using program modpib. See the modpib man page for an explanation of command line syntax. See the GNU bash manuals for an explanation of why this works.
# modpib abc.pib -D $(plcID -Di eth2 00:B0:52:DA:DA:57) -N $(plcID -Mi eth2
00:B0:52:DA:DA:57)
The following example is an alternate way of accomplishing the same thing using shell script variables. This method may be easier to read and maintain. Notice that we 'squished' all the options together for brevity.
# PLC=00:B0:52:DA:DA:57
# DAK=$(plcID -Dieth2 ${PLC})
# NMK=$(plcID -Mieth2 ${PLC})
# modpib abc.pib -D ${DAK} -N ${NMK}
plc(1), plcboot(1), plcinit(1), plctool(1)
Charles Maier
November 2013 | open-plc-utils-0.0.3 |