Comments (15)
We are actively working on bringing MQTT support and expect this to be shipped in the next month or so.
from azure-iot-arduino.
Hi,
Microsoft has just added MQTT for Arduino... Happy holydays!
from azure-iot-arduino.
Hi @yaweiw
This is a perfectly reasonable ask (at least for MQTT as I suspect AMQP might be a bit too much in terms of memory usage to be brought up). We will look into this soon and will keep you posted here.
from azure-iot-arduino.
Can you please confirm or refute, that currently only sending data to the IoTHub is supported and not receiving messages via MQTT? I'm a bit confused...
from azure-iot-arduino.
At this point you can only use HTTP to send AND receive messages using the Arduino lib.
We are planning to bring MQTT support soon and certainly AMQP later.
from azure-iot-arduino.
Hey, thanks for the answer. How can I receive notifications with HTTP? Does your lib use long polling?
Plans for supporting MQTT sound good!
from azure-iot-arduino.
The library doesn't implement long poling, you have to do it in your loop. MQTT will definitively solve this.
from azure-iot-arduino.
For AMQP & MQTT, I use below code snippet to poll for iot client status
while ((IoTHubClient_LL_GetSendStatus(iotHubClientHandle, &status) == IOTHUB_CLIENT_OK) && (status == IOTHUB_CLIENT_SEND_STATUS_BUSY))
{
IoTHubClient_LL_DoWork(iotHubClientHandle);
ThreadAPI_Sleep(100);
}
from azure-iot-arduino.
Hi @yaweiw
I wouldn't recommend using this pattern. When using the lower layer of the C SDK (you can read more about lower layer vs. convenience layer of the C SDK here), the DoWork is about triggering all the work the client SDK has to do: send a message, receive a message,...). If you condition the call to DoWork on the GetSendStatus, then you will never receive a message if you are not sending one...
from azure-iot-arduino.
@olivierbloch in our code, sending is happening constantly.. any possibility to just receive while not send. I guess it's no according to behavior of IoTHubClient_LL_DoWork?
from azure-iot-arduino.
Actually you can receive without ever sending. You need to register the callback for receiving messages, then regularly call DoWork. If a message is sent from the Cloud to the device then the next time the DoWork is called, the device client will get the message and will invoke the callback you registered. Our samples show this pattern
from azure-iot-arduino.
@olivierbloch Could you roughly estimate when you will support MQTT with this library? In 1 month, 6 month or 1 year?
from azure-iot-arduino.
Please I would like to have that answer as well.
from azure-iot-arduino.
Would also very much like to know any kind of rough timeline indication on this. Thanks for the great work!
from azure-iot-arduino.
MQTT would make a great Holiday gift!
Thanks for your efforts.
Best regards
from azure-iot-arduino.
Related Issues (20)
- Missing internal header file HOT 1
- Failed to connect azure iot hub with esp8266 using azure-iot-arduino library HOT 1
- IoT Central example HOT 2
- No Arduino boards actually supported? HOT 1
- Support for Device Provisioning Support HOT 1
- Using IoT Edge certificate instead of Baltimore certificate
- Big Sur compatibility issues
- blob.h is missing HOT 5
- Compatibility with MKR1000 dubious
- blob.h issue for Arduino Nano 33 IoT board HOT 2
- get_epoch_time in iothub_client_diagnostic.c throws errors HOT 1
- Dead link to Huzzah Tutorial in ReadMe
- missing dependencies when updating through library manager
- Arduino Ethernet Shield
- Arduino MKR WIFI 1010 Support
- az_http_client_send_request HOT 1
- upload_to_blob functionality (blob.c and blob.h) HOT 1
- MQTT CONNECT NOT DECLARED IN THIS SCOPE
- While Generating SAS token issue HOT 1
- This repo is missing important files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-iot-arduino.