Problems with AT+WMBS


Sometimes, my Q2501 switches to a different GSM operator and keeps locked to it for several days. It happens on several tens of modules, so I guess it’s a problem in the firmware.
The manual choice of an operator (AT+COPS=1,xx) is not possible, since I need to allow roaming.
I thought it would help to restart the module, and it does. However, that’s not nice since the application looses the whole RAM content during the restart. So I’m looking for a way to restart only the GSM part.
First I was using AT+COPS=2, then AT+COPS=0. It seemed to work but then I found that in roaming, the module never chooses the operator it was before. So, I would need to do the cycle twice, and I don’t like that.
Then I found this AT+WMBS=2,1 then AT+WMBS=5,1 cycle. It works really nice, just what I needed. But there’s another problem: the AT+CPAS starts to return 5 (asleep), even though the calls and everything works fine. The problem is that when the ON/~OFF pin goes low, the module turns off, and that’s a showstopper for my app.
I also have no more free GPIO that could be used to reset the SIM or something.

So, this is what I need:

  1. A way to restart the GSM, or re-run the process of looking for an optimal “service provider” (operator).
  • or -
  1. A way to go from +CPAS: 5 to +CPAS: 0 without restart.

It would also help if someone could confirm that after AT+WMBS=1,1 the +CPAS goes to 5 forever. My firmware is quite old and this may have been fixed already.


I don’t think messing with the band selection is a good practice. If you are so sensitive for the used gsm operator you have to use the AT+COPS=1,xxxx which is the manual selection. Why do you think it can’t be used during roaming? Simply create a list of operator codes, which are the best for your home GSM provider. ( choose operators with cheap prices and high covarage ) If your module is connected to a server you can simple update it whenever you want.

I think you can also edit the preferred gsm operators.


Well, of course there are ways to do what I need. I’m just looking for the best way:

  1. The problem with AT+COPS=1 is that I’d have to constantly ask AT+COPS=? to see if I should switch to another operator. I should also read the preferred and forbidden operators lists from SIM etc., and that’s pretty much work that has already been done in the firmware. I just need to restart the selection process if the current operator does not work.
    My application is automotive, thus it’s expected the device will switch between roaming and home often, and it should switch fast. Also, the SIM cards are provided by customers. So I should make the whole thing as universal as possible, avoiding hard-wired lists.
  2. I’ve already described the problem with AT+WMBS.
  3. Also, a complete restart is a big problem, as it resets all the variables in RAM, or would need a great amount of flash memory to store the state of application.
  4. So, the best thing I could do until now is to perform AT+COPS=2 then AT+COPS=0, and check with AT+CLCK=“xx”,2 if I can send SMS and perform calls. If I cannot, then repeat the cycle.
  5. I think removing and inserting the SIM would work even better, but we’ve already used all the GPIOs that could be used to drive the SIMPRES signal. I hope this will be the final solution in the next generation of our device.

If you can see yet another way, I’d be happy to hear it, since all these have their problems.