如何在 Contiki-NG cc2420 无线电模块中禁用地址过滤?

How to disable address filtering in Contiki-NG cc2420 radio module?

当尝试通过如下所示更改 RADIO_PARAM_RX_MODE 来禁用地址过滤时,cc2420 auto ack 无法正常工作,mote 会收到重复的数据包。

radio_value_t radio_rx_mode;
NETSTACK_RADIO.get_value(RADIO_PARAM_RX_MODE, &radio_rx_mode);
radio_rx_mode &= ~RADIO_RX_MODE_ADDRESS_FILTER;
if(NETSTACK_RADIO.set_value(RADIO_PARAM_RX_MODE, radio_rx_mode) != RADIO_RESULT_OK) {
    LOG_WARN("radio does not support setting RADIO_PARAM_RX_MODE\n");
}else{
    LOG_INFO("turned of Address filtering.\n");
}

如何关闭仅地址过滤?

您的代码是禁用地址识别/过滤的正确方法。

关于自动确认,CC2420 数据表是这样说的:

If MDMCTRL0.AUTOACK is enabled, an acknowledge frame is transmitted for all incoming frames accepted by the address recognition with the acknowledge request flag set and a valid CRC. AUTOACK therefore does not make sense unless also ADR_DECODE and AUTOCRC are enabled.

这意味着如果您禁用了地址过滤,则需要发送软件ACK。