Skip to content

RPC request & subscription, Shared Attribute request & subscription, and Provisioning are not functioning v0.16.0 #262

@BatuhanKaratas

Description

@BatuhanKaratas

Hi,

This issue is observed while using the following fork:
👉 https://github.com/MathewHDYT/thingsboard-client-sdk
with HEAD set to commit 9c00098.

Tests were performed directly using the example applications in the repository (not in a custom project) to ensure accuracy.

Platform:

  • ESP32-S3
  • ESP-IDF v5.5

🔧 Observed Issues:

  1. RPC Request
Client_Side_RPC<MAX_RPC_SUBSCRIPTIONS, MAX_RPC_REQUEST> rpc_request;
RPC_Request_Callback callback(RPC_REQUEST_CALLBACK_METHOD_NAME, &processTime, nullptr, REQUEST_TIMEOUT_MICROSECONDS, &requestTimedOut);
rpc_request.RPC_Request(callback);

Log:

I (00:01:28.777) ThingsBoard: Subscribing the given topic (v1/devices/me/rpc/response/+) failed

2. RPC Subscription

Server_Side_RPC<MAX_RPC_SUBSCRIPTIONS, MAX_RPC_RESPONSE> rpc;
rpc.RPC_Subscribe(RPC_Callback{RPC_OTA_METHOD_NAME.data(), &processRPCOTARequest});
Although the subscription call returns success and no error is reported in the logs, the callback is never triggered when an RPC request is sent from the server.

3. Shared Attribute Request

Attribute_Request<1U, NUMBER_OF_MAX_ATTR> attr_request;
constexpr std::array<const char*, 1> REQUESTED_SHARED_ATTRIBUTES = {CCSHA_KEY};
const Attribute_Request_Callback<NUMBER_OF_MAX_ATTR> sharedCallback(&processSharedAttributeRequest, 5000U * 1000U, &requestTimedOutCB, REQUESTED_SHARED_ATTRIBUTES);
attr_request.Shared_Attributes_Request(sharedCallback);

Log:
I (00:01:29.278) ThingsBoard: Subscribing the given topic (v1/devices/me/attributes/response/+) failed

4. Provisioning

const Provision_Callback provisionCallback(Access_Token(), &processProvisionResponse, PROVISION_DEVICE_KEY, PROVISION_DEVICE_SECRET, s_DeviceName.c_str(), PROVISION_REQUEST_TIMEOUT_MICROSECONDS, &requestTimedOut);
Provision<> m_Prov;
m_Prov.Provision_Request(provisionCallback);

Result: Returns false and provisioning fails.

Working:

  • MQTT connection
  • Sending telemetry
  • Sending client attributes (not shared)

🔁 Additional Note:
When I checkout commit d1709fb, the Shared Attribute Request starts working correctly again.
Let me know if any other details are needed to reproduce or debug the issue.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions