Wifi: struct raw_rx_pkt_header signal values

I am receiving packets in monitor mode on a nRF7002DK. I need some advice on how to interpret the signal value. From <modules/nrf_wifi/fw_if/umac_if/inc/system/fmac_structs.h> I get:

struct raw_rx_pkt_header {
/** Frequency on which this packet received. */
unsigned short frequency;
/** Signal strength of received packet. */
signed short signal;
/** Received packet type */
unsigned char rate_flags;
/** Data rate of the packet (MCS or Legacy). */
unsigned char rate;
};
What I receive is for example:


1C:57:3E:71:99:E3: BEACON RSSI 23300 freq 2412 rate 1/0 len 22

How do I interpret 23300 as a RSSI value, ideally in dBm?

Parents Reply
  • // #include <modules/nrf_wifi/fw_if/umac_if/inc/system/fmac_structs.h>
    struct raw_rx_pkt_header {
        /** Frequency on which this packet received. */
        unsigned short frequency;
        /** Signal strength of received packet. */
        signed short signal;
        /** Received packet type */
        unsigned char rate_flags;
        /** Data rate of the packet (MCS or Legacy). */
        unsigned char rate;
    };

    static void parse_packet(unsigned char* packet, int len)
    {
        if (len < sizeof(struct raw_rx_pkt_header)) {
            LOG_ERR("Invalid size");
            return;
        }

        struct raw_rx_pkt_header* hdr = (struct raw_rx_pkt_header*)packet;
        packet += sizeof(struct raw_rx_pkt_header);

        uint8_t* ta = uwifi_get_80211_header_ta(packet, WIFI_SCAN_PKT_SIZE);
        if (!ta) {
            return;
        }

        uint16_t fc = uwifi_get_80211_header_fc(packet, WIFI_SCAN_PKT_SIZE);

        LOG_INF("SCAN " MAC_FMT ": %s RSSI %d freq %d rate %d/%x len %d",
                MAC_PAR(ta), wlan_get_packet_type_name(fc), hdr->signal,
                hdr->frequency, hdr->rate, hdr->rate_flags, len);
    }
Children
No Data
Related