Amqp protocol is not supported on Universal Windows App

I was surprised to learn that AMQP protocol is not supported on Universal Windows Platform with Azure Devices Client libraries.I was getting this message “Amqp protocol is not supported” when trying to connect to the Microsoft Azure IoT Hub through the UWA app. This applies to MQTT as well. Only thing that’s supported right now is HTTP.

The nuget package Microsoft.Azure.Devices.Client lists both AMQP and MQTT libraries as dependencies. But its not supported on the Universal Windows platform. Weird.

Workaround:

This threw “Amqp protocol is not supported” :

__thisClient = DeviceClient.Create(__azureIoTHubHostname, 
                       new DeviceAuthenticationWithRegistrySymmetricKey(__azureIoTHubDeviceId, __azureIoTHubDeviceKey));

Had to update the line to include the TransportType.HTTP1 parameter:

__thisClient = DeviceClient.Create(__azureIoTHubHostname, 
                       new DeviceAuthenticationWithRegistrySymmetricKey(__azureIoTHubDeviceId, __azureIoTHubDeviceKey),
                       TransportType.Http1);

MQTT Client Libraries in a Processing Sketch

While waiting for my Arduino Yun to arrive for my WiFi Christmas Tree project, I decided to complete as many software components as possible. I had already setup a local MQTT broker and bridge. Now I am planning to use my PC and Mac for all the music and sound generation. They will act as MQTT subscribers. I will be running Processing sketches on the PC. So I decided to setup MQTT Client Libraries on Processing.

Continue reading “MQTT Client Libraries in a Processing Sketch”

Local MQTT Broker and Bridge

As I mentioned in the Interactive WiFi Christmas Tree introduction, I am waiting for parts to arrive from element14. Meanwhile I started to set up my MQTT infrastructure. My initial plan was to use the sandboxed MQTT Broker available at iot.eclipse.org at port 1883. Then I decided to explore more about the MQTT Broker and wanted to setup a local MQTT Broker on my PC and use it as the MQTT gateway for all my needs. After further research i ended up choosing the mosquitto broker. Since the Mosquitto broker allows bridging, it should be possible for me to selectively choose “topics” to forward to one or more of sandboxes available on the internet.

Continue reading “Local MQTT Broker and Bridge”