Hi,
I'm evaluating the nrf7002 for use in a monitor mode device.
I'm using a nrf7002-dk, nrf connect sdk 2.6.1.
I'm working off of the monitor mode sample here: https://github.com/nrfconnect/sdk-nrf/tree/v2.6.1/samples/wifi/monitor
I'm finding two issues:
Issue 1:
I can only get 64-255 bytes of monitor payload. I'm judging this by printing the values of received here: https://github.com/nrfconnect/sdk-nrf/blob/v2.6.1/samples/wifi/monitor/src/main.c#L371C1-L372C37
For the default sample configuration, the max received value is 70 (-6 for RAW_PKT_HDR = 64)
If I manually configure the filter length higher like this in wifi_set_mode():
#include <fmac_structs.h> struct wifi_filter_info filter_info = { 0 }; filter_info.if_index = net_if_get_by_iface(iface); filter_info.filter = NRF_WIFI_PACKET_FILTER_ALL; filter_info.buffer_size = 255; filter_info.oper = WIFI_MGMT_SET; ret = net_mgmt(NET_REQUEST_WIFI_PACKET_FILTER, iface, &filter_info, sizeof(filter_info)); if (ret) { LOG_ERR("Mode setting filter %d", ret); return -1; }
The maximum packet size increases to 255 (received = 261 - 6 = 255)
But higher values do not work.
I see that in the command structure capture_len is given as an unsigned char:
https://github.com/nrfconnect/sdk-nrfxlib/blob/main/nrf_wifi/fw_if/umac_if/inc/fw/host_rpu_sys_if.h#L1169-L1178
But in the SDK filter API and everywhere else this value is given as an unsigned short:
https://github.com/nrfconnect/sdk-nrfxlib/blob/v2.6.1/nrf_wifi/fw_if/umac_if/src/fmac_api_common.c#L1243
so I assume values >255 are lost in the cast into the command wire format.
Is there a way to fix this? I'd like to capture full length packets.
Issue 2:
If I filter for NRF_WIFI_PACKET_FILTER_MGMT, I get no packets.
Reproduction for this is to use the same filter configuration used above, but setting filter_info.filter = NRF_WIFI_PACKET_FILTER_MGMT. When doing this the example will never print any packets/stats (as the stats are triggered by packet reception). I know the management frames are there because with filtering set to *_ALL, the management frame statistics counts increases.
Thanks,
-Pascal