wiki:iot/azurelorademo

Version 7 (modified by Ron Eisworth, 17 months ago) ( diff )

Update RAK link

Gateworks LoRa & Azure IoT Demo

This page details a demo that Gateworks has created using the LoRa Sub-1GHz Radio technology and the Microsoft Azure Cloud. This utilizes a Gateworks Single Board Computer acting as the Gateway.

For general IoT (Internet of Things) information, including other Radio technologies and Clouds, please view the parent page, Gateworks IoT Wiki

LoRa & Microsoft Azure Cloud Demo

This 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.

Requirements

  1. Node / Device
    1. SparkLAN WLRS-591EVB
    2. Make sure antenna is connected
    3. Connect to desktop/laptop via CuteCom terminal program
    4. Set freq mac set ch_freq 0 902600000
    5. Mac join abp mac join abp
  2. Gateworks IoT Gateway
    1. Obtain a Gateworks Single Board Computer. This example uses the Ventana GW5220.
    2. Install Ubuntu Bionic (Ventana) Instructions
    3. Insert 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)
      1. The SPI version will not work in the Gateworks Mini-PCIe slot
      2. Be sure to purchase proper antenna and cable with card
    4. Software pieces on the Gateworks SBC:
      1. Install LoRa Packet Forwarder
        1. Github used is rak_common_for_gateway https://github.com/RAKWireless/rak_common_for_gateway
        2. apt-get update
        3. apt-get install build-essential git
        4. git clone https://github.com/RAKWireless/rak_common_for_gateway
        5. cd rak_common_for_gateway/lora/rak2247
        6. ./install.sh
        7. cd packet_forwarder/lora_pkt_fwd
        8. vi global_conf.json
          1. Adjust frequency, etc. Example config given in log and config file section below for USA.
          2. Adjust connecting port to 1700
        9. ./lora_pkt_fwd
        10. This talks to the actual radio card.
        11. 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)
      2. Install Gateway Bridge
        1. .deb package lora-gateway-bridge (must be v3.3 or higher)(now called chirpstack because of licensing issues)
        2. 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.
        3. https://www.chirpstack.io
        4. .deb file here: https://artifacts.chirpstack.io/downloads/lora-gateway-bridge/
        5. Download using wget on Gateworks SBC: wget https://artifacts.chirpstack.io/downloads/lora-gateway-bridge/lora-gateway-bridge_3.3.0_linux_armv7.deb
        6. Install: dpkg -i lora-gateway-bridge_3.3.0_linux_armv7.deb
        7. Edit config: vi /etc/lora-gateway-bridge/lora-gateway-bridge.toml
          1. Add in Azure details as in example config below, editing the key, etc
          2. 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.
  3. Azure Cloud
    1. Must sign up for free account.
    2. It is recommended to use the pre-done remote monitoring solution accelerator (here)
      1. It is recommended to turn off simulated data in the accelerator to ensure the free trial lasts longer.
        1. Must create a device with a specific device ID. This device ID must be used by the MQTT lora-gateway-bridge
      2. Select real device, authentication type is symmetric
      3. Must get shared key device string like example:
        1. HostName=gateworksremotemonitor-s2pc7.azurewebsites.net;DeviceId=GateworksTest1;SharedAccessKey=R9hjZNOvtfferesrsHzFGScSgc3EUxc004pjMg=
          

Step by Step

  1. Make sure node is up and running and connected to with terminal program on laptop/desktop
  2. Start SBC
  3. Start packet forward program and ensure it is running successfully as shown in the output in the Log file section below
    ./lora_pkt_fwd 
    
  4. Start the gateway bridge and ensure it is running successfully as shown in the output in the Log file section below
    lora-gateway-bridge -c /etc/lora-gateway-bridge/lora-gateway-bridge.toml
    
  5. Login to Azure website and check for connected device on Azure (status packets are being sent up by the Gateway Bridge)
  6. 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)
    1. In CuteCom or terminal program connected to the node, send a packet with the following command
      mac tx ucnf 0 1234
      
  7. Observe in Azure Device Explorer

