I am working on a project where I need to make the MAC address variable such that my ucontroller is connected to a chip which has 32bit unique ID. I read this 32bit ID into a buffer and then I want to use this 32bit ID for MAC Address.
The problem is FreeRTOS_IPInit function takes a const MAC address as shown in the following declaration in FreeRTOS_IP.h file.
BaseType_t FreeRTOS_IPInit( const uint8_t ucIPAddress[ ipIP_ADDRESS_LENGTH_BYTES ],
const uint8_t ucNetMask[ ipIP_ADDRESS_LENGTH_BYTES ],
const uint8_t ucGatewayAddress[ ipIP_ADDRESS_LENGTH_BYTES ],
const uint8_t ucDNSServerAddress[ ipIP_ADDRESS_LENGTH_BYTES ],
const uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] );
When I modify the above function by removing “const” term. I can pass the 32bit ID and can initialize the IP stack. I can even see my board gets IP address assigned by the DHCP, however when I try to communicate with Development board (TM4C129E). My Putty/YAT terminal says the connection refused. YAT terminal gives me following message;
<Warning: An existing connection was forcibly closed by the remote host>
Please note, if I do not modify the above function and rather use a const MAC address. Everything works perfect and I can talk to my board using Putty/YAT Terminal.
Any hint or any alternative approach that can make me accomplish it?