IPV6 listener ERROR on binding: Address family not supported by protocol

Hi,

Trying a IPv6 listener and binding on the socket is giving the below error:

Dec 17 12:31:42 swi-mdm9x28-wp user.debug Legato: DBUG | UNKNOWN[9230]/ T=main | _componentMain.c _uarttotcpv6listener_psaComponent_Init() 30 | Initializing uarttotcpv6listener_psaComponent component library.
Dec 17 12:31:42 swi-mdm9x28-wp user.debug Legato: DBUG | uarttotcpv6listener_psaComponentExe[9230]/framework T=main | mem.c InitPool() 400 | Memory pool name ‘framework.msgs-LogControlProtocol’ is truncated to ‘framework.msgs-LogControlProtoc’
Dec 17 12:31:42 swi-mdm9x28-wp user.debug Legato: DBUG | uarttotcpv6listener_psaComponentExe[9230]/framework T=main | messagingSession.c le_msg_SetSessionRecvHandler() 2078 | SetSessionRecv: Unix socket session
Dec 17 12:31:42 swi-mdm9x28-wp user.debug Legato: DBUG | uarttotcpv6listener_psaComponentExe[9230]/framework T=main | mem.c le_mem_ForceAlloc() 1172 | Memory pool ‘framework.SigMonitor’ overflowed. Expanded to 1 blocks.
Dec 17 12:31:42 swi-mdm9x28-wp user.debug Legato: DBUG | uarttotcpv6listener_psaComponentExe[9230]/framework T=main | mem.c le_mem_ForceAlloc() 1172 | Memory pool ‘framework.SigHandler’ overflowed. Expanded to 1 blocks.
Dec 17 12:31:42 swi-mdm9x28-wp user.debug Legato: DBUG | uarttotcpv6listener_psaComponentExe[9230]/uarttotcpv6listener_psaComponentExe_exe T=main | _main.c main() 59 | == Starting Event Processing Loop ==
Dec 17 12:31:42 swi-mdm9x28-wp user.info Legato: INFO | uarttotcpv6listener_psaComponentExe[9230]/uarttotcpv6listener_psaComponent T=main | uarttotcpv6listener_psaComponent.c _uarttotcpv6listener_psaComponent_COMPONENT_INIT() 254 | Component uarttotcpv6listener_psaComponent
Dec 17 12:31:42 swi-mdm9x28-wp user.info Legato: INFO | uarttotcpv6listener_psaComponentExe[9230]/uarttotcpv6listener_psaComponent T=main | uarttotcpv6listener_psaComponent.c start_listener() 203 | IPv6 Listening started…
Dec 17 12:31:42 swi-mdm9x28-wp user.info Legato: INFO | uarttotcpv6listener_psaComponentExe[9230]/uarttotcpv6listener_psaComponent T=main | uarttotcpv6listener_psaComponent.c start_listener() 214 | IPv6 Socket Binding…
Dec 17 12:31:42 swi-mdm9x28-wp user.err Legato: =ERR= | uarttotcpv6listener_psaComponentExe[9230] | ERROR on binding: Address family not supported by protocol
Dec 17 12:31:42 swi-mdm9x28-wp user.info Legato: INFO | supervisor[8648]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process ‘uarttotcpv6listener_psaComponentExe’ (PID: 9230) has exited with exit code 1.
Dec 17 12:31:42 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[8648]/supervisor T=main | app.c app_SigChildHandler() 4066 | Process ‘uarttotcpv6listener_psaComponentExe’ in app ‘uarttotcpv6listener_psa’ faulted: Ignored.
Dec 17 12:31:42 swi-mdm9x28-wp user.info Legato: INFO | supervisor[8648]/supervisor T=main | app.c app_StopComplete() 4753 | app ‘uarttotcpv6listener_psa’ has stopped.
Dec 17 12:31:42 swi-mdm9x28-wp user.info Legato: INFO | supervisor[8648]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘uarttotcpv6listener_psa’ has stopped.

Below is the TCP V6 listener function:

int start_listener(void)
{

 int sockfd, newsockfd;
 int portno = 30001;
 socklen_t clilen;
 char buffer[256];
 struct sockaddr_in6 serv_addr, cli_addr;
 int n;
 char client_addr_ipv6[100];

/* if (argc < 2) {
fprintf(stderr,“ERROR, no port provided\n”);
exit(1);
} */
LE_INFO(“IPv6 Listening started…”);
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd < 0)
error(“ERROR opening socket”);
bzero((char *) &serv_addr, sizeof(serv_addr));
// portno = atoi(argv[1]);
serv_addr.sin6_flowinfo = 0;
serv_addr.sin6_family = AF_INET6;
serv_addr.sin6_addr = in6addr_any;
serv_addr.sin6_port = htons(portno);

 LE_INFO("IPv6 Socket Binding...\n");
 if (bind(sockfd, (struct sockaddr *) &serv_addr,
          sizeof(serv_addr)) < 0) 
          error("ERROR on binding");

 LE_INFO("IPv6 Socket Listening...\n");         
 listen(sockfd,5);
 clilen = sizeof(cli_addr);
 newsockfd = accept(sockfd, 
             (struct sockaddr *) &cli_addr, 
             &clilen);
 if (newsockfd < 0) 
      error("ERROR on accept");
//Connection accepted  let us start reading and Writing on the server
LE_INFO("IPv6 Socket Connection Accepted..\n"); 
  //Sockets Layer Call: inet_ntop()
inet_ntop(AF_INET6, &(cli_addr.sin6_addr),client_addr_ipv6, 100);
LE_INFO("Incoming connection from client having IPv6 address: %s\n",client_addr_ipv6);

memset(buffer,0, 256);
 //Sockets Layer Call: recv()
n = recv(newsockfd, buffer, 255, 0);
if (n < 0)
    error("ERROR reading from socket");

LE_INFO("Message from client: %s\n", buffer);

//Sockets Layer Call: send()
n = send(newsockfd, "Server got your message", 23+1, 0);
if (n < 0)
    error("ERROR writing to socket");
 close(sockfd);
 close(newsockfd);    
 return 0; 

}

Hi,

Working with a different listener code able to listen correctly on the socket but not able to accept remote connection below are the logs:

Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[13548]/supervisor T=main | app.c app_Start() 3471 | Starting app ‘uarttotcpv6listener_psa’
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[13548]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/uarttotcpv6listener_psa/read-only/lib/libComponent_uarttotcpv6listener_psaComponent.so’ to '/legato/sy
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[13548]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/uarttotcpv6listener_psa/read-only/bin/uarttotcpv6listener_psaComponentExe’ to '/legato/systems/current
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[13548]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/uarttotcpv6listener_psa/read-only/usr/bin/config_iptables.sh’ to '/legato/systems/current/appsWriteabl
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[13548]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/dev/ttyHS0’ to ‘/legato/systems/current/appsWriteable/uarttotcpv6listener_psa/dev/ttyHS0’.
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[13548]/supervisor T=main | app.c CreateFileLink() 2154 | Created file link ‘/dev/ttyHS1’ to ‘/legato/systems/current/appsWriteable/uarttotcpv6listener_psa/dev/ttyHS1’.
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[13548]/supervisor T=main | resourceLimits.c GetCfgResourceLimit() 207 | Configured resource limit maxStackBytes is not available. Using the default value 0.
Dec 17 13:41:54 swi-mdm9x28-wp user.warn Legato: -WRN- | logCtrlDaemon[13560]/framework T=main | fdMonitor.c le_fdMonitor_Create() 449 | FD Monitor object name ‘uarttotcpv6listener_psaComponentExeStderr’ truncated to ‘uarttotcpv6listener_psaComponen’.
Dec 17 13:41:54 swi-mdm9x28-wp user.warn Legato: -WRN- | logCtrlDaemon[13560]/framework T=main | fdMonitor.c le_fdMonitor_Create() 449 | FD Monitor object name ‘uarttotcpv6listener_psaComponentExeStdout’ truncated to ‘uarttotcpv6listener_psaComponen’.
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[13548]/supervisor T=main | proc.c proc_Start() 1403 | Starting process ‘uarttotcpv6listener_psaComponentExe’ with pid 18197
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[18197]/supervisor T=main | proc.c proc_Start() 1363 | Execing ‘uarttotcpv6listener_psaComponentExe’
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[18197]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 524288.
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[18197]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 524288.
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[18197]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[18197]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[18197]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[18197]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | supervisor[18197]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | UNKNOWN[18197]/framework T=main | mem.c InitPool() 400 | Memory pool name ‘framework.PositionalCallbackRecPool’ is truncated to ‘framework.PositionalCallbackRec’
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | UNKNOWN[18197]/framework T=main | mem.c InitPool() 400 | Memory pool name ‘framework.MessagingClientInterfaces’ is truncated to ‘framework.MessagingClientInterf’
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | UNKNOWN[18197]/framework T=main | mem.c InitPool() 400 | Memory pool name ‘framework.hashMap_MessagingServices’ is truncated to ‘framework.hashMap_MessagingServ’
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | UNKNOWN[18197]/framework T=main | mem.c InitPool() 400 | Memory pool name ‘framework.hashMap_MessagingClients’ is truncated to ‘framework.hashMap_MessagingClie’
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | UNKNOWN[18197]/framework T=main | fs.c fs_Init() 916 | FS prefix path “/data/le_fs/”
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | UNKNOWN[18197]/ T=main | _componentMain.c _uarttotcpv6listener_psaComponent_Init() 30 | Initializing uarttotcpv6listener_psaComponent component library.
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | uarttotcpv6listener_psaComponentExe[18197]/framework T=main | mem.c InitPool() 400 | Memory pool name ‘framework.msgs-LogControlProtocol’ is truncated to ‘framework.msgs-LogControlProtoc’
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | uarttotcpv6listener_psaComponentExe[18197]/framework T=main | messagingSession.c le_msg_SetSessionRecvHandler() 2078 | SetSessionRecv: Unix socket session
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | uarttotcpv6listener_psaComponentExe[18197]/framework T=main | mem.c le_mem_ForceAlloc() 1172 | Memory pool ‘framework.SigMonitor’ overflowed. Expanded to 1 blocks.
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | uarttotcpv6listener_psaComponentExe[18197]/framework T=main | mem.c le_mem_ForceAlloc() 1172 | Memory pool ‘framework.SigHandler’ overflowed. Expanded to 1 blocks.
Dec 17 13:41:54 swi-mdm9x28-wp user.debug Legato: DBUG | uarttotcpv6listener_psaComponentExe[18197]/uarttotcpv6listener_psaComponentExe_exe T=main | _main.c main() 59 | == Starting Event Processing Loop ==
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | uarttotcpv6listener_psaComponentExe[18197]/uarttotcpv6listener_psaComponent T=main | uarttotcpv6listener_psaComponent.c _uarttotcpv6listener_psaComponent_COMPONENT_INIT() 360 | Component uarttotcpv6listener_psaComponent
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | uarttotcpv6listener_psaComponentExe[18197]/uarttotcpv6listener_psaComponent T=main | uarttotcpv6listener_psaComponent.c start_listener() 266 | Creating Socket for Listening
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | uarttotcpv6listener_psaComponentExe[18197]/uarttotcpv6listener_psaComponent T=main | uarttotcpv6listener_psaComponent.c start_listener() 286 | Binding Socket
Dec 17 13:41:54 swi-mdm9x28-wp user.info Legato: INFO | uarttotcpv6listener_psaComponentExe[18197]/uarttotcpv6listener_psaComponent T=main | uarttotcpv6listener_psaComponent.c start_listener() 295 | Listening on the Socket