What's Next

This is a demo of a simple setup, sending a simple MQTT Packet up to Azure

There are many ways this demo can be expanded for each application.

Sample Configuration Files and Logs

CollapsibleStart(lora-gateway-bridge Configuration File) Lora-gateway-bridge

root@bionic-armhf:~# cat /etc/lora-gateway-bridge/lora-gateway-bridge.toml
# This configuration provides a Semtech UDP packet-forwarder backend and
# integrates with a MQTT broker. Many options and defaults have been omitted
# for simplicity.
#
# See https://www.loraserver.io/lora-gateway-bridge/install/config/ for a full
# configuration example and documentation.

[general]
# debug=5, info=4, warning=3, error=2, fatal=1, panic=0
log_level = 5

# Gateway backend configuration.
[backend]
# Backend type.
type="semtech_udp"

  # Semtech UDP packet-forwarder backend.
  [backend.semtech_udp]

  # ip:port to bind the UDP listener to
  #
  # Example: 0.0.0.0:1700 to listen on port 1700 for all network interfaces.
  # This is the listeren to which the packet-forwarder forwards its data
  # so make sure the 'serv_port_up' and 'serv_port_down' from your
  # packet-forwarder matches this port.
  udp_bind = "0.0.0.0:1700"


# Integration configuration.
[integration]
# Payload marshaler.
#
# This defines how the MQTT payloads are encoded. Valid options are:
# * protobuf:  Protobuf encoding (this will become the LoRa Gateway Bridge v3 default)
# * json:      JSON encoding (easier for debugging, but less compact than 'protobuf')
marshaler="json"

  # MQTT integration configuration.
  [integration.mqtt]
  # Event topic template.
  event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}"

  # Command topic template.
  command_topic_template="gateway/{{ .GatewayID }}/command/#"

  # MQTT authentication.
  [integration.mqtt.auth]
  # Type defines the MQTT authentication type to use.
  #
  # Set this to the name of one of the sections below.
  #type="generic"
  type="azure_iot_hub"

    # Generic MQTT authentication.
    [integration.mqtt.auth.generic]
    # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
    server="tcp://127.0.0.1:1883"

    # Connect with the given username (optional)
    username=""

    # Connect with the given password (optional)
    password=""

    # Azure IoT Hub
    #
    # This setting will preset uplink and downlink topics that will only
    # work with Azure IoT Hub service.
    [integration.mqtt.auth.azure_iot_hub]

    # Device connection string (symmetric key authentication).
    #
    # This connection string can be retrieved from the Azure IoT Hub device
    # details when using the symmetric key authentication type.
    device_connection_string="HostName=iothub-s2pc7.azure-devices.net;DeviceId=00d012fffee1f102;SharedAccessKey=hWY7XLZuFOYlgIzvSGEbvzDpJ5H2sVGWGq1M6cUoiNc="

    # Token expiration (symmetric key authentication).
    #
    # ChirpStack Gateway Bridge will generate a SAS token with the given expiration.
    # After the token has expired, it will generate a new one and trigger a
    # re-connect (only for symmetric key authentication).
    sas_token_expiration="24h0m0s"

    # Device ID (X.509 authentication).
    #
    # This will be automatically set when a device connection string is given.
    # It must be set for X.509 authentication.
    device_id=""

    # IoT Hub hostname (X.509 authentication).
    #
    # This will be automatically set when a device connection string is given.
    # It must be set for X.509 authentication.
    # Example: iot-hub-name.azure-devices.net
    hostname=""

    # Client certificates (X.509 authentication).
    #
    # Configure the tls_cert (certificate file) and tls_key (private-key file)
    # when the device is configured with X.509 authentication.
    tls_cert=""
    tls_key=""

CollapsibleEnd CollapsibleStart(lora packet forwarder configuration file) Packet forwarder config:

