You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.
Hello!
I have tried SDK and simple sample with Genuino MKR1000.
Here are some additional steps that I have made:
AzureIoTProtocol_HTTP was also required for compiling, so I have install it.
It was also exception 'class Serial_' has no member named 'setDebugOutput'. So, I have commented line
Serial.setDebugOutput(true);
After those steps message was send to IoT hub, but it was only one message.
As I think because inside loop there is simplesample_http_run(); - it should be send multiple messages. Right?
May I ask what does means this code?:
/* wait for commands */
while (1)
{
IoTHubClient_LL_DoWork(iotHubClientHandle);
ThreadAPI_Sleep(1000);
}
May be I should made corrections to simple sample code to be able send multiple messages?
The text was updated successfully, but these errors were encountered:
The code that actually sends a message to IoT Hub is couple of lines above the loop:
if (IoTHubClient_LL_SendEventAsync(iotHubClientHandle, messageHandle, sendCallback, (void*)1) !=IOTHUB_CLIENT_OK)
{
printf("failed to hand over the message to IoTHubClient");
}
else
{
printf("IoTHubClient accepted the message for delivery\r\n");
}
IoTHubMessage_Destroy(messageHandle);
If you would like to send more messages, you have to edit your code and send messages within the loop.
Take a look at the slightly modified code here. I am sending a message in the loop:
Hello!
I have tried SDK and simple sample with Genuino MKR1000.
Here are some additional steps that I have made:
AzureIoTProtocol_HTTP was also required for compiling, so I have install it.
It was also exception 'class Serial_' has no member named 'setDebugOutput'. So, I have commented line
After those steps message was send to IoT hub, but it was only one message.
As I think because inside loop there is simplesample_http_run(); - it should be send multiple messages. Right?
May I ask what does means this code?:
May be I should made corrections to simple sample code to be able send multiple messages?
The text was updated successfully, but these errors were encountered: