Digi-Connect 9210 ME. The MAC address in appconf.h is used instead of MAC on the label.

I am using NET OS 7.5 to build the image.

Hello

Have you loaded an image into this connectme9210 or is this unit straight “out of the box”?

If you have loaded in image into this connectme9210, then in the file appconf.h in the main directory of the project (I assume you are using the IDE ESP) how is macro APP_USE_NVRAM defined?

I have loaded an image created with IDE ESP NET OS 7.5.

#define APP_USE_NVRAM APP_FOR_ALL_PARAMETERS.

I do use customizeIamSetStaticConfig() to change network parameters.

Hello

Assuming that at one time the correct MAC address was available in NVRAM and it is not now, then that means that somehow your MAC address got crunched. Generally this happens if the bootloader sensed that (through a CRC check) NVRAM was corrupt.

You have two options. Programmatically you can use the API customizeSetMACAddress. Look in the API reference guide
Hardware/Board Support->DEvelopment Board Parameters->Functions->customizeSetMACAddress for details on the inputs, outputs and return codes for this API.

Also in the serial dialog there is a line that will allow you to reset the MAC address.

So it sounds like something got corrupted. So my development cycle will not generally wipe out MAC.

  1. Create application with NetOS 7.5
    Program uses customizeIamSetStaticConfig() to change network settings
  2. FTP rom.bin and image.bin to device
  3. Use webpage updater to update rom.bin and image.bin when new release is available

Updating rom.bin or image.bin or both, should not affect the NVRAM value of the MAC addess. Also the structure used by customizeIamSetStaticConfig does not contain a MAC address and thus should not affect its value.

When you lose the MAC address do other NVRAM values look different than use expect or is NVRAM alone the only value that is defaulted? If NVRAM was corrupted then I would expect all NVRAM values to be set to default values, not just NVRAM.

Looking at the code there is also a call to customizeWriteDevBoardParams(&cache->nvParams); in the network_config_v.c file. Could this be causing MAC address wipe.

It is first read with following command.
customizeReadDevBoardParams(&cache->nvParams); then written back to with customizeWriteDevBoardParams(&cache->nvParams);

Hello

customizeReadDevBoardParams(&cache->nvParams); should be reading in the current values from NVRAM. Then customizeWriteDevBoardParams(&cache->nvParams); should be writing the values back to NVRAM (presumably after you updated some subset of values. Additionally, the CRC is recalculated in customizeWriteDevBoardParams before it calls the underlying code that actually writes values to NVRAM.

So it is unlikely that the call to customizeWriteDevBoardParams is crunching the MAC address by itself.

The only other reason I can think of that might cause NVRAM ot be corrupted would be if the board was powercycled while NVRAM was being written to. Doing so is almost guarenteed to crunch NVRAM.

Still have not got to the bottom of this. I have been creating custom images with correct MAC address for each 9210 so if it goes back to default the default will be the one on the sticker. Not having MAC address stay in flash is preventing in the field updates. These are only two calls.
customizeReadDevBoardParams(&cache->nvParams);
customizeReadDevBoardParams(&cache->nvParams);

with some code in between to change the static IP address to a default. It does not happen all the time when above code is ran. It seems to happen when the code runs and I power down the unit after 10 seconds. But not all the time. Sometimes it takes several times to reproduce. Very frustrating.