Changes

no edit summary
Line 245: Line 245:     
We can see that some information was correctly retrieved from the router, and everything works without any issues. This method makes it much easier to work with API calls from the Azure side.
 
We can see that some information was correctly retrieved from the router, and everything works without any issues. This method makes it much easier to work with API calls from the Azure side.
  −
==Checking if Data reaches Azure IoT Hub==
  −
<ul>
  −
<li>From router side, connect to it with CLI or SSH client and write in command '''azure_iothub''' and press Enter </li>
  −
<div>- You should get answer that looks something like that, depending on what information you chose to send. </div>
  −
[[File:Azure19_RUTX.png|border|class=tlt-border]]
  −
<li>From Azure IoT Hub side you can check if it receives data. Go to IoT Hub that you created previously. Select '''Overview''', there you can see:
  −
</li>
  −
<div>1. How many devices are connected to hub, and how many messages it sent during chosen period of time.</div>
  −
<div>2. Device to cloud messages, that your router is sending.</div><br>
  −
<div>It should look something like that if IoT Hub is receiving data. </div>
  −
[[File:Azure20_RUTX.png|border|class=tlt-border|800px]]
  −
<li>To capture logs you will need '''Device Explorer''' for IoT Hub Devices.</li>
  −
<div>For Windows you can get here: https://github.com/Azure/azure-iot-sdk-csharp/releases/tag/2019-1-4 </div><br>
  −
<div>Scroll down to Assets, download and install '''SetupDeviceExplorer.msi''' </div>
  −
[[File:Azure21.png|border|class=tlt-border]]
  −
<li>Now you will need connection string of yours Azure IoT Hub, Not device. Navigate to IoT hub in your browser, then:</li>
  −
<div>1. Click '''Shared access policies'''</div>
  −
<div>2. Next choose '''iothubowner'''</div>
  −
<div>3. And copy '''Connection string – primary key'''</div>
  −
[[File:Azure22-1_RUTX.png|border|class=tlt-border|800px]]
  −
  −
<li>After that go back to Device Explorer: </li>
  −
<div>1. In Configuration tab paste in Connection string that you just copied</div>
  −
<div>2. Copy HostName part from connection string and paste it in '''Protocol Gateway HostName'''</div>
  −
<div>3. Click '''Update''' </div>
  −
[[File:Azure23_RUTX.png|border|class=tlt-border|600px]]
  −
  −
<li>Open Management tab </li>
  −
<div>1. Click Update </div>
  −
<div>2. You should see your device in the list below and '''Connection state''' </div>
  −
[[File:Azure24_RUTX.png|border|class=tlt-border|800px]]
  −
  −
<li>Go to Data tab</li>
  −
<div>1. Click monitor, and wait for '''Event Hub Data''' to update (Depends on yours chosen interval)</div>
  −
<div>2. Messages like this should start appearing. </div>
  −
[[File:Azure25_RUTX.png|border|class=tlt-border|600px]]
      
==Sending data with "Data to Server" feature==
 
==Sending data with "Data to Server" feature==
Line 317: Line 280:  
====Checking if data reaches IoT Hub on Azure====
 
====Checking if data reaches IoT Hub on Azure====
   −
To determine whether data successfully reaches Azure IoT Hub, select your device and navigate to the "Telemetry" tab on the Azure IoT Explorer. Ensure that "Use built-in event hub" option is enabled and press the "Start" button. After a few seconds, you should see that a response was received from the device.
+
To determine whether data successfully reaches Azure IoT Hub, select your device and navigate to the "Telemetry" tab on the Azure IoT Explorer. Ensure that "Use built-in event hub" option is enabled and press the "Start" button.
    
[[File:Azure RutOSconf 29.png|border|class=tlt-border]]
 
[[File:Azure RutOSconf 29.png|border|class=tlt-border]]
 +
 +
After a few seconds, you should see that data was sent from the device to the Azure IoT Hub. If you see a similar response, it indicates that everything was configured correctly.