1

When trying to disable address filtering by changing RADIO_PARAM_RX_MODE like below, cc2420 auto ack is not working and motes get duplicated packets.

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");
}

How to turn off just address filtering?

kfx
  • 8,136
  • 3
  • 28
  • 52
sobhan nami
  • 60
  • 1
  • 7

1 Answers1

0

Your code is the correct way to disable the address recognition / filtering.

Regarding auto-ACK, the CC2420 datasheet says this:

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.

This means that if you have address filtering disabled, you need to send software ACK.

kfx
  • 8,136
  • 3
  • 28
  • 52
  • enable software ack by defining CSMA_CONF_SEND_SOFT_ACK in project-conf.h of contiki-ng but when i count the acked packet getting 0? for counting the packet i define LINK_STATS_CONF_PACKET_COUNTERS in project-conf. – sobhan nami Oct 18 '21 at 09:40
  • 1
    The problem was the short time to get the acked packet and i change the CSMA_ACK_WAIT_TIME in csma.h file to fix this problem. – sobhan nami Oct 18 '21 at 11:18