Changes between Version 11 and Version 12 of iot


Ignore:
Timestamp:
11/26/2019 12:33:21 AM (3 years ago)
Author:
Ryan Erbstoesser
Comment:

add in more info about azure and clean up other sections

Legend:

Unmodified
Added
Removed
Modified
  • iot

    v11 v12  
    5656 1. Set freq {{{ mac set ch_freq 0 902600000}}}
    5757 1. Mac join abp {{{ mac join abp }}}
    58 1. Gateworks SBC
     581. Gateworks IoT Gateway
     59 1. Obtain a Gateworks Single Board Computer. This example uses the Ventana GW5220.
    5960 1. Install Ubuntu Bionic (Ventana) [wiki:ventana/ubuntu Instructions]
    60  1. Insert RAK2247 Mini-PCIe card with antenna installed into adapter (Because the card by default does not support active low reset which is what the Gateworks SBC uses. Contact RAK to have a RAK2247 modified to use a active low reset)
    61  1. Software pieces:
    62   1. Github rak_common_for_gateway https://github.com/RAKWireless/rak_common_for_gateway
     61 1. Insert [https://www.rakwireless.com/en-int/products/rak2247/ RAK2247 Mini-PCIe card (USB Version)] with antenna installed into adapter (Because the card by default does not support active low reset which is what the Gateworks SBC uses. Contact RAK to have a RAK2247 modified to use a active low reset)
     62  1. The SPI version will not work in the Gateworks Mini-PCIe slot
     63  1. Be sure to purchase proper antenna and cable with card
     64 1. Software pieces on the Gateworks SBC:
     65  1. Install !LoRa Packet Forwarder
     66   1. Github used is rak_common_for_gateway [https://github.com/RAKWireless/rak_common_for_gateway]
    6367   1. {{{ apt-get update }}}
    6468   1. {{{ apt-get install build-essential git}}}
     
    6872   1. {{{ cd packet_forwarder/lora_pkt_fwd }}}
    6973   1. {{{ vi global_conf.json }}}
    70     1. Adjust frequency, etc. Example config given in log and config file section below.
     74    1. Adjust frequency, etc. Example config given in log and config file section below for USA.
    7175    1. Adjust connecting port to 1700
    7276   1. {{{ ./lora_pkt_fwd}}}
     
    7478   1. Careful to set config file global_conf.json for frequency, and gateway to local host for this example (or The Things Network (TTN) if not using azure)
    7579   1. /root/rak_common_for_gateway/lora/rak2247/packet_forwarder/lora_pkt_fwd/lora_pkt_fwd
    76   1. .deb package lora-gateway-bridge (must be v3.3 or higher)(now called chirpstack because of licensing issues)
     80  1. Install Gateway Bridge
     81   1. .deb package lora-gateway-bridge (must be v3.3 or higher)(now called chirpstack because of licensing issues)
    7782   1. The bridge is required because the packet forwarder cannot talk to Azure direct. It only speaks Lora Protocol. Azure needs something like MQTT, etc. So the bridge converts from Lora to MQTT.
    7883   1. https://www.chirpstack.io
    79    1. Download here: https://artifacts.chirpstack.io/downloads/lora-gateway-bridge/
    80    1. {{{ wget https://artifacts.chirpstack.io/downloads/lora-gateway-bridge/lora-gateway-bridge_3.3.0_linux_armv7.deb}}}
    81    1. {{{ dpkg -i lora-gateway-bridge_3.3.0_linux_armv7.deb }}}
    82    1. {{{ vi /etc/lora-gateway-bridge/lora-gateway-bridge.toml }}}
     84   1. .deb file here: https://artifacts.chirpstack.io/downloads/lora-gateway-bridge/
     85   1. Download using wget on Gateworks SBC: {{{ wget https://artifacts.chirpstack.io/downloads/lora-gateway-bridge/lora-gateway-bridge_3.3.0_linux_armv7.deb}}}
     86   1. Install: {{{ dpkg -i lora-gateway-bridge_3.3.0_linux_armv7.deb }}}
     87   1. Edit config: {{{ vi /etc/lora-gateway-bridge/lora-gateway-bridge.toml }}}
    8388    1. Add in Azure details as in example config below, editing the key, etc
    84    1. lora-gateway-bridge -c /etc/lora-gateway-bridge/lora-gateway-bridge.toml
    8589    1. Config file must specify the proper device ID thats set in Azure cloud, however, I felt the bridge was not listening to my config file and picked the eth0 MAC address as the device ID, so then I created a device in the cloud to match this MAC.
    86901. Azure Cloud
    87  1. Must sign up for free account. It is recommended to use the pre-done remote monitoring solution accelerator ([https://docs.microsoft.com/en-us/azure/iot-accelerators/iot-accelerators-remote-monitoring-sample-walkthrough])
     91 1. Must sign up for free account.
     92 1. It is recommended to use the pre-done remote monitoring solution accelerator ([https://docs.microsoft.com/en-us/azure/iot-accelerators/iot-accelerators-remote-monitoring-sample-walkthrough here])
     93   1. It is recommended to turn off simulated data in the accelerator to ensure the free trial lasts longer.
    8894  1. Must get shared key device string like example:
    8995   1.
     
    9298}}}
    9399   1. Must create a device with a specific device ID. This device ID must be used by the MQTT lora-gateway-bridge
    94     1. Select real device
     100    1. Select real device, authentication type is symmetric
    95101[[Image(azure-device-credentials.png,900px)]]
    96102
     
    114120}}}
    1151211. Observe in Azure Device Explorer
     122
     123=== What's Next
     124This is a demo of a simple setup, sending a simple MQTT Packet up to Azure
     125
     126There are many ways this demo can be expanded for each application.
     127
     128 * Further integrate this into Azure as the application requires.
     129 * Explore the Azure IoT Libraries: [here https://github.com/Azure?utf8=%E2%9C%93&q=iot&type=&language=]
    116130=== Sample Configuration Files and Logs
    117131[[CollapsibleStart(lora-gateway-bridge Configuration File)]]