One thing seen is the reconnection from the dcsdaemon as below:
Dec 17 13:42:00 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 254 | State of connection 1 transitioned from up to down
Dec 17 13:42:00 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsCellular T=main | dcsCellular.c le_dcsCellular_RetryConn() 1300 | Initiated retrying connection 1; retry attempt 1, backoff 1 secs
Dec 17 13:42:00 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 311 | Wait for the next retry before failing connection 1
Dec 17 13:42:00 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 780 | Received for channel reference 0x8f event Temporary Down
Dec 17 13:42:00 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[13626] | RTNETLINK answers: No such file or directory
Dec 17 13:42:00 swi-mdm9x28-wp user.warn Legato: -WRN- | dcsDaemon[13626]/le_pa_dcs T=main | pa_dcs_linux.c pa_dcs_DeleteDefaultGateway() 1011 | system ‘/sbin/ip -6 route del default’ failed
Dec 17 13:42:00 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsNet T=main | dcsNet.c le_net_RestoreDefaultGW() 674 | Default IPv6 GW address on interface restored
Dec 17 13:42:00 swi-mdm9x28-wp user.info Legato: INFO | dataconn_psaComponentExe[13635]/dataconn_psaComponent T=main | dataconn_psaComponent.c ConnectionStateHandler() 126 | Interface disconnected.
Dec 17 13:42:00 swi-mdm9x28-wp user.info Legato: INFO | dataconn_psaComponentExe[13635]/dataconn_psaComponent T=main | dataconn_psaComponent.c Set_backofftimer() 133 | Setting a BackOff Timer.!!
Dec 17 13:42:00 swi-mdm9x28-wp user.info Legato: INFO | dataconn_psaComponentExe[13635]/dataconn_psaComponent T=main | dataconn_psaComponent.c Set_backofftimer() 137 | Attemptcount is 1 Interval of BackOff Timer in sec= 30
Dec 17 13:42:01 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[13667]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
Dec 17 13:42:01 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[13667]/le_pa T=main | pa_mdc_qmi.c StartSession() 1978 | Data connection failure Call End provided 45, Code 1
Dec 17 13:42:01 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[13667]/le_pa T=main | pa_mdc_qmi.c StartSession() 1989 | Data connection failure Verbose Call End provided Type 2, Verbose 208
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1079 | Succeeded starting cellular connection 1
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 254 | State of connection 1 transitioned from down to up
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 780 | Received for channel reference 0x8f event Up
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsDaemon T=main | dcsServer.c SetDefaultGWConfiguration() 426 | Setting default GW address on device
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsNet T=main | dcsNet.c le_net_SetDefaultGW() 827 | Succeeded to set default GW addr on interface rmnet_data0 for channel 1 of technology cellular
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 584 | Setting DNS server addresses on device
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/le_pa_dcs T=main | pa_dcs_linux.c pa_dcs_SetDnsNameServers() 367 | Set DNS ‘2404:a800:0:14::1:1010’ ‘2401:4900:50:9::8’
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/le_pa_dcs T=main | pa_dcs_linux.c pa_dcs_SetDnsNameServers() 392 | DNS 1 ‘2404:a800:0:14::1:1010’ found in file
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/le_pa_dcs T=main | pa_dcs_linux.c pa_dcs_SetDnsNameServers() 397 | DNS 2 ‘2401:4900:50:9::8’ found in file
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsNet T=main | dcsNet.c le_net_SetDNS() 1251 | DNS address(es) of channel 1 of technology cellular already set onto device
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[13626]/dcsDaemon T=main | dcsServer.c SetDefaultRouteAndDns() 658 | Succeeded setting DNS configuration
Dec 17 13:42:04 swi-mdm9x28-wp user.info Legato: INFO | dataconn_psaComponentExe[13635]/dataconn_psaComponent T=main | dataconn_psaComponent.c ConnectionStateHandler() 120 | Interface rmnet_data0 connected.

