This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Client to Server Data transmit

Hi every one , i tries to call the generic_onoff_client_set function to send a message from the client to the server but this ain't working. Can someone please help me?

Here is the code:

When i call the function, this is the error i get in the Logs: 

Please help! Thank you all

Parents
  • Hi,

    Which Mesh SDK are you using? Are you using the Light switch client example? Is this the only thing you have modified?

    You can track the error to find which function causing the assert by using addr2line tool, the syntax is:  

    arm-none-eabi-addr2line -e filename.elf 0x2C4F2

     

  • Do you get any errors when you remove this modification? 

    You should have the addr2line tool after installing SES. You should be able to find it here: 

    [Your location]\SEGGER\SEGGER Embedded Studio for ARM 4.52c\gcc\arm-none-eabi\bin

    Add it to your PATH. Then you use the command above in your command prompt.

  • Hi, i used the command, and it gave me this :

    mesh\core\src/timer_scheduler.c:214 (discriminator 1)

    when i looked in the file on that line i have this: 

    Can you please help?

  • Where do you call the code snippet above? And do you get the assert right away when calling generic_onoff_client_set function?

    It would also be helpful if you sent me the call stack when the assert occurs.

    Can you also give me more details about your use-case? What are you trying to do?

  • Hi, 

    My answers below.

    Where do you call the code snippet above? And do you get the assert right away when calling generic_onoff_client_set function?

    I call the generic_onoff_client_set function in the main() loop. And i get the assert when i call the function.

    It would also be helpful if you sent me the call stack when the assert occurs.

    I call the function here. It is in the main loop. 

    Can you also give me more details about your use-case? What are you trying to do?

    To explain, I'm trying to send a byte from the client to the server.
    That byte comes from a smartphone application connected to the client through the proxy service. This proxy service communication  works fine and I receive the byte in the client from the smartphone.
    When I receive the byte I have to retransmit it to the server. This is where I try to call the generic_onoff_client_set function in the main() but this is where I get the error.

    Is it clearer? Feel free to suggest another way to send data to the server if there is one.

    Thanks

Reply
  • Hi, 

    My answers below.

    Where do you call the code snippet above? And do you get the assert right away when calling generic_onoff_client_set function?

    I call the generic_onoff_client_set function in the main() loop. And i get the assert when i call the function.

    It would also be helpful if you sent me the call stack when the assert occurs.

    I call the function here. It is in the main loop. 

    Can you also give me more details about your use-case? What are you trying to do?

    To explain, I'm trying to send a byte from the client to the server.
    That byte comes from a smartphone application connected to the client through the proxy service. This proxy service communication  works fine and I receive the byte in the client from the smartphone.
    When I receive the byte I have to retransmit it to the server. This is where I try to call the generic_onoff_client_set function in the main() but this is where I get the error.

    Is it clearer? Feel free to suggest another way to send data to the server if there is one.

    Thanks

Children
Related