I am new to azure iot and I am trying to connect a 3g obd 2 tracker to my account azure iot hub. I found an example to connect the obd to local gateway (phone) via bluetooth or wifi but I want the tracker to be completely independant from any local gateway.
Is there a tutorial or documentation to help me getting starting with connecting 3g teacker to azure iot
There is no tutorial specifically on 3G trackers. What is the OS running on the device? You can always use the device SDK to connect to IoT Hub directly if your device is IP capable.
Related
Our Current Deployment:
1) several back-end devices running an MQTT client connect to an opensource MQTT broker (Mosquitto)
2) Mosquitto is running on a Linux VM and acts as a broker and a communication point between back-end & front-end devices.
3) Several front-end devices (Mobile App / browser based GUI) connect to the broker. some of the front-end devices read & write to the broker (Sub & Pub) while some front-end only read (Sub)
4) Some front-end devices connect for a few minutes & some front ends are always connected.
5) Although the amount of data being transferred is a few kb, it is sometimes fast changing.
6) No TLS is used for the MQTT traffic & it cannot be enabled on the back-end devices.
This setup works for us, but I am looking for a way to scale up and was considering the azure IoT hub, but I am confused if the IoT hub can be used as a broker or I would need additional components to be deployed for acting as a MQTT broker ?
Azure IoT Hub is not a generic MQTT Broker. There is a built-in the device communications for MQTT protocol. More details can be found in the Using the MQTT protocol directly
For exploring the MQTT Devices (virtual devices) with the Azure IoT Hub (without the coding) can be used a small tool Azure IoT Hub Tester
I am working on an embedded linux based device that runs ubuntu. Now the device driver for the wifi is really crappy so I cannot create a hotspot so this device connects to another device which is running a hotspot. Now I am connecting to that device for some input but at the same time connecting to internet to send mqtt message using paho mqtt in python via a gsm modem. The modem connect to internet using pon command and it works nicely. But when both connections are running, paho-mqtt cannot connect to internet anymore. pinging using -I ppp0 works fine. I tried to bind ppp0 ip address to paho-mqtt client using the bind_address argument but it does not work. How to resolve this issue?
I have a Ubuntu Server 14.04 running on an Azure machine. I have installed MQTT broker on this Ubuntu Server. Moreover, I have multiple ESP8266 devices that are assumed to subscribe and publish to different MQTT topics via this broker. Now my problem is that when I connect two devices to Broker, one for receiving data and other for publishing, they work fine but as I try to connect one more device to broker all devices stop working and my ESPs just display this message "trying to connect Broker" over and over again.
(In endpoints of my machine I've added 1883 for HTTP, 443 for HTTPS and 22 for SSH)
My question is how I can allow multiple devices to communicate with MQTT broker running on Azure broker?
All client devices needs to have unique client ids. The situation you have described sounds exactly like what happens if all your esp8266 devices have the same hardcoded client id
MQTT clients get clientID as parameter before connection to provide uniqueness. ESP8266's has unique ChipID. So use it to hit the issue.
Here the example for Arduino firmware :
WiFiClient wifiClient;
PubSubClient mqttClient(wifiClient);
mqttClient.setServer(MQTT_BROKER, MQTT_BROKER_PORT);
String clientId = "IoTDevice-" + String(ESP.getChipId());
mqttClient.connect(clientId.c_str(), MQTT_USERNAME, MQTT_KEY);
Here is NodeMCU firmware example :
mqtt_cli:connect(MQTT_BROKER, MQTT_BROKER_PORT, 0, CALLBACK_FN);
mqtt_cli = mqtt.Client("IoTDevice-"..node.chipid(), 120, MQTT_USERNAME, MQTT_KEY);
Not Able To Connect to XMPP Server Outside the Network (different netwok or WiFi)
Hi all am developing an IOS app which has chat feature am able to connect to XMPP server(Ejabbered) which is installed locally (same wifi for Local mac and device) but when am trying to connect to server which is installed on main live Server its not connecting because thats a different network! how i solve this issue!
Thanks in Advance!
I followed the Azure IoT tutorial at:
https://azure.microsoft.com/en-us/documentation/articles/iot-hub-csharp-csharp-getstarted/
and everything works great.
I now have a new requirement, which is to connect to the IoT hub from an iPhone. In the C# example, I had to download the appropriate NuGet package (Microsoft.Azure.Devices.Client) and use the DeviceClient class.
Is there a similar "package" available for iPhone development? How can an iOS device connect to the Azure IoT hub?
There's a REST API for devices to exchange messages with an Azure IOT Hub.
The Azure IoT Hub C# Device SDK is now cross-platform (with Xamarin), and supports iOS devices.
It's published as a nuget package:
https://www.nuget.org/packages/Microsoft.Azure.Devices.Client.PCL/