Read MAC Address

173 views
Skip to first unread message

Simon Brown

unread,
Sep 26, 2023, 2:37:37 AM9/26/23
to herme...@googlegroups.com
Hi,

How do I read the actual MAC address of the ethernet hardware, is this actually possible? As far as I understand, the value is returned from the EEPROM.

Simon Brown

unread,
Sep 26, 2023, 5:59:04 AM9/26/23
to herme...@googlegroups.com
Hang on,

Both my HL2 return the same MAC address 00-1C-C0-A2-12-DD and​ my router shows the same MAC address. I'm no expert in this area, but isn't this a bit iffy (technical term). I am using the MAC address as a unique HL2 identification, for now I'll use the IP address.

I am going out soon, I seem to remember that there's something in the EEPROM / Gateware.

Toodles,


From: herme...@googlegroups.com <herme...@googlegroups.com> on behalf of Simon Brown <Si...@sdr-radio.com>
Sent: 26 September 2023 07:37
To: herme...@googlegroups.com <herme...@googlegroups.com>
Subject: Read MAC Address
 
--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/LNXP123MB25057C561C03369B9D38776DFAC3A%40LNXP123MB2505.GBRP123.PROD.OUTLOOK.COM.

"Christoph v. Wüllen"

unread,
Sep 26, 2023, 6:32:38 AM9/26/23
to Simon Brown, herme...@googlegroups.com
It is possible (libpcap) to "sniff" the MAC address but it
should not be necessary:

The MAC address is also reported as part of the discovery packet.

In piHPSDR I use the MAC address to "make" the name of the preferences
file, so I get the same preferences for the same radio (the IP address
may change, if it comes from a DHCP server).

I see no other purpose of knowing the MAC addr.

> Am 26.09.2023 um 11:45 schrieb Simon Brown <Si...@sdr-radio.com>:
>
> Thanks,
>
> Will check that out.
> From: "Christoph v. Wüllen" <DL1...@darc.de>
> Sent: 26 September 2023 08:51
> To: Simon Brown <Si...@sdr-radio.com>
> Subject: Re: Read MAC Address
> It may be that this is only possible using libpcap with administrator privileges.
> Look, e.g., at the file bootloader.c in my piHPSDR repo.

G4ZAL

unread,
Sep 26, 2023, 6:33:29 AM9/26/23
to Hermes-Lite
Hi Simon,

ALL HL2's spoof the MAC 00:1c:c0:a2:13:dd
If you have 2 or more HL2 on the same network, you should change the MAC of one, you can do this with SparkSDR, Quisk or hermeslite.py.
I have two HL2 and made one of them  00:1c:c0:a2:13:de for example.

Doing this will help your router from getting confuddled (another technical term) and possibly switching the IP address issued to the HL2's.

HTH
Nigel
G4ZAL

Simon Brown

unread,
Sep 26, 2023, 6:38:14 AM9/26/23
to herme...@googlegroups.com
OK,

Thanks - if it's in hermeslite.py then I'll have all I need. I thought that each ethernet adapter came with a pre-loaded MAC address, but maybe this was 30 years ago.

More fun for the programmer 🙂 .
From: herme...@googlegroups.com <herme...@googlegroups.com> on behalf of G4ZAL <devon...@gmail.com>
Sent: 26 September 2023 11:33
To: Hermes-Lite <herme...@googlegroups.com>

Subject: Re: Read MAC Address

G4ZAL

unread,
Sep 26, 2023, 7:16:00 AM9/26/23
to Hermes-Lite
Simon,
I don't know 'how to' in hermeslite.py as I used Quisk to change one of mine, which made it 'stick' and I now have both HL2 clearly defined on my LAN.
Obviously when making the change, only one HL2 should be on the network ;-)
I also set each as 'static' IP in my router.

Steve explained some time ago that as this is not a 'commercial' product, it was not possible to have individual MAC addresses for each HL2 as opposed to fully commercial products that would have an individual MAC assigned at 'birth'.

Nigel
G4ZAL

ron.ni...@gmail.com

unread,
Sep 26, 2023, 7:33:56 PM9/26/23
to Hermes-Lite
The discovery process that software uses to find an HL2's IP address returns the HL2's MAC address in bytes 3 thru 8 of the UDP reply packet.

Ron, N6YWU

Don [N5SKT]

unread,
Sep 27, 2023, 8:48:27 AM9/27/23
to ron.ni...@gmail.com, Hermes-Lite
I have had an HL2 and a radioberry on the same network and it was able to distinguish them. So apparently, the radioberry's and HL2 don't have the mac issue? 



--
Best Regards,
Don - N5SKT

G4ZAL

unread,
Sep 27, 2023, 8:58:03 AM9/27/23
to Hermes-Lite
also have a radioberry and indeed it does have a totally different MAC address, BUT, this comes from the Raspberry Pi host that it is plugged onto.

Nigel
G4ZAL

Steve Haynal

unread,
Oct 1, 2023, 4:22:19 PM10/1/23
to Hermes-Lite
Hi All,

All HL2 spoof the same MAC address. You can set the lower 16-bits of the MAC address to be different via Quisk, SparkSDR and hermeslite.py. See the network guide:


I have multiple HL2s on the same network provided each has a different MAC address.

73,

Steve
kf7o
Reply all
Reply to author
Forward
0 new messages