Changes between Initial Version and Version 1 of iot/azurelorademo


Ignore:
Timestamp:
12/10/2019 11:02:44 PM (5 years ago)
Author:
Ryan Erbstoesser
Comment:

create page as sub page of iot

Legend:

Unmodified
Added
Removed
Modified
  • iot/azurelorademo

    v1 v1  
     1= Gateworks LoRa & Azure IoT Demo
     2[[PageOutline]]
     3
     4This page details a demo that Gateworks has created.
     5
     6For general IoT information, please view the parent page, [wiki:iot Gateworks IoT Wiki]
     7
     8
     9== !LoRa & Microsoft Azure Cloud Demo ==
     10
     11[[Image(lora-azure-diagram.png,800px)]]
     12
     13[[Image(azure-dashboard.png,800px)]]
     14
     15This demo showcases how to connect a !LoRa sensor to a Gateworks SBC Gateway and then push the data up to the Microsoft Azure cloud using MQTT.
     16
     17=== Requirements
     18
     191. Node / Device
     20 1. [http://www.sparklan.com/p2-products-detail.php?PKey=1d706in8fkBM1aogttf0QPj2j2xnNC4Ud8OmmRXWAPM&WLRS-591EVB%20%20Series SparkLAN WLRS-591EVB]
     21 1. Make sure antenna is connected
     22 1. Connect to desktop/laptop via !CuteCom terminal program
     23 1. Set freq {{{ mac set ch_freq 0 902600000}}}
     24 1. Mac join abp {{{ mac join abp }}}
     251. Gateworks IoT Gateway
     26 1. Obtain a Gateworks Single Board Computer. This example uses the Ventana GW5220.
     27 1. Install Ubuntu Bionic (Ventana) [wiki:ventana/ubuntu Instructions]
     28 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)
     29  1. The SPI version will not work in the Gateworks Mini-PCIe slot
     30  1. Be sure to purchase proper antenna and cable with card
     31 1. Software pieces on the Gateworks SBC:
     32  1. Install !LoRa Packet Forwarder
     33   1. Github used is rak_common_for_gateway [https://github.com/RAKWireless/rak_common_for_gateway]
     34   1. {{{ apt-get update }}}
     35   1. {{{ apt-get install build-essential git}}}
     36   1. {{{ git clone https://github.com/RAKWireless/rak_common_for_gateway}}}
     37   1. {{{ cd rak_common_for_gateway/lora/rak2247 }}}
     38   1. {{{ ./install.sh }}}
     39   1. {{{ cd packet_forwarder/lora_pkt_fwd }}}
     40   1. {{{ vi global_conf.json }}}
     41    1. Adjust frequency, etc. Example config given in log and config file section below for USA.
     42    1. Adjust connecting port to 1700
     43   1. {{{ ./lora_pkt_fwd}}}
     44   1. This talks to the actual radio card.
     45   1. Careful to set config file global_conf.json for frequency, and gateway to local host (port 1700) for this example (or The Things Network (TTN) if not using Azure)
     46  1. Install Gateway Bridge
     47   1. .deb package lora-gateway-bridge (must be v3.3 or higher)(now called chirpstack because of licensing issues)
     48   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.
     49   1. https://www.chirpstack.io
     50   1. .deb file here: https://artifacts.chirpstack.io/downloads/lora-gateway-bridge/
     51   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}}}
     52   1. Install: {{{ dpkg -i lora-gateway-bridge_3.3.0_linux_armv7.deb }}}
     53   1. Edit config: {{{ vi /etc/lora-gateway-bridge/lora-gateway-bridge.toml }}}
     54    1. Add in Azure details as in example config below, editing the key, etc
     55    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.
     561. Azure Cloud
     57 1. Must sign up for free account.
     58 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])
     59   1. It is recommended to turn off simulated data in the accelerator to ensure the free trial lasts longer.
     60     1. Must create a device with a specific device ID. This device ID must be used by the MQTT lora-gateway-bridge
     61    1. Select real device, authentication type is symmetric
     62    1. Must get shared key device string like example:
     63     1.
     64{{{
     65HostName=gateworksremotemonitor-s2pc7.azurewebsites.net;DeviceId=GateworksTest1;SharedAccessKey=R9hjZNOvtfferesrsHzFGScSgc3EUxc004pjMg=
     66}}}
     67[[Image(azure-device-credentials.png,900px)]]
     68
     69=== Step by Step
     70
     711. Make sure node is up and running and connected to with terminal program on laptop/desktop
     721. Start SBC
     731. Start packet forward program and ensure it is running successfully as shown in the output in the Log file section below
     74{{{
     75./lora_pkt_fwd
     76}}}
     771. Start the gateway bridge and ensure it is running successfully as shown in the output in the Log file section below
     78{{{
     79lora-gateway-bridge -c /etc/lora-gateway-bridge/lora-gateway-bridge.toml
     80}}}
     811. Login to Azure website and check for connected device on Azure (status packets are being sent up by the Gateway Bridge)
     821. Send actual data packet from node and view as it propagates from the packet forwarder to the bridge and then to Azure (as shown in the Log section below)
     83 1. In !CuteCom or terminal program connected to the node, send a packet with the following command
     84{{{
     85mac tx ucnf 0 1234
     86}}}
     871. Observe in Azure Device Explorer
     88
     89=== What's Next
     90This is a demo of a simple setup, sending a simple MQTT Packet up to Azure
     91
     92There are many ways this demo can be expanded for each application.
     93
     94 * Further integrate this into Azure as the application requires.
     95 * Explore the Azure IoT Libraries: [here https://github.com/Azure?utf8=%E2%9C%93&q=iot&type=&language=]
     96=== Sample Configuration Files and Logs
     97[[CollapsibleStart(lora-gateway-bridge Configuration File)]]
     98Lora-gateway-bridge
     99{{{
     100root@bionic-armhf:~# cat /etc/lora-gateway-bridge/lora-gateway-bridge.toml
     101# This configuration provides a Semtech UDP packet-forwarder backend and
     102# integrates with a MQTT broker. Many options and defaults have been omitted
     103# for simplicity.
     104#
     105# See https://www.loraserver.io/lora-gateway-bridge/install/config/ for a full
     106# configuration example and documentation.
     107
     108[general]
     109# debug=5, info=4, warning=3, error=2, fatal=1, panic=0
     110log_level = 5
     111
     112# Gateway backend configuration.
     113[backend]
     114# Backend type.
     115type="semtech_udp"
     116
     117  # Semtech UDP packet-forwarder backend.
     118  [backend.semtech_udp]
     119
     120  # ip:port to bind the UDP listener to
     121  #
     122  # Example: 0.0.0.0:1700 to listen on port 1700 for all network interfaces.
     123  # This is the listeren to which the packet-forwarder forwards its data
     124  # so make sure the 'serv_port_up' and 'serv_port_down' from your
     125  # packet-forwarder matches this port.
     126  udp_bind = "0.0.0.0:1700"
     127
     128
     129# Integration configuration.
     130[integration]
     131# Payload marshaler.
     132#
     133# This defines how the MQTT payloads are encoded. Valid options are:
     134# * protobuf:  Protobuf encoding (this will become the LoRa Gateway Bridge v3 default)
     135# * json:      JSON encoding (easier for debugging, but less compact than 'protobuf')
     136marshaler="json"
     137
     138  # MQTT integration configuration.
     139  [integration.mqtt]
     140  # Event topic template.
     141  event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}"
     142
     143  # Command topic template.
     144  command_topic_template="gateway/{{ .GatewayID }}/command/#"
     145
     146  # MQTT authentication.
     147  [integration.mqtt.auth]
     148  # Type defines the MQTT authentication type to use.
     149  #
     150  # Set this to the name of one of the sections below.
     151  #type="generic"
     152  type="azure_iot_hub"
     153
     154    # Generic MQTT authentication.
     155    [integration.mqtt.auth.generic]
     156    # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
     157    server="tcp://127.0.0.1:1883"
     158
     159    # Connect with the given username (optional)
     160    username=""
     161
     162    # Connect with the given password (optional)
     163    password=""
     164
     165    # Azure IoT Hub
     166    #
     167    # This setting will preset uplink and downlink topics that will only
     168    # work with Azure IoT Hub service.
     169    [integration.mqtt.auth.azure_iot_hub]
     170
     171    # Device connection string (symmetric key authentication).
     172    #
     173    # This connection string can be retrieved from the Azure IoT Hub device
     174    # details when using the symmetric key authentication type.
     175    device_connection_string="HostName=iothub-s2pc7.azure-devices.net;DeviceId=00d012fffee1f102;SharedAccessKey=hWY7XLZuFOYlgIzvSGEbvzDpJ5H2sVGWGq1M6cUoiNc="
     176
     177    # Token expiration (symmetric key authentication).
     178    #
     179    # ChirpStack Gateway Bridge will generate a SAS token with the given expiration.
     180    # After the token has expired, it will generate a new one and trigger a
     181    # re-connect (only for symmetric key authentication).
     182    sas_token_expiration="24h0m0s"
     183
     184    # Device ID (X.509 authentication).
     185    #
     186    # This will be automatically set when a device connection string is given.
     187    # It must be set for X.509 authentication.
     188    device_id=""
     189
     190    # IoT Hub hostname (X.509 authentication).
     191    #
     192    # This will be automatically set when a device connection string is given.
     193    # It must be set for X.509 authentication.
     194    # Example: iot-hub-name.azure-devices.net
     195    hostname=""
     196
     197    # Client certificates (X.509 authentication).
     198    #
     199    # Configure the tls_cert (certificate file) and tls_key (private-key file)
     200    # when the device is configured with X.509 authentication.
     201    tls_cert=""
     202    tls_key=""
     203
     204}}}
     205
     206[[CollapsibleEnd]]
     207[[CollapsibleStart(lora packet forwarder configuration file)]]
     208Packet forwarder config:
     209{{{
     210root@bionic-armhf:~/rak_common_for_gateway/lora/rak2247/packet_forwarder/lora_pkt_fwd# cat global_conf.json
     211{
     212    "SX1301_conf": {
     213        "lorawan_public": true,
     214        "clksrc": 1,
     215        "antenna_gain": 0,
     216        "radio_0": {
     217            "enable": true,
     218            "type": "SX1257",
     219            "freq": 902600000,
     220            "rssi_offset": -166.0,
     221            "tx_enable": true,
     222            "tx_freq_min": 902000000,
     223            "tx_freq_max": 928000000
     224        },
     225        "radio_1": {
     226            "enable": true,
     227            "type": "SX1257",
     228            "freq": 903400000,
     229            "rssi_offset": -166.0,
     230            "tx_enable": false
     231        },
     232        "chan_multiSF_0": {
     233            "enable": true,
     234            "radio": 0,
     235            "if": -400000
     236        },
     237        "chan_multiSF_1": {
     238            "enable": true,
     239            "radio": 0,
     240            "if": -200000
     241        },
     242        "chan_multiSF_2": {
     243            "enable": true,
     244            "radio": 0,
     245            "if": 0
     246        },
     247        "chan_multiSF_3": {
     248            "enable": true,
     249            "radio": 0,
     250            "if": 200000
     251        },
     252        "chan_multiSF_4": {
     253            "enable": true,
     254            "radio": 1,
     255            "if": -300000
     256        },
     257        "chan_multiSF_5": {
     258            "enable": true,
     259            "radio": 1,
     260            "if": -100000
     261        },
     262        "chan_multiSF_6": {
     263            "enable": true,
     264            "radio": 1,
     265            "if": 100000
     266        },
     267        "chan_multiSF_7": {
     268            "enable": true,
     269            "radio": 1,
     270            "if": 300000
     271        },
     272        "chan_Lora_std": {
     273            "enable": true,
     274            "radio": 0,
     275            "if": 300000,
     276            "bandwidth": 500000,
     277            "spread_factor": 8
     278        },
     279        "chan_FSK": {
     280            "enable": false,
     281            "radio": 0,
     282            "if": 300000,
     283            "bandwidth": 250000,
     284            "datarate": 100000
     285        },
     286        "tx_lut_0": {
     287                "desc": "TX gain table, index 0",
     288                "pa_gain": 0,
     289                "mix_gain": 8,
     290                "rf_power": -6,
     291                "dig_gain": 0
     292        },
     293        "tx_lut_1": {
     294                "desc": "TX gain table, index 1",
     295                "pa_gain": 0,
     296                "mix_gain": 10,
     297                "rf_power": -3,
     298                "dig_gain": 0
     299        },
     300        "tx_lut_2": {
     301                "desc": "TX gain table, index 2",
     302                "pa_gain": 0,
     303                "mix_gain": 12,
     304                "rf_power": 0,
     305                "dig_gain": 0
     306        },
     307        "tx_lut_3": {
     308                "desc": "TX gain table, index 3",
     309                "pa_gain": 1,
     310                "mix_gain": 8,
     311                "rf_power": 3,
     312                "dig_gain": 0
     313        },
     314        "tx_lut_4": {
     315                "desc": "TX gain table, index 4",
     316                "pa_gain": 1,
     317                "mix_gain": 10,
     318                "rf_power": 6,
     319                "dig_gain": 0
     320        },
     321        "tx_lut_5": {
     322                "desc": "TX gain table, index 5",
     323                "pa_gain": 1,
     324                "mix_gain": 12,
     325                "rf_power": 10,
     326                "dig_gain": 0
     327        },
     328        "tx_lut_6": {
     329                "desc": "TX gain table, index 6",
     330                "pa_gain": 1,
     331                "mix_gain": 13,
     332                "rf_power": 11,
     333                "dig_gain": 0
     334        },
     335        "tx_lut_7": {
     336                "desc": "TX gain table, index 7",
     337                "pa_gain": 2,
     338                "mix_gain": 9,
     339                "rf_power": 12,
     340                "dig_gain": 0
     341        },
     342        "tx_lut_8": {
     343                "desc": "TX gain table, index 8",
     344                "pa_gain": 1,
     345                "mix_gain": 15,
     346                "rf_power": 13,
     347                "dig_gain": 0
     348        },
     349        "tx_lut_9": {
     350                "desc": "TX gain table, index 9",
     351                "pa_gain": 2,
     352                "mix_gain": 10,
     353                "rf_power": 14,
     354                "dig_gain": 0
     355        },
     356        "tx_lut_10": {
     357                "desc": "TX gain table, index 10",
     358                "pa_gain": 2,
     359                "mix_gain": 11,
     360                "rf_power": 16,
     361                "dig_gain": 0
     362        },
     363        "tx_lut_11": {
     364                "desc": "TX gain table, index 11",
     365                "pa_gain": 3,
     366                "mix_gain": 9,
     367                "rf_power": 20,
     368                "dig_gain": 0
     369        },
     370        "tx_lut_12": {
     371                "desc": "TX gain table, index 12",
     372                "pa_gain": 3,
     373                "mix_gain": 10,
     374                "rf_power": 23,
     375                "dig_gain": 0
     376        },
     377        "tx_lut_13": {
     378                "desc": "TX gain table, index 13",
     379                "pa_gain": 3,
     380                "mix_gain": 11,
     381                "rf_power": 25,
     382                "dig_gain": 0
     383        },
     384        "tx_lut_14": {
     385                "desc": "TX gain table, index 14",
     386                "pa_gain": 3,
     387                "mix_gain": 12,
     388                "rf_power": 26,
     389                "dig_gain": 0
     390        },
     391        "tx_lut_15": {
     392                "desc": "TX gain table, index 15",
     393                "pa_gain": 3,
     394                "mix_gain": 14,
     395                "rf_power": 27,
     396                "dig_gain": 0
     397        }
     398    },
     399    "gateway_conf": {
     400        "gateway_ID": "00D012FFFEE1F102",
     401        /* change with default server address/ports, or overwrite in local_conf.json */
     402        "server_address": "localhost",
     403        "serv_port_up": 1700,
     404        "serv_port_down": 1700,
     405        /* adjust the following parameters for your network */
     406        "keepalive_interval": 10,
     407        "stat_interval": 30,
     408        "push_timeout_ms": 100,
     409        /* forward only valid packets */
     410        "forward_crc_valid": true,
     411        "forward_crc_error": true,
     412        "forward_crc_disabled": false,
     413        "autoquit_threshold": 6
     414    }
     415}
     416}}}
     417
     418
     419[[CollapsibleEnd]]
     420[[CollapsibleStart(lora packet forwarder example output)]]
     421
     422Example packet forward application running output:
     423{{{
     424root@bionic-armhf:~/rak_common_for_gateway/lora/rak2247/packet_forwarder/lora_pkt_fwd# ./lora_pkt_fwd
     425*** Beacon Packet Forwarder for Lora Gateway ***
     426Version: 4.0.1
     427*** Lora concentrator HAL library version info ***
     428Version: 5.0.1;
     429***
     430INFO: Little endian host
     431INFO: found global configuration file global_conf.json, parsing it
     432INFO: global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
     433INFO: lorawan_public 1, clksrc 1
     434INFO: no configuration for LBT
     435INFO: antenna_gain 0 dBi
     436INFO: Configuring TX LUT with 16 indexes
     437INFO: radio 0 enabled (type SX1257), center frequency 902600000, RSSI offset -166.000000, tx enabled 1, tx_notch_freq 0
     438INFO: radio 1 enabled (type SX1257), center frequency 903400000, RSSI offset -166.000000, tx enabled 0, tx_notch_freq 0
     439INFO: Lora multi-SF channel 0>  radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
     440INFO: Lora multi-SF channel 1>  radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
     441INFO: Lora multi-SF channel 2>  radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
     442INFO: Lora multi-SF channel 3>  radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
     443INFO: Lora multi-SF channel 4>  radio 1, IF -300000 Hz, 125 kHz bw, SF 7 to 12
     444INFO: Lora multi-SF channel 5>  radio 1, IF -100000 Hz, 125 kHz bw, SF 7 to 12
     445INFO: Lora multi-SF channel 6>  radio 1, IF 100000 Hz, 125 kHz bw, SF 7 to 12
     446INFO: Lora multi-SF channel 7>  radio 1, IF 300000 Hz, 125 kHz bw, SF 7 to 12
     447INFO: Lora std channel> radio 0, IF 300000 Hz, 500000 Hz bw, SF 8
     448INFO: FSK channel 8 disabled
     449INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
     450INFO: gateway MAC address is configured to 00D012FFFEE1F102
     451INFO: server hostname or IP address is configured to "localhost"
     452INFO: upstream port is configured to "1700"
     453INFO: downstream port is configured to "1700"
     454INFO: downstream keep-alive interval is configured to 10 seconds
     455INFO: statistics display interval is configured to 30 seconds
     456INFO: upstream PUSH_DATA time-out is configured to 100 ms
     457INFO: packets received with a valid CRC will be forwarded
     458INFO: packets received with a CRC error will be forwarded
     459INFO: packets received with no CRC will NOT be forwarded
     460INFO: Auto-quit after 6 non-acknowledged PULL_DATA
     461INFO: found local configuration file local_conf.json, parsing it
     462INFO: redefined parameters will overwrite global parameters
     463INFO: local_conf.json does not contain a JSON object named SX1301_conf
     464INFO: local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
     465INFO: gateway MAC address is configured to 00D012FFFEE1F102
     466INFO: packets received with a valid CRC will be forwarded
     467INFO: packets received with a CRC error will be forwarded
     468INFO: packets received with no CRC will NOT be forwarded
     469INFO: [main] concentrator started, packet can now be received
     470
     471INFO: Disabling GPS mode for concentrator's counter...
     472INFO: host/sx1301 time offset=(1573244036s:715596µs) - drift=1811158092µs
     473INFO: Enabling GPS mode for concentrator's counter.
     474
     475
     476INFO: Received pkt from mote: 12345678 (fcnt=77)
     477
     478JSON up: {"rxpk":[{"tmst":12244828,"chan":6,"rfch":1,"freq":903.500000,"stat":1,"modu":"LORA","datr":"SF10BW125","codr":"4/5","lsnr":10.8,"rssi":-39,"size":17,"data":"QHhWNBKATQAPR52Q+oKvi8I="}]}
     479INFO: [down] PULL_ACK received in 4 ms
     480
     481INFO: Received pkt from mote: 12345678 (fcnt=78)
     482
     483JSON up: {"rxpk":[{"tmst":27958804,"chan":4,"rfch":1,"freq":903.100000,"stat":1,"modu":"LORA","datr":"SF10BW125","codr":"4/5","lsnr":10.2,"rssi":-39,"size":17,"data":"QHhWNBKATgAPZnN8WUUi2U8="}]}
     484INFO: [up] PUSH_ACK received in 7 ms
     485
     486##### 2019-11-08 20:14:29 GMT #####
     487### [UPSTREAM] ###
     488# RF packets received by concentrator: 2
     489# CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
     490# RF packets forwarded: 2 (34 bytes)
     491# PUSH_DATA datagrams sent: 2 (396 bytes)
     492# PUSH_DATA acknowledged: 50.00%
     493### [DOWNSTREAM] ###
     494# PULL_DATA sent: 3 (33.33% acknowledged)
     495# PULL_RESP(onse) datagrams received: 0 (0 bytes)
     496# RF packets sent to concentrator: 0 (0 bytes)
     497# TX errors: 0
     498# BEACON queued: 0
     499# BEACON sent so far: 0
     500# BEACON rejected: 0
     501### [JIT] ###
     502# SX1301 time (PPS): 2835751
     503src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
     504### [GPS] ###
     505# GPS sync is disabled
     506##### END #####
     507
     508JSON up: {"stat":{"time":"2019-11-08 20:14:29 GMT","rxnb":2,"rxok":2,"rxfw":2,"ackr":50.0,"dwnb":0,"txnb":0}}
     509INFO: [up] PUSH_ACK received in 2 ms
     510INFO: [down] PULL_ACK received in 2 ms
     511INFO: [down] PULL_ACK received in 3 ms
     512
     513}}}
     514
     515[[CollapsibleEnd]]
     516[[CollapsibleStart(lora-gateway-bridge example output)]]
     517
     518Example lora-gateway-bridge output
     519{{{
     520root@bionic-armhf:~# lora-gateway-bridge -c /etc/lora-gateway-bridge/lora-gateway-bridge.toml
     521INFO[0000] starting LoRa Gateway Bridge                  docs="https://www.loraserver.io/lora-gateway-bridge/" version=3.3.0
     522INFO[0000] backend/semtechudp: starting gateway udp listener  addr="0.0.0.0:1700"
     523DEBU[0000] backend/semtechudp: cleanup gateway registry
     524INFO[0000] integration/mqtt: connected to mqtt broker   
     525DEBU[0001] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullData
     526DEBU[0001] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullACK
     527INFO[0001] integration/mqtt: subscribing to topic        qos=0 topic="devices/00d012fffee1f102/messages/devicebound/#"
     528DEBU[0006] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushData
     529DEBU[0006] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushACK
     530INFO[0006] integration/mqtt: publishing event            event=up qos=0 topic=devices/00d012fffee1f102/messages/events/up uplink_id=d0e63fa3-ede2-4850-b981-e239820a8434
     531DEBU[0011] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushData
     532DEBU[0011] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushACK
     533INFO[0011] integration/mqtt: publishing event            event=stats qos=0 stats_id=1af685eb-3e6d-4a1f-bf18-103c7619c7d1 topic=devices/00d012fffee1f102/messages/events/stats
     534DEBU[0011] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullData
     535DEBU[0011] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullACK
     536DEBU[0021] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullData
     537DEBU[0021] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullACK
     538DEBU[0032] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullData
     539DEBU[0032] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullACK
     540DEBU[0041] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushData
     541DEBU[0041] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushACK
     542INFO[0041] integration/mqtt: publishing event            event=stats qos=0 stats_id=9926a236-5ef0-41f5-968b-83eb80af1836 topic=devices/00d012fffee1f102/messages/events/stats
     543DEBU[0042] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullData
     544DEBU[0042] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullACK
     545
     546}}}
     547
     548[[CollapsibleEnd]]
     549[[CollapsibleStart(Status Packet Example Logs)]]
     550Sample status on Azure platform for a sample packet:
     551
     552Bridge log:
     553{{{
     554INFO[5322] integration/mqtt: publishing event            event=stats qos=0 stats_id=5c6c1e4f-ae87-4bf9-a18d-8b2c27646dbb topic=devices/00d012fffee1f102/messages/events/stats
     555
     556}}}
     557
     558
     559Azure receive:
     560{{{
     561{
     562  "data": {
     563    "gatewayId": "ANAS//7h8QI=",
     564    "ip": "172.24.24.194",
     565    "time": "2019-11-08T21:37:30Z",
     566    "location": null,
     567    "configVersion": null,
     568    "rxPacketsReceived": 0,
     569    "rxPacketsReceivedOk": 0,
     570    "txPacketsReceived": 0,
     571    "txPacketsEmitted": 0,
     572    "statsId": "Mf/IdLFxTe6ZVlUYcQvlZw==",
     573    "stats": null
     574  },
     575  "deviceId": "00d012fffee1f102",
     576  "time": "2019-11-08T21:37:30+00:00"
     577}
     578}}}
     579
     580[[CollapsibleEnd]]
     581
     582[[CollapsibleStart(Data / Up Packet Example Logs)]]
     583Sample data up on Azure for sample up packet:
     584
     585Bridge log:
     586{{{
     587INFO[5193] integration/mqtt: publishing event            event=up qos=0 topic=devices/00d012fffee1f102/messages/events/up uplink_id=7a36347f-e7f5-4d9e-b75c-d54adf68e9d2
     588
     589}}}
     590
     591
     592Azure packet log
     593{{{
     594{
     595  "data": {
     596    "phyPayload": "QHhWNBKAVwAPo+J5m001Lok=",
     597    "txInfoFrequency": 903100000,
     598    "txInfoModulation": "LORA",
     599    "txInfoLoRaModulationInfoBandwidth": 125,
     600    "txInfoLoRaModulationInfoSpreadingFactor": 10,
     601    "txInfoLoRaModulationInfoCodeRate": "4/5",
     602    "txInfoLoRaModulationInfoPolarizationInversion": false,
     603    "rxInfoGatewayId": "ANAS//7h8QI=",
     604    "rxInfoTime": null,
     605    "rxInfoTimeSinceGpsEpoch": null,
     606    "rxInfoRssi": -35,
     607    "rxInfoLoRaSnr": 11.5,
     608    "rxInfoChannel": 4,
     609    "rxInfoRfChain": 1,
     610    "rxInfoBoard": 0,
     611    "rxInfoAntenna": 0,
     612    "rxInfoLocation": null,
     613    "rxInfoFineTimestampType": "NONE",
     614    "rxInfoContext": "NtnEjA==",
     615    "rxInfoUplinkId": "ejY0f+f1TZ63XNVK32jp0g==",
     616    "up": null
     617  },
     618  "deviceId": "00d012fffee1f102",
     619  "time": "2019-11-08T21:40:52+00:00"
     620}
     621}}}
     622[[CollapsibleEnd]]
     623
     624=== Azure Links ===
     625 * https://github.com/Azure-Samples/IoTMQTTSample
     626 * https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support
     627 * https://www.chirpstack.io/guides/microsoft-azure/
     628 * https://www.chirpstack.io/gateway-bridge/overview/
     629 * https://artifacts.chirpstack.io/downloads/lora-gateway-bridge/
     630
     631== Troubleshooting
     632[https://www.gateworks.com/contact/ Contact Gateworks Support Team]
     633