Ok, how have you created my_socket ? that is the bit that will use the IPV6 address and open a connection to the remote server if i am not mistaken.
once you have that then im not sure you need to pass the address in the data stream like you have...
"POST /api/v1/localservertbhw16lab/telemetry HTTP/1.1\r\nHost: 2001:db8:abcd:a:d54c:4b07:8738:9bfc\r\nContent-Type: application/json\r\nContent-Length: %d\r\n\r\n", payload_str_len);
unless there is a handler of some kind that builds the link based on this data then just passes the data over.
nsapi_error_t open_result = my_socket.open(network_if);
if (open_result != 0)
{
printf("Error! socket.open(net) returned: %d\n", open_result);
}
int errConnect = my_socket.connect(server, 8080); //"demo.thingsboard.io", 80
while(true)
{
if(errConnect != 0)
{
printf("Could not connect to socket : error = %d\r\n", errConnect);
wait(60);
errConnect = my_socket.connect(server, 8080);
// TODO Manage connection issues here !!!!
}
else
{
printf("Socket connected\r\n");
break;
}
hello i used postman for send telemetry data to device
postman http code 200ok but i dont see telemetry data on device
how to fixed it?