Azure-iot-sdk-c: Make device twin sample to run on ESP8266

Created on 30 Jan 2017  路  8Comments  路  Source: Azure/azure-iot-sdk-c

serializer/samples/devicetwin_simplesample is one good example how to use device twin (WITH_DESIRED_PROPERTY) and device method (WITH_METHOD).

But unfortunately, it currently does not work with ESP8266 (Sparkfun Thing Dev). I am not proficient in C but when I drill down I found that parson.c use sscanf but ESP8266 does not support sscanf (issue).

I really hope the device twin sample can work because it enables ESP8266 to be invoked with device method.

enhancement

Most helpful comment

@jantielens Real Soon Now. I've gotten it running, and just need to get it into the next release.

All 8 comments

We suggest changing parson source code to use some of the functions we wrote in order to work around the sscanf problem. We have no time to make this change ourselves for the foreseeable future.

If you manage to get it running, we'd take a pull request on that. Thank you.

Best Regards,
Andrei Porumb

I have forked parson and made a version of it without sscanf. It passed all parson tests.

Since it is not a bug in parson, I filed an issue (a.k.a. suggestion) to them and see if they like my commit.

Waiting for my pull request at parson to be accepted.

@anporumb Although device twin is still not working on ESP8266 (lack of Lock/Unlock/Lock_init), the latest parson@96150ba remove dependency to sscanf. Bringing one closer step.

Twin support for Arduino is near the front of my task queue. I'll post here when it's complete.

Any update @JetstreamRoySprowl ? Is it still far away?
Thanks!

@jantielens Real Soon Now. I've gotten it running, and just need to get it into the next release.

The 1.0.44 versions of the Azure IoT libraries now have twin support. Running this version will require the latest library and devices files. Here is the sample for Huzzah, but it also fits in Thing Dev: https://github.com/Azure-Samples/iot-hub-c-huzzah-getstartedkit

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kskog picture kskog  路  5Comments

kiranpradeep picture kiranpradeep  路  7Comments

vpetrigo picture vpetrigo  路  5Comments

alexeystrakh picture alexeystrakh  路  5Comments

wlisac picture wlisac  路  4Comments