SPI comunication between DWM1001-dev and Chip ESP8266 (WeMos D1 mini)

hi, as the tittle say, im trying to do a SPI comunication between DWM1001-dev and WeMos D1 mini, im using the following code (from a post):

#include <SPI.h>
SPISettings settingsA(8000000,MSBFIRST,SPI_MODE0);


void setup() {
pinMode(SS,OUTPUT);
Serial.begin(115200);
SPI.begin();
}

void loop() {
Serial.println("request for pos start ");
SPI.beginTransaction(settingsA);
digitalWrite(SS,LOW);
Serial.print("Sending command, getting back these bytes: ");

Serial.print(SPI.transfer(0x02),HEX);
Serial.print(" ");
Serial.print(SPI.transfer(0x00),HEX);
Serial.println(" ");
digitalWrite(SS,HIGH);

// get the SIZE
uint8_t rxSize = 0x00;
while (rxSize == 0x00) {
digitalWrite(SS,LOW);
rxSize = SPI.transfer(0xFF);
digitalWrite(SS,HIGH);
}
Serial.print("Size:");
Serial.print(rxSize,HEX);
Serial.println("");

Serial.print("here are the data DWM1001 sent back: ");
digitalWrite(SS,LOW);
for (byte i = 0; i < rxSize; i++) {
Serial.print(SPI.transfer(0xFF),HEX);
Serial.print(" ");
}
digitalWrite(SS,HIGH);

Serial.println("");
Serial.println("------------------");
SPI.endTransaction();

delay(100);
}

So im trying to understand what im receiving , because when i use PuTTY to connect with the DWM1001-dev, and i can see the position

Connection that i used:

D8 - Pin 24
D7 - Pin 19
D6 - Pin 21
D5 - Pin 23
G - Pin 25

Best
FC

Hi,

How were you able to solve the issue? Did this code works well?

Regards
Eranga

Hi…I’m struggling with the following problem.I have connected one dwm1001-dev[1] module to my Raspberry Pi 3 model B over the SPI port using the 26-pins header.My goal is to send a string from Raspberry to dwm, as depicted below. So, just for testing, currently I’m sending data using py-spidev library from raspberry but from the C-language module inside the dwm1001 board, I’m not able to detect and read anything from SPI.

1 Like