root@bionic-armhf:~/rak_common_for_gateway/lora/rak2247/packet_forwarder/lora_pkt_fwd# cat global_conf.json 
{
    "SX1301_conf": {
        "lorawan_public": true,
        "clksrc": 1,
        "antenna_gain": 0,
        "radio_0": {
            "enable": true,
            "type": "SX1257",
	    "freq": 902600000,
            "rssi_offset": -166.0,
            "tx_enable": true,
            "tx_freq_min": 902000000,
            "tx_freq_max": 928000000
        },
        "radio_1": {
            "enable": true,
            "type": "SX1257",
	    "freq": 903400000,
            "rssi_offset": -166.0,
            "tx_enable": false
        },
        "chan_multiSF_0": {
            "enable": true,
            "radio": 0,
            "if": -400000
        },
        "chan_multiSF_1": {
            "enable": true,
            "radio": 0,
            "if": -200000
        },
        "chan_multiSF_2": {
            "enable": true,
            "radio": 0,
            "if": 0
        },
        "chan_multiSF_3": {
            "enable": true,
            "radio": 0,
            "if": 200000
        },
        "chan_multiSF_4": {
            "enable": true,
            "radio": 1,
            "if": -300000
        },
        "chan_multiSF_5": {
            "enable": true,
            "radio": 1,
            "if": -100000
        },
        "chan_multiSF_6": {
            "enable": true,
            "radio": 1,
            "if": 100000
        },
        "chan_multiSF_7": {
            "enable": true,
            "radio": 1,
            "if": 300000
        },
        "chan_Lora_std": {
            "enable": true,
            "radio": 0,
            "if": 300000,
            "bandwidth": 500000,
            "spread_factor": 8
        },
        "chan_FSK": {
            "enable": false,
            "radio": 0,
            "if": 300000,
            "bandwidth": 250000,
            "datarate": 100000
        },
	"tx_lut_0": {
		"desc": "TX gain table, index 0",
		"pa_gain": 0,
		"mix_gain": 8,
		"rf_power": -6,
		"dig_gain": 0
	},
	"tx_lut_1": {
		"desc": "TX gain table, index 1",
		"pa_gain": 0,
		"mix_gain": 10,
		"rf_power": -3,
		"dig_gain": 0
	},
	"tx_lut_2": {
		"desc": "TX gain table, index 2",
		"pa_gain": 0,
		"mix_gain": 12,
		"rf_power": 0,
		"dig_gain": 0
	},
	"tx_lut_3": {
		"desc": "TX gain table, index 3",
		"pa_gain": 1,
		"mix_gain": 8,
		"rf_power": 3,
		"dig_gain": 0
	},
	"tx_lut_4": {
		"desc": "TX gain table, index 4",
		"pa_gain": 1,
		"mix_gain": 10,
		"rf_power": 6,
		"dig_gain": 0
	},
	"tx_lut_5": {
		"desc": "TX gain table, index 5",
		"pa_gain": 1,
		"mix_gain": 12,
		"rf_power": 10,
		"dig_gain": 0
	},
	"tx_lut_6": {
		"desc": "TX gain table, index 6",
		"pa_gain": 1,
		"mix_gain": 13,
		"rf_power": 11,
		"dig_gain": 0
	},
	"tx_lut_7": {
		"desc": "TX gain table, index 7",
		"pa_gain": 2,
		"mix_gain": 9,
		"rf_power": 12,
		"dig_gain": 0
	},
	"tx_lut_8": {
		"desc": "TX gain table, index 8",
		"pa_gain": 1,
		"mix_gain": 15,
		"rf_power": 13,
		"dig_gain": 0
	},
	"tx_lut_9": {
		"desc": "TX gain table, index 9",
		"pa_gain": 2,
		"mix_gain": 10,
		"rf_power": 14,
		"dig_gain": 0
	},
	"tx_lut_10": {
		"desc": "TX gain table, index 10",
		"pa_gain": 2,
		"mix_gain": 11,
		"rf_power": 16,
		"dig_gain": 0
	},
	"tx_lut_11": {
		"desc": "TX gain table, index 11",
		"pa_gain": 3,
		"mix_gain": 9,
		"rf_power": 20,
		"dig_gain": 0
	},
	"tx_lut_12": {
		"desc": "TX gain table, index 12",
		"pa_gain": 3,
		"mix_gain": 10,
		"rf_power": 23,
		"dig_gain": 0
	},
	"tx_lut_13": {
		"desc": "TX gain table, index 13",
		"pa_gain": 3,
		"mix_gain": 11,
		"rf_power": 25,
		"dig_gain": 0
	},
	"tx_lut_14": {
		"desc": "TX gain table, index 14",
		"pa_gain": 3,
		"mix_gain": 12,
		"rf_power": 26,
		"dig_gain": 0
	},
	"tx_lut_15": {
		"desc": "TX gain table, index 15",
		"pa_gain": 3,
		"mix_gain": 14,
		"rf_power": 27,
		"dig_gain": 0
	}
    },
    "gateway_conf": {
	"gateway_ID": "00D012FFFEE1F102",
	/* change with default server address/ports, or overwrite in local_conf.json */
	"server_address": "localhost",
	"serv_port_up": 1700,
	"serv_port_down": 1700,
	/* adjust the following parameters for your network */
	"keepalive_interval": 10,
	"stat_interval": 30,
	"push_timeout_ms": 100,
	/* forward only valid packets */
	"forward_crc_valid": true,
	"forward_crc_error": true,
	"forward_crc_disabled": false,
	"autoquit_threshold": 6
    }
}

