2021-07-20 11:48 AM
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?
2021-08-03 08:16 AM
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);
2021-08-24 03:55 AM
2021-08-24 05:30 AM
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.
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
2021-08-24 06:47 AM
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
2021-08-24 07:22 AM
Got it, I'll test it. Just out of curiosity, what would this file be?
2021-08-24 07:28 AM
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
2021-08-24 07:35 AM
The file I attached in previous post is, as said previously, the linker script of Sigfox_AT_Slave or Sigfox_PushButton, for STM32CubeIDE toolchain
2021-08-24 09:32 AM
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
2021-08-24 09:45 AM
I am using STM32WLE5xB device, this linker script that you sent works Sigfox with STM32WLE5xB devices?