Opnen TCP for MC9S12NE64: DHCP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Opnen TCP for MC9S12NE64: DHCP

1,569 Views
rADiaN
Contributor I
    Hello

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.

Regards

Radian
Labels (1)
0 Kudos
Reply
2 Replies

482 Views
Mampaey
Contributor I

Hi everyone,

 

nowadays, i have many issues with DHCP, my udp project works fine with static IP, but i can't make dhcp work.

 

So, is someone having a simple project with working dhcp?

 

It would be marvellous.

 

thanks.

 

 

0 Kudos
Reply

482 Views
dkelly
Contributor I
That and several other bug fixes are posted under Freescale-OpenTCP (or similar name) on sourceforge.net.

The big bug I found was that OpenTCP copied its MAC address backwards in DHCP replies so that 01-02-03-04-05-06 would appear as 06-05-04-03-02-01 in server logs.

More recently others have noted OpenTCP doesn't check for its own MAC address in broadcast DHCP replies so if you have more than one OpenTCP client listening on the wire and booting at the same time, the result is more than one claiming the same IP address.
0 Kudos
Reply