2021-09-07 01:21 AM
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 !
2021-09-07 04:44 AM
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
2021-09-07 06:52 AM
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
2021-09-07 08:05 AM
2021-09-07 09:52 AM
@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