Skip to main content
Visitor II
April 8, 2024
Question

RPMSG SDB Parsing of Buffer ID and Size fails in rpmsg_sdb_decode_rxbuf_string

  • April 8, 2024
  • 2 replies
  • 992 views

I am getting a buffer ID parsing error every once in a while in the rpmsg_sdb_decode_rxbuf_string() function. It looks like the strsep fails to parse out the ID. This also is only happening on buffer ID 0. Here is the debug from the function.

What would cause strsep to truncate the string? Even when the passed in string is correct.

Before and after the error. Thanks for any help.

Apr  8 20:35:08.378 kernel(debug): rpmsg_sdb(rpmsg_sdb_decode_rxbuf_string): rxbuf_str:B00L00002000                                
Apr  8 20:35:08.378 kernel(debug): rpmsg_sdb(rpmsg_sdb_decode_rxbuf_string): sub_str:B00                                                            
Apr  8 20:35:08.478 kernel(debug): [265795.660533] rpmsg_sdb(rpmsg_sdb_decode_rxbuf_string): rxbuf_str:B00L00002000                 
Apr  8 20:35:08.478 kernel(debug): [265795.660553] rpmsg_sdb(rpmsg_sdb_decode_rxbuf_string): sub_str:B                                       
Apr  8 20:35:08.588 kernel(err): [265795.660569] rpmsg_sdb(ERROR): Extract of buffer id failed(-22) 
Apr  8 20:35:08.588 kernel(debug): [265795.760504] rpmsg_sdb(rpmsg_sdb_decode_rxbuf_string): rxbuf_str:B00L00002000                          
Apr  8 20:35:08.588 kernel(debug): [265795.765075] rpmsg_sdb(rpmsg_sdb_decode_rxbuf_string): sub_str:B00

    This topic has been closed for replies.

    2 replies

    ST Employee
    April 26, 2024

    Hi @GHamm.2 ,

     

    The problem that you described looks like the one that was corrected in the commit "Rectify parameters passed to strsep to avoid error EINVAL (#6)" (SHA1 17c7cc20f3fc8aad8af5acafd3d0b4472004d22d) of the https://github.com/STMicroelectronics/meta-st-stm32mpu-app-logicanalyser.git Git repository.
    If you uses a version of meta-st-stm32mpu-app-logicanalyser that doesn't include this commit, it might be interesting to integrate this patch or to use a more recent version.
    Hope it helps.

     

    Regards,
    JC.

     

     

    Visitor II
    November 27, 2024

    Hi, buddy, I have the same problem as you. Have you found a final solution?