FNET Change Static IP

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FNET Change Static IP

ソリューションへジャンプ
1,980件の閲覧回数
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?

タグ(2)
1 解決策
1,842件の閲覧回数
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.

元の投稿で解決策を見る

2 返答(返信)
1,843件の閲覧回数
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.

1,842件の閲覧回数
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 件の賞賛
返信