[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: MAC Address
- From: jose.camacho@...
- Date: Tue, 15 Feb 2011 16:05:31 +0100
I follow the list since a while, but this is my first
contribution. Thanks everyone for your support
Regarding the MAC address question, we also work with
embedded Linux and what we do in such szenarios, is calling the OS interface
functions using os.execute and shell commands.
Output will be save in a file and then, with strings
parsed. The same functionality is used for reading process IDs, network
usage, etc, and it is not *so* slow because we dump the information into
a file in a Ramdisk.
For dumping the MAC Address, call os.execute ('ifconfig
| grep HWaddr > [FILENAME]'). Then use io.open, read, close to get the
info from the file into a lua string, then os.remove (to delete the file)
and strings functions find (search for 'HWaddr ') and sub to extract the
Hope it helps
> > I'm not doing licensing, instead I have
multiple embedded devices that
> > are identical except for the MAC address. I'm trying to identify
> > device. The devices are Linux based so I can write some C code
> > MAC address. I was trying to avoid the C code and the corresponding
> > build/install complications.
> Try nixio: