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

How to set TCP Port Address in TCP example.

Hi,

I am a beginner in nrf52840 DK. I am trying to run TCP example.
I have flashed client example in the DK and able to connect to the laptop(LED_2 ON).
When I press BUTTON_1 for "TCP connection request" it generates a fatal error. the reason behind this error might be below setting in the client code.

/** Remote TCP Port Address on which data is transmitted.
* Modify m_remote_addr according to your setup.
* The address provided below is a place holder. */
static const ip6_addr_t m_remote_addr =
{
.addr =
{HTONL(0x20010DB8),
0x00000000,
0x00000000,
HTONL(0x00000001)}
};

When is connect the device using echo command as mention the doc. below is the output of ifcofig bt0

bt0 Link encap:UNSPEC HWaddr 54-13-79-FF-FE-7A-56-76-00-00-00-00-00-00-00-00
inet6 addr: fe80::5613:79ff:fe7a:5676/64 Scope:Link
inet6 addr: 2005::5613:79ff:fe7a:5676/64 Scope:Global
UP POINTOPOINT RUNNING MULTICAST MTU:1280 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:65 (65.0 B) TX bytes:225 (225.0 B)

Please let me know how to assign value for "m_remote_addr" in source code.