A multifunctional and modular Firmware for Multitech's mDot based on ARM mBed provides a widerange of functionality for several Sensors such as MAX44009, BME280, MPU9250, SI1143 and uBlox. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.

Dependencies:   mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed

LoRa

Table of Contents

  1. LoRa Modes
  2. Join Modes

LoRa Modes

The Table below shows you some predefined LoRa_Modes. You can use them or adapt them for your usage. The Modes define the settings for the LoRa Module.

LORA_MODENetworkPublicityActivityFrequency SubbandSpreading FactorTx Power [dbm]Acknowledge RetriesJOIN_MODE
LORA_MODE_0_OFFtruefalse07161ABP
LORA_MODE_1truetrue18161OTA
LORA_MODE_2truetrue012161ABP
LORA_MODE_3truetrue07161ABP
LORA_MODE_4truetrue07161ABP
LORA_MODE_5truetrue07201ABP

definition of a LoRa_Mode inside LoRaConfig::build(LORA_MODE)

...
		case LORA_MODE_1:
			setNetworkPublicity(true);
			setActivity(true);
			setFrequencySubBand(LORA_SUBBAND_1);
			setSpreadingFactor(LORA_SPREADING_FACTOR_8);
			setTxPowerdBm(LORA_TX_POWER_16_DBM);
			setAcknowledgeRetries(LORA_ACKNOWLEDGE_RETRIES_0);
			setJOIN_MODE(OTA);
			break;
...

If you want to adapt a specific Mode just adapt the Parameters. Adding a new Mode just requires a new LORA_MODE-enum and an additional switch case insid LoRaConfig::build(LORA_MODE) that defines the attribute of the mode.

Join Modes

ABP

If you are using a LoRa_Mode that uses ABP as its JOIN_MODE make sure you've defined the LORA_NETWORK_NAME and LORA_NETWORK_PASSPHRASE inside LoRaConfig.h

definition of LORA_NETWORK_NAME and LORA_NETWORK_PASSPHRASE inside LoRaConfig.h

#define LORA_NETWORK_NAME			"conduitgwy"
#define LORA_NETWORK_PASSPHRASE		"conduitgwy"

OTAA

If you are using a LoRa_Mode that uses OTA as its JOIN_MODE make sure you've defined LORA_APP_EUI and LORA_APP_KEY correctly

definition of LORA_NETWORK_NAME and LORA_NETWORK_PASSPHRASE inside LoRaConfig.h

static uint8_t LORA_APP_EUI[] = {0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88};
static uint8_t LORA_APP_KEY[]	= {0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff,0x00};

for TTN Users you can find them on your Application Dashboard at https://staging.thethingsnetwork.org/applications

https://www.thethingsnetwork.org/media/django-summernote/2016-06-15/0c8f8e34-4916-4e59-a9da-c067f33cc86c.png

https://www.thethingsnetwork.org/media/django-summernote/2016-06-15/5c34e036-774f-4c39-ab54-6a3d6913923e.png

More Information for TTN Users about how to get the APP EUI and APP Key can be found at https://www.thethingsnetwork.org/labs/story/getting-started-with-the-multitech-mdot/step/connect-with-otaa#step-anchor


All wikipages