我们正在调用Direct方法,该方法允许wireless temperature sensor设备将数据发送到Azure云。
在设备方面,我正在调用设备方法回调以从云中接收直接方法。每当我收到此消息时,都希望将数据发送到云中。
我有两种直接方法,
启动方法-启动流。并且,
停止方法-终止流。
代码:
static int DeviceMethodCallback(const char *methodName, const unsigned char *payload, int size, unsigned char **response, int *response_size)
{
LogInfo("Try to invoke method %s", methodName);
const char *responseMessage = "\"Successfully invoke device method\"";
int result = 200;
if (strcmp(methodName, "start") == 0)
{
LogInfo("Start sending temperature and humidity data");
messageSending = true;
}
但是从云中调用这些方法时出现以下错误。
{"message":"Device {\"Message\":/"{\\\"errorCode\\\":404103,\\\"trackingId\\\":\\\"8fcb31d1dc06486ebe38d4434160543f-G:15-TimeStamp:01/04/2019 06:09:04\\\",\\\"message\\\":\\\"Timed out waiting for device to connect.\\\",\\\"info\\\":{\\\"timeout\\\":\\\"00:02:00\\\"},\\\"timestampUtc\\\":\\\"2019-01-04T06:09:04.668628Z\\\"}\",\"ExceptionMessage\":/"\"} not registered"}
我猜这些错误是由于恶意负载或类似原因造成的。你能建议出什么问题吗?