Raducu Radian

Opnen TCP for MC9S12NE64: DHCP

Discussion created by Raducu Radian on Oct 14, 2008
Latest reply on Mar 22, 2010 by Renaud Gelai

I used Open TCP stack for MC9S12NE64 as a starting point in my design.
I would like to share a little bit of my experience regarding DHCP:
1. I had problems with recognizing HOST NAME by the DNS server. The option HOST NAME is only in the DHCP DISCOVER message. It is missed in the DHCP_REQUEST message.  Normally must be in both messages ( I read a few books and also analyzed packets sent by other DHCP clients). When I made it like this I had no problem with recognizing the HOST NAME of my embedded system.
2. There is a mistake in the dhcpc.c when the renew and rebind time is computed from the lease time:
dhcpc_t1=(UINT32)((UINT16)(0.5)*temp); gives always zero because of truncating 0.5 to int!

If somebody else is interested in this subject I will be glad to exchange experience.