ampinit.1 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. .TH ampinit 1 "Mar 2014" "plc-utils-2.1.6" "Qualcomm Atheros Powerline Toolkit"
  2. .SH NAME
  3. ampinit - Qualcomm Atheros Production Device Manager
  4. .SH SYNOPSIS
  5. .BR ampinit
  6. .RI [ options ]
  7. .RI [ device ]
  8. .RI [ device ]
  9. [...]
  10. .SH DESCRIPTION
  11. The Production Device Manager performs basic device operations using the raw Ethernet protocol described in the Atheros HomePlug AV Firmware Technical Reference Manual.
  12. It can be used to initialize devices, interrogate and control them and upgrade them when on-board NVRAM is present.
  13. .PP
  14. This program is part of the Qualcomm Atheros Powerline Toolkit.
  15. It supports the AR7400, QCA7450 and similar chipsets.
  16. See program \fBint6kp\fR to support the legacy INT6000, INT6300, INT6400 and similar chipsets.
  17. See program \fBplcinit\fR to support the newer QCA6410, QCA7000, AR7420 and similar chipsets.
  18. .PP
  19. This program is a \fBproduction version\fR of \fBamptool\fR and may not be distributed without the explicit permission of Qualcomm Atheros, Ocala FL USA.
  20. .SH OPTIONS
  21. .TP
  22. -\fBa\fR
  23. Read device attributes using VS_OP_ATTRIBUTES.
  24. Attributes are short strings and integers that describe device hardware and firmware.
  25. They are concatenated to form the output that is similar to option -\fBr\fR but derived differently.
  26. .TP
  27. .RB - b
  28. Requests and prints a device enumeration table on stdout using VS_EM_ID_TABLE.
  29. An enumeration table contains MAC addresses of known devices on the Ethernet (H1) side of a powerline device.
  30. This option is only supported on EoC enabled devices.
  31. .TP
  32. -\fBB \fIbutton\fR
  33. Press the simple connect pushbutton using VS_PB_ENC.
  34. The \fBaction\fR can be specified by number 1, 2, 3 or 4 or by symbol "\fBjoin\fR", "\fBleave\fR", "\fBstatus\fR" or "\fBreset\fR", respectively.
  35. Use 1 on both devices that are expected to join.
  36. Use 2 only on the device that is expected to leave the network.
  37. .TP
  38. -\fBC \fImodule\fR
  39. Write (commit) downloaded modules to NVRAM using VS_MOD_NVM.
  40. The \fBmodule\fR can be spedified by number 1=NVM, 2=PIB and 3=BOTH or string "nvm", "pib" or "both".
  41. Module 3 is equivalent to option -\fBF\fR which writes the NVM and PIB together.
  42. You cannot force flash NVRAM using this option.
  43. Use option -\fBFF\fR to force flash.
  44. .TP
  45. -\fBd\fR \fIfilename\fR
  46. Read Watchdog Report from the device and write it to the named file in binary format using VS_WD_RPT.
  47. The report file can be sent to Qualcomm Atheros for technical analysis.
  48. No assumptions are made based on filename and no filename convetions are enforced; however, you should use a \fB.log\fR file extension to indicate binary format.
  49. .TP
  50. -\fBD\fR \fIxx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx\fR
  51. Define the 16 octet Device Access Key (DAK) in hex format.
  52. The DAK is used by options -\fBJ\fR, -\fBC\fR and -\fBF\fR.
  53. It may also be specified as "key1" or "key2" as explained in the \fBKEYS\fR section.
  54. You may omit this option on the command line when the device DAK happens to be the same as the program default of "key1".
  55. .TP
  56. .RB - e
  57. Redirects stderr messages to stdout.
  58. By convention status and error messages are printed on stderr while primary program output is printed on stdout.
  59. This option prints all output on stdout in cases where this is desired.
  60. .TP
  61. .RB - E
  62. Erase NVRAM on the specified device using VS_PTS_NVM and reboot.
  63. This option is similar to option -\fBF\fR or -\fBFF\fR but writes all ones to NVRAM instead of downloaded firmware or paratemeters.
  64. Any firmware or parameters that have been downloaded pending flash will be lost when the device reboots.
  65. You must also specify the device \fBDAK\fR using option -\fBD\fR or the erase operation will fail without indication.
  66. This operation can only be performed on the local device.
  67. Attempts to erase a remote device are ignored.
  68. Some firmware versions do not permit the operation and those that do permit it will prevent it on INT6000 devices.
  69. .TP
  70. .RB - f
  71. Read flash memory parameters using VS_GET_NVM.
  72. An error will be reported if no flash memory is present.
  73. .TP
  74. .RB - F [ F ]
  75. Write previously downloaded MAC and PIB to NVRAM using VS_MOD_NVM.
  76. Adding a second \fBF\fR here or another -\fBF\fR anywhere on the command line will \fBforce-flash\fR a blank or corrupted NVRAM.
  77. Firmware loaded from NVRAM will treat force-flash as an error.
  78. Unlike program \fBamptool\fR, this program modifies factory default settings by erasing the User PIB and rewriting the Factory PIB.
  79. .TP
  80. .RB - g
  81. Read multicast group information discovered while IGMP snooping using VS_MULTICAST_INFO.
  82. .TP
  83. -\fBi\fR \fIinterface\fR
  84. Select the host Ethernet interface.
  85. All requests are sent via this host interface and only reponses received via this host interface are recognized.
  86. The default interface is \fBeth1\fR because most people use \fBeth0\fR as their principle network connection; however, if environment string "PLC" is defined then it takes precedence over the default interface.
  87. This option then takes precedence over either default.
  88. .TP
  89. .RB - I
  90. Read the device PIB header using VS_RD_MOD and print the PIB major and minor revision number, Device Access Key (DAK), Network Membership Key (NMK), MAC address and other information on stdout.
  91. The values displayed can be changed using program \fBmodpib\fR.
  92. .TP
  93. .RB - J
  94. Set the Network Membership Key (NMK) on a remote device using VS_SET_KEY.
  95. This option is similar to option -\fBK\fR but requires the remote device DAK in addition to NMK and MAC address.
  96. The NMK value is defined using option -\fBK\fR unless you want to use the default value.
  97. The remote DAK is defined using option -\fBD\fR unless you want to use the default value.
  98. Programming remote device keys is complicated.
  99. It is often easier to connect the device directly to the host and use the -\fBK\fR option.
  100. .TP
  101. -\fBK\fR \fIxx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx\fR
  102. Define the Network Membership Key (NMK) value used by options -\fBM\fR or -\fBJ\fR.
  103. The symbolic names "key1" and "key2" are recognized as described in the \fBKEY\fR section.
  104. .TP
  105. -\fBl\fR \fIcount\fR
  106. Define the number of times that the command will be repeated for each device specified.
  107. Normally, you will repeat operations on one device only.
  108. .TP
  109. .RB - m
  110. Read network membership information using VS_NW_INFO.
  111. This can be used to determine network configuration.
  112. .TP
  113. .RB - M
  114. Set the Network Membership Key (NMK) on the local device using VS_SET_KEY.
  115. The NMK value is specified using the -\fBK\fR option unless you want to use the default value.
  116. .TP
  117. -\fBn\fR \fIfilename\fR
  118. Read the entire firmware image chain from the device flash memory and write it to the named \fB.nvm\fR file using multiple VS_RD_BLK_NVM messages.
  119. No assumptions are made based on filename and no filename conventions are enforced.
  120. This option is performed before option -\fBN\fR when both are specified.
  121. .TP
  122. -\fBN\fR \fIfilename\fR
  123. Read the named \fB.nvm\fR file and write it to volatile memory using multiple VS_WR_MOD messages.
  124. The file will also be written to flash memory if option -\fBF\fR is present.
  125. No assumptions are made based on filename and no filename conventions are enforced; however, files having invalid .nvm format will be rejected.
  126. This option is executed after -\fBn\fR when both are specified.
  127. .TP
  128. -\fBp\fR \fIfilename\fR
  129. Read the entire user parameter block from the flash memory and write it to the named \fB.pib\fR file using multiple VS_RD_BLK_NVM messages.
  130. No assumptions are made based on filename and no filename convetions are enforced.
  131. This option is executed before option -\fBP\fR when both are specified.
  132. .TP
  133. -\fBP\fR \fIfilename\fR
  134. Read the named \fB.pib\fR file and write it to volatile memory using multiple VS_WR_MOD messages.
  135. The file will also be written to flash memory if option -\fBF\fR is present.
  136. No assumptions are made based on filename and no filename conventions are enforced; however, files having invalid .pib format will be rejected.
  137. This option is executed after -\fBp\fR when both are specified.
  138. .TP
  139. .RB - q
  140. Suppresses status messages on stderr.
  141. .TP
  142. .RB - Q
  143. Quick flash.
  144. The program will not wait for a device to reset or the firmware to restart after writing flash memory.
  145. This option is desirable with newer firmware that writes flash memory in the background.
  146. It has no effect unless used with option -\fBF\fR or -\fBC\fR.
  147. .TP
  148. .RB - r
  149. Read device firmware and hardware revision using VS_SW_VER.
  150. Output is similar to option -\fBa\fR but is derived differently.
  151. Example output might look like "eth0 00:B0:52:00:00:01 INT6300A0 INT6000-MAC-2-0-2000-1018-20070611-SP1-B NOT-UPGRADEABLE".
  152. .TP
  153. .RB - R
  154. Reset the device using VS_RS_DEV.
  155. This option is executed after all others on the same command line.
  156. .TP
  157. .RB - s
  158. Read device SDRAM configuration using VS_RD_CBLOCK.
  159. .TP
  160. -\fBS\fR \fIoperand\fR
  161. This option is permitted but ignored in order to support legacy scripts that have not been kept current.
  162. A warning message is printed to inform users that the option and operand are being ignored.
  163. .TP
  164. -\fBt \fItimer\fR
  165. Read timeout in milliseconds.
  166. Values range from 0 through UINT_MAX.
  167. This is the maximum time allowed for a response.
  168. The default is 50 milliseconds.
  169. .TP
  170. .RB - T
  171. Restore factory defaults.
  172. This permanently erases PIB changes made since the device was last programmed with factory default values.
  173. The device will automatically reset and reboot.
  174. .TP
  175. .RB - v
  176. Print additional information on stdout.
  177. In particular, this option dumps incoming and outgoing packets which can be saved as text files for reference.
  178. .TP
  179. -\fBw \fIseconds\fR
  180. Defines the number of \fIseconds\fR to wait before repeating command line options.
  181. This option has no effect unless option -\fBl\fR is also specified with a non-zero value.
  182. .TP
  183. .RB - x
  184. Cause the program to exit on the first error instead of continuing with remaining iterations, operations or devices.
  185. Normally, the program reports errors and moves on to the next operation, iteration or device depending on the command line.
  186. .TP
  187. .RB - ? ,-- help
  188. Print program help summary on stdout.
  189. This option takes precedence over other options on the command line.
  190. .TP
  191. .RB - ! ,-- version
  192. Print program version information on stdout.
  193. This option takes precedence over other options on the command line.
  194. Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of the Linux Toolkit you are using.
  195. .SH ARGUMENTS
  196. .TP
  197. \fIdevice\fR
  198. The MAC address of some powerline device.
  199. More than one address may be specified.
  200. If more than one address is specified then operations are performed on each device in turn.
  201. The default address is \fBlocal\fR.
  202. See \fBDEVICES\fR for information about symbolic device addresses.
  203. .SH KEYS
  204. Encryption keys are long, tedious to type and prone to error.
  205. For convenience, the following symbolic names may be used to specify either a Device Access Key or Network Membership Key.
  206. They may be entered in place of the full 16-octet key.
  207. The DAK and NMK will always be different for a given pass phrase.
  208. .TP
  209. .BR key1
  210. This will translate to the HomePlug AV compliant DAK or NMK for pass phrase "HomePlugAV" depending on context.
  211. .TP
  212. .BR key2
  213. This will translate to the HomePlug AV compliant DAK or NMK for pass phrase "HomePlugAV0123" depending on context.
  214. .TP
  215. .BR none
  216. Symbolic name for "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00".
  217. .SH DEVICES
  218. Powerline devices use Ethernet Media Access Control (MAC) addresses.
  219. A MAC address is a 48-bit value entered as 12 hexadecimal digits in upper, lower or mixed character case.
  220. Octets may be separated with colons for clarity.
  221. For example, "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
  222. .PP
  223. The following MAC addresses are special and may be entered by name instead of number.
  224. .TP
  225. .BR all
  226. Same as "broadcast".
  227. .TP
  228. .BR broadcast
  229. A synonym for the Ethernet broadcast address, \fBFF:FF:FF:FF:FF:FF\fR.
  230. All devices, whether local, remote or foreign recognize messages sent to this address.
  231. A remote device is any device at the far end of a powerline connection.
  232. A foreign device is any device not manufactured by Atheros.
  233. .TP
  234. .BR local
  235. A synonym for the Atheros vendor specific Local Management Address (LMA), \fB00:B0:52:00:00:01\fR.
  236. All local Atheros devices recognize this address but remote and foreign devices do not.
  237. A remote device is any device at the far end of a powerline connection.
  238. A foreign device is any device not manufactured by Atheros.
  239. .SH REFERENCES
  240. See the Atheros HomePlug AV Firmware Technical Reference Manual for more information.
  241. .SH DISCLAIMER
  242. Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.
  243. Consequently, public information is not available.
  244. Qualcomm Atheros reserves the right to modify message structure or content in future firmware releases without any obligation to notify or compensate users of this program.
  245. .SH EXAMPLES
  246. .PP
  247. The following command performs 5 operations on one device.
  248. It uploads the firmware and PIB from the device and writes them to files \fBold.nvm\fR and \fBold.pib\fR, respectively.
  249. It reads files \fBnew.nvm\fR and \fBnew.pib\fR and downloads them as new firmware and PIB, respectively.
  250. It commits the downloaded firmware and PIB to NVRAM after validating the device DAK.
  251. Operations are executed in the order just described regardless of the order specified on the command line.
  252. If you want reading and writing to occur in a different order then you must use two or more commands to accomplish tasks in the order you want.
  253. .PP
  254. # ampinit -n old.nvm -p old.pib -N new.nvm -P new.pib -D 00112233445566778899AABBCCDDEEFF -F 0123456789AB
  255. .PP
  256. It is not neccessary to specify all operations on one command line.
  257. The three command lines below do essentially the same thing as the command line shown above.
  258. Notice that this example uses -\fBC 3\fR, instead of -\fBF\fR, as an alternate way to write both firmware and parameters to NVRAM.
  259. Specifying -\fBC 1\fR or -\fBC nvm\fR will write firmware only.
  260. Specifying, -\fBC 2\fR or -\fBC pib\fR will write parameters only.
  261. The value \fB3\fR is the logical OR of \fB1\fR and \fB2\fR and could be specified as -\fBC all\fR.
  262. The device DAK must appear on the same line as option -\fBC\fR because a valid DAK is required for the commit operation.
  263. .PP
  264. # ampinit -N new.nvm 01:23:45:67:89:28
  265. # ampinit -P new.pib 01:23:45:67:89:28
  266. # ampinit -C 3 -D 00:11:22:33:44:55:66:77:88:99:BB:CC:DD:EE:FF 01:23:45:67:89:28
  267. .PP
  268. The next example downloads file \fBnew.nvm\fR and file \fBnew.pib\fR and force flashes the \fBlocal\fR device.
  269. Force flashing only works with running firmware that has been downloaded and started by the Atheros Bootloader.
  270. See \fBint6kfp\fR to download, start firmware and perform a force flash in one operation.
  271. .PP
  272. .PP
  273. # ampinit -N new.nvm -P new.pib -D 01:23:45:67:89:AB:CD:EF:01:23:45:67:89:AB:CD:EF -FF local
  274. .PP
  275. The next two commands are equivalent.
  276. They set the NMK on the local device to \fBkey1\fR as descripted in the \fBKEYS\fR section.
  277. The first command resets the NMK on the local device with -\fBM\fR then specifies the NMK as \fBkey1\fR.
  278. The second command omits the key specification since \fBkey1\fR is the program default NMK.
  279. One could, of course, type the full encryption key.
  280. .PP
  281. # ampinit -MK key1
  282. # ampinit -M
  283. .PP
  284. The next command erases the flash memory on the local device using \fBkey1\fR as the device DAK.
  285. Assuming that the device DAK matches, NVRAM will be erased.
  286. Some older versions of Atheros firmware do not support the erase operation.
  287. .PP
  288. # ampinit -ED key1
  289. .PP
  290. The next command is similar to the previous example but erases only flash memory sector \fB5\fR on the local device because option -\fBX\fR was specified.
  291. Again, some older versions of Atheros PLC firmware do not support this operation;
  292. .PP
  293. # ampinit -X 5 -D key1
  294. .SH SEE ALSO
  295. .BR AMP ( 1 ),
  296. .BR amptool ( 1 ),
  297. .BR amphost ( 1 ),
  298. .BR amprate ( 1 ),
  299. .BR ampstat ( 1 )
  300. .SH CREDITS
  301. Charles Maier <cmaier@qca.qualcomm.com>
  302. Nathaniel Houghton <nhoughto@qca.qualcomm.com>