Cellular interface (HL7802) -- send a list of preferred radio access technologies in init

Hi, In cellular_hl7802.c, starting line 344, there is a mechanism for selecting radio access technology (RAT). It first sends AT+KSRAT=0 to select RAT automatically and then it sends AT+KSELACQ=0,x to configure the list of RATs to a selected one (where x is CELLULAR_CONFIG_DEFAULT_RAT).

In AirPrime HL78xx AT Commands Interface Guide, Sierra Wireless notes that “AT+KSRAT is provided for backwards compatibility only. AT+KSELACQ is recommended for RAT switching. (See RAT Switching Application Note (Doc# 2174296) for details.)”

  1. It might not be necessary to send AT+KSRAT=0 but it causes no problems either.
  2. What would actually be nice is the possibility to send the priority list of RATs, not just only one as is currently implemented in the switch on line 359 in cellular_hl7802.c. For example, in my country, the 4G narrowband technology is not deployed for the operator I use but when we ship the product to other countries, it might be deployed there so I would like to fully leverage the AT+KSELACQ command and send a complete list. I can send a specific command to change the RATs later but I think it won’t work very well because if the initial attachment to the mobile network fails (because of incorrect RAT), the function Cellular_Init will not return. Also, reboot is needed after sending AT+KSELACQ. Therefore, I think sending a list of RATs would be better than just picking one in Cellular_Init / Cellular_ModuleEnableUE.
  3. Also, what if I misconfigure the CELLULAR_CONFIG_DEFAULT_RAT, e.g. to unsupported CELLULAR_RAT_HSDPAHSUPA? The switch will go to its default case where it does nothing but still sends a command (I reckon with the previous payload). Maybe an assert / a static assert would be appropriate?

Hello @kaktus

These seem like great suggestions. Let me follow up with the folks working on cellular so they can triage these improvements.

Hi Kaktus,

Thank you for your suggestions. We will look into these suggestions and reply in the discussion thread.

Hi Kaktus,

Please reference this commit.

CELLULAR_CONFIG_DEFAULT_RAT_2 and CELLULAR_CONFIG_DEFAULT_RAT_3 are added to support default RAT priority list.
User of cellular library can still use Cellular_SetRatPriority to change the RAT priority list later.

Thank you again for your feedback.

Excellent! Thank you!