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 Nov 16, 2023. It is now read-only.
I am using the remote monitoring solution and an Arduino M0 feather. When using the HTTP protocol to send messages from the Arduino to IoTHub, everything works great. However, I can only receive one command per startup. After that, the IoTHubClient_LL_DoWork function is called, but no command is processed.
The first time IoTHubClient_LL_DoWork(iotHubClientHandle) is called, it processes one command, and one command only, even if more are in the queue. I've modified iothub_client_ll.c to log what's happing, and the IoTHubClient_LL_DoWork(IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle) appears to be working fine, so I'm not sure what's going on.
Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered:
gmhewett
changed the title
Receive commands only at startup
Receive commands only once, and one at atime
Feb 15, 2017
gmhewett
changed the title
Receive commands only once, and one at atime
Receive commands only once, and only one
Feb 15, 2017
As I recall the example remote monitoring example only does one sample and likewise one command. You will need to create a loop. The work of sending the serialized sample and of processing the incoming command are both done within IoTHubClient_LL_DoWork().
@GregTerrell thanks for responding. I figured out what my issue was: I was using HTTP protocol to send/receive messages, and the SDK only checks for commands every 25 minutes or so, as per current HTTP guidelines. So, even though my while loop was calling dowork, there was no work to be done because the client hadn't polled the IoT Hub yet. Unfortunately, MQTT is not currently working on the Arduino Feather M0, though. Thanks!
Hi,
I am using the remote monitoring solution and an Arduino M0 feather. When using the HTTP protocol to send messages from the Arduino to IoTHub, everything works great. However, I can only receive one command per startup. After that, the
IoTHubClient_LL_DoWork
function is called, but no command is processed.The code in question from remote_moitoring.c:
The first time
IoTHubClient_LL_DoWork(iotHubClientHandle)
is called, it processes one command, and one command only, even if more are in the queue. I've modified iothub_client_ll.c to log what's happing, and theIoTHubClient_LL_DoWork(IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle)
appears to be working fine, so I'm not sure what's going on.Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: