-->
Page 1 of 2

Changing MAC and its influence to ChipID

PostPosted: Tue Jul 14, 2015 5:04 pm
by matkar
Hi,
I apologise upfront for some tedious questions.
In the AT command set I've seen there is a command to change MAC address (AT+CIPSTAMAC and AT+CIPAPMAC) . Is there a way to change MAC address from ESP Ardiuno application? What function should I call? I also noticed the ChipID (uint32_t EspClass::getChipId(void)) is basically the integer representation of last three digits of the MAC address. In case I change module's MAC address, does this affect the ChipID value as well or does this value remain as originally assigned?

Regards,
Mat

Re: Changing MAC and its influence to ChipID

PostPosted: Tue Jul 14, 2015 6:19 pm
by martinayotte
The ESP.getChipID() is simply calling system_get_chip_id() from Espressif SDK.
So, maybe you are right, that means changing the MAC address will be reflected there.
I think we can be sure by testing it thru code.

Re: Changing MAC and its influence to ChipID

PostPosted: Thu Jul 16, 2015 11:42 am
by matkar
I did some tests. I uploaded the stock AT command firmware back to the module "at_v0.20_on_SDKv0.9.3\bin\user1.bin" and executed the commands to change the last digit of the mac address for STA and AP mode (AT+CIPSTAMAC and AT+CIPAPMAC). On both commands I received "OK" response but when verifying macs again only AP mac has been changed. The STA mac returned unchanged. The AP change is valid until the next reset. It does not save the set mac to flash. ChipID doesn't change as well.

Is there is a method to permanently change both MAC addresses?

Regards, Mat

Re: Changing MAC and its influence to ChipID

PostPosted: Thu Jul 16, 2015 12:27 pm
by martinayotte
Unfortunately, maybe not ...
(I know that some other chips, such STM32 or NXP-LPC have hard-coded ChipID, also used to generate MAC, and they usually coming from ROM or OTP written by manufacturers)
There is a possibility to manage yourself those MACs by writting them in the Flash and re-initialize them in your own firmware.
To be sure, the question needs to be asked on the Espressif BBS...