Hi,
is there a way to query the keepAlive value already configured in a firmware?
Imagine this scenario:
it is set to a value that I want to preserve, but change momentarily
thanks
It appears that the answer is no. The properly can be set, but you can’t get it (scroll down a little to the get function, there’s no case for SPARK_CLOUD_PING_INTERVAL
).
{
SYSTEM_THREAD_CONTEXT_SYNC(spark_set_connection_property(property, value, data, reserved));
switch (property) {
case SPARK_CLOUD_DISCONNECT_OPTIONS: {
const auto d = (const spark_cloud_disconnect_options*)data;
auto opts = CloudDisconnectOptions::fromSystemOptions(d);
CloudConnectionSettings::instance()->setDefaultDisconnectOptions(std::move(opts));
return 0;
}
// These properties are forwarded to the protocol instance as is
case SPARK_CLOUD_PING_INTERVAL:
case SPARK_CLOUD_FAST_OTA_ENABLED: {
const auto d = (const protocol::connection_properties_t*)data;
const auto r = spark_protocol_set_connection_property(sp, property, value, d, reserved);
return spark_protocol_to_system_error(r);
}
default:
return SYSTEM_ERROR_INVALID_ARGUMENT;
}
}
1 Like