Tech Zone > Programming

Setting static IP address to UDHCP client

(1/1)

ENzero:
I am using udhcp client for an embedded device. I am trying to add a feature to set a static IP, Netmask, DNS, and gateway address.

I am trying to set it through the "-r" argument (request):


--- Code: ---
/sbin/udhcpc -A 3 -f -s /tmp/udhcpc_wlan0_sh -i wlan0 -r 172.16.0.2
--- End code ---

It does not seem to work. I try to connect my device to an access point and it still used the dhcp deamon provide address.

I was wondering if there are any additional things that I need to do to enable static address.

Navigation

[0] Message Index

Go to full version