DW3000 MakerFabs Library Configuration

I am trying to work on a multiple anchor DS-TWR example, it works fine but the problem is that ranging really gets hit after 10ish meters, after that anchors give very high amount of peaks and connectivity starts stutter. I tried to solve this issue by changing the dwt_config but when i change it this happens:

-Tag sends its messsage
-Anchor receives the message
-Anchor sends its response
-Tag does not receive that response

Here is the configuration that worked:

   static dwt_config_t config = {
    5,                /* Channel number. */
    DWT_PLEN_128,     /* Preamble length. Used in TX only. */
    DWT_PAC8,         /* Preamble acquisition chunk size. Used in RX only. */
    9,                /* TX preamble code. Used in TX only. */
    9,                /* RX preamble code. Used in RX only. */
    1,                /* 0 to use standard 8 symbol SFD, 1 to use non-standard 8 symbol, 2 for non-standard 16 symbol SFD and 3 for 4z 8 symbol SDF type */
    DWT_BR_6M8,       /* Data rate. */
    DWT_PHRMODE_STD,  /* PHY header mode. */
    DWT_PHRRATE_STD,  /* PHY header rate. */
    (129 + 8 - 8),    /* SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */
    DWT_STS_MODE_OFF, /* STS disabled */
    DWT_STS_LEN_64,   /* STS length see allowed values in Enum dwt_sts_lengths_e */
    DWT_PDOA_M0       /* PDOA mode off */
};

And here is the one I tried and did not work:

static dwt_config_t config = {
    5,            /* Channel number. */
    DWT_PLEN_4096, /* Preamble length. Used in TX only. */
    DWT_PAC32,     /* Preamble acquisition chunk size. Used in RX only. */
    9,            /* TX preamble code. Used in TX only. */
    9,            /* RX preamble code. Used in RX only. */
    1, /* 0 to use standard 8 symbol SFD, 1 to use non-standard 8 symbol, 2 for
          non-standard 16 symbol SFD and 3 for 4z 8 symbol SDF type */
    DWT_BR_850K,      /* Data rate. */
    DWT_PHRMODE_STD, /* PHY header mode. */
    DWT_PHRRATE_STD, /* PHY header rate. */
    (4096 + 1 + 64 - 32), /* SFD timeout (preamble length + 1 + SFD length - PAC size).
                      Used in RX only. */
    DWT_STS_MODE_OFF, /* STS disabled */
    DWT_STS_LEN_64,   /* STS length see allowed values in Enum dwt_sts_lengths_e
                       */
    DWT_PDOA_M0       /* PDOA mode off */
};

Any help would be appriciated.

Do you have any receive timeouts set? Dropping the data rate and increasing the preamble lengths will make your packet take significantly longer to transmit. If you have a timeout set and didn’t increase it then it could be that your receive is timing out and giving up before the packet has arrived.

Thanks for the reply,
I am trying it but it doesn’t solve the problem no matter how high i set it to, is there a way that I can calculate the value I need to assign.

The link here Power Calculator Released - #5 by AndyA can calculate the packet duration for a given set of settings.
It was for the DW1000 so no STS support but other than that the times should be valid.

That looks like a great tool, hope it works for me

It’s pulled from a decawave tool that they released a while back.
They had a java app that calculated power consumption and packet duration for the DW1000. The app broke years ago but all it was doing was acting as a front end for that excel file. For a while after that the excel file was still on their site if you knew the location (which was in the apps error message) so I grabbed a copy.

Thanks this worked but for only preamble length of 256 symbols, seems like I need to do more tests. For someone who will come to this thread here is the config I used that increased the range of stable communication :

dwt_config_t config = {
    5,            /* Channel number. */
    DWT_PLEN_256, /* Preamble length. Used in TX only. */
    DWT_PAC16,     /* Preamble acquisition chunk size. Used in RX only. */
    9,            /* TX preamble code. Used in TX only. */
    9,            /* RX preamble code. Used in RX only. */
    1, /* 0 to use standard 8 symbol SFD, 1 to use non-standard 8 symbol, 2
          for non-standard 16 symbol SFD and 3 for 4z 8 symbol SDF type */
    DWT_BR_6M8,       /* Data rate. */
    DWT_PHRMODE_STD,  /* PHY header mode. */
    DWT_PHRRATE_STD,  /* PHY header rate. */
    (257 + 8 - 16),    /* SFD timeout (preamble length + 1 + SFD length - PAC
                         size).    Used in RX only. */
    DWT_STS_MODE_OFF, /* STS disabled */
    DWT_STS_LEN_64,   /* STS length see allowed values in Enum
                       * dwt_sts_lengths_e
                       */
    DWT_PDOA_M0       /* PDOA mode off */
};

and you should set the RX_TIMEOUT_UUS to 6400000 which is used in the function dwt_setrxtimeout.

Hi @hsnbrky , did you manage to increase your range?
I am also stuck now at 10 meters.
If I change the set-up (Frequency and preamble), what should I change in the library?

hi @JT_1
image

Here is the dwt_config_t I used while reaching 40-50 meters. But for this to work you need to change some delay values :
image

Also you need to increase the TX power but this may exceed radio regulations:

dwt_txconfig_t txconfig_options =
{
    0x34,           /* PG delay. */
    0xffffffff,      /* TX power. */
    0x0             /*PG count*/
};

With this i got a pretty stable RTLS solution but i want to warn you, I don’t think you should use 3rd party boards instead you can use DWM3001CDK board which is more stable, easier to configure with the SDK and has more range, I could get 73 meters range with this board.

Edit: They are also cheaper