This happens pretty quickly and not noticeable but not sure if this impacts the listener setup in the previous data connection setup?

Also it is not clear why the data connection disconnects in between.

SIM Card has a Static Public IPV6 address pingable from outside world.

ip6tables is disabled:

root@swi-mdm9x28-wp:~# ip6tables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p ipv6-icmp -m icmp6 --icmpv6-type 129 -j ACCEPT
-A INPUT -p ipv6-icmp -m icmp6 --icmpv6-type 134 -m hl --hl-eq 255 -j ACCEPT
-A INPUT -p ipv6-icmp -m icmp6 --icmpv6-type 135 -m hl --hl-eq 255 -j ACCEPT
-A INPUT -p ipv6-icmp -m icmp6 --icmpv6-type 136 -m hl --hl-eq 255 -j ACCEPT
-A INPUT -p ipv6-icmp -m icmp6 --icmpv6-type 137 -m hl --hl-eq 255 -j ACCEPT
-A INPUT -i ecm0 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i ecm0 -p ipv6-icmp -m icmp6 --icmpv6-type 128 -j ACCEPT
-A INPUT -i ecm0 -p udp -m udp --sport 67:68 --dport 67:68 -j ACCEPT
-A INPUT -i ecm0 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i ecm0 -p ipv6-icmp -m icmp6 --icmpv6-type 128 -j ACCEPT
-A INPUT -i ecm0 -p udp -m udp --sport 67:68 --dport 67:68 -j ACCEPT
root@swi-mdm9x28-wp:~#

netstat showing the application listening on the specified port 30001

root@swi-mdm9x28-wp:~# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 2067/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1834/dropbear
tcp 0 0 :::53 :::* LISTEN 2067/dnsmasq
tcp 0 0 :::22 :::* LISTEN 1834/dropbear
tcp 0 0 :::30001 :::* LISTEN 20674/uarttotcpv6li
udp 0 0 0.0.0.0:53 0.0.0.0:* 2067/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 2067/dnsmasq
udp 0 0 :::53 :::* 2067/dnsmasq

Ping is working smoothly indicating there is no disconnection of data session, wondering what may be the issue?

