TCP Client disconnects after 3-5 minutes and may or may not reconnect to TCP Server

I'm attempting to write a Particle program that runs on a Particle B-SoM board running OS 6.1.1. It is a TCP client that connects to a TCP server and periodically writes some command strings for the server to consume and act on. I can repeat the problem talking to a simple Python server.

After the client connects to the server and sends data periodically for about 3-5 minutes, the client will lose connection and the server will not detect any error. The server continues to sit in a TCP recv function and doesn't error out with any connection errors. Sometimes restarting the server works to re-establish connection but more often, the client requires the Particle board to be re-powered before it connects to the server again.

We are using an Adafruit ethernet featherwing connector and I've tried it with more than one. We did a couple of small modifications when attaching the connector. We changed the enabling pin as the default pin was already being used and added jumpers for a couple of lines which don't have pins in the standard featherwing output.

This is an example of the outputs I'm seeing on the Particle TCP client side when it loses the connection:

Entering calibration stage SPAN
Connected value = 1
sendFlowVolumesToNI: 2,10,5,0
0000153348 [system] WARN: Internet available, cloud not reachable
0000153348 [system] WARN: Cloud handshake failed, code=-220
0000153599 [system] INFO: Cloud: disconnecting
0000153599 [system] INFO: Cloud: disconnected
0000153599 [system] INFO: Cloud: connecting
0000153601 [system] WARN: Failed to load session data from persistent storage
0000153608 [system] INFO: Cloud socket connected
0000153608 [comm.protocol.handshake] INFO: Establish secure connection
0000153611 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
Starting Sample Pump 1
0000182777 [wiring] ERROR: recv error = 113
Connected value = 0
Connection lost, try reconnection
Socket Status = 0
Connection closed
0000198614 [comm.dtls] ERROR: handshake failed -6800
0000198615 [comm.dtls] ERROR: Invalid handshake state
0000198616 [comm.protocol.handshake] ERROR: Handshake failed: 17
Failed to connect to server
Ethernet is on
Socket Status = 0

Here is my TCP client class and main loop code:

TCPIPTest.cpp:

/* 
 * Project myProject
 * Author: Your Name
 * Date: 
 * For comprehensive documentation and examples, please visit:
 * https://docs.particle.io/firmware/best-practices/firmware-template/
 */

// Include Particle Device OS APIs
#include "Particle.h"
#include "TCPClientHelper.h"

TCPClient client;

// Let Device OS manage the connection to the Particle Cloud
SYSTEM_MODE(AUTOMATIC);

// Run the application and system concurrently in separate threads
SYSTEM_THREAD(ENABLED);

// Show system, cloud connectivity, and application logs over USB
// View logs with CLI using 'particle serial monitor --follow'
SerialLogHandler logHandler(LOG_LEVEL_INFO);

int SamplePump_1_Control(String command);

// TCP Server connection details
byte niServer[4] = {192, 168, 50, 105 };

uint16_t port = 6341;

NICommand currentCommand = NICommand::ZERO;

TCPClientHelper tcpHelper(niServer, port);

// setup() runs once, when the device is first turned on
void setup() {
    Serial.begin(9600);       // Start serial communication for debugging50
    delay(1000);              // Allow time for serial to initialize

    Particle.function("pumpControl", SamplePump_1_Control);
    tcpHelper.Initialize(false);
}

// loop() runs over and over again, as quickly as it can execute.
void loop() {
    int Z1Flow = 10;
    int S1Flow = 5;
    int S2Flow = 0;

    int zeroTime = 0;
    int spanTime = 0;
    int offTime = 0;
    int pumptime = 0;

    switch (currentCommand)
    {
        case NICommand::ZERO:
            Serial.println("Entering calibration stage ZERO");
            tcpHelper.sendFlowVolumesToNI(NICommand::ZERO, Z1Flow, 0, 0);
            delay(zeroTime);
            currentCommand = NICommand::SPAN;
            break;
        case NICommand::SPAN:
            Serial.println("Entering calibration stage SPAN");
            tcpHelper.sendFlowVolumesToNI(NICommand::SPAN, Z1Flow, S1Flow, S2Flow);
            delay(spanTime);
            currentCommand = NICommand::SAMPLE_PUMP_1;
            break;
        case NICommand::SAMPLE_PUMP_1:
            Serial.println("Starting Sample Pump 1");
            tcpHelper.sendPumpOnOff(NICommand::SAMPLE_PUMP_1, true );
            delay(pumptime);
            currentCommand = NICommand::OFF;
            break;
        default:
            Serial.println("Entering calibration stage OFF");
            tcpHelper.sendFlowVolumesToNI(NICommand::OFF, 0, 0, 0);
            delay(offTime);
            currentCommand = NICommand::ZERO;
            break;
    }
    delay(30000);
}

