vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.96k stars 728 forks source link

STATE: PDP DEACT #433

Open T-Kalweit opened 4 years ago

T-Kalweit commented 4 years ago

I use a Vodafone card and in my case the problem was that the TinyGSM library is used for the APN data in the gprsConnectImpl routine for the IP. So the SIM800L always showed me at AT+CIICR PDP DEACT and when I added an ATO the modem showed me the error "not allowed".

In the TinyGsmClientSIM800.h you will find the line sendAT(GF("+CGDCONT=1,\"IP\",\""), apn, '"');

But Vodafone needs an IP here, so I changed the line as follows for testing purposes: sendAT(GF("+CGDCONT=1,\"IP\",\""), "139.007.029.017", '"'); The information about this can be found here: https://www.vodafone.de/hilfe/mobiles-telefonieren/mobilfunk-services-einrichten.html#so-lauten-die-einstellungen-fuer-vodafone-live For APN I use "web.vodafone.de", username and password are "";. Since then the connection to the WEB works fine.

Is it possible to extend the function bool gprsConnectImpl(const char* apn, const char* user = NULL, const char* pwd = NULL) with the IP? e.g. like this bool gprsConnectImpl(const char* apn, const char* user = NULL, const char* pwd = NULL, const char* ip = apn)

BavariaESP32 commented 3 years ago

Hi T-Kalweit, I have the same problem with a VodafoneD2 (Germany) card. Thanks to your great hint 👍 (manipulating TinyGsmClientSIM800.h with

sendAT(GF("+CGDCONT=1,\"IP\",\""), "139.007.029.017", '"');

it is now working for me (after hours of searching for the error).

Therefore I would support your request in making this extension or doing it in any other way to configure that for Vodafone users in Germany (and maybe other countries).

Thanks.