Hello,
I am kinda new with MQX. I am trying to retrieve an IP dynamically for my TWR-K60D100M board, using the RTCS DHCP.
I've found that there are 3 methods to do so, and I would like to know what are the differences/cons/pros of each method:
1. Using RTCS_if_bind_DHCP_timed().
2. Using ipcfg_bind_dhcp_wait().
3. Using ipcfg_bind_dhcp() followed by ipcfg_poll_dhcp().
Also, what is generally the difference between the RTCS functions and the ipcfg functions?
Thanks,
Lior.
Hi Lior,
Look at ipcfg_xxx as at the application library which is actually calls RTCS functions/services.
Usually ipcfg_ xxx functions call RTCS_xxx functions.
Thanks,
Andrey Butok
Hey Andrey, Thank you for replying.
However, I am still missing something: why would I want to use ipcfg functions, rather than RTCS functions? What is the recommended usage for each? While I choose one service, can I also use the 2nd one, or should I be consistent?
I ask that because I've seen a few methods to init services & modules (i.e. DHCP), and I am a bit confused.
Thanks again,
Lior.
Hi Lior,
I suggest using of ipcfg_xxx() where it is possible, just to be consistent.
You can look at ipcfg.c, to understand its internals/functionality.
Also look at sh_ipconfig.c as its usage example.
Regards,
Andrey Butok