plcinit.1 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. .TH plcinit 1 "Mar 2014" "plc-utils-2.1.6" "Qualcomm Atheros Powerline Toolkit"
  2. .SH NAME
  3. plcinit - Qualcomm Atheros Production Device Manager
  4. .SH SYNOPSIS
  5. .BR plcinit
  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. It support chipsets QCA6410, QCA7000 and QCA7420.
  14. .PP
  15. This program is a \fBproduction version\fR of \fBplctool\fR and may not be distributed without the explicit permission of Qualcomm Atheros, Ocala FL USA.
  16. .PP
  17. This program is part of the Qualcomm Atheros Powerline Toolkit.
  18. See the \fBplc\fR man page for an overview and installation instructions.
  19. .SH COMMENTS
  20. This program version is identical to legacy program \fBint6k\fR except for option -\fBm\fR which uses version \fB1\fR of the Qualcomm Atheros \fBVS_NW_INFO\fR vendor-specific message.
  21. Older firmware versions may not recognize this message version.
  22. .SH OPTIONS
  23. .TP
  24. .RB - a
  25. Read device attributes using VS_OP_ATTRIBUTES.
  26. Attributes are short strings and integers that describe device hardware and firmware.
  27. They are concatenated to form the output that is similar to option -\fBr\fR but derived differently.
  28. .TP
  29. .RB - b
  30. Requests and prints a device enumeration table on stdout using VS_EM_ID_TABLE.
  31. An enumeration table contains MAC addresses of known devices on the Ethernet (H1) side of a powerline device.
  32. This option is only supported on EoC enabled devices.
  33. .TP
  34. -\fBB \fIaction\fR
  35. Press the simple connect pushbutton using VS_PB_ENC.
  36. 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.
  37. Use 1 on both devices that are expected to join.
  38. Use 2 only on the device that is expected to leave the network.
  39. .TP
  40. -\fBC\fR \fIoperand\fR
  41. This option is permitted but ignored in order to support legacy scripts that have not been kept current.
  42. A warning message is printed to inform users that the option and operand are being ignored.
  43. .TP
  44. -\fBd\fR \fIfilename\fR
  45. Read Watchdog Report from the device and write it to the named file in binary format using VS_WD_RPT.
  46. The report file can be sent to Qualcomm Atheros for technical analysis.
  47. 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.
  48. .TP
  49. -\fBD\fR \fIxx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx\fR
  50. Define the 16 octet Device Access Key (DAK) in hex format.
  51. The DAK is used by options -\fBE\fR and -\fBJ\fR.
  52. It may also be set to "\fBkey1\fR" or "\fBkey2\fR" as explained in the \fBKEYS\fR section.
  53. .TP
  54. .RB - e
  55. Redirects stderr messages to stdout.
  56. Normally, status and error messages are printed on stderr while primary program output is printed on stdout.
  57. This option prints all output on stdout in cases where this is desired.
  58. .TP
  59. .RB - E
  60. Erase flash memory.
  61. You must specify the device DAK using option -\fBD\fR when the programmed DAK is not the default value or the device will refuse your request.
  62. This option erases all of flash memory and may take up to 60 seconds to complete.
  63. .TP
  64. .RB - f
  65. Read flash memory parameters using VS_GET_NVM.
  66. An error will be reported if no flash memory is present.
  67. .TP
  68. .RB - F [ F ]
  69. Write previously downloaded MAC and PIB to NVRAM using VS_MOD_NVM.
  70. Adding a second \fBF\fR here or another -\fBF\fR anywhere on the command line WILL NOT \fBforce-flash\fR a blank or corrupted NVRAM as with programs \fBint6kf\fR or \fBampinit\fR.
  71. Firmware loaded from NVRAM will treat force-flash as an error.
  72. Unlike program \fBplctool\fR, this program modifies factory default settings by erasing the User PIB and rewriting the Factory PIB.
  73. .TP
  74. .RB - g
  75. Read multicast group information discovered while IGMP snooping using VS_MULTICAST_INFO.
  76. .TP
  77. -\fBi\fR \fIinterface\fR
  78. Select the host Ethernet interface.
  79. All requests are sent via this host interface and only reponses received via this host interface are recognized.
  80. 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.
  81. This option then takes precedence over either default.
  82. .TP
  83. .RB - I
  84. Read the device PIB header using VS_MODULE_OPERATION and print the firmware major revision number, PIB minor revision number, Device Access Key (DAK), Network Membership Key (NMK), MAC address and other information on stdout.
  85. The values displayed can be changed using program \fBmodpib\fR.
  86. .TP
  87. -\fBJ \fIxx:xx:xx:xx:xx:xx\fR
  88. Set the Network Membership Key (NMK) on a remote device using VS_SET_KEY.
  89. This option is similar to option -\fBK\fR but requires the remote device MAC and DAK in addition to the NMK and local device MAC address.
  90. The NMK value is defined using option -\fBK\fR unless you want to use the default value.
  91. The remote DAK is defined using option -\fBD\fR unless you want to use the default value.
  92. Programming remote device keys is complicated.
  93. It is often easier to connect the device directly to the host and use the -\fBK\fR option.
  94. .TP
  95. -\fBK\fR \fIxx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx\fR
  96. Define the Network Membership Key (NMK) value used by options -\fBM\fR or -\fBJ\fR.
  97. The symbolic names "\fBkey1\fR" and "\fBkey2\fR" are recognized as described in the \fBKEY\fR section.
  98. .TP
  99. -\fBl\fR \fIcount\fR
  100. Define the number of times that the command will be repeated for each device specified.
  101. Normally, you will repeat operations on one device only.
  102. .TP
  103. .RB - L
  104. Read and display powerline link status.
  105. .TP
  106. .RB - m
  107. Read network membership information using VS_NW_INFO.
  108. This can be used to determine network configuration.
  109. .TP
  110. .RB - M
  111. Set the Network Membership Key (NMK) on the local device using VS_SET_KEY.
  112. The NMK value is specified using the -\fBK\fR option unless you want to use the default value.
  113. .TP
  114. -\fBn\fR \fIfilename\fR
  115. Read firmware from the device SDRAM and write it to the named \fB.nvm\fR file using multiple VS_MODULE_OPERATION messages.
  116. No assumptions are made based on filename and no filename conventions are enforced.
  117. This option is performed before option -\fBN\fR when both are specified.
  118. .TP
  119. -\fBN\fR \fIfilename\fR
  120. Read the named firmware file and write it to the device using multiple VS_MODULE_OPERATION messages.
  121. No assumptions are made based on filename and no filename conventions are enforced; however, files having invalid .nvm format will be rejected.
  122. This option is executed after -\fBn\fR when both are specified.
  123. .TP
  124. -\fBo\fI filename\fR
  125. Read all of flash memory and write it to the named file using multiple VS_MODULE_OPERATION messages.
  126. No assumptions are made based on filename and no filename conventions are enforced.
  127. This option can be used to dump and analyse flash memory.
  128. .TP
  129. -\fBp\fR \fIfilename\fR
  130. Read parameters from the device NVRAM and write them to the named \fB.pib\fR file using multiple VS_MODULE_OPERATION messages.
  131. No assumptions are made based on filename and no filename convetions are enforced.
  132. This option is executed before option -\fBP\fR when both are specified.
  133. .TP
  134. -\fBP\fR \fIfilename\fR
  135. Read the named parameter file and write it to the device using multiple VS_MODULE_OPERATION messages.
  136. Unlike program \fBplctool\fR, this program erases the User PIB and overwrites the Factory PIB.
  137. No assumptions are made based on filename and no filename conventions are enforced; however, files having invalid .pib format will be rejected.
  138. This option is executed after -\fBp\fR when both are specified.
  139. .TP
  140. .RB - q
  141. Suppresses status messages on stderr.
  142. .TP
  143. .RB - Q
  144. Quick flash.
  145. The program will not wait for a device to reset or the firmware to restart after writing flash memory.
  146. This option is desirable with newer firmware that writes flash memory in the background.
  147. It has no effect unless used with option -\fBF\fR or -\fBC\fR.
  148. .TP
  149. .RB - r
  150. Read device firmware and hardware revision using VS_SW_VER.
  151. Output is similar to option -\fBa\fR but is derived differently.
  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. -\fBS\fR \fIfilename\fR
  158. Read the named softloader file and write it to flash using multiple VS_MODULE_OPERATION messages if option -\fBF\fR is present.
  159. No assumptions are made based on filename and no filename conventions are enforced; however, files having invalid .nvm format will be rejected.
  160. This option is executed after -\fBn\fR when both are specified.
  161. .TP
  162. -\fBt \fItimer\fR
  163. Read timeout in milliseconds.
  164. Values range from 0 through UINT_MAX.
  165. This is the maximum time allowed for a response.
  166. The default is 50 milliseconds.
  167. .TP
  168. .RB - T
  169. Restore factory defaults.
  170. This permanently erases all PIB changes made since the device was last programmed with factory default settings.
  171. The device will automatically reset and reboot.
  172. .TP
  173. .RB - v
  174. Print additional information on stdout.
  175. In particular, this option dumps incoming and outgoing packets which can be saved as text files for reference.
  176. .TP
  177. -\fBw \fIseconds\fR
  178. Defines the number of \fIseconds\fR to wait before repeating command line options.
  179. This option has no effect unless option -\fBl\fR is also specified with a non-zero value.
  180. .TP
  181. .RB - x
  182. Cause the program to exit on the first error instead of continuing with remaining iterations, operations or devices.
  183. Normally, the program reports errors and moves on to the next operation, iteration or device depending on the command line.
  184. .TP
  185. .RB - ? ,-- help
  186. Print program help summary on stdout.
  187. This option takes precedence over other options on the command line.
  188. .TP
  189. .RB - ? ,-- version
  190. Print program version information on stdout.
  191. This option takes precedence over other options on the command line.
  192. 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.
  193. .SH ARGUMENTS
  194. .TP
  195. .IR device
  196. The Ethernet hardware address of some powerline device.
  197. More than one address may be specified on the command line.
  198. If more than one address is specified then operations are performed on each device in turn.
  199. The default address is \fBlocal\fR.
  200. as explained in the \fBDEVICES\fR section.
  201. .SH KEYS
  202. Passwords are variable length character strings that end-users can remember.
  203. Keys are fixed length binary values created by encrypting passwords.
  204. There are two encryption algorithms for HomePlugAV.
  205. One for DAKs and the other for NMKs.
  206. This means that a given password will produce different keys depending on use.
  207. This program only deals with keys because that is what powerline devices recognize.
  208. The passwords that generated the keys are irrelevant here.
  209. .PP
  210. Encryption keys are tedious to type and prone to error.
  211. For convenience, symbolic names have been assigned to common encryption keys and are recognized by options -\fBD\fR and -\fBK\fR.
  212. .TP
  213. .BR key1
  214. Key for encrypted password "\fBHomePlugAV\fR".
  215. This is "689F074B8B0275A2710B0B5779AD1630" for option -\fBD\fR and "50D3E4933F855B7040784DF815AA8DB7" for option -\fBK\fR.
  216. .TP
  217. .BR key2
  218. Key for encrypted password "\fBHomePlugAV0123\fR".
  219. This is "F084B4E8F6069FF1300C9BDB812367FF" for option -\fBD\fR and "B59319D7E8157BA001B018669CCEE30D" for option \fBK\fR.
  220. .TP
  221. .BR none
  222. Always "00000000000000000000000000000000".
  223. .SH DEVICES
  224. Powerline devices use Ethernet hardware, or Media Access Control (MAC), addresses.
  225. Device addresses are 12 hexadecimal digits (\fB0123456789ABCDEFabcdef\fR) in upper, lower or mixed case.
  226. Individual octets may be separated by colons, for clarity, but not all octets need to be seperated.
  227. For example, "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
  228. .PP
  229. These symbolic addresses are recognized by this program and may be used instead of the actual address value.
  230. .TP
  231. .BR all
  232. Equivalent to "broadcast", described next.
  233. .TP
  234. .BR broadcast
  235. A synonym for the standard Ethernet broadcast address, \fBFF:FF:FF:FF:FF:FF\fR.
  236. All devices, whether local, remote or foreign will respond to this address.
  237. .TP
  238. .BR local
  239. A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), \fB00:B0:52:00:00:01\fR.
  240. All local Atheros devices will recognize this address but remote and foreign devices will not.
  241. A remote device is any device at the far end of a powerline connection.
  242. A foreign device is any device not manufactured by Atheros.
  243. .SH REFERENCES
  244. See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
  245. .SH DISCLAIMER
  246. Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.
  247. Consequently, public information may not be available.
  248. 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.
  249. .SH EXAMPLES
  250. .PP
  251. # plcinit -n old.nvm -p old.pib -N new.nvm -P new.pib -F 01:23:45:67:89:AB
  252. .PP
  253. Performs 5 operations on one device.
  254. Uploads the firmware and PIB from the device and writes them to files \fBold.nvm\fR and \fBold.pib\fR, respectively.
  255. Reads files \fBnew.nvm\fR and \fBnew.pib\fR and downloads them as new firmware and PIB, respectively.
  256. Commits the downloaded firmware and PIB to NVRAM.
  257. Operations are executed in the order just described regardless of the order specified on the command line.
  258. 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.
  259. .PP
  260. # plcinit -N new.nvm 01:23:45:67:89:28
  261. # plcinit -P new.pib 01:23:45:67:89:28
  262. # plcinit -C 3 01:23:45:67:89:28
  263. .PP
  264. It is not neccessary to specify all operations on one command line.
  265. The three command lines above do essentially the same thing as the command line shown in the previou example.
  266. Notice that this example uses -\fBC 3\fR, instead of -\fBF\fR, as an alternate way to write MAC and PIB to NVRAM.
  267. Specifying -\fBC 1\fR, instead, would write the .nvm file only.
  268. Specifying, -\fBC 2\fR, instead, would write the .pib file only.
  269. The value \fB3\fR is the logical OR of \fB1\fR and \fB2\fR.
  270. .PP
  271. # plcinit -N new.nvm -P new.pib -FF local
  272. .PP
  273. Downloads file \fBnew.nvm\fR and file \fBnew.pib\fR and force flashes the \fBlocal\fR device.
  274. Force flashing only works on running firmware that has been downloaded and stated by the Qualcomm Atheros Boot Loader.
  275. See \fBplcinitf\fR to download, start firmware and perform a force flash in one operation.
  276. .PP
  277. # plcinit -MK key1
  278. # plcinit -M
  279. .PP
  280. These two commands are equivalent.
  281. They set the NMK on the local device to key1 as descripted in the \fBKEYS\fR section.
  282. The first command resets the NMK on the local device with -\fBM\fR then specifies the NMK as \fBkey1\fR.
  283. The second command omits the key specification since \fBkey1\fR is the program default NMK.
  284. One could, of course, type the encryption key.
  285. .SH SEE ALSO
  286. .BR ampboot ( 1 ),
  287. .BR ampinit ( 1 ),
  288. .BR amptool ( 1 ),
  289. .BR plcboot ( 1 ),
  290. .BR plctool ( 1 )
  291. .SH CREDITS
  292. Charles Maier <cmaier@qca.qualcomm.com>
  293. Nathaniel Houghton <nhoughto@qca.qualcomm.com>