-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work with Multi-Network SIMs #5
Comments
Hi, Ok, thank you for your contribution! I'll try to improve the "connected" concept by adding the Roaming Multi Network SIM state when I'd have a bit of free time. Cheers |
Had the same problem, took me about half an hour to figure out the solution. I came here to write about it so maybe I can save someone's time but its already documented. |
@jaka87 I just created a PR with some work I did using the code @ChrisBingham1 shared, I've tested a bit but I didn't release it because of I didn't have enough time to test it properly #28 |
Great work. I tested it for more than one day with update intervals of about 5min. Everything seems fine. |
Hi,
Firstly, a great bit of serial feedback to COM6 when doing things in your code - something so often missed out and something which helped me understand what was going wrong!
Multi-Network SIMs - often used for MMI applications are normally Roaming SIMs. I have one of these in my Arduino SIM800L. This means that even though you are connected, the returned status is not :
+CREG:0,1
it is:
+CREG:0,5
Therefore, in http.cpp since you have the following defined:
#define CONNECTED "+CREG: 0,1"
This While statement causes it to be stuck in the loop:
Result HTTP::configureBearer(const char *apn){
Result result = SUCCESS;
unsigned int attempts = 0;
unsigned int MAX_ATTEMPTS = 10;
sendATTest();
// CONNECTED IN THE NEXT LINE FAILS THE ROAMING SIMS:
while (sendCmdAndWaitForResp(REGISTRATION_STATUS, CONNECTED, 2000) != TRUE && attempts < MAX_ATTEMPTS){
sendCmdAndWaitForResp(SIGNAL_QUALITY, CONNECTED, 1000);
attempts ++;
delay(1000 * attempts);
if (attempts == MAX_ATTEMPTS) {
attempts = 0;
preInit();
}
}
So it looks like that the code needs to be tweaked so that if CONNECTED fails then it looks for ROAMING which would be defined as:
#define ROAMING "+CREG: 0,5"
I've currently just cloned and changed CONNECTED in my copy to 0,5 and the code then works fine for my Roaming Multi Network SIM.
Cheers,
Chris
The text was updated successfully, but these errors were encountered: