Re: [USRP-users] Fwd: E310: Change MAC Address?

2020-11-27 Thread aneesh patel via USRP-users
No worries! In lieu of an eeprom burning solution which is the right answer as 
Phillip stated, one can just provision it in the dtb pre-production (ur uboot 
enc method) for an interim fix (i would assume) before SD cards are passed 
around with some scripting. Of course testing required :).
someone had this problem before too. yikes. best of luck and seems solvable 
multiple ways!
https://www.xilinx.com/support/answers/53476.html
Sent from Yahoo Mail on Android 
 
  On Fri, Nov 27, 2020 at 2:20 PM, Andrew Payne wrote:   
Thanks Aneesh but the decompiled dts file has no mention of the exact MAC 
address for eth0, but just to read from the eeprom from what I can gather. Plus 
an md5sum of the dtb file on the sdimg from Ettus is the same checksum as an 
e310 that has booted.
On Fri, Nov 27, 2020 at 1:40 PM Philip Balister  wrote:

On 11/27/20 1:34 PM, aneesh patel via USRP-users wrote:
> Hi Andrew,
> The MAC may be in the devicetree blobs in the boot area of the SD image.
> You will need dtcedit to decompile, edit, and recompile as needed.

I don't think so, since the first time the card boots it does read from
the i2c eeprom.

I'm guessing u-boot sets the ethaddr env var and saves it in the
environment, but I forget where that might be saved. Need to review the
u-boot configuration for setting about the u-boot env (maybe getting
saved to the sd card).

Anyone from Ettus paying attention? This is a pretty serious problem for
people copying cards and using them in different units. The correct
behavior is follow the MAC address programmed into the i2c eeprom.

Philip

> Amp
> 
> Sent from Yahoo Mail on Android 
>  
>   On Fri, Nov 27, 2020 at 1:23 PM, Andrew Payne via 
>USRP-users wrote:   
>___
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>   
> 
> 
> ___
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
> 

  
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


Re: [USRP-users] Fwd: E310: Change MAC Address?

2020-11-27 Thread Philip Balister via USRP-users
OK try this at the u-boot prompt:

env default -a
env save

and then

reset

This should reset the u-boot env to the default values and I think this
resets the ethaddr variable. Then you write it to the  mmc (99%
certain). On the next hard reset hopefully it reads the address from the
eeprom.

Philip

On 11/27/20 2:20 PM, Andrew Payne wrote:
> Thanks Aneesh but the decompiled dts file has no mention of the exact MAC
> address for eth0, but just to read from the eeprom from what I can gather.
> Plus an md5sum of the dtb file on the sdimg from Ettus is the same checksum
> as an e310 that has booted.
> 
> On Fri, Nov 27, 2020 at 1:40 PM Philip Balister  wrote:
> 
>> On 11/27/20 1:34 PM, aneesh patel via USRP-users wrote:
>>> Hi Andrew,
>>> The MAC may be in the devicetree blobs in the boot area of the SD image.
>>> You will need dtcedit to decompile, edit, and recompile as needed.
>>
>> I don't think so, since the first time the card boots it does read from
>> the i2c eeprom.
>>
>> I'm guessing u-boot sets the ethaddr env var and saves it in the
>> environment, but I forget where that might be saved. Need to review the
>> u-boot configuration for setting about the u-boot env (maybe getting
>> saved to the sd card).
>>
>> Anyone from Ettus paying attention? This is a pretty serious problem for
>> people copying cards and using them in different units. The correct
>> behavior is follow the MAC address programmed into the i2c eeprom.
>>
>> Philip
>>
>>> Amp
>>>
>>> Sent from Yahoo Mail on Android
>>>
>>>   On Fri, Nov 27, 2020 at 1:23 PM, Andrew Payne via USRP-users<
>> usrp-users@lists.ettus.com> wrote:
>>  ___
>>> USRP-users mailing list
>>> USRP-users@lists.ettus.com
>>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>>
>>>
>>>
>>> ___
>>> USRP-users mailing list
>>> USRP-users@lists.ettus.com
>>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>>
>>
> 

___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


Re: [USRP-users] Fwd: E310: Change MAC Address?

2020-11-27 Thread Marcus D Leech via USRP-users
I have a query In to Ettus engineering on this. I can’t find any documentation 
on changing the MAC. 

The u-boot environment thinks of the MAC address as precious and once it is 
set, it won’t let you change it or delete it. 

Presumably a fresh image from the download site has code that sets the u-boot 
env from hardware, which then “locks” it. U-boot used to use text files for the 
environment but now it’s in a binary format AFAiR. 

Sent from my iPhone

> On Nov 27, 2020, at 2:21 PM, Andrew Payne via USRP-users 
>  wrote:
> 
> 
> Thanks Aneesh but the decompiled dts file has no mention of the exact MAC 
> address for eth0, but just to read from the eeprom from what I can gather. 
> Plus an md5sum of the dtb file on the sdimg from Ettus is the same checksum 
> as an e310 that has booted.
> 
>> On Fri, Nov 27, 2020 at 1:40 PM Philip Balister  wrote:
>> On 11/27/20 1:34 PM, aneesh patel via USRP-users wrote:
>> > Hi Andrew,
>> > The MAC may be in the devicetree blobs in the boot area of the SD image.
>> > You will need dtcedit to decompile, edit, and recompile as needed.
>> 
>> I don't think so, since the first time the card boots it does read from
>> the i2c eeprom.
>> 
>> I'm guessing u-boot sets the ethaddr env var and saves it in the
>> environment, but I forget where that might be saved. Need to review the
>> u-boot configuration for setting about the u-boot env (maybe getting
>> saved to the sd card).
>> 
>> Anyone from Ettus paying attention? This is a pretty serious problem for
>> people copying cards and using them in different units. The correct
>> behavior is follow the MAC address programmed into the i2c eeprom.
>> 
>> Philip
>> 
>> > Amp
>> > 
>> > Sent from Yahoo Mail on Android 
>> >  
>> >   On Fri, Nov 27, 2020 at 1:23 PM, Andrew Payne via 
>> > USRP-users wrote:   
>> > ___
>> > USRP-users mailing list
>> > USRP-users@lists.ettus.com
>> > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>> >   
>> > 
>> > 
>> > ___
>> > USRP-users mailing list
>> > USRP-users@lists.ettus.com
>> > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>> > 
> ___
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


Re: [USRP-users] Fwd: E310: Change MAC Address?

2020-11-27 Thread Andrew Payne via USRP-users
Thanks Aneesh but the decompiled dts file has no mention of the exact MAC
address for eth0, but just to read from the eeprom from what I can gather.
Plus an md5sum of the dtb file on the sdimg from Ettus is the same checksum
as an e310 that has booted.

On Fri, Nov 27, 2020 at 1:40 PM Philip Balister  wrote:

> On 11/27/20 1:34 PM, aneesh patel via USRP-users wrote:
> > Hi Andrew,
> > The MAC may be in the devicetree blobs in the boot area of the SD image.
> > You will need dtcedit to decompile, edit, and recompile as needed.
>
> I don't think so, since the first time the card boots it does read from
> the i2c eeprom.
>
> I'm guessing u-boot sets the ethaddr env var and saves it in the
> environment, but I forget where that might be saved. Need to review the
> u-boot configuration for setting about the u-boot env (maybe getting
> saved to the sd card).
>
> Anyone from Ettus paying attention? This is a pretty serious problem for
> people copying cards and using them in different units. The correct
> behavior is follow the MAC address programmed into the i2c eeprom.
>
> Philip
>
> > Amp
> >
> > Sent from Yahoo Mail on Android
> >
> >   On Fri, Nov 27, 2020 at 1:23 PM, Andrew Payne via USRP-users<
> usrp-users@lists.ettus.com> wrote:
>  ___
> > USRP-users mailing list
> > USRP-users@lists.ettus.com
> > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
> >
> >
> >
> > ___
> > USRP-users mailing list
> > USRP-users@lists.ettus.com
> > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
> >
>
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


Re: [USRP-users] Fwd: E310: Change MAC Address?

2020-11-27 Thread Philip Balister via USRP-users
On 11/27/20 1:34 PM, aneesh patel via USRP-users wrote:
> Hi Andrew,
> The MAC may be in the devicetree blobs in the boot area of the SD image.
> You will need dtcedit to decompile, edit, and recompile as needed.

I don't think so, since the first time the card boots it does read from
the i2c eeprom.

