I broke down and bought a GL-AR300M-Lite (so I don't have to keep saying I didn't own one) and am working through getting it running on the "stock" ath79 target.
It is a single-port device with wireless, and my guess is that default config will have it inaccessible after "clean" flash or firstboot as there will be no password set and typically wireless is disabled prior to interactive config.
What is the "approved" way of configuring such a device in the source so that it's accessible with a blank overlay partition?
Set up the single Ethernet as "LAN"?
If you're familiar with a similar device and its first-boot configuration, I'd appreciate a pointer so I don't reinvent the wheel.
BTW, cute little device for under US$18, delivered. Will be using it for providing wireless access to an Ethernet-only device as the first excuse for buying it.
I'm looking for a clean way to differentiate between the AR-300M (dual Ethernet) and the AR-300M-Lite (single) so that two builds aren't required for little if anything more than a first-boot config difference.
In looking at the DTS files, they suggest that there are two MACs in the "art" partition of the AR300M, one at offset 0x0 and one at 0x6
In looking at my AR300M-Lite, it appears that there is only one present
0000000 e4 95 6e xx xx xx ff ff ff ff ff ff ff ff ff ff
I'm hoping that a test for ff:ff:ff:ff:ff:ff:ff at offset 0x6 can tell if that second Ethernet device is present and connected or not.
If you've got access to an AR300M with two Ethernet sockets, would you be able to confirm that there is a MAC address at offset 0x6?
Thanks!
Edit: The MAC also appears later in the art, at offset 0x1002
0001000 02 02 e4 95 6e xx xx xx 00 00 00 00 00 00 00 00
Oh bah! There I thought I had a way to distinguish between the single- and dual-Ethernet devices without having to have an ar-300m-nor and ar300m-lite build.
If it helps someone with something else, here's how I was detecting locally administered MAC address
if [ $(( 0x$( cut -c 1-2 /sys/class/net/eth1/address ) & 2 )) -eq 2 ] ; then
echo "Self"
else
echo "Normal"
fi