+CME ERROR: connection failed

10 thoughts on “+CME ERROR: connection failed

  1. Hi All,

    I am using the GE865 and have previously been able to send emails using the AT#EMAILD command, my code has not changed but I am now getting a +CME ERROR: connection failed.  What could be some of the possibilities for that?  Is it a device related issue or network?  I am trying to reach one of google’s email servers at aspmx.l.google.com on port 25, I was able to open the command prompt on my laptop and successfully ping that address.  At first I when I did not have a data plan for my GoPhone SIM card I got that error but once I got a data plan everything was fine.  Then yesterday I tried to have ATT switch the SIM card to the HE910 I just purchased but I got a SIM card failure so I had them switch it back to the GE865 module. Thats when my problem began and the numnuts at ATT are for the most part clueless about M2M devices.  Any assistance would be greatly appreciated.

     

    Thanks,

     

    Tony

      1. Thank you for your reply Cosmin.  I read up on the aspmx.l.google.com mail server and I can’t find anywhere that has definitively said it has been abandoned.  Not to mention I was successfully sending emails through it prior speaking with the ATT people on Jan 30th.  I clearly don’t know if it is an ATT issue or if it is something I have done accidentally since I have not changed my code and one day it works and the next it doesn’t.  I have no problem sending SMS but once I try data (email) I get the connection failed message.  I tried a different mail server that, like aspmx.l.google.com, also does not require SSL/TLS and that gives the same result, connection failed. I am at a total loss about what to try next.  Below is my send email function, I get out of Init_Cell_Module() just fine and I know I am registered to my home network with a suficiently strong signal strength checked with +CSQ.  If you could look over my AT commands to see if there are any claring mistakes I would be greatful.  Thanks.

         

        void SendEmail( void )
        {
            Init_Cell_Module();   

            sprintf(WriteBuffer,”AT+CGDCONT=1,”IP”,”wap.cingular”,”0.0.0.0″,0,0r”);
         
            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell command = %sn”, WriteBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Send_AT_Command( (unsigned int*)WriteBuffer );
            Get_AT_Response();

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell response = %sn”, ReadBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Delay(0.25);

            sprintf(WriteBuffer,”AT#SCFG=1,1,300,90,1200,50r”);

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell command = %sn”, WriteBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif 
         
            Send_AT_Command( (unsigned int*)WriteBuffer );
            Get_AT_Response();

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell response = %sn”, ReadBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Delay(0.25);       

        //    sprintf(WriteBuffer,”AT#ESMTP=”aspmx.l.google.com”:25r”);
            sprintf(WriteBuffer,”AT#ESMTP=”smtp.gmx.com”:465r”);

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell command = %sn”, WriteBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif
         
            Send_AT_Command( (unsigned int*)WriteBuffer );
            Get_AT_Response();

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell response = %sn”, ReadBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Delay(0.25);

        //    sprintf(WriteBuffer,”AT#EADDR=”jbwavedata@gmail.com”r”);
            sprintf(WriteBuffer,”AT#EADDR=”wavedata@gmx.com”r”);

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell command = %sn”, WriteBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif 

            Send_AT_Command( (unsigned int*)WriteBuffer );
            Get_AT_Response();

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell response = %sn”, ReadBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Delay(0.25);

        //    sprintf(WriteBuffer,”AT#EUSER=”jbwavedata@gmail.com”r”);
            sprintf(WriteBuffer,”AT#EUSER=”wavedata@gmx.com”r”);

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell command = %sn”, WriteBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif 

            Send_AT_Command( (unsigned int*)WriteBuffer );
            Get_AT_Response();

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell response = %sn”, ReadBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Delay(0.5);

        //    sprintf(WriteBuffer,”AT#EPASSW=”xxxxxx”r”);
            sprintf(WriteBuffer,”AT#EPASSW=”xxxxxxxx”r”);

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell command = %sn”, WriteBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif 

            Send_AT_Command( (unsigned int*)WriteBuffer );
            Get_AT_Response();

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell response = %sn”, ReadBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Delay(0.25);

            sprintf(WriteBuffer,”AT#SGACT=1,1r”);

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell command = %sn”, WriteBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif 

            Send_AT_Command( (unsigned int*)WriteBuffer );
            Get_AT_Response();

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell response = %sn”, ReadBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Delay(0.25);

            sprintf(WriteBuffer,”AT#EMAILD=”tcimaglia@tncoceanographic.com”,”Cell Modem Test”r”);

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell command = %sn”, WriteBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif 

            Send_AT_Command( (unsigned int*)WriteBuffer );
            Get_AT_Response();

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell response = %sn”, ReadBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Delay(0.25);

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Email data = %sn”, NewData );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif 

            Send_AT_Command( (unsigned int*)NewData  );

            sprintf(WriteBuffer,”%c”,0x1A);

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “End email = %sn”, WriteBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Send_AT_Command( (unsigned int*)WriteBuffer );
            Get_AT_Response();

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Cell response = %sn”, ReadBuffer );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            #ifdef CELL_INFO
                DRIVER_485 = 1;            // Enable 485 Driver
                printf( “Powering down cell module…n” );
                DRIVER_485 = 0;            // Dissable 485 Driver
            #endif

            Cell_OFF();   

        1. Indeed aspmx.l.google.com seems to carry a SMTP service on port 25, at least the connection can be opened.

          Please post a real log of commands & answers, focus on AT#SGACT=1,1 and its answer.

          You could also try to open a simple socket connection (AT#SD) to see if that works.

          1. Hi Cosmin,

             

            Attached is a log file from an email attempt.  By the way as of last writing I have been able to send emails but only maybe 1 out of 20 go through.  As you can see in the file I successfully get registered to the network, which always works, my signal strength is more that adequate and I get my IP address from the #SGACT=1,1 comand which I always get as well.  But as usual I get the +CME: ERROR connection failed message which is clearly not good.

             

            Tony

          2. I still think there is a problem with the signal, AT#MONI is more adequate to check, use it. You should also try in both network modes, UTRAN and GSM, use AT+WS46 to lock the module in one mode.

          3. Hi Cosmin,

            I have had some time to try some of your suggestions.  Changing modes with AT+WS46 does not help.  I have added the AT#MONI to query the signal and I have attached a file with the latest connection failure.  Could you please take a look at the MONI response to see if you see something that is concerning.  I am still trying to determine what the power numbers mean from a signal strength point of view. I have also switched from AT&T to KORE for my SIM cards but the same issue exists.  I know KORE uses AT&T’s network but I was hoping that using a SIM card from a provider that specalizes in m2m would solve this issue but it has not.  Thanks in advance.

            Tony

          4. The signal is good but maybe there is still a lack of resources.

            What about connecting with AT#SD?

            Another trial, if you have a smartphone or tablet, put the SIM and observe browsing quality while connected on 3G.

          5. Hi Cosmin,

            Thanks again.  Ok so I have a friend who is using the exact same product and he took some time to issue the same commands I am using and he was able to make it work BUT with his company’s mail server.  So I used his email account and mail server settings and it works just fine. So I am comfortable it is not a hardware issue on my end or a settings issue in the module but rather an issue with the mail server stuff with google.  I used a website, wormly.com, to test the smtp settings that I use for google and they worked just fine and sent the email.  So at this stage I just need to research more about the google mail servers and/or try a different route than google.  Thanks for all your assistance!

            Tony