01:4900:50:9::8: seq=555 ttl=54 time=54.662 ms
64 bytes from 2401:4900:50:9::8: seq=556 ttl=54 time=59.884 ms
64 bytes from 2401:4900:50:9::8: seq=557 ttl=54 time=57.300 ms
64 bytes from 2401:4900:50:9::8: seq=558 ttl=54 time=58.516 ms
64 bytes from 2401:4900:50:9::8: seq=559 ttl=54 time=56.826 ms
64 bytes from 2401:4900:50:9::8: seq=560 ttl=54 time=54.352 ms
64 bytes from 2401:4900:50:9::8: seq=561 ttl=54 time=64.905 ms
64 bytes from 2401:4900:50:9::8: seq=562 ttl=54 time=56.302 ms
64 bytes from 2401:4900:50:9::8: seq=563 ttl=54 time=58.277 ms
64 bytes from 2401:4900:50:9::8: seq=564 ttl=54 time=62.990 ms
64 bytes from 2401:4900:50:9::8: seq=565 ttl=54 time=56.092 ms
64 bytes from 2401:4900:50:9::8: seq=566 ttl=54 time=54.791 ms
64 bytes from 2401:4900:50:9::8: seq=567 ttl=54 time=53.025 ms
64 bytes from 2401:4900:50:9::8: seq=568 ttl=54 time=56.591 ms
64 bytes from 2401:4900:50:9::8: seq=569 ttl=54 time=55.454 ms
64 bytes from 2401:4900:50:9::8: seq=570 ttl=54 time=54.893 ms
64 bytes from 2401:4900:50:9::8: seq=571 ttl=54 time=54.367 ms
64 bytes from 2401:4900:50:9::8: seq=572 ttl=54 time=61.982 ms
64 bytes from 2401:4900:50:9::8: seq=573 ttl=54 time=55.392 ms
64 bytes from 2401:4900:50:9::8: seq=574 ttl=54 time=53.665 ms
64 bytes from 2401:4900:50:9::8: seq=575 ttl=54 time=57.196 ms
64 bytes from 2401:4900:50:9::8: seq=576 ttl=54 time=55.772 ms
64 bytes from 2401:4900:50:9::8: seq=577 ttl=54 time=55.814 ms
64 bytes from 2401:4900:50:9::8: seq=578 ttl=54 time=58.427 ms
64 bytes from 2401:4900:50:9::8: seq=579 ttl=54 time=66.143 ms
64 bytes from 2401:4900:50:9::8: seq=580 ttl=54 time=55.432 ms
64 bytes from 2401:4900:50:9::8: seq=581 ttl=54 time=54.951 ms
64 bytes from 2401:4900:50:9::8: seq=582 ttl=54 time=58.347 ms
64 bytes from 2401:4900:50:9::8: seq=583 ttl=54 time=56.778 ms
64 bytes from 2401:4900:50:9::8: seq=584 ttl=54 time=60.378 ms
64 bytes from 2401:4900:50:9::8: seq=585 ttl=54 time=55.010 ms
64 bytes from 2401:4900:50:9::8: seq=586 ttl=54 time=56.413 ms
64 bytes from 2401:4900:50:9::8: seq=587 ttl=54 time=54.912 ms
64 bytes from 2401:4900:50:9::8: seq=588 ttl=54 time=59.234 ms
64 bytes from 2401:4900:50:9::8: seq=589 ttl=54 time=137.605 ms
64 bytes from 2401:4900:50:9::8: seq=590 ttl=54 time=57.742 ms
64 bytes from 2401:4900:50:9::8: seq=591 ttl=54 time=56.157 ms
64 bytes from 2401:4900:50:9::8: seq=592 ttl=54 time=59.336 ms
64 bytes from 2401:4900:50:9::8: seq=593 ttl=54 time=54.907 ms
64 bytes from 2401:4900:50:9::8: seq=594 ttl=54 time=81.745 ms
64 bytes from 2401:4900:50:9::8: seq=595 ttl=54 time=61.818 ms
64 bytes from 2401:4900:50:9::8: seq=596 ttl=54 time=700.681 ms
64 bytes from 2401:4900:50:9::8: seq=597 ttl=54 time=73.231 ms
64 bytes from 2401:4900:50:9::8: seq=598 ttl=54 time=62.786 ms
64 bytes from 2401:4900:50:9::8: seq=599 ttl=54 time=56.998 ms
64 bytes from 2401:4900:50:9::8: seq=600 ttl=54 time=80.770 ms
64 bytes from 2401:4900:50:9::8: seq=601 ttl=54 time=68.414 ms
64 bytes from 2401:4900:50:9::8: seq=602 ttl=54 time=57.664 ms
64 bytes from 2401:4900:50:9::8: seq=603 ttl=54 time=66.229 ms
64 bytes from 2401:4900:50:9::8: seq=604 ttl=54 time=54.742 ms
64 bytes from 2401:4900:50:9::8: seq=605 ttl=54 time=58.233 ms
64 bytes from 2401:4900:50:9::8: seq=606 ttl=54 time=52.558 ms
64 bytes from 2401:4900:50:9::8: seq=607 ttl=54 time=55.586 ms
64 bytes from 2401:4900:50:9::8: seq=608 ttl=54 time=54.650 ms
64 bytes from 2401:4900:50:9::8: seq=609 ttl=54 time=53.714 ms
64 bytes from 2401:4900:50:9::8: seq=610 ttl=54 time=61.077 ms
64 bytes from 2401:4900:50:9::8: seq=611 ttl=54 time=89.682 ms

