St-device-sdk-c Limited Number of Components?

After dealing with the challenges of connecting my device to Samsung cloud and then a weekend fighting with the UART coding I have a few new challenges :slight_smile:

I have created a device profile that has a switch and healthcheck in the “main” componenent
I then have 11 other components each with 1 capability, either a Motion Sesor or Contact.

The problem? I have is that when the code starts it runs the initialisation routine to set the status of each of the capabilities to the cloud. In total it should send 12 messages but is only sending 10. It just never seems to run the last 2. I can change the order they are sent and what ever the last 2 in the list are never get sent.

Each capability is initialised by two line. A small section below. Is there a limit? Can it be adjusted?

cap_contactSensor01_data = caps_contactSensor_initialize(ctx, “Contact01”, NULL, NULL);
cap_contactSensor01_data->set_contact_value(cap_contactSensor_data01, “closed”);
cap_contactSensor02_data = caps_contactSensor_initialize(ctx, “Contact02”, NULL, NULL);
cap_contactSensor02_data->set_contact_value(cap_contactSensor_data02, “closed”);
cap_motionSensor01_data = caps_motionSensor_initialize(ctx, “PIR01”, NULL, NULL);
cap_motionSensor01_data->set_motion_value(cap_motionSensor_data01, “inactive”);

I don’t know how up to date the docs are, but they suggest the guardrail for device components is 10. I vaguely recall seeing that number somewhere else too.

Thanks for the link - That looks like it is the problem.

Anyone got any suggestions on how I can make a single device report more than 10 capabilities?

Hi @bmc
You can simply adjust it by increasing IOT_PUB_QUEUE_LENGTH value as a workaround.