Whats the impact of "[comm.dtls] WARN: skipping hello message"

I use an electron to publish some metrics of an off-grid solar power system.
My electron is offline most of the time. It connects every hour to cloud to publish the averaged data and goes offline immediately after the publish (~ 2 minutes).
When it goes online most of the time I see the following warning on the logging output:

[comm.dtls] WARN: skipping hello message

What is the impact of this warning?
What is this hello message used for?
What would I need to change when reestablishing the connection after the 1 hour offline time to get rid of the warning?

I checked the code that logs the warning but could not really understand what the app_state_crc is:

SessionPersist::RestoreStatus restoreStatus = sessionPersist.restore(&ssl_context, renegotiate, keys_checksum, coap_state, callbacks.restore);
LOG(INFO,"(CMPL,RENEG,NO_SESS,ERR) restoreStatus=%d", restoreStatus);
if (restoreStatus==SessionPersist::COMPLETE)
{
   LOG(INFO,"out_ctr %d,%d,%d,%d,%d,%d,%d,%d, next_coap_id=%x", sessionPersist.out_ctr[0],
         sessionPersist.out_ctr[1],sessionPersist.out_ctr[2],sessionPersist.out_ctr[3],
         sessionPersist.out_ctr[4],sessionPersist.out_ctr[5],sessionPersist.out_ctr[6],
         sessionPersist.out_ctr[7], sessionPersist.next_coap_id);
   sessionPersist.make_persistent();
   uint32_t actual = sessionPersist.application_state_checksum(this->callbacks.calculate_crc);
   LOG(INFO,"app state crc: %x, expected: %x", actual, app_state_crc);
   if (actual==app_state_crc) {
      LOG(WARN,"skipping hello message");
      flags |= Protocol::SKIP_SESSION_RESUME_HELLO;
   }
   LOG(INFO,"restored session from persisted session data. next_msg_id=%d", *coap_state);
   return SESSION_RESUMED;
}

My code uses:

SYSTEM_MODE(MANUAL);
SYSTEM_THREAD(ENABLED);

The code used to connect every hour looks roughly like this

Cellular.on();
Cellular.connect();
// wait for System Event network_status_connected
Particle.connect();
// wait for System Event cloud_status_connected
Particle.publish(....);

Thank for any insights.

Regards
Franz

It’s not really a warning, despite being level WARN. You actually want that, as it indicates that the session was not renegotiated and was instead resumed.

If you instead did a full renegotiation, you wouldn’t get that warning, but you’d use an additional:

  • 10.94 seconds
  • 2.778 amp-seconds of energy
  • 3579 bytes of data

So really, the warning is preferable.

4 Likes

@rickkas7 thanks for the very quick replay and the details.

I will just ignore this WARN message in the future :wink: .

1 Like