Any specific settings for ipv6 in WP76?

How do you set “cm data”?
Did you shut down firewall by ip6tables?
Did you capture wireshark log to check?

@jyijyi ,

To set the cm data used application to automatically start cm data. Have shutdown the firewall by ip6tables as seen above in the commant.

Have not captured wireshark logs can you let me know how do we do that?

you can see here about taking wireshark log:

You can also setup a host PC with WP76 as data channel and see if problem happens:

@jyijyi ,

In my case there is no ethernet but rmnet_data0 so should I use -i rmnet_data0 for the logs?

btw I have built netcat-openbsd and TCPDUMP in the yocto image itself.

root@swi-mdm9x28-wp:~# which tcpdump
/usr/sbin/tcpdump
root@swi-mdm9x28-wp:~# tcpdump --version
tcpdump version 4.9.2
libpcap version 1.8.1
OpenSSL 1.0.2p 14 Aug 2018

of course you need to use the correct interface…

BTW, remember to enable this:

@jyijyi ,

IPv6 is enabled:

image

You can also setup a host PC with WP76 as data channel and see if problem also happens.

BTW, is your SIM card having public IPv4 address?
You can also check if problem only happens in IPV6 address?

@jyijyi,
Have setup a PC with WP76 as a data channel still the problem persists.

SIM card has only Static public IPV6 addresses no public IPv4 addresses.

We have seen it working with HL series through AT Commands there we do not see any issue with the same SIM card.

At least you can isolate it is not legato problem…

how about that PC with HL module as data channel?
This can make sure no problem is found on host side

Will post the logs here with HL, I do not see any issue with PC or Host or SIM, the solution works fine with HL series.

Only with WP series we see the application is always listening on specified port with IPv6 address. The other WP76 module which is a client is never able to connect to the listening application.

There is always a timeout.

so now the TCP server setup in PC is not working, but TCP client connection from PC is working fine, right?

Yes the listener setup is not working, but the IPv6 client is working fine. We have both IPv6 listener and client application. the IPv6 client is able to communicate with other IPv6 listeners which are based on cloud. The IPv6 client fails to connect with other IPv6 listeners which are based out of the static public IPv6 SIM card inserted in second WP76 module.

did you capture the wireshark log in PC for the failure case?
did you capture the network log from network operator to see if the TCP package is droppped?

no Will be capturing that now. any suggestions on filters?

you can monitor the TCP server port on the filter in wireshark

Hi,

Collected the tcpdump logs on the rmnet_data0 interface with below command:

tcpdump -s0 -i rmnet_data0 -w /tmp/testipv6_2.pcap here is the log:

Attached is the pcap file:
testipv6_2.pcap (3.0 KB)

Below are the setup details:

  1. 2401:4900:4022:9D49::2 is the Static Public IP address of the SIM card inside WP7608. Data Connection activated through cm data connect & command. For listening on the port nc -6 -l 4058 is the command used.

  2. ip6tables -S shows everything is allowed:

  3. Netstat -tunlp shows listening correctly on IPv6 port 4058:

  4. 2401:4900:4022:9D4A ::2 is the client side IP address of the SIM inserted in HL8518 modem driven by AT Command.

Would like to know if any settings is missing here? Why we are not able to connect to the listener

from your screenshot, there is not response on the incoming TCP connection…

Did you capture the wireshark log in PC for the failure case?
I wonder if it is the same case for PC.
If so, then PC also have same problem on responding on incoming TCP connection.

BTW, you can shut down the firewall by :

iptables -I INPUT -j ACCEPT
ip6tables -I INPUT -j ACCEPT