Join Subband vs. Tx Subband (US)

Hello All,

The coreConfiguration_t structure has two members, Join.SubBand_1st and Join.SubBand_2nd. However, the Tx section of the structure does not have any SubBand members. How does the stack choose which subband to use when transmitting?

Paul

Hi Paul,

During Join, the device sets the channel mask to the Join.Subbands and the network server responds with (new) channel mask, which the device implements. This new channel mask is used for LoRaWAN_Send sending.

Most (cheaper) gateways only have 8 channels and do not respond with a channel mask. And only the expensive gateways have more channels.

If your gateway did not respond to with a channel mask, the sending procedure will use the joining channel mask. What happens is, at join, the device sets the channel mask to the Join.Subbands, the network server does not respond with a (new) channel mask and the device uses the channel mask as initialized with the Join.Subbands.

Therefore, if your gateway only supports sub-band 2 for example, and does not relay its channel mask, you can set SubBands as it follows:

  • Join.SubBand_1st = US_SUB_BAND_2;
  • Join.SubBand_2nd = US_SUB_BAND_2;

Or

  • Join.SubBand_1st = US_SUB_BAND_2;
  • Join.SubBand_2nd = US_SUB_BAND_NONE;

Or

  • Join.SubBand_1st = US_SUB_BAND_NONE;
  • Join.SubBand_2nd = US_SUB_BAND_2;

Hi Tom,

Thanks for the information. I suspected that I wasn’t receiving a channel mask. I think I read somewhere that TheThingsNetwork legacy server does not send the channel mask. I don’t know if TheThingsIndustries V3 stack sends it. I’ll have to experiment. I didn’t realize that some gateways don’t pass along the channel mask. That’s another thing to look into.

Is there any way to do any of the following?

  • Read the channel mask
  • Determine what channel (or frequency) the device is using, either just before or just after transmitting

Note that I don’t want to do these in a production device, but they could be helpful when debugging.

Paul

I should probably clarify. The actions I was asking about are with respect to the Onethinx module. That is, can I read the channel mask received and/or the frequency/channel on which the module has transmitted?

Paul

Hi Paul,

Let me correct myself. It is up to Network Server to relay back the channel mask. Nothing to do with Gateway. Gateway (GW) is just a dummy which is relaying information between LoRaWAN end device and Network Server (NWS), and vice versa. You can imagine the whole communication as if there is no GW. Its a communication between NWS and the end device. GW is just a dummy device which just relays the info.

When setting up you GW on the NWS, you need to set it up with the correct information (information like channels which the GW supports). So you need to set it up manualy in the NWS. This information is then relayed from the NWS to the end device. Remember: Network Server MAY relay this info. MAY = Not obligatory. It may, or it may not.

So, after join, if NWS relays this info, it replaces the SubBand channel mask settings (which were originally set by you in coreConfig in code).

If, after join, NWS does not relay this info. The same channel mask is used for Sending as you set it in the code for Joining.

PS: If you set the wrong info about the GW on the NWS, and NWS relays it back to the end device, and end device sets its channel mask to this incorrect info about the GW, the GW will not be able to hear this device anymore because of the wrong information.

Hope this clarifies. I had to invest some time to get this as well.

Regards,

Tom

Thanks, Tom. Do you know of a way to determine what channel or frequency the module has chosen to transmit, either just before or just after transmission?

I noticed that, in the extended API, there is a structure, LoRaParams_t, that has a member called Frequency. But I suspect that this is only used for straight LoRa (not LoRaWAN) communications.

I also noticed, in the extended API, a function called LoRaWAN_Debug. However, I can find any information about this function. Any chance it could help?

Paul

Hi Paul

can I read the channel mask received and/or the frequency/channel on which the module has transmitted?

No, it’s updated internally.

Do you know of a way to determine what channel or frequency the module has chosen to transmit, either just before or just after transmission?

No, that is internal to the stack. It respects the LoRaWAN Specification 1.0.2

I noticed that, in the extended API, there is a structure, LoRaParams_t , that has a member called Frequency. But I suspect that this is only used for straight LoRa (not LoRaWAN) communications.

Correct, Only for LoRa

I also noticed, in the extended API, a function called LoRaWAN_Debug . However, I can find any information about this function. Any chance it could help?

LoRaWAN_Debug can take control of the red led on the DevKit, blinking it, which signals if stack is working or hanging, and it also returns the states in which the stack is in. It is more or less for internal use.

Tom