Setting up APN on A6 gsm

Hello,

I have a problem connecting my A6 GSM module to the internet (to be more precise i have trouble setting up apn settings). I have tried using commands from the A6 AT commands document, but all i get is +CME ERROR: 58. I have also tried commands from this forum post Troubleshooting AiThinker A6 GSM/GPRS board - Networking, Protocols, and Devices - Arduino Forum with same results.

The code:
1st try:
from the datasheet:

AT+ CSTT=, , (i'm probably messing up the syntax, i tried deleting the brackets, adding "", and/or ' ' .

2nd try:
...
mySerial.println("AT+SAPBR=3,1,"CONTYPE","GPRS"");
updateSerial();
delay(2000);
mySerial.println("AT+SAPBR=3,1,"APN","gprswap"");
updateSerial();
delay(2000);
mySerial.println("AT+SAPBR=1,1");
updateSerial();
delay(2000);
mySerial.println("AT+HTTPINIT");
updateSerial();
delay(2000);
mySerial.println("AT+HTTPPARA="CID",1");
updateSerial();
...

Any help would be welcome, thanks in advance.

just to note, it sends sms messages and makes calls just fine

sms messages and calls do not need APN
I have a smartphone that has trouble with data but can send/receive SMS and make/receive calls

You are not setting up a APN. You are connecting to an APN.

.

ieee488:
sms messages and calls do not need APN
I have a smartphone that has trouble with data but can send/receive SMS and make/receive calls

i just wanted to say that the module seems to be operating normally.