set the future someone time transmit, how to set the other time as rx mode?

All discussions related to the Loco Positioning system
Post Reply
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

set the future someone time transmit, how to set the other time as rx mode?

Post by justinleeyang »

hi, arnaud:

A question, I want to set future someone time transmit data, but other time as rx mode, for example:
(1)0 time, we call dwSetTxRxTime function next 1s to transmit data.
(2)then call the following code to set the dw1000 rx mode:
dwNewReceive(dev);
dwSetDefaults(dev);
dwStartReceive(dev);

we see that the transmit is ok, but 0~1s don't work as rx mode. is the flow wrong ? or other config ?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: set the future someone time transmit, how to set the other time as rx mode?

Post by arnaud »

Hi justin

Scheduling RX and TX sould work fine, this is what we are doing in the TDoA anchor. You can maybe look at the TDoA anchor code to see what we are doing there: https://github.com/bitcraze/lps-node-fi ... #L198-L213
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: set the future someone time transmit, how to set the other time as rx mode?

Post by justinleeyang »

hi, arnaud:

my understanding, tdma config as following:

#define NSLOTS 8
#define TDMA_SLOT_BITS 26 // 26: 2ms timeslot
#define TDMA_NSLOT_BITS 3

so per slot only 2ms time.
anchor0: slot0: 0~2ms;
anchor1: slot1: 2~4ms;
anchor2: slot2: 4~6ms;
anchor3: slot3: 6~8ms;
anchor4: slot4: 8~10ms;
anchor5: slot5: 10~12ms;
anchor6: slot6: 12~14ms;
anchor7: slot7: 14~16ms;

anchor0 slot 0 send, send time as following:
ctx.timestamps[ctx.anchorId] = transmitTimeForSlot(ctx.nextSlot);
transmitTimeForSlot add the GUARD and PREAMBLE time <1ms, what tx or rx mode slot0 1~2ms ?

then anchor0 next slot, 2ms set as rx mode, we see the RECEIVE_TIMEOUT about 250us, if anchor1 send data, anchor0 receive the data, for example anchor0 slot1 receive data time is 100us, then call handleRxPacket to save the receive timestamp, next step call function setupRx(dev) to prepare the next slot2 4ms as rx mode, so we want to know that 100us~4ms still always rx mode ? or idle mode?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: set the future someone time transmit, how to set the other time as rx mode?

Post by arnaud »

All packet are schedule to be sent and received at the begining of each slot. So anchor 0 will send its packet from 0ms. At ~130us the packet is send, anchor 0 setup RX to start at 2ms and meantime the radio is not receiving yet, is it schedule to receive. This should be checked in the DW1000 documentation but my understanding is that the radio is in RX mode but the receiver is not activated.

This is happening during the whole frame: the radio is almost always either in RX or TX scheduled mode, but the receiver or transmitter is only activated at the beginning of each timeslot.
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: set the future someone time transmit, how to set the other time as rx mode?

Post by justinleeyang »

hi, arnaud:

Got it, Thanks! 8-)
Post Reply