LucaAmato
LucaAmato

Reputation: 1

Callback not found for topic using C SDK for IBM Watson

I start from example found at ibm-watson-iot.github.io

  1. I define my device on Watson IOT

  2. I create my C-device snippet using deviceSample.c and it send an event {"d": {"SensorID":"Test","Reading": 99}}

  3. I see the event in Watson IoT platform correctly

But when I try to manage the event from my C application I catch the following error

iotp_async.c iotp_client_messageArrived 1320: ERROR: Callback not found for topic. topic: iot-2/type/semaforo/id/1002/evt/status/fmt/json

from my client log I take the following msg

iotp_client_setHandler 1176: INFO: Handler (type=AppEvent) is added. Topic=iot-2/type/+/id/+/evt/+/fmt/+

Does this msg means that my code is subscribed to the event ? In my C code I define a CallBack event func using

IoTPApplication_setEventHandler
               (application, applicationEventCallback, 
                        devType, devId, eventName, format
               );

where my applicationEventCallback is

void  applicationEventCallback (char* type, char* id, 
           char* eventName, char *format, void* payload, size_t payloadSize);

Why my client does not mange correctly the incoming event ?

Upvotes: 0

Views: 66

Answers (1)

LucaAmato
LucaAmato

Reputation: 1

A fix for the issue is delivered in the GigHub project:

https://github.com/ibm-watson-iot/iot-c

For details, refer to:

https://github.com/ibm-watson-iot/iot-c/pull/10

thanks to Ranjan for collaboration and fixing

Upvotes: 0

Related Questions