amphost(1)

πŸ’– amphost πŸ’–

Qualcomm Atheros Open Powerline Toolkit πŸ¦‹

✨ NAME ✨

amphost β€” Qualcomm Atheros Powerline Device Host Emulator πŸŽ€

✨ SYNOPSIS ✨

amphost [options] -N file -P file -n file -p file

✨ DESCRIPTION ✨

okay bestie so amphost just sits there waiting for VS_HST_ACTION.IND messages from a local device, then services them the way the QCA Firmware Technical Reference Manual says to 🧚 it's perfect for showing off or double-checking that a powerline device and host are vibing properly when the device is flash-less πŸ’…

heads up tho, this is not production grade 😭 it will stop dead (like a bug!) the second things go sideways. if you're building something real, go check out the Qualcomm Atheros Embedded API for real-time, production-grade apps 🫢

host emulation is for flash-less device designs where a local host processor handles the persistent storage πŸ“ the host can do a whole bunch of smart storage stuff, but this program only does one flavor. -N and -P point at files that already exist and hold the factory default runtime firmware and parameters (respectively). -n and -p point at scratch files for user firmware and parameters. it's similar to the standard Atheros NVRAM scheme, but it's not the same, so don't mix them up πŸ‘‘

to use it, plug a flash-less device into the host over ethernet, then start the program with the correct filenames ✨ it'll automatically respond when the device asks to download memory configuration, firmware and/or parameters, and upload firmware or and/or parameters under device control. see the Qualcomm Atheros Firmware Technical Reference Manual for more deets πŸ“–

this program is part of the Qualcomm Atheros Powerline Toolkit 🌈 check the plc man page for an overview and installation instructions.


✨ OPTIONS ✨

  • -F[F] β€” flash NVRAM once the downloaded firmware has started πŸ”₯ the same firmware and PIB get downloaded again using VS_WR_MOD, then written to NVRAM with VS_MOD_NVM. add a second F here, or throw another -F anywhere on the command line, and you get a forced flash. with no NVRAM present, normal and forced flash both make the device upload to the host. with blank or corrupted NVRAM, forced flash writes to NVRAM. this operation fails if there's no NVRAM at all.
  • -i interface β€” pick the host Ethernet interface 🌸 all requests go out this interface, and only responses that come back through it get recognized. the default is eth1, because most people use eth0 as their main network connection. but if the environment string PLC is defined, that takes priority over the default. and this option beats both of them πŸ’…
  • -N filename β€” use this file to download firmware when the local device asks πŸŽ€ it must exist and have a valid NVM file format, or it gets rejected. no assumptions are made based on the filename, and no filename conventions are enforced. the program will not overwrite this file. this option and argument are required.
  • -n filename β€” use this file to store firmware uploaded from the local device πŸ¦‹ the file doesn't need to exist, but you'll get an error if it can't be created or written. if firmware gets uploaded here, it's used for later firmware downloads, unless the device requests a factory reset. in that case, the file given by -N is used instead. this option and argument are optional. if omitted, the default filename user.pib is used.
  • -P filename β€” use this file to download parameters when the local device asks πŸ’œ it must exist and have a valid PIB file format, or it gets rejected. no assumptions are made based on the filename, and no filename conventions are enforced. the program will not overwrite this file. this option and argument are required.
  • -p filename β€” use this file to store parameters uploaded from the local device 🧚 it doesn't have to exist, but an error happens if it can't be created or written. once parameters are uploaded here, they're used for later parameter downloads, unless the device requests a factory reset. then the file given by -P is used. this option and argument are optional. if omitted, the default filename user.nvm is used.
  • -q β€” shh, suppress status messages on stderr πŸ™ˆ
  • -t milliseconds β€” set the read timeout in milliseconds ⏱️ values range from 0 through UINT_MAX. this is the max time allowed for a response. the default is shown in brackets on the program menu.
  • -v β€” get extra info printed on stdout πŸ” this option prints incoming and outgoing Ethernet frames on stdout, so you can see everything happening.
  • -?, --help β€” print a program help summary on stdout πŸ’β€β™€οΈ this one takes precedence over other options on the command line.
  • -!, --version β€” print the program version info on stdout πŸ‘‘ this one also takes precedence over other options. use it when sending screen dumps to Atheros Technical Support, so they know exactly which version of the Linux Toolkit you're using.

✨ ARGUMENTS ✨

None. nothing to see here, bestie πŸ’…

✨ REFERENCES ✨

see the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information πŸ“š

✨ EXAMPLES ✨

the following command starts the host emulator πŸš€ -N and -P are always required, but their order doesn't matter.

# amphost -N test.nvm -P test.pib -n temp.nvm -p temp.pib
eth1 00:B0:52:00:00:01 Waiting for Host Action Requests

eth1 00:B0:52:00:00:01 Host Action Request is (4) configure memory.
eth1 00:B0:52:00:00:01 Write Memory (00000040:15752)
eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
eth1 00:B0:52:00:00:01 Started BootLoader

eth1 00:B0:52:00:00:01 Host Action Request is (0) initialize device.
eth1 00:B0:52:00:00:01 Write Memory (00000040:15752)
eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
eth1 00:B0:52:00:00:01 Started BootLoader
eth1 00:B0:52:00:00:01 Write Memory (00204000:1013952)
eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
eth1 00:B0:52:00:00:01 Write Memory (01F00000:11400)
eth1 00:B0:52:00:00:01 Wrote AR7400-WallAdapter-
HomePlugAV_NorthAmerica.pib
eth1 00:B0:52:00:00:03 Started
INT7400-MAC-0-0-1008-00-63-20100227-AUTO-D

✨ DISCLAIMER ✨

⚠️ Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros, Ocala FL USA. so public info 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 ✨

plc(1), ampboot(1), amptool(1),

✨ CREDITS ✨

Charles Maier πŸ‘‘


ily bestie πŸ’œ this was open-plc-utils-0.0.3, November 2013 🌸✨