What are these configurations for in LPS firmware?

Discussions about all things Bitcraze
doctorlu
Beginner
Posts: 22
Joined: Mon Dec 28, 2015 8:41 am

What are these configurations for in LPS firmware?

Postby doctorlu » Mon Apr 17, 2017 3:59 am

Dear all,
I have a question in terms of the LPS configuration. I see the current code has configured this mode, in UWB.c
dwNewConfiguration(dwm);
dwSetDefaults(dwm);
dwEnableMode(dwm, MODE_SHORTDATA_FAST_ACCURACY);
dwSetChannel(dwm, CHANNEL_2);
dwSetPreambleCode(dwm, PREAMBLE_CODE_64MHZ_9);

I just got confused that the "dwEnableMode" has already set the channel and preamblecode in it. Why use "dwSetChannel" and "dwSetPreambleCode" again?



arnaud
Bitcraze
Posts: 889
Joined: Tue Feb 06, 2007 12:36 pm

Re: What are these configurations for in LPS firmware?

Postby arnaud » Tue Apr 18, 2017 6:58 pm

Hi,
The dwEnableMode function sets channel 5 and a preamble by default. In this code we set channel 2 and a preamble ID authorized for channel 2.

doctorlu
Beginner
Posts: 22
Joined: Mon Dec 28, 2015 8:41 am

Re: What are these configurations for in LPS firmware?

Postby doctorlu » Wed Apr 19, 2017 5:22 am

Thanks. I get it. So my question is why you change the channel from 5 to 2?

arnaud
Bitcraze
Posts: 889
Joined: Tue Feb 06, 2007 12:36 pm

Re: What are these configurations for in LPS firmware?

Postby arnaud » Wed Apr 19, 2017 8:11 am

No good reason for using channel 2 really, we have always done that even before porting the arduino driver to C (what we now call libdw1000) and we stick with it. Intuitively channel 2 is on lower frequency than channel 5 so it should have better range however we have never tested this assumption.


Return to “Bitcraze”

Who is online

Users browsing this forum: No registered users and 1 guest