I am using standard Yocto build from BSP 4.14.98 for imx8m mini. Our device is headless. After yocto boots on our device, I am able to access the device using ssh, device comes up with dhcp enabled, assigned IP address and works fine.
Before we ship the device, it must be configured for a known static ip address, subnet mask, gateway and dns. Our customers will have the option of using the device with the shipped ip address or change the network settings to their own.
I tried ifconfig command to change ip address, but upon reboot it went back to dhcp.
1. What is the best way to change ip address and mask etc., and save them?
2. My customers or I need to be able to do (1) above using my application without going to ssh. Is there any API (similar to Windows network adapter), I could use to change IP settings from my application?
Do I need to rebuild Yocto with any additional Install options?
Thank you.
Amrit Soni