I have some points I like to mention about channel_settings.
-
- The way modem_settings is defined in Meshtastic
-
- The way we can choose from a multiple of settings. In Meshtastic only 6 are defined.
-
- Channels-mumbers cannot be choosen but are randomly generated.
- [1]
modem_setting is displayed like this: Bw125Cr48Sf4096
meaning BandWidth 125kHz, CodingRate 4/8, SpreadFactor 4096
In the LoRa community usually when talking about SpreadFactors a number between 7 and 12 is used. In Meshtastic the way it is expressed is in chips/symbol [C/s]. I find the first way more convenient and it just means the same.
SF7 equals 2^7 = 128 C/s.
SF8 equals 2^8 = 256 C/s
SF9 equals 2^9 = 512 C/s
SF10 equals 2^10 = 1024 C/s
SF11 equals 2^11 = 2048 C/s
SF12 equals 2^12 = 4096 C/s.
So mode Bw125Cr48Sf4096 would become Bw125Cr48Sf12.
- [2]
The usual LoRa radio_chip is programmed with 4 variables, SpreadFaktor, CodingRate, BandWidth and ChannelFrequency.
These variables define a multiple of modem_settings.
6 SpreadFaktors, 4 CodingRates (4/5, 4/6. 4/7, 4/8), 4 BandWidths (62.5kHz , 125kHz, 250kHz, 500kHz) and 10 different Channels.
Multiplied gives that 6x4x4x10 = 960 different modem_settings. *note 1)
In the FirmWare we we can only choose from 6 different modem_settings
command - BandWidth - SpreadFactor - CodingRate - modem_setting
–ch-longslow - Bw125kHz - SF12 - CR_4/8 - Bw125Cr48Sf4096
–ch-longfast - Bw31kHz - SF9 - CR_4/8 - Bw31_25Cr48Sf512
–ch-mediumslow - Bw25okHz - SF11 - CR_4/6 - Bw250Cr46Sf2048
–ch-mediumfast - Bw250kHz - SF10 - CR_4/7 - Bw250Cr47Sf1024
–ch-shortslow - Bw125kHz - SF7 - CR_4/5 - Bw125Cr45Sf128
–ch-shortfast - Bw500kHz - SF7 - CR_4/5 - Bw500Cr45Sf128
One of those 6, LongFast can not be relied on for modems without a TCXO
so only 5 modem_settings out of 960 are left for normal use.
I propose to make it possible to choose which SpreadFactor, BandWidth or CodingRate is used.
- [3]
By the firmware a channel is randomly chosen out of the 10 available channels.
There are situations in which a user likes to define a channel number. f.i. because certain channel(s) are heavyly occupied.
Choosing a channel by oneself could be very usefull.
*note 1)
There are more modem_settings possible but
SF6 seldom used
Bw’s lower than 62.5kHz are not often used due to the necessary accuracy of the reference Xtal.
Bw of 31.25kHz is not advisable for most LoRa modems because they do not have a TCXO which makes it a unreliable BandWidth.