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=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 184.108.40.206, 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 single, 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
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.