Modem-settings wishlist

I have some points I like to mention about channel_settings.

    1. The way modem_settings is defined in Meshtastic
    1. The way we can choose from a multiple of settings. In Meshtastic only 6 are defined.
    1. 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.

2 Likes

Hi,
Agree with your points, but (maybe this will be a stupid question from me) aren’t most of these options available through command line? I know I was interested in choosing a specific radio channel due to interference and I was able to do it. Even all the other radio parameters could be changed:
meshtastic --setchan spread_factor 12 --setchan coding_rate 8 --setchan bandwidth 31

Cheers!

1 Like

Thanks for your reply.
I am aware that at some point in the past there were some ways to change the modem parameters.

But in fw 1.2.52 I get this message:

ERROR file:main.py common line:605 This option has been deprecated, see help below for the correct replacement…

So it seems that it was only temporary implemented.

Also the documentation on github says that changing the modem parameters is not yet implemented or at least not yet properly documented.

try adding --ch-index 0 to the command, like:

meshtastic --ch-set spread_factor 12 --ch-set coding_rate 8 --ch-set bandwidth 31 --ch-index 0

is that command from our docs? if so, let me know so it can be updated.

1 Like

wow …
that works , every day I’m learning more secrets of this fantastic piece of software.

The documentation on github and also on the meshtastic docs site says: TODO for these items.

bandwidth, channel_num, coding_rate, spread_factor

so I faultly assumed these commands were unavailable.

Apparently the documentation for these commands was hidden somewhere in a post in the forum.

So the only parameter that cannot be changed by hand seems to be the center_frequency of the channels by selecting one of the 10 radio-channels

Our project is in very active development. If you see something wrong, even with the docs, we’d love some help keeping things straight!

2 Likes

updated docs with an example command including --ch-index 0.

you should open issues for [1] & [3] in Meshtastic-device.

I found radio-settings documentation on the mestashtic site /docs/developers/device/radio-settings
where the old example is given :

meshtastic --setchan spread_factor 10 --setchan coding_rate 4 --setchan bandwidth 125

which generates the error message:
ERROR file:main.py common line:605 This option has been deprecated, see help below for the correct replacement…

good. fixed. thanks!

1 Like

Looks like you added --ch-index 0 . to line 78 in radio-settings.md
so now the line looks like:

meshtastic --setchan spread_factor 10 --setchan coding_rate 4 --setchan bandwidth 125 --ch-index 0

This still generates the same error for me.

The right way I need to give this command is:

meshtastic --ch-set spread_factor 10 --ch-set coding_rate 4 --ch-set bandwidth 125 --ch-index 0

that is accepted by the firmware

2 Likes

ooops! second time is the charm. thanks!