Restrict Boron 2G or 3G connections

boron
Tags: #<Tag:0x00007fe21f7344a8>

#1

Hello,

Quick question and then the reason at the end on why I want to do this.

Question

Are we able to restrict the Boron 2G/3G devices to just use 3G networks?

Research

From the device APIs, it seem that we are able to tell what radio technology is being used via the getAccessTechnology() command but I don’t think the function is available to restrict the device to just use 3G networks.

As of device OS 0.9.0 the Cellular.command() was made available to send AT commands the cellular module. I am in the process of looking through the docs for these commands but if someone has done it or have insight on this, it would be appreciated.

Reason

As LTM-M is not fully established in Canada yet, we have to stick with the 2G/3G version of the Boron. Currently in Canada, Rogers is the only vendor left with a 2G network running. They plan to completely obsolete and shut off all 2G towers in Canada by end of 2020. What I do not what happening is for deployed Boron 2G/3G devices to be affected by this shutdown.

Since the shutting down of 2G is inevitable if we are able to control and restrict the Boron to just 3G networks, we can then test connectivity and avoid installing units in places with only 2G connection.

A smaller bonus is that the 3G power consumption of the Boron units is only 800mA

Sources


#2

The command you’re looking for is AT+URAT=x. This allows you to select a specific radio access technology.

Indicates the radio access technology and may be:
• 0: GSM / GPRS / eGPRS (single mode)
• 1: GSM / UMTS (dual mode)
• 2: UMTS (single mode)
• 3: LTE (single mode)
• 4: GSM / UMTS / LTE (tri mode)
• 5: GSM / LTE (dual mode)
• 6: UMTS / LTE (dual mode)
• 7: LTE Cat.M1
• 8: LTE Cat.NB1
• 9: GPRS / eGPRS

Correct power supply for Boron 2G/3G without LiPo battery
#3

@picsil thanks for the reply.

I looked through the commands manual and the “AT+URAT” define values in section 7.7.3 does not show SARA U201 under the module series.

I also posted on the Ublox forums and I was recommended the " AT+COPS" command instead in section 7.4. In the allowed values for the SARA U201 are 0 and 2. With apparently 2 being 3G in general

I will probably give both these commands a try but on first read it seems the AT+UART command may not be supported for the Ublox on the Boron.

Let me know your thoughts

AT commands manual:

Ublox forum post:


#4

So I spend the weekend trying somethings out plus reading the AT-commands and examples sheet…

In summary I think I’ve gotten the AT+URAT=x to work, thank you @picsil for the reply. I didn’t get the AT+COPS command to work but it might be be not understanding the “AT+COPS=[mode[,format[,oper[,AcT]]]]” syntax, and there weren’t any examples of changing the value in the example document.

Now I am not really fimilar with radio access technology terminologies and I am far from being an expert, but from what I can tell + google + trail and error from the table posted by @picsil

• 0: GSM / GPRS / eGPRS (single mode)
• 1: GSM / UMTS (dual mode)
• 2: UMTS (single mode)
• 3: LTE (single mode)
• 4: GSM / UMTS / LTE (tri mode)
• 5: GSM / LTE (dual mode)
• 6: UMTS / LTE (dual mode)
• 7: LTE Cat.M1
• 8: LTE Cat.NB1
• 9: GPRS / eGPRS
  • Mode: Single/Dual/Tri mode allows your radio to switch between the number different bands i.e. 2G/3G/4G (4G being LTE?) with single mode restricting you to 1 band, dual to 2 and tri to 3
  • Band GSM/GPRS/eGPRS: I think this band is 2G, setting this to single band and using the getAccessTechnology() gives me “NET_ACCESS_TECHNOLOGY_GSM” which is said to be 2G RAT on particle’s device API docs
  • Band UMTS: I think this band is 3G, my device by default is connected to this band and getAccessTechnology() returns “NET_ACCESS_TECHNOLOGY_UMTS”.
  • Band LTE/LTE Cat.M1/LTE Cat.NB1: Did not try, theres no LTE-M publically availble in canada yet.

If anyone can confirm or correct my findings above, I would really really really appreciate it.

Assming all of the above is correct, the syntax for the AT+URAT command is AT+URAT<SelectedAcT>[,<PreferredAct>[,<2ndPreferredAct>]] (e.g. AT+URAT=x,y,z where x, y, z is your selected, preferred and second preferred). Note that in order to have a preferred act you MUST at least be operating in dual/tri mode. Same goes for the second preferred act in tri mode. So 1 variable single mode, 2 variables dual mode and 3 variables tri mode. If you have additional perferred act variables and operating in a lower mode, the variables are ignored (e.g. AT+URAT=0,0 is the same as AT+URAT=0 since 0 is for GSM single mode so the second “0” doesn’t matter)

Now to limit your device to 3g, example 4.1.3.2, page 15 and 17.1.1 on page 117 of the AT examples helped me the most. There seems to be some presteps before you need to call AT-URAT. The steps are;

  • Deregister from network
  • Select the band you want
  • Register to network
    Cellular.command(printCallback, tech, 10000, "AT+COPS=2\r\n"); // Deregister network
    Cellular.command(printCallback, tech, 10000, "AT+URAT=2\r\n"); // Pick band 2 for 3G sigle, 0 for 2G single
    Cellular.command(printCallback, tech, 10000, "AT+COPS=0\r\n"); // Register network

After executing these commands, you will loose connection for a few seconds and then reconnection will automatially happen. Use the getAccessTechnology() to see what band you are on. By default it seems the boron 2g/3g is on a selected 3g band with a preferred band of 2g (i.e. it will always pick 3g unless 2g is avaible, so I think default mode is AT+URAT=1,2).

With all that being said…

  • If anyone has experience or can verify what what I posted is correct that would really be great
  • Check my terminology and implementation if possible (Maybe someone from particle? I would really appreciate it)

This implementation is probably important to those who are deploying units in areas where 2G is being EOLed.