Configuring Homeplug from Linux#
Thu May 23 21:42:08 2019
The new house doesn't have structured cabling, and I won't be doing anything to address that until we start work on the extension. In the meantime, therefore, we're using Homeplug AV (networking over the power line). I had two plugs, I needed a third so I bought the cheapest one I could find on Ebay.
When it turned up it had no buttons - which made it a little difficult to add to the existing network. Usually you press the "pair" button on the new plug and then on the existing plug and count to ten and wave a dead chicken around[*] and do a little dance, but that doesn't work when there is no button. Here's how to do it, assuming (1) it's an Intellon chipset, and (2) you have a Linux or other Unix-like box with an ethernet adaptor to plug it into.
dd bs=8
count=1 if=/dev/random |od -x
. This is a shared secret which you
will need to install on all your adaptors, so probably you should save
it somewhere until you're done. Note: the faifa source code
seems to suggest that the key you provide is further hashed before
being used, so maybe any amount of random stuff is OK here and there's
no need to be precious about the format.
$ sudo faifa -i enp0s31f6 -m
a000
(which is "Get Device/SW Version Request), it might respond something
like this:
Choose the frame type (Ctrl-C to exit): 0xa000 Frame: Get Device/SW Version Request (0xA000) Dump: Frame: Get Device/SW Version Confirm (A001), HomePlug-AV Version: 1.0 Status: Success Device ID: INT6400, Version: INT6000-MAC-4-1-4102-00-3679-20090724-FINAL-C, upgradeable: 0
0xa050
(Set Encryption Key Request). It prompts you further for "local or remote" (I have no idea what this means, but "local" worked), for the key itself, and for the MAC address.
Choose the frame type (Ctrl-C to exit): 0xa050 Frame: Set Encryption Key Request (0xA050) Local or distant setting ? 0: distant 1: local 1 AES NMK key ?0001020304050607 Destination MAC address ?b0:48:7a:b9:00:00 Dump: Frame: Set Encryption Key Confirm (A051), HomePlug-AV Version: 1.0 Status: Success
I make no claim that this is correct, but it seems to work for me, and now I can plug my new Odroid C2 (I'll write about that another time, but there's little to say so far, it just runs Kodi) into the TV without the use of a 5m HDMI cable.
[*] make sure it's dead. Waving a live chicken is stressful for all involved.