diff --git a/configs/b-l475e-iot01a/README.txt b/configs/b-l475e-iot01a/README.txt index cf59a99ec0..fe8f1ce5a9 100644 --- a/configs/b-l475e-iot01a/README.txt +++ b/configs/b-l475e-iot01a/README.txt @@ -593,5 +593,20 @@ Configuration sub-directories I would say it is functional but fragile in this usage, but probably robust in a less busy environment. - 2017-08-08: Added and verified broadcast packet transfers using the - hub-based broadcast UDP client. + 2017-08-08: Added broadcast packet transfers using the hub-based + broadcast UDP client. This appears to be a problem the HC06 + compression/decompression. The decompression logic comes up with + the destination address as ff02::ff00:00fe:3500 (which the receiving + node address is 37) instead of ff02::0001. It is then out of sync + with the IPHC headers and is unable to uncompress the rest of the + packet correction. + + Trying again with HC1 compression, I see other isses. The first + frame is received correctly, the following frames have an incorrect + packet length. + + There is probably another issue related to broadcast TX setup: If + we are sending to the multicast or broadcast address, should we + not also disable ACKs, retries, and RX timeouts? What will happen + if multiple radios ACK? At a minimum it could keep the driver + unnecessarily busy. diff --git a/drivers/wireless/spirit/drivers/spirit_netdev.c b/drivers/wireless/spirit/drivers/spirit_netdev.c index b8741db9b7..1ddf2733b7 100644 --- a/drivers/wireless/spirit/drivers/spirit_netdev.c +++ b/drivers/wireless/spirit/drivers/spirit_netdev.c @@ -1121,11 +1121,28 @@ static void spirit_interrupt_work(FAR void *arg) } if (irqstatus.IRQ_TX_FIFO_ERROR != 0 || - irqstatus.IRQ_MAX_RE_TX_REACH != 0) + irqstatus.IRQ_MAX_RE_TX_REACH != 0 || + irqstatus.IRQ_MAX_BO_CCA_REACH != 0) { - wlwarn("WARNING: Tx FIFO Error/Max retries\n"); +#ifdef CONFIG_DEBUG_WIRELESS_WARN + wlwarn("WARNING: Tx Error\n"); + if (irqstatus.IRQ_TX_FIFO_ERROR != 0) + { + wlwarn(" Tx FIFO Error\n"); + } - /* Discard TX data */ + if (irqstatus.IRQ_MAX_RE_TX_REACH != 0) + { + wlwarn(" Max retries reached\n"); + } + + if (irqstatus.IRQ_MAX_BO_CCA_REACH != 0) + { + wlwarn(" Max backoff reached\n"); + } +#endif + + /* Discard TX data in the FIFO */ DEBUGVERIFY(spirit_command(spirit, COMMAND_FLUSHTXFIFO)); irqstatus.IRQ_TX_DATA_SENT = 0; @@ -2519,20 +2536,6 @@ int spirit_hw_initialize(FAR struct spirit_driver_s *priv, return ret; } - ret = spirit_irq_enable(spirit, TX_FIFO_ERROR, S_ENABLE); - if (ret < 0) - { - wlerr("ERROR: Enable TX_FIFO_ERROR failed: %d\n", ret); - return ret; - } - - ret = spirit_irq_enable(spirit, RX_FIFO_ERROR, S_ENABLE); - if (ret < 0) - { - wlerr("ERROR: Enable RX_FIFO_ERROR failed: %d\n", ret); - return ret; - } - #ifdef CONFIG_SPIRIT_FIFOS #if CONFIG_SPIRIT_PKTLEN > SPIRIT_MAX_FIFO_LEN ret = spirit_irq_enable(spirit, TX_FIFO_ALMOST_EMPTY, S_ENABLE); @@ -2551,6 +2554,27 @@ int spirit_hw_initialize(FAR struct spirit_driver_s *priv, } #endif + ret = spirit_irq_enable(spirit, TX_FIFO_ERROR, S_ENABLE); + if (ret < 0) + { + wlerr("ERROR: Enable TX_FIFO_ERROR failed: %d\n", ret); + return ret; + } + + ret = spirit_irq_enable(spirit, RX_FIFO_ERROR, S_ENABLE); + if (ret < 0) + { + wlerr("ERROR: Enable RX_FIFO_ERROR failed: %d\n", ret); + return ret; + } + + ret = spirit_irq_enable(spirit, MAX_BO_CCA_REACH, S_ENABLE); + if (ret < 0) + { + wlerr("ERROR: Enable MAX_BO_CCA_REACH failed: %d\n", ret); + return ret; + } + /* Configure Spirit1 */ wlinfo("Configure Spriti1\n");