mdioblock2(1)
π mdioblock2 β Qualcomm Atheros Clause 45 MDIO Instruction Block Assembler π
okay bestie, sit down, we're doing MDIO today and honestly? it's giving iconic. this is mdioblock2(1) from the Qualcomm Atheros Open Powerline Toolkit, and she is here to turn your hex register instructions into a whole MDIO instruction block. no cap. π¦
β¨ SYNOPSIS β¨
mdioblock2 [options] file [file] [...] [>stdout]
mdioblock2 [options] [<stdin] [>stdout]
like. she takes files, or she takes stdin, and she gives you output. that's the whole vibe. π
πΈ DESCRIPTION πΈ
So the whole point of this program is assembling an Atheros MDIO instruction block out of hexadecimal register instructions. π« These MDIO instruction blocks get written to Atheros powerline devices as modules using the VS_MOD_OP message type. Or, if you'd rather do it another way, you can use program int6kmod instead. options, options, we love choices.
Atheros MDIO modules consist of a 16-bit header followed by one or more MDIO communication frames with register masks, and they get padded to the nearest multiple of 32-bits for download purposes. β¨ You enter MDIO instructions here using the 802.3ae Clause 45 format (that's the addr, data and mask situation). And if you want a similar program that accepts instructions in 802.3 Clause 22 format β aka phy, reg, data and mask β go check out program mdioblock instead. sisters, not twins. π«Ά
This program is part of the Qualcomm Atheros Powerline Toolkit. See the AMP man page for an overview and installation instructions, because context is everything. π
π OPTIONS π
-qβ Quiet mode. She suppresses error messages caused by instruction syntax errors. silent but deadly (affectionate). π€«-vβ Verbose mode. Prints instructions onstderras they are processed. main character energy: everything gets narrated. π’-?,--helpβ Displays program help information onstderr. This option takes precedence over all other options on the command line except version information. help me help you. π-!,--versionβ Displays program version information onstderr. This option takes precedence over all other options on the command line except help information. Use this option when sending screen dumps to Atheros technical staff β they need the receipts. πΈ
π¦ ARGUMENTS π¦
fileβ A text file containing one or more generic MDIO register instructions, which consist of an address, data and mask field. Fields are separated by whitespace. Instructions are terminated with a semicolon. Multiple instructions may appear on one line, and one instruction may span multiple lines. Script-style comments are permitted between instructions but not between instruction fields. read that twice, bestie. π
π REFERENCES π
See the Qualcomm Atheros AR7x00 Firmware Technical Reference Manual, section on the Module Operation message type, for more information on MDIO Block format. it's giving homework but it's the useful kind. π
π DISCLAIMER π
Atheros HomePlug AV Vendor Specific Management Message 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.
fr fr. it's proprietary, they can change it whenever, and they don't owe you a heads up. that's the whole disclaimer, don't shoot the messenger. π
β¨ EXAMPLES β¨
The following command reads register instructions from text file mdio.txt and writes binary file mdio.bin. In this example, the program acts as a filter, reading from stdin and writing to stdout. Progress and error messages, if any, are written to stderr.
# mdioblock2 < mdio.txt > mdio.bin
The following command reads register instructions from files physetup.dat, then flowctl.dat, then misc.ins, and writes one binary MDIO block to file mdio.bin. The previous contents of file mdio.bin are overwritten. π
(yes, overwritten. bye bye old data.)
# mdioblock2 physetup.dat flowctl.dat misc.ins > mdio.bin
An example register instruction file might look like this. Instructions have addr, data and mask fields. Instruction fields are separated by whitespace and instructions are terminated by a semicolon. Multiple instructions can appear on one line, or one instruction can span multiple lines. Script-style comments are permitted between instructions but not between instruction fields. π§
2c 7e3f003f ffffffff;
8 500 ffffffff;
100 7d ffffffff; 30 19f005f2 ffffffff;
200
7d
ffffffff;
300 7d ffffffff;
# Hello World
400 7d ffffffff;
500 7d ffffffff;
see how 200 just sprawls across three lines and that's completely valid? slay. and # Hello World is sitting pretty in the middle because comments are allowed between instructions. just not between fields. remember that part. π
π SEE ALSO π
amp(1), int6kmod(1), int6kmdio(1), int6kmdio2(1), mdioblock(1), mdiodump(1), mdiogen(1)
the whole friend group. go say hi. π«Ά
β CREDITS β
Charles Maier
and that's the page!! this one's from open-plc-utils-0.0.3, dated November 2013 β shoutout to the November 2013 era for coming through with the toolkit. π stay hexed, stay slaying, and always terminate your instructions with a semicolon. periodt. π β¨
π¦ 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 deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms