I am testing a bunch of borons at the exact same location. Few borons are connecting to AT&T cell tower without any issues, while the ones connecting to T-mobil are struggling intermittently for the last 2-3 days. The signal strength from T-mobil cell tower is terrible (less than -101 dbM). In our application we switch on the boron intermittently to send a bunch of data, so the borons are not powered on continuously. We power them on, provided a critical no of samples have been acquired by another microcontroller, we give around 3 minutes to acquire a cellular connection. If it fails we try again after sleeping for a predetermined time.
My question is
How does the roaming between T-mobil and At&T work ? When does it happen bcz the signal strength is persistently poor for nearly a day and still the borons which are tied to T-mobil keep trying to connect to T-mobil.
Is there a way to force a rescan , when there are persistent network connection failures ? Maybe something like :
That's probably not quite long enough, see Particle.connect() for recommendations.
If you can capture a log via USB on a device that is experiencing the problem, that is the best way to diagnose the problem. Use this in the firmware for maximum logging:
SerialLogHandler logHandler(LOG_LEVEL_TRACE);
You can't manually steer the cellular modem to specific carriers, and you should not attempt to scan for carriers manually. It will happen automatically after the modem is hardware reset after 10 minutes of failing to connect.
I see, thank you for the reply and documentation (very useful). it says
You must also stay awake trying to connect for at least 5 minutes periodically. The SIM may switch between IMSI when failing to connect, and if you do not try for long enough, it may not cycle through them properly, causing the device to stay stuck on one that can't be used in your location.
This means I need to be up atleast 6 minutes before IMSI cycling can occur ?
Also it gives the below points
After 10 minutes of failing to connect, Device OS will do a full shutdown of the cellular modem and restart it. This can help clear issues in some cases. It is recommended that you wait at least 11 minutes to be sure this can occur.
If you do not want to wait 11 minutes for battery life reasons, you should implement a variable backoff scheme were you at least do this periodically, say once every several hours, to be sure it will be done eventually. This will also assure that the 5 minute IMSI cycling time requirement is met.
The 11 minute shutdown of the cellular modem consists of sending it command to full reset, and also removing the power to the modem. This is more thorough than entering sleep mode, or using the reset button on the device.
This 11 minute shutdown, the document says the cellular modem is fully reset ? what does this mean ? is it just power cycling (which in my case is already happening) or the network priorities are also reestablished based on signal strengths ?
Also it says variable backoff scheme to save power. What does it mean by variable backoff scheme ? First wait 5 minutes, than 6 minutes and so on until 11 minutes, until we start getting a succesful connection ? Can you please elaborate a little more.
Whether you need to do both 5 minute and 11 minute resets depends on how often you want to try, how critical lost data is. For example you could initially do 5 minutes in case of IMSI switch, then do shorter cycles. Or you could just wait a few hours and for an 11 minute cycle. Or an 11 minute cycle once per day. It really depends on your use case, which is why it's not built in.
I believe it is possible the EtherSIM will need to change which IMSI it presents to mobile carriers. This doesn't necessarily affect the carriers that are available to the device, but it does affect how it is routed through the cellular network.
Thank Rick. I am not worried about the data lost, since the data is getting saved in an internal non-volatile memory.
But what exactly does Device OS does in an 11 minute cycle. I am already doing a power cycle of boron, so if it is only power cycling that it not very helpful and I will only stick to 5 minute resets. Is Device OS also resetting modem configurations after 11 minutes of connection failure ?
So after 5 minutes it tries to do IMSI switch. What happens at the 11 minutes reset ?
Wait, which Boron is this? At the end of the 10 minute cycle an emergency hardware reset AT command is issued to the modem before it's powered down. But not all modems use that, and the logic is fairly complicated, more than just issuing a Cellular.command to the modem.