VSChina / ESP32_AzureIoT_Arduino

The library for ESP32 Azure IoT for Arduino
MIT License
37 stars 43 forks source link

Direct Method Invocation seems to be broken #14

Closed CoolNamesAllTaken closed 5 years ago

CoolNamesAllTaken commented 5 years ago

I have an ESP32 device running this library, and while it can connect to Azure IoT hub and transmit/receive messages just fine, it seems that the device method functionality is not working. Whenever I call the device's direct method from the Azure IoT portal or the device manager utility, I get the following error: image

As of mid-2018, it sounds like there were issues with direct method invocation not being supported for ESP8266. Is this currently the case for ESP32?

Thanks!

CoolNamesAllTaken commented 5 years ago

My bad! I forgot to initialize the Esp32MQTTClient as a device with a device twin. Once I added a "true" as the second parameter in Esp32MQTTClient_Init, things worked fine.