Questions and discussions about the software that runs on the TD RF module itself.
francois
 
Posts: 47
Joined: Tue Jun 16, 2015 6:13 am

SDK Functions to change the macro channels

by francois Fri Nov 18, 2016 4:49 pm

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
User avatar
mstempin
 
Posts: 168
Joined: Thu May 07, 2015 9:24 am

Re: SDK Functions to change the macro channels

by mstempin Wed Nov 23, 2016 3:37 pm

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.
ramon2015
 
Posts: 51
Joined: Mon Jul 06, 2015 4:06 pm

Re: SDK Functions to change the macro channels

by ramon2015 Wed Nov 30, 2016 9:30 am

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.
User avatar
mstempin
 
Posts: 168
Joined: Thu May 07, 2015 9:24 am

Re: SDK Functions to change the macro channels

by mstempin Wed Nov 30, 2016 2:07 pm

The function was added in SDK 6.3.4, it is declared here:
https://github.com/Telecom-Design/TD_RF ... fox.h#L185

Its 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.
Return to Firmware

Who is online

Users browsing this forum: No registered users and 1 guest