Hi Fotis, On 8/2/20, Fotis Panagiotopoulos <f.j.pa...@gmail.com> wrote: >> Where do you initialize the IP address? You should use the same socket >> descriptor to call the ioctl to set the MAC address at that location > > I am using the NuttX apps package for the moment, and specifically nsh. So > I guess this code handles everything for me. > > But still, I believe that the MAC address and the IP address belong to > different layers of the system. > The IP can be handled by the application (as the user may want to do > anything with it). > On the other hand, the MAC address is a hard-wired address, accessed in a > hardware specific way. In my opinion the application shouldn't mess with it > and it is best to be set once during the hardware initialization. >
The user (i.e. root user on Linux) could be enable to setup a new MAC address. You can do it using the ifconfig command, ip command or other. So this same feature should exist on NuttX. Also as Mr. Greg explained the application needs to setup the MAC address when the connection was lost and recovered. BR, Alan