The G62 LoRaWAN provides a number of configurable parameters, to allow its behavior to be tailored to specific applications. Factors affecting the configuration you might choose include:
- How many messages per day your network will allow
- What external devices need monitoring
- How detailed a bread-crumb trail you require, or the required time between updates
- How good the GPS reception is in your installation
How The G62 Connects (OTAA)
By default, the G62 connects to a local LoRaWAN network using Over The Air Activation. Each G62 is provisioned with:
- A read-only DevEUI - a 16 digit code uniquely identifying the G62 (printed on the label)
- A configurable AppEUI - a 16 digit code uniquely identifying the website that data will be sent to
- A configurable AppKey - a 32 digit code that authenticates the G62 to the website and network server
- The default AppEUI is 70-B3-D5-70-50-00-00-05
- Each G62 is provisioned with a random default AppKey
- A configurable Region and Channel Mask
- The channel mask is used in the US and ANZ regions, to set the network frequencies
- Other regions don't need the channel mask, as all their networks use the same OTAA frequencies
Once the region has been configured, the G62 will attempt to join local networks by transmitting join requests. Any network that hears the join requests and has knowledge of the G62's DevEUI, AppEUI and AppKey, will allow the G62 to join the network and transmit data.
Once joined, the G62 repeats the OTAA process once a fortnight by default. This renegotiates encryption keys for enhanced security, and ensures continued operation in the event of a network losing the keys (for instance, if the device is mistakenly deleted).
How The G62 Connects (ABP)
The G62 can also be configured to connect using Activation By Personalization. When using ABP, each G62 must be configured with three additional numbers:
- A configurable DevAddr - an 8 digit code identifying the G62 to the network
- A configurable NwkSKey - a 32 digit code that authenticates the G62 to the network server
- A configurable AppSKey - a 32 digit code that authenticates the G62 to the backend website and network server
ABP allows a LoRaWAN device to connect without exchanging the usual join request and join response, which can save on downlink bandwidth, and allow the device to work when downlink reception is difficult. However, in LoRaWAN 1.0, the ABP mechanism is somewhat problematic. It either suffers from a lack of security (if you configure your device to reset it's uplink frame counts when it resets), or difficulty with configuration (if you don't reset the frame counts, and are in a region requiring dynamic channel configuration). These issues are beyond the scope of this document, so we recommend that you use OTAA unless you are confident you understand the implications of ABP.
How The G62 Locates
The G62 uses 3 sources of data to determine when it is in-trip (or the asset is in use). These are:
- Accelerometer & GPS - Used to start/end movement based trips
- Ignition input - Start/end a trip on an external on/off output, like an ignition switch, for example
- External voltage - "Run detect" trips based on the external voltage input going above/below certain thresholds
Each of these can be enabled or disabled separately, or be used together. Be aware that a source must end a trip before another can start a new one. During a trip, the G62 will periodically send position updates at the rate set in the parameters. Runtime and odometer readings will also be incremented while in a trip.
Outside of a trip, the G62 can also be programmed to send position and/or runtime/odometer updates at a set interval.
How The G62 Uses LoRaWAN Airtime
LoRaWAN devices can transmit at various data rates, usually denoted DR0, DR1, DR2, and so forth. The lowest data rate (DR0) takes the longest to transmit, but has the longest range. As the data rate goes up, the range goes down a bit, and the transmission time goes down a lot. G62s can be configured to use a particular data rate, or a range of data rates (ie. DR2-DR4). Lower data rates will have the longest range, but also use the most energy and airtime. When configured to use a range of data rates, the G62 spends an equal amount of airtime using each data rate. The G62 also has optional Adaptive Data Rate support, which allows the network server to intelligently control the data rate.
There are several factors limiting the maximum transmission rate of an G62:
- Radio regulations may limit the transmission time
- In Europe the law limits you to 36 seconds of transmit time per hour on most frequencies
- Whereas in Australia there is no legal limit
- Networks may limit the transmission time, to prevent congestion
- The Things Network for instance limits you to 30 seconds of transmit time per day
- At DR0, this gives you 20 messages with 100% range
- At DR1, this gives you 36 messages with 75% range
- At DR2, this gives you 80 messages with 50% range
- At DR3, this gives you 145 messages with 37% range
- At DR4, this gives you 265 messages with 28% range
- At DR5, this gives you 486 messages with 21% range
- In America, data rates are all two increments higher, so DR0 corresponds to DR2 in the above list
- Networks may limit the number of messages, for billing purposes
- Your network might require you to pay more for higher throughput
The radio regulations are automatically enforced by inserting delays between messages where required. It is up to the user to configure their G62 with a low enough transmission rate to meet network and energy requirements.
How The G62 is Configured
The G62 is configurable over-the-air using downlinks. Websites integrating the G62 can find the complete protocol specification here. Initial configuration of the region and AppEUI, as well as firmware updates, are performed with a plug-in USB adapter, and a Windows configuration app. An adapter can be obtained from your G62 distributor. The adapter plugs into the four pin connector below the battery compartment.
To read the available parameters, select your adapter from the drop-down list in the top right, and click Start. The configuration tool will read continuously, and display the existing parameters in the center column. To program new parameters, enter the desired parameters in the right hand column, and check the Program Parameters button. Checking the Program Firmware button will additionally update the G62 with the bundled firmware.
f you click the DevEUI List button, a list of scanned DevEUIs will pop up. You can hot-plug the adapter into many G62s in sequence to populate the list. The list is in CSV format, so it can imported into a spreadsheet easily.
The top line in the display shows the DevEUI and version string. In the screenshot above, the DevEUI is 70B3D57050001A0A, the firmware version is 188.8.131.52 (product, hardware revision, major, minor). The default AppKey and the effective AppEUI and AppKey can be found in the DevEUI list on the right.
The 'Reset To Default' button in the top of the right column resets the whole right column to the default settings. The 'Existing' button copies the settings from the left column to the right column. The 'Save' and 'Load' buttons open a file dialog, to save or restore the right column to disk.
When the G62's parameters were last changed.
This selects the radio frequencies to use according to your country. Please be sure to select the correct region, to maintain compliance with your country's radio regulations. If the region is unset, the G62 will not transmit until configured. Otherwise, to prevent the G62 from transmitting before configuration, click the Start button on the tool, and plug the cable into the G62, before powering it up. The region cannot be reconfigured over the air.
This chooses between the default (and recommended) Over The Air Activation, and Activation By Personalization. In OTAA, the G62 and the network server generate the session encryption keys and device address during a join request / join response exchange. In ABP, you have to generate the encryption keys and device address beforehand, and configure them. There are two different ABP options - Reset Frame Count and Save Frame Count. Reset Frame Count will reset the uplink and downlink frame counts whenever the device is reset. This defeats the encryption entirely, but is required in LoRaWAN 1.0 so that the network server can detect the device reset, and reconfigure the device's channels. If your network doesn't need to detect the device reset and reconfigure the channels, you can select Save Frame Count. In this mode, encryption is not compromised, but there is no opportunity for the network server to reconfigure the device. Future firmwares will upgrade the G62 to LoRaWAN 1.1, where this reconfiguration problem has been solved.
This identifies the backend website that your data should be sent to. If you leave it blank, the default for the G62 LoRaWAN (70-B3-D5-70-50-00-00-05) will be used.
This 32 character key authenticates the G62 with the backend website and network server. If you leave it blank, the G62 will use a unique random key, which was written to it in the factory. This default key can be read from the DevEUI list dialog, or the label on the box. It is not printed on the G62's label. The AppKey cannot be reconfigured over the air.
This 32 character key authenticates the G62 with the network server. It is only required if Activation is set to ABP.
This 32 character key authenticates the G62 with the backend website and network server. It is only required if Activation is set to ABP.
This 8 character number identifies the G62 with the network server. It is only required if Activation is set to ABP.
In the US and ANZ region, you must set this channel mask to select which of the 72 uplink channels your network provider uses. The parameter is one big hexadecimal number, with the lowest channels corresponding to the rightmost digits. For example:
Sub-band 1 uses channels 0-7, and channel 64, so it's mask is 0100000000000000FF
Sub-band 2 uses channels 8-15, and channel 65, so it's mask is 02000000000000FF00
Sub-band 3 uses channels 16-23, and channel 66, so it's mask is 040000000000FF0000
Sub-band 4 uses channels 24-31, and channel 67, so it's mask is 0800000000FF000000
Sub-band 5 uses channels 32-39, and channel 68, so it's mask is 10000000FF00000000
Sub-band 6 uses channels 40-47, and channel 69, so it's mask is 200000FF0000000000
Sub-band 7 uses channels 48-55, and channel 70, so it's mask is 4000FF000000000000
Sub-band 8 uses channels 56-63, and channel 71, so it's mask is 80FF00000000000000
To select all channels, you'd use FFFFFFFFFFFFFFFFFF
The configuration app default is blank, which results in the selected region's default channels being used. In both the US and ANZ region, this is the same as enabling all channels, and will lead to packet loss if your network is only using a single sub-band.
Min / Max Data Rate:
These parameters select the minimum and maximum data rates to transmit at, when ADR is not active. A '0' selects DR0, the lowest data rate with the longest range. If you set both parameters to the same value, the G62 will always use that rate. If you choose a range, the G62 will alternate between the allowed data rates in such a way as to spread the transmit time evenly. This means it will use the higher data rates more often. Using a range of data rates allows the network to support more devices per gateway, but reduces your guaranteed range to the range of the highest data rate. Using higher data rates may allow you to send more messages per day. Please see the section 'How The G62 Uses LoRaWAN Airtime' above. The default is DR0-DR2.
Adaptive Data Rate:
By default, the G62 does not request ADR when sending uplinks, choosing instead to control its data rate according to the configured range. However, you may wish to enable ADR when the tracked asset is mostly stationary, to optimize power usage and network capacity. You can also force ADR on at all times, in order to control it using a policy on the network server.
If the G62 is configured to enable ADR when out-of-trip, it will switch to its lowest configured data rate, and highest transmit power, whenever a trip ends. Thereafter, the network server will configure it to a lower power mode if appropriate.
Please remember that the ADR adaptation rate in LoRaWAN 1.0 is extremely slow. If the device loses connectivity, it takes 96 lost transmissions before it will attempt to increase its transmit range. This adaptation rate will be adjustable in a future LoRaWAN release.
By default, the G62 rejoins the network once a fortnight, in case the network server has somehow forgotten the session keys. This period can be extended to up to 255 days, or disabled entirely (0). However, if a device is accidentally deleted on the network server, or the network server suffers a database failure and loses the session keys, the server will be unable to decrypt any device data until it has rejoined. Rejoining fortnightly generates several extra transmissions, but lowers the time spent out of service in the event of an accident. The rejoin is exactly equivalent to a device reset, and takes place even if Activation is set to ABP.
Enable Movement Detection:
Enables trip detection from accelerometer + GPS movement.
Enable Ignition Input:
Allow the ignition input to start and end trips. This does not disable ignition input detection, so it can be used as a digital input when this is disabled.
Enable Run Detect:
Allow external voltage changes to start and end a trip. Run detect settings must be checked before enabling (see below).
In Trip Update Period (0 - 7600 s):
Period between updates while in trip. Care must be taken to ensure region and network limits are not reached. 0 disables in trip updates. Alarms will reset the timer.
Movement Speed Threshold (0 - 255 km/h):
The minimum speed, in km/h, that the G62 must be moving before a movement trip is started. The device must also move greater than 150m from the start position for a trip to be started.
Odo/Runtime On Trip End:
Send odometer and runtime data at the end of every trip.
Odo/Runtime Send Period (0 - 255 hrs):
Period that odometer and runtime data is sent. 0 to disable.
Heartbeat Period (0 - 2550 min):
Period when out of trip that position updates will be sent. 0 to disable.
Ignition Alarm on High:
Send an update if the ignition input changes to high (on). This should only be enabled if "Enable Ignition Input" above is disabled.
Ignition Alarm on Low:
Send an update if the ignition input changes to low (off). This should only be enabled if "Enable Ignition Input" above is disabled.
Ignition Debounce Period (0 - 65535 ms):
Time the ignition input needs to stay in a state (on or off), before it gets counted as a change.
Digital Input 1/2 Alarm on High:
Send an update if a digital input changes to high (on).
Digital Input 1/2 Alarm on Low:
Send an update if a digital input changes to low (off).
Digital Input 1/2 Pull Direction:
Whether the input should be set to pull up or pull down. See here for more information.
Digital Input 1/2 Debounce Period (0 - 65535 ms):
Time a digital input needs to stay in a state (on or off), before it gets counted as a change.
External Voltage Good Alarm:
Send an update if the external voltage goes above ~7 V.
External Voltage Low Alarm:
Send an update if the external voltage goes below ~7 V.
Run Detect High Voltage (0 - 36000 mV):
External power input voltage that needs to be reached to start a run detect trip.
Run Detect Low Voltage ( 0 - 36000 mV):
External power input voltage that will end a run detect trip.
Run Detect Start Time (0 - 255 s):
External voltage must be above the high threshold for this amount of time to start a run detect trip.
Run Detect End Time ( 0 - 255 s):
External voltage must be below the low threshold for this amount of time to end a run detect trip.
Ain Alarm Upload on Reset:
Send an update when the analog input voltage goes back inside the threshold range.
Ain Alarm High Threshold (0 - 30000 mV):
Send an update when the analog input voltage goes above this value. There is a small amount of hysteresis so that voltages close to the threshold do not trigger multiple uploads. This value may be lower than the low threshold, to allow for an internal alarm range. 0 to disable.
Ain Alarm Low Threshold (0 - 30000 mV):
Send an update when the analog input voltage goes below this value. There is a small amount of hysteresis so that voltages close to the threshold do not trigger multiple uploads. This value may be higher than the high threshold, to allow for an internal alarm range. 0 to disable.
PDOP Mask (2.5-10):
The PDOP is a measure of how imprecise a GPS fix is, due to the satellites used being too close together to triangulate effectively. This parameter sets an upper bound on the imprecision, for a fix to be considered valid. You can safely use the default value, and specify the Coarse Accuracy Mask instead. The default is 10.
Coarse Accuracy Mask (5-100 m):
This is the required position accuracy for a position fix to be considered valid. It provides a lower bound on accuracy. Please note that it works on the estimated accuracy, and it is not uncommon for position fix errors to occasionally be two or three times larger than the mask. Also note that values lower than 20 will be difficult to achieve in practice. The default is 75 meters.
Speed Accuracy Mask (3-20 km/h):
This is the required accuracy of the speed component of a fix, before the fix is considered valid. The default is 10 km/h.
This informs the GPS module of what sort of motion to expect from the asset, allowing it to make better estimates when moving. The Automotive setting is a safe default, but the Pedestrian and Stationary settings may be useful as well. Setting the model appropriately allows the GPS to filter out noise more effectively.
Require 3D Fix:
This requires that a position fix use 4 satellites, and calculate a height as well as latitude and longitude, before being considered valid. It is recommended, as using only 3 satellites gives less redundancy in the rare event of a satellite failure, increasing the risk of a position fix giving an erroneous result. However, disabling this option can allow fixes to proceed faster, and in adverse conditions such as urban canyons. The default is false.
Discard First Fixes (0-32):
This option discards the first few valid position fixes from the GPS module. This gives the module some time to refine and cross-check its estimate, reducing the risk of an erroneous fix in the rare event of a satellite failure. We recommend the default value of 3.
This enables a GPS feature that predicts future satellite movements, so that position fixes can proceed without listening for all of the satellite information the next time the satellite is in view. It can help fixes succeed in low signal levels, but greatly decreases the accuracy of the fixes. The default is false.
Max Aiding Error (5-1000 m):
This provides a rough limit on the additional error introduced by the Autonomous Aiding feature. This error cannot be detected by the GPS module, so it can't be filtered out by the Pos Acc Mask setting. The actual error can be several times the value set here. Autonomous Aiding is unlikely to be of any use if this value is set below 50. The default is 100 meters.
Wakeup Threshold (1-8):
This sets the amount of force, in units of 63 mG, that will wake the accelerometer up. Setting it too high might result in trips being missed. Increase this value if you have a problem with small vibrations setting off spurious trips. The default is 1 (63 mG).
Wakeup Period (0-2500 ms):
This is the required time duration of the force that will wake the accelerometer up. Increasing this value will make the accelerometer less sensitive to short, sharp forces, but increases the chances of a trip start being missed. It is currently rounded to a multiple of 80 ms by the G62. The default is 0 ms.