I'm guessing u-boot sets the ethaddr env var and saves it in the
environment, but I forget where that might be saved. Need to review the
u-boot configuration for setting about the u-boot env (maybe getting
saved to the sd card).

Anyone from Ettus paying attention? This is a pretty serious problem for
people copying cards and using them in different units. The correct
behavior is follow the MAC address programmed into the i2c eeprom.

Philip

> Amp
> 
> Sent from Yahoo Mail on Android 
>  
>   On Fri, Nov 27, 2020 at 1:23 PM, Andrew Payne via 
> USRP-users wrote:   
> ___
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>   
> 
> 
> ___
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
> 

___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


Re: [USRP-users] Fwd: E310: Change MAC Address?

2020-11-27 Thread aneesh patel via USRP-users
Correction as the last post was from memory/apologies.
Package: device-tree-compiler
executable: dtc
Happy holidays. 
Amp

Sent from Yahoo Mail on Android 
 
  On Fri, Nov 27, 2020 at 1:35 PM, aneesh patel via 
USRP-users wrote:   
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
  
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


Re: [USRP-users] Fwd: E310: Change MAC Address?

2020-11-27 Thread aneesh patel via USRP-users
Hi Andrew,
The MAC may be in the devicetree blobs in the boot area of the SD image.
You will need dtcedit to decompile, edit, and recompile as needed.
Amp

Sent from Yahoo Mail on Android 
 
  On Fri, Nov 27, 2020 at 1:23 PM, Andrew Payne via 
USRP-users wrote:   
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
  
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


Re: [USRP-users] Fwd: E310: Change MAC Address?

2020-11-27 Thread Andrew Payne via USRP-users
P.S.: To add, in each of my 8 e310s, the following command:

cat /sys/class/net/eth0/address

yields:  00:80:2f:19:4c:37

So I have that mac address in 8 SDRs on my LAN.  And only one of them is
true, the one from which I cloned the golden image via dd.

But the following command:
hexdump /sys/bus/nvmem/devices/0-00510/nvmem

yields ... 8000 182f f624 ...
and if you rearrange each byte, you get: 00:80:2f:18:24:f6

which is the encoded hw address on the PHY on the sample e310.  If I knew
where Linux gets its /sys/class/net/... device tree from I could chase that
rabbit hole.

Any clues or tips I'd appreciate it.

Thanks,
Andrew


On Fri, Nov 27, 2020 at 1:15 PM Andrew Payne  wrote:

