cancel
Showing results for 
Search instead for 
Did you mean: 

API Sigfox without prototype (SIGFOX_API_send_frame) and dont works. (STM32WL Single Core versions 1.1.0 and 1.0.0)

MRebo.1
Associate II

The API (SIGFOX_API_send_frame) found in the examples of PushButton and AT_SLAVE of STM32WL SINGLE CORE (https://www.st.com/en/embedded-software/stm32cubewl.html), versions 1.1.0 and 1.0.0, is without prototype and the sigfox does not work (does not send). This is normal?

11 REPLIES 11
IREMI.1
Associate II

Hi MRebo, it is not normal.

the prototype is in the MW:

Firmware\Middlewares\Third_Party\Sigfox\SigfoxLib\sigfox_api.h:

and sigfox_api.h is included in st_sigfox_api.h

the prototype is:

sfx_error_t SIGFOX_API_send_frame(sfx_u8* customer_data,

                 sfx_u8 customer_data_length,

                 sfx_u8* customer_response,

                 sfx_u8 tx_mode,

                 sfx_bool initiate_downlink_flag);

So I tried to run the code but no signal from Sigfox came out. I was confused by not having a prototype like the dual core version has. As shown in the figures below.0693W00000DqDyjQAF.jpg  

Here we can see the prototype of the SIGFOX_API_send_frame() function. But this only exists in the dual core example. The single core has no prototype of this function, and I don't see any signal coming out of the board when I run the AT_SLAVE or PUSHBUTTON (SINGLE CORE) example

LCHAM.1
Associate II

Hi MRebo,

The SIGFOX_API_send_frame() is a direct API to Sigfox library, you can find its definition in Middlewares\Third_Party\Sigfox\SigfoxLib\sigfox_api.h

The SIGFOX_API_send_frame() you are displaying is not the mplementation of the routine, but only a function created in Dual Core project only, in order to allow CM4 (application core) to ask CM0 (containing Sigfox radio stack) to send the frame.

As posted on previous thread, if you don't see any signal and if you are using STM32CubeIDE toolchain on single core AT_SLAVE or PUSHBUTTON you should update the linker script by the one attached, at location: Projects\NUCLEO-WL55JC\Applications\Sigfox\Sigfox_AT_Slave (or Sigfox_PushButton)\STM32CubeIDE

On any other toolchain and on Dual Core this update isn't necessary, and you should check the credentials in your device that may not have been updated properly.

Regards

Got it, I'll test it. Just out of curiosity, what would this file be?

IREMI.1
Associate II

Hi MRebo.

Ohhh, you were looking for a function implementation ...

Sorry the missunderstanding but in computer programming litterature, a function prototype or function interface is a declaration of a function that specifies the function’s name and type signature, but omits the function body (wikipedia definition).

As said by Ludo the implementation is part of a library owned by Sigfox. We only know the API.

The function of your printshot shows the dual core is a mailbox wrapper.

In dual core the Sigfox library runs on CM0PLUS. 

In order to call that function from CM4 the dualcore projects implements a mecanism called MbMux, where the actual function is replaced on CM4 by a wrapper that send a message to CM0PLUS to tell to execute that function.

This allows CM4 application to be the same (same function calls) in single and in dual version ....

BR

The file I attached in previous post is, as said previously, the linker script of Sigfox_AT_Slave or Sigfox_PushButton, for STM32CubeIDE toolchain

Sorry for the mistake, I thought the prototype would be the body of the function...

But where do you find this body of function? I can't understand this heheh

I am using STM32WLE5xB device, this linker script that you sent works Sigfox with STM32WLE5xB devices?