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

  • 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

  • Hi,

    If you want to send a message from the smartphone to the server, then it's better if you just publish to the server's unicast address.

Related