Unable to get incoming ARPs with esp_wifi_internal_reg_rxcb in WIFI STA

roanwifi
Posts: 2
Joined: Sat Oct 09, 2021 12:05 pm

Unable to get incoming ARPs with esp_wifi_internal_reg_rxcb in WIFI STA

Postby roanwifi » Wed Jan 24, 2024 7:37 pm

Hi
for a project I'm working, I'm intercepting incoming WIFI traffic with esp_wifi_internal_reg_rxcb.
I have noticed in WIFI STA mode, only the packets for the DST-MAC = ESP32 wifi sta mac are forwarded to the callback.
The problem I have is that ARP packets entering the ESP32 WIFI are not being sent to the callback function.
I'm working on a PROXY-ARP function so I need to catch the incoming ARP packets which don't reach the my callback function. In WIFI AP mode it works but I need it to work in WIFI STA mode.

Is there any low level callback function to intercept ARP packets? I have digging into lwip etharp and it seems low level wifi functions connects to etharp then it forward packets but ARP.

Thanks
Antonio

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Unable to get incoming ARPs with esp_wifi_internal_reg_rxcb in WIFI STA

Postby MicroController » Thu Jan 25, 2024 10:12 am

Not sure if an ARP packet would be forwarded to other stations by an AP/router in the first place, when the AP itself can provide the answer.

roanwifi
Posts: 2
Joined: Sat Oct 09, 2021 12:05 pm

Re: Unable to get incoming ARPs with esp_wifi_internal_reg_rxcb in WIFI STA

Postby roanwifi » Thu Jan 25, 2024 7:48 pm

May be I didn't explain correctly as I'm not English speaker.

When an ARP packet is sent from the a WIFI AP to the ESP32 (WIFI STA), it seems to be processed a etherarp task which seems hooked between the wifi driver and the lwip tcp/ip stack.

If I intercept the received packets from the wifi driver with the "esp_wifi_internal_reg_rxcb" function, the ARP packets are not arriving to my function so I guess the etherarp task which resolves ARPs is between the wifi driver and my function.

The question is Can I intercept the received wifi packets at some other point which let me receive the ARP packets?

Regards
Antonio

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Unable to get incoming ARPs with esp_wifi_internal_reg_rxcb in WIFI STA

Postby MicroController » Fri Jan 26, 2024 1:22 pm

So we're talking about ARP responses?

Who is online

Users browsing this forum: Baidu [Spider] and 76 guests