Discussion:
failed to get IP address from Router
(too old to reply)
lj2057@163.com [nuttx]
2018-01-10 15:19:09 UTC
Permalink
Hi Group,
I received an email from NuttX fan, he was asking about NuttX TCP/IP stack stability and reliability and he hoped I could help test it. Now I was running NuttX on Atmel SAMV71 Xplained Pro and DHCPC was enabled, but my board failed to get IP address from the router. Here is the log information (enabled debug feature in sam_emac.c and dhcpc.c):
dhcpc_request: Received OFFER from c0a80101
dhcpc_request: Send REQUEST
sam_txavail_work: ifup: 1
sam_transmit: d_len: 298 txhead[0]: 1
sam_interrupt_work: isr: 00000080 pending: 00000080
sam_interrupt_work: isr: 00000000 pending: 00000000
sam_interrupt_work: isr: 00000002 pending: 00000002
sam_recvframe: Entry rxndx[0]: 6
sam_recvframe: packet 6-11 (590)
sam_recvframe: rxndx: 11 d_len: 590
sam_receive: IPv4 frame
sam_recvframe: Entry rxndx[0]: 11
sam_recvframe: Exit rxndx[0]: 11
dhcpc_request: Received NAK
dhcpc_request: Broadcast DISCOVER
sam_txavail_work: ifup: 1
sam_transmit: d_len: 291 txhead[0]: 2
sam_interrupt_work: isr: 00000080 pending: 00000080
sam_interrupt_work: isr: 00000000 pending: 00000000
sam_interrupt_work: isr: 00000002 pending: 00000002
sam_recvframe: Entry rxndx[0]: 11
sam_recvframe: packet 11-12 (60)
sam_recvframe: rxndx: 12 d_len: 60
sam_receive: ARP frame
sam_recvframe: Entry rxndx[0]: 12
sam_recvframe: Exit rxndx[0]: 12
sam_interrupt_work: isr: 00000000 pending: 00000000
sam_interrupt_work: isr: 00000002 pending: 00000002
sam_recvframe: Entry rxndx[0]: 12
sam_recvframe: packet 12-1 (590)
sam_recvframe: rxndx: 1 d_len: 590
sam_receive: IPv4 frame
sam_recvframe: Entry rxndx[0]: 1
sam_recvframe: Exit rxndx[0]: 1
--------------------------------------------------------------------------------
It seemed that SAMV71 received broadcast from the router, but when tried to send message to router, it got no ACK.
If anyone could give a hint there I'd appreciated it!
Thanks & Best Regards
spudarnia@yahoo.com [nuttx]
2018-01-10 15:36:02 UTC
Permalink
Do you use Wireshark so that you can see the actual content of the Network traffic?
lj2057@163.com [nuttx]
2018-01-10 15:41:42 UTC
Permalink
No, I didn't use a network tool to capture network data. Your suggestion is a idea, I will connect my laptop to router and using network tool to analyze the actual data sending from my board.
Thanks & Best Rds
spudarnia@yahoo.com [nuttx]
2018-01-10 16:05:52 UTC
Permalink
I don't think you can see the traffic from a router. I use an Ethernet hub for network debug.


There are also some low cost devices for splitting and monitoring Ethernet. I forget what they are called,
Sebastien Lorquet sebastien@lorquet.fr [nuttx]
2018-01-10 16:10:33 UTC
Permalink
Of course a good old hub is ideal, but sometimes you cant find one...

in that case you can still see (a least a part of) dhcp traffic with a simple
switch or router, since it's made of broadcast packets...

It is also possible to install a basic dhcp server on the machine that runs
wireshark.

Sebastien
 
I don't think you can see the traffic from a router.  I use an Ethernet hub
for network debug.
There are also some low cost devices for splitting and monitoring Ethernet.  I
forget what they are called,
spudarnia@yahoo.com [nuttx]
2018-01-10 16:22:30 UTC
Permalink
I use a NetGear DS104 which is still readily available.
lj2057@163.com [nuttx]
2018-01-11 13:53:26 UTC
Permalink
Ethernet Hub was a good choice, hope I can find it in my storage room. Thanks for your suggestion, Sebastien.
spudarnia@yahoo.com [nuttx]
2018-01-11 14:20:49 UTC
Permalink
If you can't find a hub, another option is to jury rig a passive tap. Like:

https://hackaday.com/2008/09/14/passive-networking-tap/
http://www.janitha.com/articles/passive-splice-network-tap/
https://itgeekchronicles.co.uk/2011/09/21/random-diy-passive-ethernet-tap-or-pet/

http://www.enigmacurry.com/category/diy/

And lots more.

I also have one of these in a box somewhere (I probably could never find it if I needed it):
http://greatscottgadgets.com/throwingstar/
spudarnia@yahoo.com [nuttx]
2018-01-11 14:25:18 UTC
Permalink
There are some special instructions for using the passive tap on the Wireshark web page: The passive tap is a little more complex to use because it breaks out each of the full duplex directions as separate, read-only Ethernet interfaces.

https://wiki.wireshark.org/CaptureSetup/Ethernet#Capture_using_a_network_tap
Continue reading on narkive:
Loading...