Hello
I use FreeRTOS + FAT with Renesas RA6M3.
I can change DHCP ON/OFF at build project.
#define ipconfigUSE_DHCP 0 or 1
I want to change DHCP ON/OFF in runtime.
Please tell me How to change DHCP ON/OFF.
Hello
I use FreeRTOS + FAT with Renesas RA6M3.
I can change DHCP ON/OFF at build project.
#define ipconfigUSE_DHCP 0 or 1
I want to change DHCP ON/OFF in runtime.
Please tell me How to change DHCP ON/OFF.
You can use the bWantDHCP
field inside the bits
field of the network endpoint for which you want to turn DHCP on/off.
You can take a look at this example.
If you need even finer control over DHCP, you can take a look at the: xApplicationDHCPHook_Multi
, this user implemented hook function is called by the DHCP state machine at multiple phases of the DHCP process. If you wish to stop the DHCP process in the middle for a particular endpoint - pxEndPoint
you can make this hook function return - eDHCPUseDefaults
, causing the TCP/IP stack to use the static IP settings.
Thank you for reply
I’ll try it.
Is this sample for IPV6?
Can you tell me for IPV4?
The example I linked is an IPv6 + IPv4 demo.
The usage is the same regardless of the IP version.
Here is another example that’s IPv4 only.