> Just an update on my findings with the MAC Address problem.  It seems that
> on first boot, the mac address is set in stone in the u-boot environment
> variable ethaddr.  It cannot be manually changed by me if I went into the
> u-boot configuration menu:
> https://www.denx.de/wiki/view/DULG/UBootEnvVariables
>
> So if you then move that SD card that has been booted in one particular
> e310 to another, the mac address will follow.  That is the problem I have,
> and I wanted to see if that also happens with others' e310s?  Or maybe it
> is the particular sdimg file I have downloaded (v3.15.0.0).
>
> I guess to solve this issue myself without digging in too deeply to the
> nuances of bitbaking (which I've already started and in a little bit over
> my head), I could just copy a fresh uboot image to the 7 other SDRs I have,
> and theoretically on bootup u-boot would detect the hw address and set
> their unique MAC address, which is what should happen.  But running md5sum
> on u-boot.img and boot.bin, to my dismay I have found out the checksum
> doesn't change after boot from a fresh sdimg file's u-boot.img and
> boot.bin.  So where could the u-boot environment variables actually be
> stored on the sd card?
>
> Thanks,
> Andrew
>
> On Wed, Nov 25, 2020 at 2:21 PM Andrew Payne  wrote:
>
>> Of the 8 e310s that I have tested with the same image, only one of them
>> has the actual MAC address of 00:80:2f:19:4c:37, which I was able to find
>> out via:
>> hexdump /sys/bus/nvmem/devices/0-00510/nvmem
>>
>> Weird.  Glad I found the one device that had that MAC though. So that
>> must have been patient 0. Then I copied that image to the others. But the
>> question is why did they adopt the same MAC address instead of reading from
>> the PROM at every boot up?  I'll have to dig deeper into U-Boot to see.
>>
>> On Wed, Nov 25, 2020 at 2:09 PM Marcus D Leech 
>> wrote:
>>
>>> Near as I can tell the e310 gets its MAC from the motherboard i2c
>>> eeprom.
>>>
>>> Sent from my iPhone
>>>
>>> On Nov 25, 2020, at 12:55 PM, Andrew Payne via USRP-users <
>>> usrp-users@lists.ettus.com> wrote:
>>>
>>> 
>>> So does the U-Boot environment determine the MAC address of eth0 prior
>>> to booting the kernel?  Or is it during the make of the boot image?  I just
>>> find it a stretch to believe that I am running an image on a number of
>>> SDRs, and they're all using the same MAC address, possibly from the e310
>>> for which the boot image was generated?
>>>
>>>
>>>
>>> On Wed, Nov 25, 2020 at 8:59 AM Philip Balister 
>>> wrote:
>>>
 Mine is different, but both seem to be from the National Instruments
 block (which is good):

 root@ni-e31x-30D280A:~# ifconfig
 eth0  Link encap:Ethernet  HWaddr 00:80:2F:25:02:37
   inet addr:192.168.11.152  Bcast:192.168.11.255

 I see a warning early in boot about using a MAC address from ROM. I'm
 not sure where that came from.

 Philip

 On 11/25/20 8:36 AM, Andrew Payne via USRP-users wrote:
 > -- Forwarded message -
 > From: Andrew Payne 
 > Date: Wed, Nov 25, 2020 at 8:35 AM
 > Subject: Re: [USRP-users] E310: Change MAC Address?
 > To: Philip Balister 
 >
 >
 > It is: 00:80:2f:19:4c:37
 >
 > When is that .patch file ran, is it during compilation of the BSP?
 When
 > would I see that error message printf("I2C EEPROM MAC address read
 > failed\n");?
 >
 > How could I experiment with compiling a new BSP with the UHD 3.15
 > environment loaded, so then I may insert my own MAC Address or get
 the i2c
 > EEPROM read to work? Do I need
 > https://github.com/EttusResearch/meta-ettus
 > and
 > https://github.com/Xilinx/u-boot-xlnx
 > and may be use this guide:
 >
 https://opencpi.github.io/bsp_e310/Ettus_E3xx_Getting_Started_Guide.pdf
 > ?
 >
 > Thanks,
 > Andrew
 >
 >
 > On Wed, Nov 25, 2020 at 8:26 AM Philip Balister 
 wrote:
 >
 >> What is that mac address? I'd like to see if it matches mine.
 >>
 >> If I recall correctly, the mac address is flashed into the i2c
 eeprom,
 >> u-boot is supposed to read that and use it. Factory test should set
 it
 >> up uniquely. But my memories fade. Inspecti

Re: [USRP-users] Fwd: E310: Change MAC Address?

2020-11-27 Thread Andrew Payne via USRP-users
Just an update on my findings with the MAC Address problem.  It seems that
on first boot, the mac address is set in stone in the u-boot environment
variable ethaddr.  It cannot be manually changed by me if I went into the
u-boot configuration menu:
https://www.denx.de/wiki/view/DULG/UBootEnvVariables

So if you then move that SD card that has been booted in one particular
e310 to another, the mac address will follow.  That is the problem I have,
and I wanted to see if that also happens with others' e310s?  Or maybe it
is the particular sdimg file I have downloaded (v3.15.0.0).

I guess to solve this issue myself without digging in too deeply to the
nuances of bitbaking (which I've already started and in a little bit over
my head), I could just copy a fresh uboot image to the 7 other SDRs I have,
and theoretically on bootup u-boot would detect the hw address and set
their unique MAC address, which is what should happen.  But running md5sum
on u-boot.img and boot.bin, to my dismay I have found out the checksum
doesn't change after boot from a fresh sdimg file's u-boot.img and
boot.bin.  So where could the u-boot environment variables actually be
stored on the sd card?

Thanks,
Andrew

On Wed, Nov 25, 2020 at 2:21 PM Andrew Payne  wrote:

> Of the 8 e310s that I have tested with the same image, only one of them
> has the actual MAC address of 00:80:2f:19:4c:37, which I was able to find
> out via:
> hexdump /sys/bus/nvmem/devices/0-00510/nvmem
>
> Weird.  Glad I found the one device that had that MAC though. So that must
> have been patient 0. Then I copied that image to the others. But the
> question is why did they adopt the same MAC address instead of reading from
> the PROM at every boot up?  I'll have to dig deeper into U-Boot to see.
>
> On Wed, Nov 25, 2020 at 2:09 PM Marcus D Leech 
> wrote:
>
>> Near as I can tell the e310 gets its MAC from the motherboard i2c eeprom.
>>
>> Sent from my iPhone
>>
>> On Nov 25, 2020, at 12:55 PM, Andrew Payne via USRP-users <
>> usrp-users@lists.ettus.com> wrote:
>>
>> 
>> So does the U-Boot environment determine the MAC address of eth0 prior to
>> booting the kernel?  Or is it during the make of the boot image?  I just
>> find it a stretch to believe that I am running an image on a number of
>> SDRs, and they're all using the same MAC address, possibly from the e310
>> for which the boot image was generated?
>>
>>
>>
>> On Wed, Nov 25, 2020 at 8:59 AM Philip Balister 
>> wrote:
>>
>>> Mine is different, but both seem to be from the National Instruments
>>> block (which is good):
>>>
>>> root@ni-e31x-30D280A:~# ifconfig
>>> eth0  Link encap:Ethernet  HWaddr 00:80:2F:25:02:37
>>>   inet addr:192.168.11.152  Bcast:192.168.11.255
>>>
>>> I see a warning early in boot about using a MAC address from ROM. I'm
>>> not sure where that came from.
>>>
>>> Philip
>>>
>>> On 11/25/20 8:36 AM, Andrew Payne via USRP-users wrote:
>>> > -- Forwarded message -
>>> > From: Andrew Payne 
>>> > Date: Wed, Nov 25, 2020 at 8:35 AM
>>> > Subject: Re: [USRP-users] E310: Change MAC Address?
>>> > To: Philip Balister 
>>> >
>>> >
>>> > It is: 00:80:2f:19:4c:37
>>> >
>>> > When is that .patch file ran, is it during compilation of the BSP?
>>> When
>>> > would I see that error message printf("I2C EEPROM MAC address read
>>> > failed\n");?
>>> >
>>> > How could I experiment with compiling a new BSP with the UHD 3.15
>>> > environment loaded, so then I may insert my own MAC Address or get the
>>> i2c
>>> > EEPROM read to work? Do I need
>>> > https://github.com/EttusResearch/meta-ettus
>>> > and
>>> > https://github.com/Xilinx/u-boot-xlnx
>>> > and may be use this guide:
>>> >
>>> https://opencpi.github.io/bsp_e310/Ettus_E3xx_Getting_Started_Guide.pdf
>>> > ?
>>> >
>>> > Thanks,
>>> > Andrew
>>> >
>>> >
>>> > On Wed, Nov 25, 2020 at 8:26 AM Philip Balister 
>>> wrote:
>>> >
>>> >> What is that mac address? I'd like to see if it matches mine.
>>> >>
>>> >> If I recall correctly, the mac address is flashed into the i2c eeprom,
>>> >> u-boot is supposed to read that and use it. Factory test should set it
>>> >> up uniquely. But my memories fade. Inspecting the u-boot source might
>>> >> show us 
>>> >>
>>> >>
>>> >>
>>> https://github.com/EttusResearch/meta-ettus/blob/zeus/meta-e31x/recipes-bsp/u-boot/files/0001-ni-zynq-Add-support-for-NI-E31x-SG1-SG3-boards.patch#L397
>>> >>
>>> >> I didn't sift through the ifdef's though.
>>> >>
>>> >> Philip
>>> >>
>>> >> On 11/24/20 7:28 PM, Andrew Payne via USRP-users wrote:
>>> >>> Is there a way to change the mac address of my e310s?  I have imaged
>>> >>> several e310s using the image file in
>>> >>> https://files.ettus.com/binaries/cache/e3xx/meta-ettus-v3.15.0.0/,
>>> and
>>> >> they
>>> >>> all have the same MAC address.
>>> >>>
>>> >>> On some searching around the web I can see that it is likely that
>>> the MAC
>>> >>> address parameter is specified as a U-boot parameter.  I'd like to
>>> know
>>> >>> what my options are f