GSM/GPRS Module and TinyGSM
Hello,
I'm trying to connect to Proximus network using the GSM/GPRS module and the TinyGSM library but get the same error as in https://industruino.com/forum/help-1/question/serial-communication-with-gsm-gprs-expansion-module-428 :
Output to Serial monitor:
Waiting for network... fail
Waiting for network... fail
When trying to get the error codes for waitfornetwork, gprsconnect I get "1"
I tried the 2 IDC modes by changing the jumpers and SerialAT but didn't solve anything. From what I understood, my setup should work with IDC1.
The INDIO is connected to a 12V power source and the GSM/GPRS module is connected using the 14 PIN IDC Port
The code I use to test the module is https://github.com/Industruino/democode/blob/master/GPRSwebclientTinyGSM_D21G_HardwareSerial/GPRSwebclientTinyGSM_D21G_HardwareSerial.ino
The ISP confirms the SIM cards support 2G, 3G, 4G
Using my cellphone, the SIM connects immediately to the network (no PIN)
What is the best way to troubleshoot these issues?
Thanks
Martin
Hello Didier,
Yes I'm using a D21G INDIO, i didn't try with a 24V power supply yet, will have to get one first...but is this required?
I thought I read in the documentation that 8V was the minimum for the power supply.
Also following piece of code doesn't output anything except the hardcoded string "Modem: "
String modemInfo = modem.getModemInfo();
SerialMon.print(F("Modem: "));
SerialMon.println(modemInfo);
Are following assumptions correct?
(modem.waitForNetwork()) should output 1 if succesful?
(modem.gprsConnect(apn, user, pass)) should output 1 if succesful?
I looked into the https://github.com/vshymanskyy/TinyGSM/blob/master/src/TinyGsmClientSIM800.h library and found following status codes
enum SimStatus {
SIM_ERROR = 0,
SIM_READY = 1,
SIM_LOCKED = 2,
};
enum RegStatus {
REG_UNREGISTERED = 0,
REG_SEARCHING = 2,
REG_DENIED = 3,
REG_OK_HOME = 1,
REG_OK_ROAMING = 5,
REG_UNKNOWN = 4,
};
Yes would be great if you could share the code. Et je parles français donc pas de soucis pour les comments :)
Thanks,
Martin
============
EDIT
===========
Just found out there was a verbose mode where AT commands are sent to serialmon
This is the output I get
..Initializing modem...
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
AT
ATI
Modem:
Waiting for network...AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
AT+CREG?
fail
Waiting for network...AT+CREG?
AT+CREG?
Hi Martin,
Could your please be a bit more precise ? What Industruino do you use ? 1286 or D21G ?
Have you tried with a 24Vdc power supply ?
Do not hesitate to lengthen your waiting timers. For instance, the modem really needs 10 seconds to reset.
I had an active connection some week back and I can send you the corresponding code for D21G and GPRS module (french comments, sorry) if you think it may help.
Didier, DG2R
Your answer
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
Keep Informed
About This Forum
This community is for professionals and enthusiasts of our products and services.
Read GuidelinesQuestion tools
Stats
Asked: 5/7/18, 2:20 PM |
Seen: 6753 times |
Last updated: 7/25/19, 11:02 AM |
I have been using TinyGsmClientSIM800.h, by the way. I will do an extract of the code and send it along tomorrow. The 24 V suggestion is just because if your power supply is a bit too weak on the current side, I guess the GPRS module would be the first to go. So a higher voltage could mean enough power. Seeing your code, this definitrely is not the case. Didier, DG2R