Changes between Version 11 and Version 12 of iot
- Timestamp:
- 11/26/2019 12:33:21 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
iot
v11 v12 56 56 1. Set freq {{{ mac set ch_freq 0 902600000}}} 57 57 1. Mac join abp {{{ mac join abp }}} 58 1. Gateworks SBC 58 1. Gateworks IoT Gateway 59 1. Obtain a Gateworks Single Board Computer. This example uses the Ventana GW5220. 59 60 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] 63 67 1. {{{ apt-get update }}} 64 68 1. {{{ apt-get install build-essential git}}} … … 68 72 1. {{{ cd packet_forwarder/lora_pkt_fwd }}} 69 73 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. 71 75 1. Adjust connecting port to 1700 72 76 1. {{{ ./lora_pkt_fwd}}} … … 74 78 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) 75 79 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) 77 82 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. 78 83 1. https://www.chirpstack.io 79 1. Downloadhere: 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 }}} 83 88 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.toml85 89 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. 86 90 1. 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. 88 94 1. Must get shared key device string like example: 89 95 1. … … 92 98 }}} 93 99 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 95 101 [[Image(azure-device-credentials.png,900px)]] 96 102 … … 114 120 }}} 115 121 1. Observe in Azure Device Explorer 122 123 === What's Next 124 This is a demo of a simple setup, sending a simple MQTT Packet up to Azure 125 126 There 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=] 116 130 === Sample Configuration Files and Logs 117 131 [[CollapsibleStart(lora-gateway-bridge Configuration File)]]