CollapsibleEnd CollapsibleStart(lora packet forwarder example output)

Example packet forward application running output:

root@bionic-armhf:~/rak_common_for_gateway/lora/rak2247/packet_forwarder/lora_pkt_fwd# ./lora_pkt_fwd 
*** Beacon Packet Forwarder for Lora Gateway ***
Version: 4.0.1
*** Lora concentrator HAL library version info ***
Version: 5.0.1;
***
INFO: Little endian host
INFO: found global configuration file global_conf.json, parsing it
INFO: global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
INFO: lorawan_public 1, clksrc 1
INFO: no configuration for LBT
INFO: antenna_gain 0 dBi
INFO: Configuring TX LUT with 16 indexes
INFO: radio 0 enabled (type SX1257), center frequency 902600000, RSSI offset -166.000000, tx enabled 1, tx_notch_freq 0
INFO: radio 1 enabled (type SX1257), center frequency 903400000, RSSI offset -166.000000, tx enabled 0, tx_notch_freq 0
INFO: Lora multi-SF channel 0>  radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 1>  radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 2>  radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 3>  radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 4>  radio 1, IF -300000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 5>  radio 1, IF -100000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 6>  radio 1, IF 100000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 7>  radio 1, IF 300000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora std channel> radio 0, IF 300000 Hz, 500000 Hz bw, SF 8
INFO: FSK channel 8 disabled
INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to 00D012FFFEE1F102
INFO: server hostname or IP address is configured to "localhost"
INFO: upstream port is configured to "1700"
INFO: downstream port is configured to "1700"
INFO: downstream keep-alive interval is configured to 10 seconds
INFO: statistics display interval is configured to 30 seconds
INFO: upstream PUSH_DATA time-out is configured to 100 ms
INFO: packets received with a valid CRC will be forwarded
INFO: packets received with a CRC error will be forwarded
INFO: packets received with no CRC will NOT be forwarded
INFO: Auto-quit after 6 non-acknowledged PULL_DATA
INFO: found local configuration file local_conf.json, parsing it
INFO: redefined parameters will overwrite global parameters
INFO: local_conf.json does not contain a JSON object named SX1301_conf
INFO: local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to 00D012FFFEE1F102
INFO: packets received with a valid CRC will be forwarded
INFO: packets received with a CRC error will be forwarded
INFO: packets received with no CRC will NOT be forwarded
INFO: [main] concentrator started, packet can now be received

