ampID(1)

πŸŽ€ ampID(1) πŸŽ€

Qualcomm Atheros Open Powerline Toolkit πŸ’–

✨ NAME ✨

ampID, a.k.a. the Echo Device Key tool πŸ’…

🧚 SYNOPSIS 🧚

ampID [options] [device] [device] [ ... ]

🌸 DESCRIPTION 🌸

Okay bestie, so ampID prints a single powerline device key or HFID straight to stdout πŸ’–. It's lowkey perfect for dynamically defining environment variables or slipping command line arguments into scripts at runtime ✨.

It's meant to echo one specific key read from one device, but it can also echo a specific key type from several devices. Just pass either the Qualcomm Atheros Local Management Address or a broadcast address πŸ¦‹.

This program is kind of the inverse of modpib πŸ™ˆ, except 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 🌈. Check the plc man page for an overview and installation instructions πŸ“–.

πŸ‘‘ OPTIONS πŸ‘‘

  • -A β€” Prints the Ethernet address (MAC) for each specified device. This option and options -D, -M, -N, -S and -U are mutually exclusive πŸ™…β€β™€οΈ.
  • -D β€” Prints the Device Access Key (DAK) for each specified device. This option and options -A, -M, -N, -S and -U are mutually exclusive.
  • -e β€” Sends stderr messages over to stdout πŸ“¬. Usually, status and error messages go to stderr while the main output goes to stdout. This option prints everything on stdout for when that's what you want.
  • -i interface β€” Picks the host Ethernet interface πŸ”Œ. All requests go out through this host interface, and only responses received through it get recognized. The default interface is eth1 because most people use eth0 as their main network connection. But if the environment string PLC is defined, it takes precedence over the default interface. This option then beats both defaults πŸ’œ.
  • -n β€” Appends a newline to the end of each key πŸ“. Newlines are left off by default so the output can be the raw input to another program. If you want the newline, you have to ask for it with this option ✨.
  • -M β€” Prints the Network Membership Key (NMK) for each specified device. This option and options -A, -D, -N, -S and -U are mutually exclusive.
  • -N β€” Prints the network HFID string for each specified device. This option and options -A, -D, -M, -S and -U are mutually exclusive.
  • -q β€” Silences the status messages on stderr 🀫.
  • -S β€” Prints the manufacturer HFID string for each specified device. This option and options -A, -D, -M, -N and -U are mutually exclusive.
  • -v β€” Prints extra info on stdout πŸ“. Specifically, it dumps incoming and outgoing packets, which can be saved as text files for reference.
  • -x β€” Makes the program exit on the first error πŸ’€, instead of pushing on through the remaining iterations, operations or devices. Normally, the program reports errors and moves on to the next operation, iteration or device, depending on the command line.
  • -?, --help β€” Prints the program help summary on stdout πŸ†˜. This option takes precedence over other options on the command line.
  • -?, --version β€” Prints program version information on stdout 🫢. This option also takes precedence over other options on the command line. Use it when sending screen dumps to Atheros Technical Support so they know exactly which version of the Linux Toolkit you're using.

πŸ¦‹ ARGUMENTS πŸ¦‹

  • device β€” The MAC address of some powerline device πŸ”’. You can specify more than one, and if you do, operations run on each device in turn. The default address is local. See DEVICES for info about symbolic device addresses.

🌈 DEVICES 🌈

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 🌟.

  • all β€” Same as "broadcast".
  • broadcast β€” A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF. All devices, whether local, remote or foreign, recognize messages sent to this address. A remote device is any device at the far end of a powerline connection. A foreign device is any device not manufactured by Atheros.
  • local β€” A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01. All local Atheros devices recognize this address, but remote and foreign devices don't. A remote device is any device at the far end of a powerline connection. A foreign device is any device not manufactured by Atheros.

πŸ“š REFERENCES πŸ“š

See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information πŸ€“.

🚫 DISCLAIMER 🚫

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. πŸ™ƒ

🧁 EXAMPLES 🧁

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 πŸ’–.

# ampID
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 $(ampID -Di eth2 00:B0:52:DA:DA:57) -N $(ampID
-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=$(ampID -Dieth2 ${PLC})
# NMK=$(ampID -Mieth2 ${PLC})
# modpib abc.pib -D ${DAK} -N ${NMK}

πŸ”— SEE ALSO πŸ”—

plc(1), amptool(1), ampboot(1), ampinit(1), modpib(1) πŸ¦‹

🌟 CREDITS 🌟

Charles Maier πŸ‘‘


Okay that's the whole tea β˜•πŸŽ€ This page is from open-plc-utils-0.0.3, dated November 2013. Now go echo some keys, bestie πŸ’…πŸ’–πŸ§š