int SamplePump_1_Control(String command)
{
    if (command == "on") {
        tcpHelper.sendPumpOnOff(NICommand::SAMPLE_PUMP_1, true );
        return 1;
    } 
    else if (command == "off") {
        tcpHelper.sendPumpOnOff(NICommand::SAMPLE_PUMP_1, false );
        return 1;
    }
    else {
        return -1;
    }
}

TCPClientHelper.h

#ifndef TCPCLIENTHELPER_H
#define TCPCLIENTHELPER_H

#include "Particle.h"

enum class NICommand {
    OFF = 0,
    ZERO = 1,
    SPAN = 2,
    FLUSH = 3,
    SAMPLE_PUMP_1 = 4,
    SAMPLE_PUMP_2 = 5,
    SUCTION_PUMP_1 = 6,
    SUCTION_PUMP_2 = 7,
};

// Define the TCPClientHelper class
class TCPClientHelper {
public:
    // Constructor that takes server and port as parameters
    TCPClientHelper(const byte server[4], uint16_t port);

    void Initialize(bool closeConnectionAfterCommands);

    // Function to send flow volumes (three integers) to the TCP server
    bool sendFlowVolumesToNI(NICommand cailbrationStage, int volume1, int volume2, int volume3);
    bool sendPumpOnOff(NICommand pumpCommand, bool onOff );

    // Helper functions to modify server and port after initialization
    void setServer(const byte server[4]);
    void setPort(uint16_t port);

    bool checkClientConnection();

    void closeClientConnection();


private:
    byte server[4];  // Server IP address or hostname
    uint16_t port;       // Server port
    TCPClient client;    // TCPClient object for managing the connection
    bool closeConnectionAfterCommands;
};

#endif

TCPClient.cpp

#include "TCPClientHelper.h"

// Constructor that accepts the server address and port
TCPClientHelper::TCPClientHelper(const byte server[4], uint16_t port) {
    memcpy(this->server, server, 4);
    this->port = port;
 }

void TCPClientHelper::Initialize(bool closeConnectionAfterCommands)
{
    this->closeConnectionAfterCommands = closeConnectionAfterCommands;

    // Disable Listening Mode if not required
    if (System.featureEnabled(FEATURE_DISABLE_LISTENING_MODE)) {
        Serial.println("FEATURE_DISABLE_LISTENING_MODE enabled");
    } else {
        
        Serial.println("Disabling Listening Mode...");
        System.enableFeature(FEATURE_DISABLE_LISTENING_MODE);
    }

    Serial.println("Checking if Ethernet is on...");
    if (Ethernet.isOn()) {
        Serial.println("Ethernet is on");
        uint8_t macAddrBuf[8] = {};
        uint8_t* macAddr = Ethernet.macAddress(macAddrBuf);
        if (macAddr != nullptr) {
            Serial.printf("Ethernet MAC: %02x %02x %02x %02x %02x %02x\r\n",
                    macAddr[0], macAddr[1], macAddr[2], macAddr[3], macAddr[4], macAddr[5]);
        }
        Ethernet.connect();
        waitFor(Ethernet.ready, 30000);
        Serial.printf("Ethernet.ready: %d\r\n", Ethernet.ready());

        IPAddress localIP = Ethernet.localIP();
        Serial.printf("localIP: %s\r\n", localIP.toString().c_str());

        IPAddress gatewayIP = Ethernet.gatewayIP();
        Serial.printf("gatewayIP: %s\r\n", gatewayIP.toString().c_str());

    } else {
        Serial.println("Ethernet is off or not detected.");
    }

    if (System.featureEnabled(FEATURE_ETHERNET_DETECTION)) {
        Serial.println("FEATURE_ETHERNET_DETECTION enabled");
    } else {
        Serial.println("Enabling Ethernet...");
        System.enableFeature(FEATURE_ETHERNET_DETECTION);
        delay(500);
        System.reset();
    }

    Serial.printlnf("Connecting to: %d.%d.%d.%d", server[0], server[1], server[2], server[3]);
    
    if (!client.connect(IPAddress(server), port))
        Serial.println("Failed to connect to server");
    else
        Serial.println("Connected to server");

    client.setTimeout(100);
}

