Closed gilbertgit closed 3 months ago
Is the other side in RX mode?
Both of the devices are running the exact code except for the mac address on dwmac and the dst array are swapped. What's the best way to tell if a device is in RX mode.
I was able to get the other device in receive mode by using dwt_rxenable(DWT_START_RX_IMMEDIATE);
and it is now getting something. But it looks like it's stuck stuck when trying to respond.
I DECA: *** RX 2006f01 flags 5
E (4983) DECA: TX error seq 0 (0x4080e1a0)
E (4983) DECA: SYS Time: 442f907a00
E (4993) DECA: TX Time: 442ea48234
E (4993) DECA: Diff: ff140834 (-242 us)
E (4993) TWR: Failed to send Response to 1001
I (5003) TWR: rx_ts442ba04f01
I (5003) TWR: tx_ts442ea48234
I (5013) TWR: delay0003043333
The sender still retries as it was doing before:
I DECA: *** RX Timeout 200001
E (114053) TWR: RX timeout from 0001
I (114053) TWR: retry 1 to 0001 after 0 ms
I DECA: *** RX Timeout 200001
I (114063) timeout_cb: Timeout
E (114063) TWR: RX timeout from 0001
I (114073) TWR: retry 2 to 0001 after 8 ms
I DECA: *** RX Timeout 200001
I (114073) timeout_cb: Timeout
E (114083) TWR: RX timeout from 0001
E (114083) TWR: retry limit exceeded 0001
I (114093) twr_done_cb: TWR Done 0001: 65535 cm
I (114093) timeout_cb: Timeout
An example of what both device setups would look like would be helpful.
It seems your microcontroller is too slow to meet the timing requirements. Increase TWR_PROCESSING_TIME by at least 250 in ranging.c on both sides. It can also help to reduce the logging in dwmac_irq.c ("*** RX 2006f01 flags 5").
An example of what both device setups would look like would be helpful.
True, I added it to the README
That's very helpful. Thank you for your help!
So did you get it to work finally? I'm very interested to get feedback on the usability of the library. Thanks!
Hello, I'm trying to use libdeca with my setup. I have a board with a dwm3000 and an esp32c6. Looks like SPI coms are good but I'm having a hard time getting the devices to range. Here are some of init functions:
My other device has an ID of 0x1001 and sending to 0x0001. Is this the correct approach? Here is an example of my logs are looking like:
I appreciate your help!