Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
I am using Thingworx C SDK, get following message and then disconnect:
---------------------------------
WARN] 2015-11-26 01:23:43,31: apiThread: Did not receive pong in time
[WARN] 2015-11-26 01:23:43,37: apiThread: Did not receive pong in time
[WARN] 2015-11-26 01:23:43,38: sendCtlFrame: Not connected
[WARN] 2015-11-26 01:23:43,44: msgHandlerOnClose: WEBSOCKET CLOSED
[WARN] 2015-11-26 01:23:43,51: msgHandlerOnClose: WEBSOCKET CLOSED
--------------------------------
It's happens every 10-30 minutes under Verizon 3G. but it's much better under WIFI.( may half day or more )
I am trying some combination of config/twDefaultSettings.h. Is there any recommended settings for always online under 3G?
You can set the heartbeat rate on the EMS and the timeout on the Platform.
Perhaps if it is happening too often, you can lengthen that.
However if this issue persists, I would log a case with support.ptc.com
the one draw back if you have longer heartbeat period / timeout is that the system won't know there was an unexpected drop of connection for a longer time.
can you explain how does DUTY_CYCLE and DUTY_CYCLE_PERIOD works ?
it seems that PING_RATE not works but DUTY_CYCLE works
From the ThingWorx WebSocket-Based Edge MicroServer Developer’s Guide
• duty_cycle | Determines what percentage of time during the connection period that the ThingW orx WS EMS is connected to the ThingW orx Platform. |
• connect_period | Defines the period of time set for duty cycle intervals |
connect_period
Specifies the rate in milliseconds to duty cycle control the WebSocket connection. The default is 60000 milliseconds.
duty_cycle
Specifies in percent the duty cycle of the WebSocket connection.
The default is 100, for AlwaysOn.
For more information, consult the Developer's Guide.