FNET Change Static IP

cancel
Showing results for 
Search instead for 
Did you mean: 

FNET Change Static IP

Jump to solution
318 Views
pcpro178
Contributor III

My application uses a static IP address, but it needs the ability to change the IP address and subnet mask through software. Is there a way to do this without modifying the FNET stack?

Tags (2)
1 Solution
180 Views
pcpro178
Contributor III

I found that I could set the IP addresses during run-time using `fnet_netif_set_ip4_addr` and `fnet_netif_set_ip4_gateway`.  I mapped some memory space in flash to store the addresses while powered-down, and my application restores them using those two API calls at power-up.

View solution in original post

2 Replies
181 Views
pcpro178
Contributor III

I found that I could set the IP addresses during run-time using `fnet_netif_set_ip4_addr` and `fnet_netif_set_ip4_gateway`.  I mapped some memory space in flash to store the addresses while powered-down, and my application restores them using those two API calls at power-up.

View solution in original post

180 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Jim:

According to Fnet Quick start:

You are able to change the default network pararmeters

 

  • By using Shell commands:
  • set address <default-if IPv4 address>
  • set gateway <default-if IPv4 gateway address>
  • set netmask <default-if IPv4 netmask address>
  • By changing the default values in the fapp_user_config.h source file. 
    Your local system administrator is able to assign a unique IPv4 address for the board, and also provide you with the IPv4 addresses of the gateway and the netmask.

Regards

Daniel

0 Kudos