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

Tcp client server example is not working

Hello to all

using the SDK nrf52840 trying to activate tcp client server example using soft device s140

On the server side

After the function in the main

err_code = ipv6_medium_eui48_set(m_ipv6_medium.ipv6_medium_instance_id,

&ipv6_medium_eui48);

I got the server address as below

On the client side I change the remote address as follow

static const ip6_addr_t m_remote_addr =

{

.addr =

{0x82895479,

0x000000bd,

0x00000000,

HTONL(0x00000000)}

};

Running the client application I got as follows after the function tcp_connect

void tcp_request_connection(void)

{

err_t err = tcp_connect(mp_tcp_port, &m_remote_addr, TCP_SERVER_PORT, tcp_connection_callback);

APP_ERROR_CHECK(err);

APPL_LOG(">> TCP Connection Requested.");

}

after that I got a fatal error on the terminal

nordic.doc

  • Hello,

    I see that you attached a screenshot in the word document, but I am not able to open it for editing, only preview. Since the image is so small, I am not able to see what it says. Could you attach it as an image file?

     

    I can only see it like this:

     

    What is the value of err, which is passed into APP_ERROR_CHECK(err); when it fails?

     

    Best regards,

    Edvin

     

     

  • Hello,

    I see that you posted the picture in this case.

     

    Can you please post your log from the terminal? A screenshot or copy paste is fine.

     

    What SDK version do you use? Can you please try to define "DEBUG" in your preprocessor defines, then it should print some relevant error info in the log (depending on the SDK version). If it doesn't, can you please try to debug to find which function that returns err_code != 0 which is passed on to APP_ERROR_CHECK(err_code)? 

     

    If you have problems with this, please specify the SDK version, and I can help you with that.

     

    Best regards,

    Edvin

Related