Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

No response from the server after sending a DHCP request

Posted by orifai01 on January 12, 2017

Hello, I have a working FreeRTOS + TCP/IP application which manages to receive and send responses to pings. In WireShark can see that FreeRTOS sends DHCP discover messages as both unicast and broadcast, yet there is no response received from the server (I suppose I should look for a packet directed to my MAC address, shall enter the first query in eConsiderFrameForProcessing function). What could be the reason for that? Attached are shapshot of FreeRTOS discover request and a DHCP discover of some service (which I couldn't turn off) for comparison.

https://s29.postimg.org/49b73hwxj/DiscoverPacketFreeRTOS.png https://s24.postimg.org/5b788fbv9/DiscoverPacketNotFree_RTOS.png


No response from the server after sending a DHCP request

Posted by orifai01 on January 12, 2017

For some reason, setting ipconfigDRIVERINCLUDEDTXIPCHECKSUM and ipconfigDRIVERINCLUDEDRXIPCHECKSUM to 0 has solved the problem.


No response from the server after sending a DHCP request

Posted by heinbali01 on January 12, 2017

Hi Orit,

When developing DHCP it can be handy to install a temporary DHCP-server on your own laptop. In that way you make sure to see all messages in WireShark.

Here is an example of a DHCP server: https://sourceforge.net/projects/dhcp-dns-server I chose the option "Run stand alone", it runs from a command-prompt.

The DHCP client will use both 'unicast' and 'broadcast', it starts with a unicast (dhcpBROADCAST flag cleared).

When the answer comes in, it is directed to UDP port 68, and xPortHasUDPSocket() should return pdTRUE for that port.

Make sure that your EMAC accepts the Ethernet broadcast address of all 1's.


No response from the server after sending a DHCP request

Posted by heinbali01 on January 12, 2017

Our posts were crossing each other.

enabling LLMNR and setting ipconfigDHCPREGISTERHOSTNAME to 1 have solved the problem.

Good to hear. I'm not sure why changing those features would make DHCP working.

I tested the DHCP client with LLMNR, with NBNS, and also without any name service at all.

Does LLMNR cause different settings in your NetworkInterface.c ?


No response from the server after sending a DHCP request

Posted by orifai01 on January 12, 2017

Hi Hein, thank you for your answer. As mentioned above, apparently setting ipconfigDRIVERINCLUDEDTXIPCHECKSUM and ipconfigDRIVERINCLUDEDRXIPCHECKSUM to 0 has solved the problem. I'll enable the Checksum Offload Engine in the ethernet controller (LAN9220) in order to set them again to 1.


No response from the server after sending a DHCP request

Posted by heinbali01 on January 12, 2017

All good, you're getting closer and closer.

Note that the "Checksum Offload Engine" must be studie well: test it with TCP, UDP, and ICMP messages. Some EMAC's want you to set the checksum field(s) to zero first, others don't care about the value.

Please feel free to publish you NetworkInterface.c or send it to us directly, so I can have a look.

Thanks, Hein


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists