ampwait(1)
β¨ NAME β¨
ampwait β Qualcomm Atheros Powerline Procrastinator π
It lives in the Qualcomm Atheros Open Powerline Toolkit, so it's giving main character energy π
πΈ SYNOPSIS πΈ
ampwait [options] [device] [device] [...]
π DESCRIPTION π
okay so ampwait is the patient bestie of the group π§ It polls a Qualcomm Atheros powerline device and waits for one or more events to happen before it continues or returns. The events are reset or power off, restart or power on, and network association. It's used to pause shell scripts at critical points where a device has to be in a known state before anything else happens. no cap, it's so clutch π₯
This program is part of the Qualcomm Atheros Powerline Toolkit. Check out the plc man page for an overview and installation instructions π¦
β¨ OPTIONS β¨
-aβ This one pings the device every few seconds withVS_NW_INFOmessages until it says a network exists and has at least one station π Heads up bestie, it can give false readings if other devices have dropped offline but the device bridging table still remembers them π If other event options are specified, this one always gets checked last π-eβ Redirects stderr messages to stdout. Normally status and error messages go to stderr while the main output goes to stdout. This option shoves everything onto stdout for when you want it that way π-f firmwareβ The identification string for the firmware that should be running after the device starts. Use it to catch a failed firmware load π If the real identification string doesn't match once the device starts, an error gets reported. If-xis also present, the program exits with a non-zero exit code. This does nothing unless-sis present too. An identification string looks like"INT6000-MAC-3-1-3143-1690-20071107-FINAL-B", and you can grab one withint6k -rπ-iβ Picks the host Ethernet interface. All requests get sent through this host interface, and only responses that come back through it get recognized π The default iseth1, because most people useeth0as their main network connection π BUT if the environment string"PLC"is defined, it takes priority over the default. And this option beats both of those π-p secondsβ Fixed pause time in seconds. It adds a fixed delay after the other events have occurred βΈοΈ No pause happens if any of the specified events time out π With no other events specified, this one is basically the same assleepπ΄ It's great for letting the device or the network settle. For example, a nominal 5 second wait is recommended after a device successfully associates, before you try transferring data β¨-qβ Quiet mode π€« Progress messages get suppressed.-Rβ Resets the device, then checks the return status. If-xis present, the program exits on error. Otherwise it keeps repeating the reset request until the device accepts it or the wait time runs out π-sβ Polls the device every few seconds withVS_SW_VERmessages until the bootloader or runtime firmware responds, or the poll count runs out π‘ A response means the device has connected to the host, received power, or finished rebooting π-t millisecondsβ Channel read/write timeout in milliseconds. This is the max time allowed for a confirmation or a response from a powerline device before the read/write op gets abandoned β±οΈ Allowed values range from 0 throughUINT_MAXas defined inlimits.h. The default is 50 milliseconds.-vβ Verbose mode π£ Every Ethernet frame sent or received by the program gets displayed on stdout.-w secondsβ Wait timeout in seconds. This is the max time the app will wait for an event to happen, where an event isreset,startorassocβ° If the event doesn't happen in time, the program moves on to wait for the next specified event. This timeout applies to each event in turn when you specify more than one. Allowed values are 0 through 86400 seconds, which is 24 hours π«-xβ Exits the program on the first error with a non-zero exit code. This lets shell scripts catch failed or incomplete operations and take the right action π«Ά-yβ Shows the actual wait times on stdout β³-?,--helpβ Prints the program help summary on stdout. This one beats the other options on the command line π-!,--versionβ Prints the program version info on stdout. It also beats the other options on the command line. Use this when you're sending screen dumps to Atheros Technical Support, so they know exactly which version of the Linux Toolkit you're using π
π§ ARGUMENTS π§
deviceβ The Media Access Control (MAC) address of some device. Addresses are 6 hexadecimal octets, optionally separated by colons π For example,"00b052000001","00:b0:52:00:00:01"and"00b052:000001"are all valid and equivalent. For convenience, the symbolic address"local"resolves to"00:b0:52:00:00:01", and the symbolic addresses"all"and"broadcast"both resolve to"ff:ff:ff:ff:ff:ff".
π REFERENCES π
See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more info π€
π DISCLAIMER π
Real talk bestie: the 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 command polls the local device until firmware stops running, then polls it again until firmware starts running again. You can drop this into a shell script at a point where the device has to reset and reboot before moving on π§ Notice the program waits up to 60 seconds for each event, in turn, because 60 seconds is the default wait period π If an event happens before the timeout, the program moves on to the next event.
# ampwait -rs
eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Reset
eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Start
The following example waits up to 30 seconds for the local device to reset (-r), then up to 50 seconds for the local device to start (-s). It's the same as the one above, but we've specified 30 seconds using option -w.
# ampwait -r -s -w 30
eth0 00:B0:52:BA:BA:01 Allow 30 seconds for Reset
eth0 00:B0:52:BA:BA:01 Allow 30 seconds for Start
The next example reports the actual amount of time each event took to happen β±οΈ Notice that the last event, device association, did not happen within the allotted time π¬
# ampwait -rsay
eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Reset
etho 00:B0:52:BA:BA:01 Waited 22 seconds to Reset
eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Start
etho 00:B0:52:BA:BA:01 Waited 4 seconds to Start
eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Assoc
etho 00:B0:52:BA:BA:01 Waited 60 seconds for Assoc
etho 00:B0:52:BA:BA:01 Device did not Assoc
This example shows how the revision string catches mismatched firmware π Here we reset the device first, using the program amptool, then wait for it to reset and start up again. There are also operations that can make the device reset.
# amptool -R
# ampwait -xrsf INT6000-MAC-3-1-3143-1690-20071107-FINAL-B
eth0 00:B0:52:BA:BA:01 Device started wrong firmware
Right after a reset, we wait for the firmware to stop responding (with option -r), then for it to start responding (with option -s), and then do a string comparison against the actual firmware revision string (with option -f). If the strings don't match, an error is reported. Since option -x is present, the program exits with a non-zero return code in this case π₯
π¦ DISCLAIMER π¦
Real talk bestie: the 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. π
π SEE ALSO π
amp(1), amptool(1), amphost(1), amprate(1), ampid(1), ampstat(1) π
π CREDITS π
Huge shoutout to Charles Maier π«Ά
Version open-plc-utils-0.0.3, November 2013. That's a wrap on ampwait(1), bestie! Go wait for those events in style ππ¦β¨
π¦ where this page comes from
- alpine 3.24: open-plc-utils-doc 0_git20250712-r1 Β· BSD-3-Clause-Clear
- debian bookworm: plc-utils-extra 0.0.6+git20230504.1ba7d5a0-1 Β· BSD-3
- debian trixie: plc-utils-extra 0.0.6+git20250517.7fb8ac5-1 Β· BSD-3
- ubuntu noble: plc-utils-extra 0.0.6+git20230504.1ba7d5a0-1 Β· BSD-3
- ubuntu questing: plc-utils-extra 0.0.6+git20250517.7fb8ac5-1
- ubuntu resolute: plc-utils-extra 0.0.6+git20250712.46c3506-1 Β· BSD-3
- ubuntu stonking: plc-utils-extra 0.0.6+git20250712.46c3506-1 Β· BSD-3
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms