Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

SMTP -Java version of HyperTerminal version giving ERROR | Telit Cinterion IoT Developer Community

July 6, 2015 - 9:34pm, 9138 views

I am able to send an SMTP with attached fileusing HyperTerminal, however when trying to do the same using Java, I get an error. I am having problems detecting where my error(s) is. The HyperTerminal version works fine and I receive a SMTP with attached file, but my JAVA version just generates ERROR – with no other information, although verbose error messages enabled.

Any help would be appreciated to help to identify where the issue is.

 

At+cscs=?

Gives ^cscs: GSM ucs2

 

SMTP : HyperTerminal

at^sics=0,"conType","gprs0"

OK

at^sics=0,"user","user"

OK

at^sics=0,"passwd","passwd"

OK

at^sics=0,"apn","everywhere"

OK

at^siss=1,"srvtype","SMTP"

OK

at^siss=1,"conid",0

OK

at^siss=1,"address","smtps://auth.smtp.1and1.co.uk"

OK

at^siss=1,"smSubj","FFS Attachment"

OK

at^siss=1,"user","****\00******.co.uk"                              ...\00 = @ for using HyperTerminal

OK

at^siss=1,"passwd","*******"

OK

at^siss=1,"smFrom","****\00******.co.uk"                       ... \00 = @

OK

at^siss=1,"smRcpt","*********\00*********.com"

OK

at^siss=1,"smAuth", "login"

OK

at^siss=1,smMsg, "FFS Data File attached"

OK

at^siss=1,path, file:///a:/Dir1/                              ... path to file on FFS

OK

at^siss=1,"cmd","files"                                          ... ‘at’ send single file, ‘files – send up to 5 files  *1

OK

at^siss=1,"files","Event1.txt"                                 .. attachment file in a:\Dir1 on Module (Disk A) on the EHS6T

OK

at^siso=1                                                                ... open internet connection

OK

^SISW: 1,1

at^SISC=1                                                                ... close Internet connection

OK

 

^SIS: 1,0,4400,"Smtp open(auth.smtp.1and1.co.uk:465)"

 

^SIS: 1,0,4400,"SSL-Info: TLS, 3.3, TLS\11DHE\11RSA\11WITH\11AES\11256\11GCM\11S

HA384"

 

^SIS: 1,0,4400,"SSL-Cert: C=US;O=thawte, Inc.;CN=thawte SSL CA - G2"

 

^SIS: 1,0,4400,"220 kundenserver.de (mreue002) Nemesis ESMTP Service ready"

 

^SIS: 1,0,4400,"250-kundenserver.de Hello \1b<auth.smtp.1and1.co.uk\1b> \1b<31.1

11.186.89\1b>"

 

^SIS: 1,0,4400,"Auth OK"

 

^SIS: 1,0,4400,"Mail send OK"

 

^SISW: 1,2                                                              ...data successfully sent.

 

Above works with SMTP + file attachment being received.

 

 

SMTP: Java   -  core code only shown.

   String smtpCMEE = atc_Cmd.send ("at+CMEE=2\r");        … verbose error reporting.

    String conType_Response = atc_Cmd.send("AT^SICS=0,conType,\"gprs0\"\r");

   Thread.sleep(1000);

   

   String user_Response = atc_Cmd.send("AT^SICS=0,user, \”user\”\r");

   Thread.sleep(1000);

 

   String passWd_Response = atc_Cmd.send("AT^SICS=0, passwd, \"\password"\r");

   Thread.sleep(1000);

 

   String apn_Response = atc_Cmd.send("AT^SICS=0, apn, \”everywhere\”\r");

   Thread.sleep(1000);

 

   String smtpSMTP_Response = at.send ("at^siss=1, \"srvType\", \"SMTP\"\r");

   Thread.sleep(1000);

 

   String smtpconID_Response = at.send ("at^siss=1, \"conID\", 0\r");

   Thread.sleep(1000);

         

   String smtpAddress = at.send ("at^siss=1, \"address\", \"smtp://auth.smtp.1and1.co.uk\"\r");

   Thread.sleep(1000);

          

   String smtpSubject_Response = at.send ("at^siss=1, \"smSubj\", subjectStr\r"); 

   Thread.sleep(1000);

 

   String smtpUsername_Response = at.send ("at^siss=1, \"user\", \"****@******.co.uk\"\r"); 

   Thread.sleep(1000);

 

   String smtpPasswd_Response = at.send ("at^siss=1, \"passwd\", \"*******\"\r");    

   Thread.sleep(1000);

 

   String smtpFrom_Response = at.send ("at^siss=1, \"smFrom\", \"****@******.co.uk\"\r");

   Thread.sleep(1000);

 

   String smtpTo_Response = at.send ("at^siss=1, \"smRcpt\", \"*******@*******.com\"\r");

   Thread.sleep(1000);

 

    String smtpRcpt_Response = at.send ("at^siss=1, \"smCC\", \"******@******.com\"\r");

    Thread.sleep(1000);

 

    String smtpAuth_Response = at.send ("at^siss=1, \"smAuth\", \"login\"\r");

    Thread.sleep(1000);

 

    String smtpMsg_Response = at.send ("at^siss=1, \"smMsg\", \"FFS Data File attached\"\r");

    Thread.sleep(1000);

 

    String smtpPath_Response = at.send ("at^siss=1, \"path\", \"file:///a:/Dir1/\"\r");

    Thread.sleep(1000);

 

    String smtpCmd_Response = at.send ("at^siss=1, \"cmd\", \"files\"\r");

    Thread.sleep(1000);

           

     String smtpFiles1_Response = at.send ("at^siss=1, \"files\", \"Event1.txt\"\r");

     Thread.sleep(1000);

 

     String smtpOpen_Response = at.send ("at^siso=1\r");

     Thread.sleep(1000);

  

     ERROR                               .. on opening Internet session