bool TCPClientHelper::checkClientConnection()
{
    // If this line is not in here, the TCPClient never detects if the server is offline.
    // It just continues to write values to it's socket buffer. Shouldn't a 
    int heartbeat = client.read();

    bool clientConnected = client.connected();
    Serial.printf("Connected value = %d\n", clientConnected);

    if (!clientConnected) {
        Serial.println("Connection lost, try reconnection");
        Serial.printlnf("Socket Status = %d", client.status());
        closeClientConnection();
        if (!client.connect(IPAddress(server), port)) {
            Serial.println("Failed to connect to server");
            if (Ethernet.isOn())
                Serial.println("Ethernet is on");
            Serial.printlnf("Socket Status = %d", client.status());
            return false;
        }
        else {
            Serial.println("Reconnected...");
        }
    }

    return client.connected();
}

// Function to send flow volumes to the server
bool TCPClientHelper::sendFlowVolumesToNI(NICommand cailbrationStage, int volume1, int volume2, int volume3) {

    if (checkClientConnection()) {
        String data = String::format("%d,%d,%d,%d", (int)cailbrationStage, volume1,volume2,volume3);

        // Send the string to the TCP server
        client.print(data);

        Serial.printlnf("sendFlowVolumesToNI: " + data);

        if (closeConnectionAfterCommands)
        {
            closeClientConnection();
        }

        return true;
    } 

    return false;
}

bool TCPClientHelper::sendPumpOnOff(NICommand pumpCommand, bool onOff )
{
    if (checkClientConnection()) {
        String data = String::format("%d,%d", (int)pumpCommand, onOff);

        // Send the string to the TCP server
        client.print(data);  // Using println to send a newline-terminated string
        Serial.printlnf("sendPumpOnOff: " + data);

        if (closeConnectionAfterCommands)
        {
            closeClientConnection();
        }

        return true;       
    }

    return false;
}

// Helper function to modify the server address
void TCPClientHelper::setServer(const byte server[4]) {
    memcpy(this->server, server, 4);
    Serial.printlnf("Server IP updated to: %d.%d.%d.%d", server[0], server[1], server[2], server[3]);
} 

// Helper function to modify the port
void TCPClientHelper::setPort(uint16_t port) {
    this->port = port;
    Serial.printlnf("Port updated to: %d", port);
}

void TCPClientHelper::closeClientConnection()
{
    // Close the connection
    client.flush();
    client.stop();
    Serial.println("Connection closed");
}

PythonTestServer.py

import datetime
import socket

# Define the server address and port
server_address = '192.168.50.105'  # Listen on all network interfaces
port = 6341  # Replace with the port number to match your client

def get_timestamp():
    """Return the current time as a formatted string."""
    return datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')

