IP Delete before flashing

Hi All,

s7g2  (Custom Board)

SSP 1.7.0

e2Studio 7.8.0

https://community.renesas.com/embedded-system-platform/synergy/f/forum/29533/how-to-flash-code-for-s7g2-dk-from-sd-card/101602#101602

we are trying to Flash the Firmware. (as shared in the above post)

So,

//FirmWare Upgrade using Buffer
uPrev_Posture=tx_interrupt_control(TX_INT_DISABLE); //Disabling Interrupts

//Stop HTTP Server
uHTTPServerDelSts=nx_http_server_delete(&g_http_server0);

//Disable IP Services
uIP0DelSts=nx_ip_delete(&g_ip0);

While Deleting we are getting 0x28 (dec 40)

which as per document says :NX_SOCKETS_BOUND (0x28) This IP instance still has UDP or
TCP sockets bound to it. All
sockets must be unbound and
deleted prior to deleting the IP
instance.

1. How Do we know which service still uses sockets?

2. How to gracefully Close them.

3. After IP Delete: a. the helper thread is still running, the device is still pinging...

Regards

Surojit

Parents Reply
  • Hi JB,

    Thank you for your reply...

    I went through the above link and found out...

    the state of the socket is...

    NX_TCP_TIMED_WAIT

    This is what we tried ...

    //Stop MODBUS Slave Service
    if(sDataLoggerConfParam.sDataLoggerConf.sETHPort1Conf.sMBTCPSlave.bServiceStatus)
    {
    //UnListen all socket
    nx_tcp_server_socket_unlisten (&g_ip0, MODBUS_TCP_PORT);
    //Delete Sockets
    for (u8SocketCtrZ = 0; u8SocketCtrZ < u16NoMBSlaveClients; u8SocketCtrZ++)
    {
    nx_tcp_socket_disconnect (&pMBSlaveClientParam[u8SocketCtrZ].NX_TCPServerClientSocket, 0); // Only 0 value allowed do not put any other value.
    nx_tcp_server_socket_unaccept (&pMBSlaveClientParam[u8SocketCtrZ].NX_TCPServerClientSocket);
    nx_tcp_socket_delete(&pMBSlaveClientParam[u8SocketCtrZ].NX_TCPServerClientSocket);
    }
    }
    uDNS0Delsts=nx_dns_delete(&g_dns0);
    uDNS1Delsts=nx_dns_delete(&g_dns1);
    //Disable IP Services
    uIP0DelSts=nx_ip_delete(&g_ip0);

Children