INFO: Disabling GPS mode for concentrator's counter...
INFO: host/sx1301 time offset=(1573244036s:715596µs) - drift=1811158092µs
INFO: Enabling GPS mode for concentrator's counter.


INFO: Received pkt from mote: 12345678 (fcnt=77)

JSON 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="}]}
INFO: [down] PULL_ACK received in 4 ms

INFO: Received pkt from mote: 12345678 (fcnt=78)

JSON 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="}]}
INFO: [up] PUSH_ACK received in 7 ms

##### 2019-11-08 20:14:29 GMT #####
### [UPSTREAM] ###
# RF packets received by concentrator: 2
# CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
# RF packets forwarded: 2 (34 bytes)
# PUSH_DATA datagrams sent: 2 (396 bytes)
# PUSH_DATA acknowledged: 50.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 3 (33.33% acknowledged)
# PULL_RESP(onse) datagrams received: 0 (0 bytes)
# RF packets sent to concentrator: 0 (0 bytes)
# TX errors: 0
# BEACON queued: 0
# BEACON sent so far: 0
# BEACON rejected: 0
### [JIT] ###
# SX1301 time (PPS): 2835751
src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
### [GPS] ###
# GPS sync is disabled
##### END #####

JSON up: {"stat":{"time":"2019-11-08 20:14:29 GMT","rxnb":2,"rxok":2,"rxfw":2,"ackr":50.0,"dwnb":0,"txnb":0}}
INFO: [up] PUSH_ACK received in 2 ms
INFO: [down] PULL_ACK received in 2 ms
INFO: [down] PULL_ACK received in 3 ms

CollapsibleEnd CollapsibleStart(lora-gateway-bridge example output)

Example lora-gateway-bridge output

root@bionic-armhf:~# lora-gateway-bridge -c /etc/lora-gateway-bridge/lora-gateway-bridge.toml 
INFO[0000] starting LoRa Gateway Bridge                  docs="https://www.loraserver.io/lora-gateway-bridge/" version=3.3.0
INFO[0000] backend/semtechudp: starting gateway udp listener  addr="0.0.0.0:1700"
DEBU[0000] backend/semtechudp: cleanup gateway registry 
INFO[0000] integration/mqtt: connected to mqtt broker   
DEBU[0001] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullData
DEBU[0001] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullACK
INFO[0001] integration/mqtt: subscribing to topic        qos=0 topic="devices/00d012fffee1f102/messages/devicebound/#"
DEBU[0006] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushData
DEBU[0006] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushACK
INFO[0006] integration/mqtt: publishing event            event=up qos=0 topic=devices/00d012fffee1f102/messages/events/up uplink_id=d0e63fa3-ede2-4850-b981-e239820a8434
DEBU[0011] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushData
DEBU[0011] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushACK
INFO[0011] integration/mqtt: publishing event            event=stats qos=0 stats_id=1af685eb-3e6d-4a1f-bf18-103c7619c7d1 topic=devices/00d012fffee1f102/messages/events/stats
DEBU[0011] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullData
DEBU[0011] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullACK
DEBU[0021] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullData
DEBU[0021] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullACK
DEBU[0032] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullData
DEBU[0032] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullACK
DEBU[0041] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushData
DEBU[0041] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:50657" protocol_version=2 type=PushACK
INFO[0041] integration/mqtt: publishing event            event=stats qos=0 stats_id=9926a236-5ef0-41f5-968b-83eb80af1836 topic=devices/00d012fffee1f102/messages/events/stats
DEBU[0042] backend/semtechudp: received udp packet from gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullData
DEBU[0042] backend/semtechudp: sending udp packet to gateway  addr="127.0.0.1:53877" protocol_version=2 type=PullACK

