Problem with basic DMW1001-DEV SPI

Hi friends,
I want to get the distance between two DMW1001-DEV.
For that:
I have 2 DMW1001-DEV connected to 2 raspberry pi 3.
I have connected all pins from dmw to RP3 :


We have installed bcm2835-1.58.
I have enabled SPI and compiled the example of tag_cfg and ancho_cfg from the tutorial, but no location apears (always [0,0,0,0]).
Also, we follow other code in Python (for DMW1001) to check other options
https://thingtype.com/blog/using-a-dwm1000-module-with-a-raspberry-pi-and-python/
But both examples without sucess.

Please, could you give us some feedback to run a simple connection between anchor and tag.
Many thanks in advance
Javi

Hi Javi,

Is the anchor set as initiator ?

Thanks
Yves

Hi Yves,
yes, we have used the same code provided with the configuration in the anchor as:
cfg_anchor.initiator = 1;
cfg_anchor.bridge = 0;
cfg_anchor.common.led_en = 1;
cfg_anchor.common.ble_en = 1;
cfg_anchor.common.uwb_mode = DWM_UWB_MODE_OFF;
cfg_anchor.common.fw_update_en = 1;
and in the tag as:
HAL_Print(“Setting to tag: dev%d.\n”, HAL_DevNum());
cfg_tag.low_power_en = 0;
cfg_tag.meas_mode = DWM_MEAS_MODE_TWR;
cfg_tag.loc_engine_en = 1;
cfg_tag.common.led_en = 1;
cfg_tag.common.ble_en = 1;
cfg_tag.common.uwb_mode = DWM_UWB_MODE_ACTIVE;
cfg_tag.common.fw_update_en = 0;

One of the DMW1001-DEV in the RP3 is runing as anchor and the other MW1001-DEV in the RP3 is runing as tag without changes in the location computed.
Thanks in advance
Javi

And the ./ext_api_fulltest is completed perfectly.
Thanks!

I found this post
https://devzone.nordicsemi.com/f/nordic-q-a/36439/spi-connection-between-nrf52832-and-raspberry-3-pi
where indicate maybe some connections are changed in DMW1001-DEV from default code, is it possible? how could I change them to check?
nrf_drv_spis_config_t spis_config = NRF_DRV_SPIS_DEFAULT_CONFIG;
spis_config.csn_pin = 3; // GPIO8/SPI_CE0 on RPi
spis_config.miso_pin = 7; // GPIO9/SPI_MISO on RPi
spis_config.mosi_pin = 6; // GPIO10/SPI_MOSI on RPi
spis_config.sck_pin = 4; // GPIO11/SPI_SCLK on RPi
spis_config.mode = NRF_DRV_SPIS_MODE_1;

Hi Javier,

You should be able to verify the GPIOs connection with the schematic of the DWM1001-Dev and DWM1001.

If there was an issue on the SPI bus you would most likely not be able to interface at all with the DWM1001, while it looks like you can retrieve data from it.

But I have already used a DWM1001-DEV on a raspberry pi with the official adapter and I could use the SPI fine, so I’d say the pins are alright.

Which api are you using the retrieve the location ?

You should use dwm_loc_get on the tag. As you are using only one anchor the position should be null, but you should get the distance to this anchor.

Maybe take a look at the page 40 of the doc below

In order to get a position, you need at least 3 anchors the tag can range to.

Thanks
Yves

Many thanks Yves,
I have successfully conected to one tag to raspberry and I obtain the location (by C++ code at the page 40 from api-guide) from the 3 anchors (one used as active) previously configured by android app.
My issue is that I would like to have one or more tags in the sytems “free” of raspberry, just one tag connected to RP3 to process the information as “listener”. Is it possible to obtain other tag locations by C++ code?
Event, I just needed the distance from one tag to other anchors.
If not, how could I obtain this information?
Many thanks
Javi