2022-06-24 19:42:37 -07:00
---
id: lora
title: LoRa Configuration
sidebar_label: LoRa
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2022-09-22 18:51:41 -07:00
The LoRa config options are: Region, Modem Preset, Max Hops, Transmit Power, Bandwidth, Spread Factor, Coding Rate, Frequency Offset, Transmit Enabled and Ignore Incoming Array. LoRa config uses an admin message sending a `Config.LoRa` protobuf.
2022-06-24 19:42:37 -07:00
## LoRa Config Values
:::note
2022-08-18 07:34:39 -07:00
You must set your device's `lora.region` setting. This will ensure that you are operating within the legal limits for your area.
2022-06-24 19:42:37 -07:00
:::
### Region
Sets the region for your node. Default is `unset`.
| Region Code | Description |
| :-------: | :---------------------------------------------------------------------------------------: |
| `unset` | Unset |
| `us` | United States |
| `eu433` | European Union 433mhz |
| `eu868` | European Union 868mhz |
| `cn` | China |
| `jp` | Japan |
| `anz` | Australia & New Zealand |
| `kr` | Korea |
| `tw` | Taiwan |
| `ru` | Russia |
| `in` | India |
| `nz865` | New Zealand 865mhz |
| `th` | Thailand |
### Modem Preset
### Max Hops
2022-06-29 08:55:33 -07:00
### Transmit Power
If zero then, use default max legal continuous power (ie. something that won't burn out the radio hardware)
In most cases you should use zero here. Units are in dBm.
### Bandwidth
Bandwidth in MHz
Certain bandwidth numbers are 'special' and will be converted to the appropriate floating point value: 31 -> 31.25MHz
### Spread Factor
A number from 7 to 12. Indicates the number of chirps per symbol as 1<<spread_factor.
### Coding Rate
The denominator of the coding rate. ie for 4/8, the value is 8. 5/8 the value is 5.
### Frequency Offset
This parameter is for advanced users with advanced test equipment, we do not recommend most users use it.
A frequency offset that is added to to the calculated band center frequency. Used to correct for crystal calibration errors.
2022-09-22 18:51:41 -07:00
### Transmit Enabled
2022-06-29 08:55:33 -07:00
2022-09-22 18:51:41 -07:00
Allows you to enable and disable transmit (TX) from the LoRa radio. Useful for hot-swapping antennas and other tests.
2022-06-29 08:55:33 -07:00
Defaults to false
### Ignore Incoming Array
For testing it is useful sometimes to force a node to never listen to particular other nodes (simulating radio out of range). All nodenums listed in the ignore_incoming array will have packets they send droped on receive (by router.cpp)
2022-06-24 19:42:37 -07:00
## LoRa Config Client Availability
<Tabs
groupId="settings"
2022-07-14 22:33:45 -07:00
defaultValue="apple"
2022-06-24 19:42:37 -07:00
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
2022-06-29 08:55:33 -07:00
{label: 'CLI', value: 'cli'},
2022-06-24 19:42:37 -07:00
{label: 'Flasher', value: 'flasher'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="android">
:::info
Region and Modem Preset can be configured on Android.
:::
</TabItem>
<TabItem value="apple">
:::info
Configuration of Region, Modem Preset and Hop Limit is available on iOS, iPadOS and macOS at Settings > Radio Configuration > LoRa.
:::
</TabItem>
<TabItem value="cli">
2022-08-03 08:14:18 -07:00
LoRa config conmmands are available in the python CLI. Example commands are below:
2022-06-24 19:42:37 -07:00
| Setting | Acceptable Values | Default |
| :----------: | :---------------------------------------------------------------------------: | :---------------: |
2022-09-12 10:50:51 -07:00
| lora.modem_preset | `LONG_FAST`, `LONG_SLOW`, `VERY_LONG_SLOW`, `MEDIUM_SLOW`, `MEDIUM_FAST`, `SHORT_SLOW`, `SHORT_FAST` | `LONG_FAST` |
2022-09-12 10:46:16 -07:00
| lora.region | `UNSET`, `US`, `EU_433`, `EU_868`, `CN`, `JP`, `ANZ`, `KR`, `TW`, `RU` ,`IN`, `NZ_865`, `TH` | `UNSET` |
2022-09-12 12:08:49 -07:00
| lora.hop_limit | `1`,`2`,`3`,`4`,`5`,`6`,`7` | `3` |
2022-06-24 19:42:37 -07:00
</TabItem>
<TabItem value="flasher">
:::info
2022-07-11 11:05:10 -07:00
No lora config options are available in the Flasher.
2022-06-24 19:42:37 -07:00
:::
</TabItem>
<TabItem value="web">
:::info
2022-08-03 08:14:18 -07:00
All lora config options are available in the Web UI.
2022-06-24 19:42:37 -07:00
:::
</TabItem>
2022-09-11 07:57:46 -07:00
</Tabs>