Page 1 of 1
SDK Functions to change the macro channels
Posted: Fri Nov 18, 2016 4:49 pm
by francois
Hi
Is there any avalaible function in the library to change the macro channels?
I am looking for an SDK function equivalent to those AT commands:
RCZ4 :
ATS306=00000000F00000000000001F
ATS307=63
ATS308=1500000
Thanks!
Francois
Re: SDK Functions to change the macro channels
Posted: Wed Nov 23, 2016 3:37 pm
by mstempin
Here is the equivalent C code for FCC, to be placed into your TD_USER_Setup() function:
uint32_t channel_bitmask[3];
//WARNING : TD_SIGFOX_SetDefaultMacroChannel must be set AFTER TD_SIGFOX_SetMacroChannelBitmask
channel_bitmask[0] = CONFIG_SIGFOX_FCC_MACRO_CHANNEL_BITMASK_LSB;
channel_bitmask[1] = CONFIG_SIGFOX_FCC_MACRO_CHANNEL_BITMASK_MID;
channel_bitmask[2] = CONFIG_SIGFOX_FCC_MACRO_CHANNEL_BITMASK_MSB;
TD_SIGFOX_SetMacroChannelBitmask(_channel_bitmask);
TD_SIGFOX_SetDefaultMacroChannel(CONFIG_SIGFOX_FCC_DEFAULT_MACRO_CHANNEL);
TD_SIGFOX_SetDownlinkOffset(3000000);
All the link-time constants above CONFIG_SIGFOX_FCC_xxx are declared in "lib\libtdcore\inc\td_config_sigfox.h", line 258. Please replace these constants by the correct values for RCZ4.
Re: SDK Functions to change the macro channels
Posted: Wed Nov 30, 2016 9:30 am
by ramon2015
Hi,
Thanks for the answer. It worked for me.
But the function TD_SIGFOX_SetDownlinkOffset() does not exist in SDK 6.3.2 nor 6.3.4.
I can see a function called TD_SIGFOX_SetDownlinkFrequency(), but not sure if I should use this instead.
Regards, Ramon.
Re: SDK Functions to change the macro channels
Posted: Wed Nov 30, 2016 2:07 pm
by mstempin
The function was added in SDK 6.3.4, it is declared here:
https://github.com/Telecom-Design/TD_RF ... fox.h#L185Its use is optional, this value was fixed in previous version to 3 MHz. It has been introduced to take into account Sigfox RF zones different from RCZ2.