0

I am trying to interface with Azure IoT Central - I already have a subscription and whatnot. Does this exist? I am intending to get data from my Raspberry Pi and post it to Azure Iot Central.

I found the C API used to connect to Azure IoT Hub and managed to get it working successfully. But this is not what I am looking for since Azure IoT Central provides a very nice way to present the data collected from these tools.

I also found Python API https://learn.microsoft.com/en-us/azure/iot-central/howto-connect-raspberry-pi-python. This is good but I was hoping for a C api for this. I'll be using the Python for now.

Albert Herd
  • 433
  • 1
  • 7
  • 13

1 Answers1

1

Okay - after some research, the same API can be used! The tricky part is to get the correct connection string. I tried to play around manually but it was not working. Luckily Microsoft supply a tool that allows you to generate a connection string.

https://github.com/Azure/dps-keygen/tree/master/bin/windows

Provide the correct data ScopeID, DeviceID and Primary key, get the connection string and use your already existing Azure IoT hub API.

Albert Herd
  • 433
  • 1
  • 7
  • 13
  • That's correct. Notice, that this is a device connection string for device-facing endpoint of the internal IoT Hub. The other side, such as a service-facing endpoint is used only by IoT Central (export data, rules, dashboards, etc.). How to get a limited access to this endpoint see https://stackoverflow.com/questions/53775213/sending-cloud-to-device-message-for-devices-provisoned-through-iot-central – Roman Kiss Jan 05 '19 at 15:10