ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.68k stars 2.99k forks source link

LPC1768 DHCP #4018

Closed chrissnow closed 7 years ago

chrissnow commented 7 years ago

Bug

Target LPC1768

Toolchain: ARM

Toolchain version:

mbed-cli version: 1.0.0

Since mbed-os 5.4.0 DHCP appears to be broken. I can see DHCP request and offers with wireshark but no IP is assigned to the interface Statically assigned IP works fine.

toyowata commented 7 years ago

Related this issue: https://github.com/ARMmbed/mbed-os-example-sockets/issues/17

geky commented 7 years ago

I'm having a difficult time reproducing this issue. The LPC1768 and ARCH_PRO both seem to work on the two networks I have available.

Could you attach the wireshark dump of the DHCP request/offer? I can probably fake the traffic to reproduce it here.

Also what does your ethernet hardware setup look like? If you are using an Arch Pro, did you compile with mbed compile -m ARCH_PRO?

chrissnow commented 7 years ago

I will get you a wireshark capture tomorrow, I may try a Ublox C027 I have at home tonight which is basically the same hardware. I'm using the EA LPC1769 board and a magjack. https://www.embeddedartists.com/products/lpcxpresso/lpc1769_cmsis_xpr.php mbed compile -t arm -m lpc1768

since going to static IP I haven't had any issues so it's unlikely to be hardware.

chrissnow commented 7 years ago

@geky here is a capture dhcp.zip

geky commented 7 years ago

Thanks! that will help a bunch.

Starting to dig my teeth in, it looks like the difference between our DHCP servers is that yours is responding with broadcast packets. This is likely an issue with a recent change to add broadcast support (https://github.com/ARMmbed/mbed-os/pull/3482?)

geky commented 7 years ago

@chrissnow, I think I found the issue in https://github.com/ARMmbed/mbed-os/pull/4060, let us know if there is still an issue.