Topics

"net arp" command displays "ARP cache is empty" even after a series of arpings from peer devices #nrf52840


giriprasad@...
 

Hi,

I have interfaced "ENC28J60" to "PCA10056"(NRF52840) through SPI. Made necessary configurations in order to reflect hardware changes in software. Flashed sample application, "dumb_http_server" to the board. Enabled "ARP" and "ICMP". I am able to ping the board from peer devices in network and vice versa. Also, I am able to "arping" the board from peer devices in network. After this, I have issued "net arp" command in the serial console of the board. By this, I am expecting a list of peer devices to be displayed on the console. But console throws a message saying "ARP cache is empty". Can I know the reason for this behavior? Please let me know, if I was wrong in the process. Also, let me know if more information is needed. Attached configuration file for reference.

Thanks & Regards,
Giri Prasad N.


Jukka Rissanen
 

Hi,

from the attached .config file, the zephyr IP address is 10.128.8.81, and if you ping it from your network, you get a ICMP reply correctly but still no entry in arp cache in zephyr, is this correct? There definitely should be entry in arp cache as otherwise zephyr would not be able to send the reply back. Are you sure that you are pinging the correct device in this case?

Cheers,
Jukka


On Fri, 2019-05-31 at 04:00 -0700, giriprasad@... wrote:
Hi,

I have interfaced "ENC28J60" to "PCA10056"(NRF52840) through SPI. Made necessary configurations in order to reflect hardware changes in software. Flashed sample application, "dumb_http_server" to the board. Enabled "ARP" and "ICMP". I am able to ping the board from peer devices in network and vice versa. Also, I am able to "arping" the board from peer devices in network. After this, I have issued "net arp" command in the serial console of the board. By this, I am expecting a list of peer devices to be displayed on the console. But console throws a message saying "ARP cache is empty". Can I know the reason for this behavior? Please let me know, if I was wrong in the process. Also, let me know if more information is needed. Attached configuration file for reference.

Thanks & Regards,
Giri Prasad N.


giriprasad@...
 

Hi,

Thanks for your reply. I am sure that, I am getting ICMP reply correctly and there is no entry in the ARP cache. But, I need to tell you about a code change that I have made in the Zephyr drivers, in the process of my application development. I have disabled a piece of code in the file "zephyr/subsys/net/l2/ethernet/ethernet.c". Attached this file to the mail. The code under "#if DISABLED"  is the code that was disabled. Please let me know whether this change is responsible for the behavior I have stated in my previous mail. Below is the reason for the code-change. Please go through.

Reason for the code change:
I was trying to interface ENC28J60 to PCA10056. I have flashed dumb_http_server example. But I was unable to see the web page in the browser. I have verified the ethernet packet transactions in wireshark application. I saw a series of ARP requests and replies between server and client. (Please verify the screenshot of wireshark application attached to the mail. In the attached screenshot "10.128.8.103" is the IP of the system where I am loading the web page and "Microchi_23:3d:65"  is the ip of my device.) So, for a trial I have disabled the ARP related code in the function "ethernet_ll_prepare_on_ipv4". From then, I was able to see the web page on the browser. Also, I am able to ping the device. But ARP cache always shows as empty. 

Please help me to understand, why I was unable to see web page until I disabled ARP related code. Also let me know whether my code change is responsible for ARP cache being empty. Please let me know if you need more information.

Thanks in advance,
Giri Prasad N.