CollapsibleEnd CollapsibleStart(Status Packet Example Logs) Sample status on Azure platform for a sample packet:

Bridge log:

INFO[5322] integration/mqtt: publishing event            event=stats qos=0 stats_id=5c6c1e4f-ae87-4bf9-a18d-8b2c27646dbb topic=devices/00d012fffee1f102/messages/events/stats

Azure receive:

{
  "data": {
    "gatewayId": "ANAS//7h8QI=",
    "ip": "172.24.24.194",
    "time": "2019-11-08T21:37:30Z",
    "location": null,
    "configVersion": null,
    "rxPacketsReceived": 0,
    "rxPacketsReceivedOk": 0,
    "txPacketsReceived": 0,
    "txPacketsEmitted": 0,
    "statsId": "Mf/IdLFxTe6ZVlUYcQvlZw==",
    "stats": null
  },
  "deviceId": "00d012fffee1f102",
  "time": "2019-11-08T21:37:30+00:00"
}

CollapsibleEnd

CollapsibleStart(Data / Up Packet Example Logs) Sample data up on Azure for sample up packet:

Bridge log:

INFO[5193] integration/mqtt: publishing event            event=up qos=0 topic=devices/00d012fffee1f102/messages/events/up uplink_id=7a36347f-e7f5-4d9e-b75c-d54adf68e9d2

Azure packet log

{
  "data": {
    "phyPayload": "QHhWNBKAVwAPo+J5m001Lok=",
    "txInfoFrequency": 903100000,
    "txInfoModulation": "LORA",
    "txInfoLoRaModulationInfoBandwidth": 125,
    "txInfoLoRaModulationInfoSpreadingFactor": 10,
    "txInfoLoRaModulationInfoCodeRate": "4/5",
    "txInfoLoRaModulationInfoPolarizationInversion": false,
    "rxInfoGatewayId": "ANAS//7h8QI=",
    "rxInfoTime": null,
    "rxInfoTimeSinceGpsEpoch": null,
    "rxInfoRssi": -35,
    "rxInfoLoRaSnr": 11.5,
    "rxInfoChannel": 4,
    "rxInfoRfChain": 1,
    "rxInfoBoard": 0,
    "rxInfoAntenna": 0,
    "rxInfoLocation": null,
    "rxInfoFineTimestampType": "NONE",
    "rxInfoContext": "NtnEjA==",
    "rxInfoUplinkId": "ejY0f+f1TZ63XNVK32jp0g==",
    "up": null
  },
  "deviceId": "00d012fffee1f102",
  "time": "2019-11-08T21:40:52+00:00"
}

CollapsibleEnd

Troubleshooting

Contact Gateworks Support Team

RAK2247 GPS PPS

This card uses pin 19 for GPS PPS. Often this is not connected by default but may be available with an optional resistor.

RAK2247 PCIe Reset Solutions

The RAK2247 card is made in a way that is not compatible out of the box with Gateworks boards by default. This is related to the PCIe reset signal. Gateworks strictly follows the Mini-PCIe specification which labels the reset as an active low. The RAK2247 is configured for an active high.

  • (Preferred) Purchase a RAK2247 with the mod for active low as discussed in the forum thread from RAK wireless (https://forum.rakwireless.com/t/rak2247-reset-active-high/643)
  • Temporarily, for proof of concept, add a piece of masking tape to block pin 22 on the RAK2247 card.
  • Purchase a Gateworks SBC that has a resistor on pin 22 that can be unloaded
  • Modify the device tree and control the GPIO through userspace as long as you are not affecting anything in the other PCIe slot. For example, if using a SBC with 3 Mini-PCIe slots, and WiFi radios are in two slots, and the RAK2247 in the third slot, hitting the reset via GPIO will negatively affect the WiFi radios. Thus, this technique is likely only good for temporary prototyping.

Attachments (4)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.