2024-05-24 06:08 AM - last edited on 2024-05-24 10:27 AM by Tesla DeLorean
I am Using an STM32 WL55Jc i.e., STM Nucleo Board and I am using an example code that is
https://github.com/stm32-hotspot/STM32WL-SubGHz-Phy-Rx-Hop
Here in this code
APP_LOG(TS_ON, VLEVEL_L, "OnTxDone\n\r");
Issues that i am facing with APP_LOG method is,
1.Messages longer than 256 bytes are truncated or not logged.
2.No error messages are provided, making it difficult to diagnose the issue
Is there a known limitation with APP_LOG regarding message size, are there any configurations or settings that can be adjusted to allow logging of larger messages. Any suggestions or workarounds to achieve logging of messages longer than 256 bytes?
2024-05-24 10:26 AM
Hello @Shivaprasad
Could you please give an example of message that is being shown wrong.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-05-26 10:54 PM
This is the code i have got stuck
void TransmitPacket(void *context) {
HAL_GPIO_WritePin(LED2_GPIO_Port, LED2_Pin, GPIO_PIN_SET);
char chunk[PACKET_SIZE + 3]; // Extra space for '@', '$', and null terminator
char dynamicString[] = "Lorem Ipsum is simply dummy text of the printing and typesetting industry.Lorem Ipsum has been theindustry's standard dummy text ever since the 1500s when an unknown printer took a galley and scrambledbutalso the leap into electronic typesetting remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages and more recently with desktop publishing software like Aldus PageMaker including versions of Letrasetsheets containing Lorem Ipsum passages and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Contrary to popular belief Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from \45 BC making it over 2000 years old. Richard McClintock a Latin professor at Hampden-Sydney Collegein Virginia looked up one of the more obscure Latin words consectetur from a Lorem Ipsum passage and going through the cites of the word in classical literature discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero written in 45 BC. This book is a treatise on the theory of ethics very popular during the Renaissance.The first line of Lorem Ipsum It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters as opposed to using 'Content here content here' making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years sometimes by accident sometimes on purpose There are many variations of passages of Lorem Ipsum available but the majority have suffered alteration in some form by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsumsuchitra\n";
bufferLength = strlen(dynamicString);
// remaining length of the dynamic string
APP_LOG(TS_ON, VLEVEL_L, "print dynamicString : %s",dynamicString);
int remainingLength = bufferLength - lastChunkIndex;
sprintf("%s\n",dynamicString);
Here in the above picture I used a string which is greater than 256 bytes when i tried to print it using
APP_LOG(TS_ON, VLEVEL_L, "print dynamicString : %s",dynamicString); this method It does not print anything
and i have also tried to print that string using sprintf but it is also not working
I don't know what is the problem.
this is the APP_LOG definition
#define APP_LOG(TS,VL,...) do{ {UTIL_ADV_TRACE_COND_FSend(VL, T_REG_OFF, TS, __VA_ARGS__);} }while(0);
When i go to declaration of this function UTIL_ADV_TRACE_COND_FSend I found this,
This is the function definition I have found..
I dont know whether we can print data which is larger than 256 bytes or not, when i print a smaller string using this APP_LOG I am getting the output..
Please help me with this issue. And I dont Know why this sprintf is not working.
2024-05-27 12:24 AM
Hello @Shivaprasad
The APP_LOG function can't send more then 256 bytes. If you are looking for more then that, you can use successive calls of the APP_LOG function.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.