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 on stderr as they are processed. main character energy: everything gets narrated. πŸ“’
  • -?, --help β€” Displays program help information on stderr. This option takes precedence over all other options on the command line except version information. help me help you. πŸ†˜
  • -!, --version β€” Displays program version information on stderr. 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. πŸ’…βœ¨