Send reported properties to Azure IOT Central with IOS SDK - ios

I'm struggling with the IOT Central SDK to send reported properties to my IOT Central but so far I haven't found any way to do it.
Have anyone managed to perform this very task? I have no problem sending properties or events / telemetries but I've been struggling with this for a while with no results.

The Device Twins features are supported for devices with the MQTT or AMQP protocols to the Azure IoT Central (Azure IoT Hub).
For your requirement such as using a device in the iOS Application, I do recommend using the MQTT protocol directly to the Azure IoT Central (Azure IoT Hub) and some iOS MQTT client library, for example MQTT-Client-Framework.
For test purposes of the features how to use the MQTT protocol directly, you can use any MQTT client tools such as MQTTBox, MQTT.fx, etc.
The following screen snippets show an example of using the MQTT protocol directly to the Azure IoT Central, where the MQTTBox client updated a device1 reported property (name battery):

Related

Can MQTT v3 client work with MQTT v5 server?

I wanted to make use of Shared Subscription feature of MQTT v5. But currently I am using AKKA MQTT client which doesn't support MQTT v5 client. Can I still use v3 MQTT paho client and use Shared Subscription feature?
That should not be a problem as from the viewpoint of an MQTT v3 client a shared subscription is just like any subscription.
The broker has to do all the work regarding shared subscription logic.
The only hindrances I can see are:
that an MQTT broker might support v5 but not v3/v3.1.1
the broker doesn't support shared subscriptions in general (yes they exist)
the broker supports all MQTT versions but handles them as two different protocols (not sure if this is a thing)
Using paho client write an app(ensure that this will use MQTT v5) that will have two clients.
Client_v3 will subscribe to the topics from the source i.e. from the app that sends MQTT v3
Client_v5 will publish the received topics as it is received in the above step.
In your application where you want to use shared subscription(again ensure it uses MQTT v5) alter the topics $share/<topic> and make it to get the topics from the client_v5 publish
In simple word: make you paho client code to act as a broker between v3 and v5 apps.

Publish data to Azure IoT Hub with MQTT

I am having a device which able to publish data to any MQTT broker. I am trying to publish data to Azure IoT Hub with this device as client.
Machine is having the data as follows,
Device/Topic1/Param1
Device/Topic1/Param2
Device/Topic1/Param3
Device/Topic2/Param1
Device/Topic2/Param2 and so on around 50 parameters from 7 different topics.
How can send all those parameters to Azure IoT Hub with MQTT? In IoT Hub I able to create device but it gives only one topic per device. Is there any other feasibility?

AWS IOT connection is getting closed on IPAD OS v12.1.1

When we are connecting to AWS IoT using wss protocol on ios version 12.1.1, we were able to connect to IoT successfully, but immediately we could see onError event being triggered from IoT and then the connection gets closed. It tries to reconnect again but without any luck. The error we are getting from IoT is "{IsTrusted : true}".
We are not using any certificates, just using a profile access key and secret key.
The same build is able to connect properly on ios 12.0.1, 12.1
IOS version:12.1.1(Not working version)
AWS IOT SDK:2.0.0
iOS 12.1.1 introduced Apple's new Certificate Transparency policy. From Apple's release notes:
iOS 12.1.1 requires that publicly-trusted Transport Layer Security (TLS) server authentication certificates issued after October 15, 2018 meet the Certificate Transparency policy to be evaluated as trusted on Apple platforms.
This policy is becoming a widespread standard which Google already enforces in its Chrome browser. Amazon knew this was coming and, in response to these new policies, released updates to their MQTT backend (AWS IoT) to include appropriate certification on a new endpoint. See https://aws.amazon.com/blogs/iot/aws-iot-core-ats-endpoints/:
You must explicitly request an Amazon Trust Services endpoint for each region in your account. Any existing customer endpoint you have is most likely a VeriSign endpoint. If your endpoint has “-ats” at the end of the first subdomain, then it is an Amazon Trust Services endpoint. For example, ‘asdfasdf-ats.iot.us-east-2.amazonaws.com’ is an ATS endpoint.
In short, for my iOS App, we were using our AWS provided MQTT endpoint asdfasdf.iot.us-east-2.amazonaws.com (just an example), without the -ats. I updated the endpoint to asdfasdf-ats.iot.us-east-2.amazonaws.com and we were able to accomplish our SSL handshake.
I hope this helps with your issue! Good Luck!

Google IoT-core v1 API discovery not found

I have some issues trying to access google iot-core API from my remote server (hosted on Digital Ocean). The same piece of code could work on my local machine, and I ensured that even the service key was the same, yet there was no explicit message to point me in some general direction.
I'm not sure if this is an issue with the discovery API as I could get the proper response on my local machine using the curl command below but when i tried to do this on my remote server it returned a 404 error. Anyone experienced this before?
curl https://cloudiot.googleapis.com/$discovery/rest?version=v1
Google Cloud IoT API endpoint is:
https://cloudiot.googleapis.com/
The current version is v1 and it is available here:
https://cloudiot.googleapis.com/v1
The discovery doc for this API and this version is:
https://www.googleapis.com/discovery/v1/apis/cloudiot/v1/rest
You may find Google API Explorer a useful tool too:
https://developers.google.com/apis-explorer/#p/
Here is the API Explorer result for Cloud IoT API v1:
https://developers.google.com/apis-explorer/#search/cloudiot/cloudiot/v1/
Even with these endpoints, you will need to authenticate your curl requests before they succeed.
I strongly encourage you to consider using Google's SDKs (Libraries) for interaction with any Google service and for Cloud IoT for service management (munging registries, devices etc.).
Once your configuration is established, your devices should use either MQTT or HTTP.

How convert an OMA-DM protocol message to an LWM2M message?

I am working on a device management solution for an IoT device. The device will host an LWM2M client. A gateway device (currently an Intel Galileo board), will host an OMA-DM client and a LWM2M server.
The general scenario is that the nodes should be able to be managed by any OMA-DM or LWM2M compliant device management server.
In case of an OMA-DM server, the commands will be sent to the gateway where they will be received by an OMA-DM client and passed on to the nodes directly as LWM2M commands or the client will use the APIs of the LWM2M server to create and send the message/command.
As such I wanted to know if there is any solution currently available that can help with this.
OR
Are there any guides or papers or any information of any kind to help me implement this solution?
OMA has something called the LwM2M gateway which interfaces an OMA-DM server to an LwM2M Server. So check out the MAI (Mobile Application Interface) gateway specs (which I don't think are finalized yet).

Resources