RT1052use DHCP can't get ip FROM SOME router

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

RT1052use DHCP can't get ip FROM SOME router

1,347 Views
gossipboy
Contributor II

Use LWIP DHCP to get ip,But I found can't get ip from some routers.By CATCH the message and found that :if the router OFFER packages's length is 590 bytes,rt1052can get IP,But if the length is 394, can't get IP,So what causes it?What should I do?

0 Kudos
Reply
4 Replies

1,332 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
It seems a bit weird, so I was wondering if you can introduce your testing environment, such as the code demo, board, model number of the routers, captured data of DHCP protocol, etc.
Looking forward to your reply.
Have a great day.
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

1,308 Views
gossipboy
Contributor II

I test like this:

 1.USE stm32 to get IP I can get it from the router and If i use rt1052 by the same environment but can't get IP.And I chang the rt1052' MAC to stm32's MAC alos can't get IP.So I think this can ignore the question of the MAC address.

2.according to catch the OFFER packages find that the length is 342ytes,If the length is more than 500 bytes can get IP,I compare 2 OFFER messages and find If the length is 342, bootp flags field is 0x80, another is 0x0,That means RT1052 can't receive broadcast messages?But If i open the Promiscuous Mode also can't get message! why?

That are 2 messages:

342 bytes:

00 80 e1 14 3b 23 cc 64 a6 99 20 24 08 00 45 80 01 48 79 39 00 00 80 11 81 e5 0a 00 00 01 0a 00 2a 06 00 43 00 44 01 34 00 00 02 01 06 00 5f 94 7b 49 00 00 00 00 00 00 00 00 0a 00 2a 06 00 00 00 00 00 00 00 00 00 80 e1 14 3b 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63 35 01 02 01 04 ff ff 00 00 03 04 0a 00 00 01 06 04 0a 00 00 01 33 04 00 01 51 80 3b 04 00 01 27 50 3a 04 00 00 a8 c0 36 04 0a 00 00 01 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00

590 bytes:

00 80 e1 14 3b 23 bc f6 85 44 72 cc 08 00 45 00 02 40 00 00 00 00 40 11 f6 f3 c0 a8 00 01 c0 a8 00 68 00 43 00 44 02 2c 35 c2 02 01 06 00 5f 94 7b 49 00 00 00 00 00 00 00 00 c0 a8 00 68 00 00 00 00 00 00 00 00 00 80 e1 14 3b 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63 35 01 02 36 04 c0 a8 00 01 33 04 00 01 51 80 01 04 ff ff ff 00 03 04 c0 a8 00 01 06 04 c0 a8 00 01 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

 

That's all thanks.

0 Kudos
Reply

1,283 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
I was wondering if you can introduce your testing environment in detail, the demo code, hardware connecting, and how to capture the DHCP protocol data, as I'd like to replicate the phenomenon you encountered.
Have a great day.
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

1,297 Views
gossipboy
Contributor II

Thanks,

  I use a HUAWEI/ASUS router,And if I use ST TO get ip with the same Ethernet cable,It can do ,so I change the mac address to same,but can't get.So it can ignore the MAC issue. And I try to set enet in Promiscuous Mode,also don't receive the offer message(by print ,other arp message can print)

I try to get the OFFER packages between different router and find If the length is like 342,the enet can't get it,maybe it be ignored, I don't know.But if the OFFER length is more than 500,can get it also can get ip.

If I use the demo by nxp,It is same.

And I find the OFFER message different is the "bootp flags" I think maybe.There is the OFFER message:

This OFFER can't be catch:

00 80 e1 14 3b 23 cc 64 a6 99 20 24 08 00 45 80 01 48 79 39 00 00 80 11 81 e5 0a 00 00 01 0a 00 2a 06 00 43 00 44 01 34 00 00 02 01 06 00 5f 94 7b 49 00 00 00 00 00 00 00 00 0a 00 2a 06 00 00 00 00 00 00 00 00 00 80 e1 14 3b 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63 35 01 02 01 04 ff ff 00 00 03 04 0a 00 00 01 06 04 0a 00 00 01 33 04 00 01 51 80 3b 04 00 01 27 50 3a 04 00 00 a8 c0 36 04 0a 00 00 01 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00

 

This OFFER can be catch:

00 80 e1 14 3b 23 bc f6 85 44 72 cc 08 00 45 00 02 40 00 00 00 00 40 11 f6 f3 c0 a8 00 01 c0 a8 00 68 00 43 00 44 02 2c 35 c2 02 01 06 00 5f 94 7b 49 00 00 00 00 00 00 00 00 c0 a8 00 68 00 00 00 00 00 00 00 00 00 80 e1 14 3b 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63 35 01 02 36 04 c0 a8 00 01 33 04 00 01 51 80 01 04 ff ff ff 00 03 04 c0 a8 00 01 06 04 c0 a8 00 01 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

 

What's the reason?

0 Kudos
Reply