setpib(7) Atheros Powerline Toolkit setpib(7)
NAME
setpib - Atheros PIB File Editor
SYNOPSIS
setpib file offset [format data] [format data] [...]
DESCRIPTION
Replace one or more values in a PIB file and re-compute the checksum. Values are specified
as a sequence of type/data pairs. Users must know the offset, length and type of the val‐
ues they change or problems will certainly result. This program makes absolutely no effort
to validate offsets or values.
This program can be used to change any PIB value, including those that one should not
change. Be warned that some PIB values are derived from, or interact with, others. Failure
to observe these dependencies may diminish performance or render the device inoperable.
Atheros does not recommend the use of this program to edit PIB parameters because small
mistakes can cause big problems. In addition, Atheros is under no obligation to provide
customers with the offsets or types of PIB file parameters.
Atheros recommends using program modpib to change common device identity parameters. It
also recommends using the Windows Device Manager whenever possible.
This program is part of the Atheros Powerline Toolkit. See the AMP man page for an
overview and installation instructions.
OPTIONS
-q Enable quiet mode which has not effect.
-v Print a hexdump of the edited region. Print hexdump headers if this option appears
twice. The region window may be changed with option -w.
-w window
The display window in bytes. When option -v is present, PIB information surrounding
the edited region is displayed to provide some sort of context. The edited region
appears in the middle of this window. The default window is 32 bytes. This means
that the 32 bytes before and the 32 bytes after the edited region are included in
the display.
-x Repair the checksum. By default, this program will not modify files that fail the
size or checksum test when opened. In addition, the program does not compute a new
checksum unless data has been changed. This option skips the the checksum test on
before and indicates that data has changed after so that a new checksum will be
computed.
-?, --help
Print program help summary on stdout. This option takes precedence over other
options on the command line.
-!, --version
Print program version information on stdout. This option takes precedence over
other options on the command line. Usethis option when sending screen dumps to
Atheros Technical Support so that they know exactly which version of the Linux
Toolkit you are using.
ARGUMENTS
file The PIB filename. The file must exist and will be re-written. No assumptions are
made based on filename and no filename conventions are enforced. This argument is
required and must precede the base argument.
offset The byte offset where changes will start. The offset is expressed in hexadecimal
with (or without) the leading "0x". Changes are applied in order, left to right,
and offset automatically increments by the correct amount after each change is
applied. This permits consectuive PIB locations to be changed with one command.
This argument is required and must follow the file argument. It must also precede
all format/data pairs.
Normally, you must use multiple setpib commands to change non-consecutive PIB loca‐
tions but careful use of format skip can achive the same results using one command.
format The implied length and encoding of the data. Valid types are byte, word, long, data
and hfid. A valid format must precede each data item. A byte is 8 bits, a word is
16 bits, a long is 32 bits and a huge is 64 bits. The format implies the maximum
data value except for format data which is limited by the number of octets entered
on the command line.
data The information written to the current PIB offset. Integer data may be expressed in
binary, decimal or hexadecimal but must not exceed the specified type. String data
may contain any ASCII characters that can be entered via keyboard but must be
enclosed in quotes when spaces are included. Binary values start with 0b or 0B and
hexadecimal values start with 0x or 0X.
FORMATS
byte integer
An unsigned integer stored as 8 bits or 1 byte. The value is expressed in decimal
by default but a binary value may be expressed with a 0b prefix and a hexadecimal
value may be expressed using a 0x prefix. Offset will increment by 1.
word integer
An unsigned integer stored as 16 bits or 2 bytes. The value is expressed in decimal
by default but a binary value may be expressed with a 0b prefix and a hexadecimal
value may be expressed using a 0x prefix. Offset will increment by 2.
long integer
An unsigned integer stored as 32 bits or 4 bytes. The value is expressed in decimal
by default but a binary value may be expressed with a 0b prefix and a hexadecimal
value may be expressed using a 0x prefix. Offset will increment by 4.
huge integer
An unsigned integer stored as 64 bits or 8 bytes. The value is expressed in decimal
by default but a binary value may be expressed with a 0b prefix and a hexadecimal
value may be expressed using a 0x prefix. Offset will increment by 8. This format
is only available on hosts that support 64 bit data values.
data hex
A stream of hexadecimal octets optionally separated by colons. The number of octets
determines the number of bytes written. Offset will increment by the number of
bytes written. This is identical to "hex" below.
hex hex
A stream of hexadecimal octets optionally separated by colons. The number of octets
determines the number of bytes written. Offset will increment by the number of
bytes written. This is identical to "data" above.
hfid text
An ASCII character string. The string is always stored as 64 bytes. Short strings
are padded on the right with NUL characters. Long strings are truncated on the
right. Offset will increment by 64. This may be used to enter user, network and
manufacturer identification strings.
key hex
A stream of hexadecimal octets optionally separated by colons. The number of octets
must convert to 16 bytes or an error will occur. Offset will increment by 16. This
is similar "data" and "hex" above but demands fixed length input. It may be used to
set the DAK, NMK or NVAK values.
zero count
An unsigned integer representing the number of consecutive bytes to write with
0x00. Offset will increment by the number of bytes written. This may be used to
erase regions of the PIB.
fill count
An unsigned integer representing the number of consecutive bytes to write with
0xFF. Offset will increment by the number of bytes written. This may be used to
erase regions of the PIB.
skip count
An unsigned integer representing the number of consecutive bytes to skip over or
advance before applying the next change. The intervening data locations are
unchanged.
EXAMPLES
The following example edits PIB file abc.pib by writing decimal value 1 at offset 01F7
followed by hexadecimal value 00B052BABE01. A partial dump is printed showing 16 bytes
before and after the edited data. The dump can be suppressed with option -q.
# setpib -v abc.pib 01F7 byte 1 data 00:B0:52:BA:BE:01
000001D0 00 00 00 00 00 00 00 00 00 .........
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001F0 00 00 00 00 00 00 00 01 00 B0 52 BA BE 01 00 00 ..........R.....
00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..............
The following example sets the manufacturer HFID string of a PIB. HFID strings are 64
characters long and either truncated or padded on the right with NUL characters. You may
need to enclose the string in quotes it it contains spaces.
# setpib -v abc.pib 24 hfid "Galactic Software Pirates, Inc."
00000000 38 1F 00 00 30 1B EB 04 00 B0 52 00 8...0.....R.
00000010 00 66 50 D3 E4 93 3F 85 5B 70 40 78 4D F8 15 AA .fP...?.[p@xM...
00000020 8D B7 00 00 47 61 6C 61 63 74 69 63 20 53 6F 66 ....Galactic Sof
00000030 74 77 61 72 65 20 50 69 72 61 74 65 73 2C 20 49 tware Pirates, I
00000040 6E 63 2E 00 00 00 00 00 00 00 00 00 00 00 00 00 nc..............
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000060 00 00 00 00 50 D3 E4 93 3F 85 5B 70 40 78 4D F8 ....P...?.[p@xM.
00000070 15 AA 8D B7 49 6E 74 65 6C 6C 6F 6E 20 45 6E 61 ....Atheros Ena
00000080 62 6C 65 64 bled
The following example displays the contents of file abc.pib without changing any data. The
region displayed is 24 bytes starting at offset 0x24. The format skip specified a region
without changing it. By default, the 32 bytes before and 32 bytes after are included in
the display.
# setpib -v abc.pib 24 skip 64
00000000 38 1F 00 00 30 1B EB 04 00 B0 52 00 8...0.....R.
00000010 00 66 50 D3 E4 93 3F 85 5B 70 40 78 4D F8 15 AA .fP...?.[p@xM...
00000020 8D B7 00 00 47 61 6C 61 63 74 69 63 20 53 6F 66 ....Galactic Sof
00000030 74 77 61 72 65 20 50 69 72 61 74 65 73 2C 20 49 tware Pirates, I
00000040 6E 63 2E 00 00 00 00 00 00 00 00 00 00 00 00 00 nc..............
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000060 00 00 00 00 50 D3 E4 93 3F 85 5B 70 40 78 4D F8 ....P...?.[p@xM.
00000070 15 AA 8D B7 49 6E 74 65 6C 6C 6F 6E 20 45 6E 61 ....Atheros Ena
00000080 62 6C 65 64 bled
The following example computes a new checksum without changing data. The file name and a
valid offset are required but no other values are needed. This form of the command can be
used after modifying the PIB using software that does not update the checksum.
# setpib abc.pib 0 -x
DISCLAIMER
PIB file structure and content is proprietary to Atheros Communications, Ocala FL USA.
Consequently, public information is not available. Atheros Communications reserves the
right to modify PIB file structure or content in future firmware releases without any
obligation to notify or compensate users of this program.
SEE ALSO
chkpib(7), getpib(7), modpib(7), mrgpib(7), pxe(7)
CREDITS
Charles Maier <charles.maier@atheros.com>
int6000-utils-linux Atheros Communications setpib(7)