def start_server():
    """Start a TCP server that listens for incoming connections."""
    # Create a TCP/IP socket
    server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    # Bind the socket to the address and port
    server_socket.bind((server_address, port))
    server_socket.listen(1)  # Listen for incoming connections, backlog of 5 clients

    print(f"Server started, listening on {server_address}:{port}")

    while True:
        try:
            # Wait for a connection
            client_socket, client_address = server_socket.accept()
            print(f"Connection established with {client_address}")

            # Handle the client connection
            while True:
                try:
                    # Read the data from the client, expecting a newline-delimited CSV string
                    timestamp = get_timestamp()
                    print(f"{timestamp} Entering recv ...")            
                    data = client_socket.recv(1024).decode('utf-8')

                    # If no data is received, the client has closed the connection
                    if not data:
                        print(f"Connection closed by {client_address}")
                        break
                    
                    print(data)

                    # Split the data on newline to handle multiple CSV lines in one packet
                    lines = data.strip().split("\r\n")
                    for line in lines:
                        try:
                            # Parse the CSV data into individual numeric values
                            values = [int(x) for x in line.split(',')]

                            # Print the received numeric values
                            timestamp = get_timestamp()
                            print(f"{timestamp} - Received data: {values}")

                        except ValueError as e:
                            print(f"Invalid data received: {line}: {e}")

                except socket.error as e:
                    # Handle socket error during data reception
                    print(f"Socket error: {e}")
                    break  # Break out to close the client socket and wait for a new connection

        except socket.error as e:
            # Handle errors during the connection establishment
            print(f"Error accepting connection: {e}")

        finally:
            # Ensure the client socket is closed in case of error
            if 'client_socket' in locals():
                client_socket.close()
                print(f"Connection with {client_address} closed")

if __name__ == '__main__':
    start_server()

It looks you are leaving the connection open between commands (closeConnectionAfterCommands is false). If you were closing the connection, it's probably a different reason.

The Python server side will only get a socket close if the other side (the Particle device) sends a FIN packet. It could also get an error when writing if the other side does not ACK the write, or the port is not open on the other side.

If the other side disappears, the server will not know it, because by default TCP does not have a periodic ping. Some protocols add a periodic message to if the server does not get this message at the required interval, it will reset the connection.

On the Particle side, things start to go wrong with recv error 113, which is:

#define ECONNABORTED 113	/* Connection aborted */

That's a little unusual if there's no indication of a problem on the server side. However, the cloud connection also fails shortly thereafter, which would point to an issue with the route through the Ethernet LAN gateway.

The first thing to do is increase the log level to LOG_LEVEL_TRACE and see if there are any more messages that would be helpful.

This will be a little hard to troubleshoot if there aren't better messages at trace level. Ideally you'd want a Wireshark trace on the Ethernet to see the traffic to and from the Particle device to see where the packets are failing.

There is also a possibility that the way you're closing the connection and reopening is done, but I didn't see anything obviously wrong the in the code.

Thanks for looking at this so quickly.

I modified the python server to timeout on the recv and check the connection. When the connection on the client side fails, this check is not detecting a connection down.

def check_connection(client_socket):
    """Check if the client socket is still connected."""
    try:
        # Send a zero-length message to the client to test the connection
        client_socket.send(b'')
        return True
    except socket.error:
        # If an error occurs, the client is disconnected
        return False

Today I experienced some other weirdness. While the Python TCP Server was still in the recv after a disconnect, I saw the particle TCP client actually somehow "reconnect" and started sending data again but I'm not sure what it thought it was reconnecting with because the Python server wasn't listening, it was still in the recv and didn't get any more data.

My latest run, I did get it to repeat while I had wireshark running filtered on the tcp.port == 6341. I also turned on Trace logging in the Particle program.

  1. Wireshark stopped at the same time as the Server started timing out and not receiving any more data. The last packet was this (UTC Timestamp):

"6609","2024-09-17 15:34:48.240785","192.168.50.245","192.168.50.105","TCP","62","65144 → 6341 [PSH, ACK] Seq=61 Ack=1 Win=5840 Len=8"

  1. Server Side messages:

2024-09-17 09:33:48 - Received data: [0, 0, 0, 0]
2024-09-17 09:33:48 Entering recv ...
1,10,0,0
2024-09-17 09:34:18 - Received data: [1, 10, 0, 0]
2024-09-17 09:34:18 Entering recv ...
2,10,5,0
2024-09-17 09:34:48 - Received data: [2, 10, 5, 0]
2024-09-17 09:34:48 Entering recv ...
2024-09-17 09:35:48 - Socket timeout, checking connection status...
2024-09-17 09:35:48 Entering recv ...

  1. On the Client side, definitely saw a flurry of trace messages at the time of disconnection. Note that the Particle connection to the cloud is not done via the Ethernet port. It is done via cellular data and the cell connection isn't always stable where I'm at. The setup I have is just a local router between my laptop and the Particle board with no internet connection:
Serial connection closed.  Attempting to reconnect...
Serial monitor opened successfully:
FEATURE_DISABLE_LISTENING_MODE enabled
Checking if Ethernet is on...
Ethernet is on
Ethernet MAC: de 47 53 20 e3 1c
0000002023 [ncp.at] TRACE: > AT
0000002838 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0000002850 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
Ethernet.ready: 1
localIP: 1920000002854 [system] INFO: Cloud: connecting
.168.50.245
gatewayIP: 192.168.50.1
0000002856 [system] WARN: Failed to load session data from persistent storage
0000002868 [system] INFO: Cloud socket connected
0000002868 [comm.protocol.handshakeFEATURE_ETHERNET_DETECTION enabled
Connecting to: 192.168.50.105
] INFO: Establish secure connection
0000002882 Connected to server
Entering calibration stage ZERO
Connected value = 1
[sendFlowVolumesToNI: 1,10,0,0
Entering calibration stage ZERO
Connected value = 1
sendFlowVolumesToNI: 1,10,0,0
0000249020 [comm.dtls] ERROR: handshake failed -6800
0000249021 [comm.dtls] ERROR: Invalid handshake state
0000249023 [comm.protocol.handshake] ERROR: Handshake failed: 17
0000254031 [system] WARN: Internet available, cloud not reachable
0000254031 [system] WARN: Cloud handshake failed, code=-220
0000254281 [system] INFO: Cloud: disconnecting
0000254281 [system] INFO: Cloud: disconnected
0000254282 [system] INFO: Cloud: connecting
0000254283 [system] WARN: Failed to load session data from persistent storage
0000254290 [system] INFO: Cloud socket connected
0000254290 [comm.protocol.handshake] INFO: Establish secure connection
0000254294 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
Entering calibration stage SPAN
Connected value = 1
sendFlowVolumesToNI: 2,10,5,0
0000299299 [comm.dtls] ERROR: handshake failed -6800
0000299299 [comm.dtls] ERROR: Invalid handshake state
0000299301 [comm.protocol.handshake] ERROR: Handshake failed: 17


Starting Sample Pump 1
0000302913 [wiring] ERROR: recv error = 113
Connected value = 0
Connection lost, try reconnection
Socket Status = 0
Connection closed


0000304309 [system] WARN: Internet available, cloud not reachable
0000304309 [system] WARN: Cloud handshake failed, code=-220
0000304559 [system] INFO: Cloud: disconnecting
0000304559 [system] INFO: Cloud: disconnected
0000304559 [system] INFO: Cloud: connecting
0000304561 [system] WARN: Failed to load session data from persistent storage
0000305755 [system] INFO: Cloud socket connected
0000305755 [comm.protocol.handshake] INFO: Establish secure connection
0000305766 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
0000308045 [comm.protocol.handshake] INFO: Sending HELLO message
0000308046 [comm.coap] TRACE: Sending CoAP message
0000308046 [comm.coap] TRACE: CON POST /h size=39 token= id=1
0000308522 [comm.coap] TRACE: Received CoAP message
0000308523 [comm.coap] TRACE: ACK 0.00  size=4 token= id=1
0000308523 [comm.protocol.handshake] INFO: Handshake completed
0000308524 [comm.protocol.handshake] TRACE: Updating cached session parameters
0000308524 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000308526 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000308741 [ncp.at] TRACE: > AT+CFUN?
0000308748 [ncp.at] TRACE: < +CFUN: 1
0000308748 [ncp.at] TRACE: < OK
0000308749 [ncp.at] TRACE: > AT+CCID
0000308755 [ncp.at] TRACE: < +CCID: 89014103273467986430
0000308755 [ncp.at] TRACE: < OK
0000308756 [ncp.at] TRACE: > AT+CGSN
0000308761 [ncp.at] TRACE: < 355523766503736
0000308761 [ncp.at] TRACE: < OK
0000308762 [ncp.at] TRACE: > ATI9
0000308767 [ncp.at] TRACE: < L0.0.00.00.05.12,A.02.19
0000308767 [ncp.at] TRACE: < OK
0000308770 [comm.coap] TRACE: Sending CoAP message
0000308770 [comm.coap] TRACE: CON POST /d?\x01 size=233 token=aa id=2
0000308774 [comm.coap] TRACE: Sending CoAP message
0000308775 [comm.coap] TRACE: CON POST /E/spark/device/last_reset size=42 token= id=3
0000308776 [comm.coap] TRACE: Sending CoAP message
0000308777 [comm.coap] TRACE: CON POST /E/particle/device/updates/enabled size=44 token= id=4
0000308779 [comm.coap] TRACE: Sending CoAP message
0000308779 [comm.coap] TRACE: CON POST /E/particle/device/updates/forced size=44 token= id=5
0000308781 [comm.coap] TRACE: Sending CoAP message
0000308781 [comm.coap] TRACE: CON GET /t size=7 token=ab id=6
0000308782 [comm.coap] TRACE: Sending CoAP message
0000308783 [comm.coap] TRACE: CON POST /d?\x02 size=38 token=ac id=7
0000308784 [comm.protocol] INFO: Sending subscriptions
0000308785 [comm.coap] TRACE: Sending CoAP message
0000308785 [comm.coap] TRACE: CON GET /e/particle?u size=17 token= id=8
0000308787 [comm.coap] TRACE: Sending CoAP message
0000308787 [comm.coap] TRACE: CON GET /e/spark?u size=14 token= id=9
0000309368 [comm.coap] TRACE: Received CoAP message
0000309369 [comm.coap] TRACE: ACK 0.00  size=5 token=aa id=2
0000309370 [comm.protocol] TRACE: Updating system DESCRIBE checksum
0000309370 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000309595 [ncp.at] TRACE: > AT+CFUN?
0000309600 [ncp.at] TRACE: < +CFUN: 1
0000309600 [ncp.at] TRACE: < OK
0000309601 [ncp.at] TRACE: > AT+CCID
0000309606 [ncp.at] TRACE: < +CCID: 89014103273467986430
0000309607 [ncp.at] TRACE: < OK
0000309608 [ncp.at] TRACE: > AT+CGSN
0000309613 [ncp.at] TRACE: < 355523766503736
0000309613 [ncp.at] TRACE: < OK
0000309614 [ncp.at] TRACE: > ATI9
0000309619 [ncp.at] TRACE: < L0.0.00.00.05.12,A.02.19
0000309619 [ncp.at] TRACE: < OK
0000309620 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000309621 [comm.coap] TRACE: Received CoAP message
0000309622 [comm.coap] TRACE: ACK 0.00  size=4 token= id=3
0000309674 [comm.coap] TRACE: Received CoAP message
0000309674 [comm.coap] TRACE: ACK 0.00  size=4 token= id=4
0000309775 [comm.coap] TRACE: Received CoAP message
0000309775 [comm.coap] TRACE: ACK 0.00  size=4 token= id=5
0000309861 [comm.coap] TRACE: Received CoAP message
0000309863 [comm.coap] TRACE: ACK 2.05  size=10 token=ab id=6
0000309869 [comm.protocol] INFO: Received TIME response: 1726587326
0000309870 [comm.coap] TRACE: Received CoAP message
0000309871 [comm.coap] TRACE: ACK 0.00  size=5 token=ac id=7
0000309871 [comm.protocol] TRACE: Updating application DESCRIBE checksum
0000309872 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000309872 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000309973 [comm.coap] TRACE: Received CoAP message
0000309973 [comm.coap] TRACE: ACK 0.00  size=4 token= id=8
0000310074 [comm.coap] TRACE: Received CoAP message
0000310074 [comm.coap] TRACE: ACK 0.00  size=4 token= id=9
0000310075 [comm.protocol] TRACE: Updating subscriptions checksum
0000310075 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000310076 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000310176 [system] INFO: Cloud connected
0000310373 [comm.coap] TRACE: Sending CoAP message
0000310374 [comm.coap] TRACE: CON 0.00  size=4 token= id=10
0000310410 [comm.coap] TRACE: Received CoAP message
0000310411 [comm.coap] TRACE: CON POST /E/particle/device/updates/pending size=47 token=01 id=28972
0000310411 [comm.coap] TRACE: Sending CoAP message
0000310412 [comm.coap] TRACE: ACK 0.00  size=4 token= id=28972
0000310513 [comm.coap] TRACE: Received CoAP message
0000310513 [comm.coap] TRACE: CON GET /d?\x04 size=9 token=02 id=28973
0000310514 [comm.protocol] INFO: Received DESCRIBE request; flags: 0x04
0000310515 [comm.coap] TRACE: Sending CoAP message
0000310515 [comm.coap] TRACE: ACK 0.00  size=4 token= id=28973
0000310517 [ncp.at] TRACE: > AT+COPS=3,2
0000310524 [ncp.at] TRACE: < OK
0000310524 [ncp.at] TRACE: > AT+COPS?
0000310529 [ncp.at] TRACE: < +COPS: 0,2,"302610",7
0000310530 [ncp.at] TRACE: < OK
0000310530 [ncp.at] TRACE: > AT+UCGED=5
0000310535 [ncp.at] TRACE: < OK
0000310536 [ncp.at] TRACE: > AT+UCGED?
0000310542 [ncp.at] TRACE: < +RSRP: 112,5145,"-106.10",
0000310543 [ncp.at] TRACE: < +RSRQ: 112,5145,"-17.60",
0000310544 [ncp.at] TRACE: < OK
0000310544 [ncp.at] TRACE: > AT+COPS=3,2
0000310549 [ncp.at] TRACE: < OK
0000310550 [ncp.at] TRACE: > AT+COPS?
0000310555 [ncp.at] TRACE: < +COPS: 0,2,"302610",7
0000310556 [ncp.at] TRACE: < OK
0000310556 [ncp.at] TRACE: > AT+CEREG?
0000310562 [ncp.at] TRACE: < +CEREG: 2,5,"2BE1","189070B",7
0000310563 [ncp.at] TRACE: < OK
0000310563 [comm.coap] TRACE: Sending CoAP message
0000310564 [comm.coap] TRACE: CON 2.05  size=199 token=02 id=11
0000310843 [comm.coap] TRACE: Received CoAP message
0000310843 [comm.coap] TRACE: ACK 0.00  size=4 token= id=10
0000310886 [comm.coap] TRACE: Sending CoAP message
0000310887 [comm.coap] TRACE: CON 0.00  size=4 token= id=12
0000311026 [comm.coap] TRACE: Received CoAP message
0000311026 [comm.coap] TRACE: ACK 0.00  size=4 token= id=11
0000311325 [comm.coap] TRACE: Received CoAP message
0000311325 [comm.coap] TRACE: ACK 0.00  size=4 token= id=12
0000311399 [comm.coap] TRACE: Sending CoAP message
0000311402 [comm.coap] TRACE: CON 0.00  size=4 token= id=13
0000311805 [comm.coap] TRACE: Received CoAP message
0000311805 [comm.coap] TRACE: ACK 0.00  size=4 token= id=13
0000311912 [comm.coap] TRACE: Sending CoAP message
0000311915 [comm.coap] TRACE: CON 0.00  size=4 token= id=14
0000312407 [comm.coap] TRACE: Received CoAP message
0000312407 [comm.coap] TRACE: ACK 0.00  size=4 token= id=14
0000312425 [comm.coap] TRACE: Sending CoAP message
0000312426 [comm.coap] TRACE: CON 0.00  size=4 token= id=15
0000312840 [comm.coap] TRACE: Received CoAP message
0000312840 [comm.coap] TRACE: ACK 0.00  size=4 token= id=15
0000312938 [comm.coap] TRACE: Sending CoAP message
0000312939 [comm.coap] TRACE: CON 0.00  size=4 token= id=16
0000313390 [comm.coap] TRACE: Received CoAP message
0000313390 [comm.coap] TRACE: ACK 0.00  size=4 token= id=16
0000313451 [comm.coap] TRACE: Sending CoAP message
0000313454 [comm.coap] TRACE: CON 0.00  size=4 token= id=17
0000313943 [comm.coap] TRACE: Received CoAP message
0000313943 [comm.coap] TRACE: ACK 0.00  size=4 token= id=17
0000313969 [comm.coap] TRACE: Sending CoAP message
0000313970 [comm.coap] TRACE: CON 0.00  size=4 token= id=18
0000314351 [comm.coap] TRACE: Received CoAP message
0000314351 [comm.coap] TRACE: ACK 0.00  size=4 token= id=18
0000314531 [comm.coap] TRACE: Sending CoAP message
0000314532 [comm.coap] TRACE: CON 0.00  size=4 token= id=19
0000315024 [comm.coap] TRACE: Received CoAP message
0000315024 [comm.coap] TRACE: ACK 0.00  size=4 token= id=19
0000315049 [comm.coap] TRACE: Sending CoAP message
0000315050 [comm.coap] TRACE: CON 0.00  size=4 token= id=20
0000315506 [comm.coap] TRACE: Received CoAP message
0000315507 [comm.coap] TRACE: ACK 0.00  size=4 token= id=20
0000315611 [comm.coap] TRACE: Sending CoAP message
0000315614 [comm.coap] TRACE: CON 0.00  size=4 token= id=21
0000316032 [comm.coap] TRACE: Received CoAP message
0000316032 [comm.coap] TRACE: ACK 0.00  size=4 token= id=21
0000316124 [comm.coap] TRACE: Sending CoAP message
0000316125 [comm.coap] TRACE: CON 0.00  size=4 token= id=22
0000316521 [comm.coap] TRACE: Received CoAP message
0000316521 [comm.coap] TRACE: ACK 0.00  size=4 token= id=22
0000316637 [comm.coap] TRACE: Sending CoAP message
0000316638 [comm.coap] TRACE: CON 0.00  size=4 token= id=23
0000317065 [comm.coap] TRACE: Received CoAP message
0000317065 [comm.coap] TRACE: ACK 0.00  size=4 token= id=23
0000317150 [comm.coap] TRACE: Sending CoAP message
0000317151 [comm.coap] TRACE: CON 0.00  size=4 token= id=24
0000317546 [comm.coap] TRACE: Received CoAP message
0000317546 [comm.coap] TRACE: ACK 0.00  size=4 token= id=24
0000317663 [comm.coap] TRACE: Sending CoAP message
0000317664 [comm.coap] TRACE: CON 0.00  size=4 token= id=25
0000318108 [comm.coap] TRACE: Received CoAP message
0000318108 [comm.coap] TRACE: ACK 0.00  size=4 token= id=25
0000318176 [comm.coap] TRACE: Sending CoAP message
0000318177 [comm.coap] TRACE: CON 0.00  size=4 token= id=26
0000318665 [comm.coap] TRACE: Received CoAP message
0000318666 [comm.coap] TRACE: ACK 0.00  size=4 token= id=26
0000318689 [comm.coap] TRACE: Sending CoAP message
0000318690 [comm.coap] TRACE: CON 0.00  size=4 token= id=27
0000319122 [comm.coap] TRACE: Received CoAP message
0000319122 [comm.coap] TRACE: ACK 0.00  size=4 token= id=27
0000319207 [comm.coap] TRACE: Sending CoAP message
0000319208 [comm.coap] TRACE: CON 0.00  size=4 token= id=28
0000319642 [comm.coap] TRACE: Received CoAP message
0000319642 [comm.coap] TRACE: ACK 0.00  size=4 token= id=28
0000319769 [comm.coap] TRACE: Sending CoAP message
0000319770 [comm.coap] TRACE: CON 0.00  size=4 token= id=29
0000320203 [comm.coap] TRACE: Received CoAP message
0000320203 [comm.coap] TRACE: ACK 0.00  size=4 token= id=29
0000320287 [comm.coap] TRACE: Sending CoAP message
0000320288 [comm.coap] TRACE: CON 0.00  size=4 token= id=30
0000320683 [comm.coap] TRACE: Received CoAP message
0000320683 [comm.coap] TRACE: ACK 0.00  size=4 token= id=30
0000320849 [comm.coap] TRACE: Sending CoAP message
0000320850 [comm.coap] TRACE: CON 0.00  size=4 token= id=31
0000321290 [comm.coap] TRACE: Received CoAP message
0000321290 [comm.coap] TRACE: ACK 0.00  size=4 token= id=31
0000321362 [comm.coap] TRACE: Sending CoAP message
0000321363 [comm.coap] TRACE: CON 0.00  size=4 token= id=32
Failed to connect to server
Ethernet is on
Socket Status = 0

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.