Skip to content

Instantly share code, notes, and snippets.

@tomconte
Created May 12, 2016 09:39
Show Gist options
  • Select an option

  • Save tomconte/8647a55046a842c3efe95e71b5e4f30b to your computer and use it in GitHub Desktop.

Select an option

Save tomconte/8647a55046a842c3efe95e71b5e4f30b to your computer and use it in GitHub Desktop.
This is an example showing how to use the MQTT.js command line tool "mqtt" to send data to Azure IoT Hub.
mqtt publish -C mqtts \
-h ciscohackhub.azure-devices.net -p 8883 \
-i lora1 \
-u 'ciscohackhub.azure-devices.net/lora1' \
-P 'SharedAccessSignature sr=ciscohackhub.azure-devices.net%2fdevices%2flora1&sig=xxxx&se=1470823180' \
-t 'devices/lora1/messages/events' \
-m "hello mqtt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment