cancel
Showing results for 
Search instead for 
Did you mean: 

SIGFOX API open fails on STM32WLE5C8

APOIR.1
Associate II

Hi everyone,

I have created a minimal new project for my board based on STM32WLE5C8.

After enabling Sigfox into the .ioc view, in my main.c I have :

 HAL_Init();

 SystemClock_Config();

 sfx_rc_t SgfxRc = RC1;

 int ret = SIGFOX_API_open(&SgfxRc);

However it fails with ret = 0x10.

This code corresponds to SFX_ERR_API_OPEN (Error occurs during the opening of the Sigfox Library : check the manuf error code)

But as I only get 0x10, no manufacturer code, I can't get any informations about what failed.

What could be the reason of SIGFOX API opening failure ?

Do I have some other configurations to do into the .ioc ?

Thank you per advance !

4 REPLIES 4
YBOUV.1
Senior

hello @APOIR.1​ ,

I think the files mcu_api.c, rf_api.c api are not fully generated (in Sigfox\Target), like empty templates. Can you tell me how the function below implementation looks like ?

sfx_u8 MCU_API_malloc(sfx_u16 size, sfx_u8 **returned_pointer)
{
}

If they are empty templates, I suggest to try the 'PushButton skeleton' form the CubeMx Sigfox application menu. This will fill all the dependence of the Sigfox middleware

best regards

APOIR.1
Associate II

Hello @YBOUV.1​,

Thanks for your reactivity, these templates were indeed empty.

However as with this skeleton additionnal peripherals are needed (ADC, USART, RTC, LPTIM,...), I'm still stucked using the PushButton skeleton, trying two different ways :

-> When I enable all these peripherals, I get errors during the build, this doesn't fit into the flash (10Ko overflow)

-> When I don't use them, I have to manually remove pieces of code related to these peripherals into the sigfox code. Then the Sigfox lib API opening goes well, but when I try to send a simple frame :

sfx_u8 ul_data[2] = {2,3};

 ret = SIGFOX_API_send_frame(ul_data, sizeof(ul_data), NULL, 0, 0);

I immediately lose the device with the following messages :

Target is not responding, retrying...

Is there somewhere an example that simply send a Sigfox frame without using a lot of features around ?

EDIT:

There are some cases where SIGFOX_API_send_frame() is an infinite loop, no device loss

@APOIR.1​ ,

please find attached a git patch (from cubeWL1.1.0) without trace / com port which may be a good start

good luck

APOIR.1
Associate II

@YBOUV.1​ thanks for the git patch, but even with these modifications SIGFOX_API_send_frame() never returns. As I've seen with putting some breakpoints, I don't get any timeout IRQ. even if the timeout value seems good when set by SubGhz lib.

Any advice where I can look to debug that kind of issue ?

Thanks again