Raspberry pi connected to a tag

Hi,

I have a module (DWM1001) configured like an active tag, I can retrieve data (mac address and locations) using SPI(selected in makefile) ports (as reference I used test_les.c), “stationary detection” was disabled, I am getting data kind of in burst mode, I have checked the log and it seems SPI crashed quite often for something like 5 to 10 seconds.

Do you know any work around?

Using the sample application test_les.c, If I select UART (in makefile), I can read mac address of the device which is good news because there is a connection between dwm1001 and RPi, but no location reports at all. any hint?

With Kind regards.

O.

Hi ,

Not too sure what this problem is.
Do you mind sharing your .c file and the log that reflects the problem?

Weibo

Hi,
I am using your code “test_les.c” configured as SPI reading. I have a module connected to a RPI and I know there is a connection between them. It seems to be working, but quite regularly it does hangs. For a 10 or 20 seconds where I get no data at all.
I looked at the logs, and it mentioning some SPI errors:

lmh: SPI0: Received 3 bytes, in 489 ms OK
dwm_loc_get(&loc)
hal: SPI: Tx 2 bytes: 0x0c00
lmh: SPI0: Rx step 1:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 1 bytes: 0x65
lmh: SPISPI0: Rx step 2:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 101 bytes: 0x400100410dcb0100007f1500001100000052495104b091d40f000064a8020000c4220000360b00006417512f1a000064c800000000000000960a0000642503851b000064a00a000000000000960a00006434938c11000064bc0c0000c42200002c0b00006
4
lmh: SPI0: Wait 1 ms…
lmh: SPI0: Received 101 bytes, in 2 ms OK
Check Tx&Rx:
OK
ts:1555503624.215854 [459,5503,17,82]
#0)a:0x000091b0[680,8900,2870,100]d=4052,qf=100
#1)a:0x00005117[200,0,2710,100]d=6703,qf=100
#2)a:0x00000325[2720,0,2710,100]d=7045,qf=100
#3)a:0x00009334[3260,8900,2860,100]d=4492,qf=100

dwm_loc_get(&loc)
hal: SPI: Tx 2 bytes: 0x0c00
lmh: SPI0: Rx step 1:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 1 bytes: 0x51
lmh: SPISPI0: Rx step 2:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 81 bytes: 0x400101410dc40200003e160000b8ffffff52493d03b0918110000064a8020000c4220000360b0000642503af1b000064a00a000000000000960a0000643493a811000064bc0c0000c42200002c0b000064
lmh: SPI0: Wait 1 ms…
lmh: *** ERROR *** HAL_SPI: DWM1001_RV_ERR: 1
Check Tx&Rx:
Fail
dwm_loc_get(&loc)
hal: SPI: Tx 2 bytes: 0x0c00
lmh: SPI0: Rx step 1:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 1 bytes: 0x65
lmh: SPISPI0: Rx step 2:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 101 bytes: 0x400101410df7020000bb160000f4ffffff51495104b091f80e000064a8020000c4220000360b00006434938311000064bc0c0000c42200002c0b00006417514b1a000064c800000000000000960a0000642503bd1b000064a00a000000000000960a00006
4
lmh: SPI0: Wait 1 ms…
lmh: *** ERROR *** HAL_SPI: DWM1001_RV_ERR: 1
Check Tx&Rx:
Fail
dwm_loc_get(&loc)
hal: SPI: Tx 2 bytes: 0x0c00
lmh: SPI0: Rx step 1:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 1 bytes: 0x65
lmh: SPISPI0: Rx step 2:
lmh: SPI0: Wait 1 ms…
hal: SPI: Rx 101 bytes: 0x400100410dee020000141700001a00000052495104b0910f0f000064a8020000c4220000360b0000643493ea11000064bc0c0000c42200002c0b0000641751391a000064c800000000000000960a0000642503561b000064a00a000000000000960a00006
4
lmh: SPI0: Wait 1 ms…
lmh: SPI0: Received 101 bytes, in 2 ms OK
Check Tx&Rx:
OK
ts:1555503654.216376 [750,5908,26,82]
#0)a:0x000091b0[680,8900,2870,100]d=3855,qf=100
#1)a:0x00009334[3260,8900,2860,100]d=4586,qf=100
#2)a:0x00005117[200,0,2710,100]d=6713,qf=100
#3)a:0x00000325[2720,0,2710,100]d=6998,qf=100

Hi,

I checked the log. A very quick judgement is that, in the system you setup, the Tag only got TWR results from 3 Anchors rather than 4. And from the TWR results, for some reason (e.g. the AN location is not very accurate, or the Tag is in some NLOS situation), the Tag didn’t solve any location. This led to some problem in the TLV response array.

We need to do some more investigation on this and will get back to you later.

Weibo