How to send an E-mail using TC65 ? | Telit Cinterion IoT Developer Community
July 15, 2015 - 9:53am, 3345 views
I have tryed to use e-mail instead of sms.
Response -> AT^SISO=0
+CME ERROR: missing input value
Iam using my own addr, mail.my-server-name using POP3
Which input value is missing
Hello,
It's hard to advice anything without any details and log.
You can find some examples for emails in the AT commands specification for TC65i. You won't find them in specification for old TC65 but the commands are similar or even the same.
Generally you need to configure the service with AT^SISS command and the connection profile with AT^SICS command before opening the connection.
POP3 is used for receiving emails, SMTP for sending.
Please send the detailed log with all AT commands that you are using if you need more help.
Best regards,
Bartłomiej
Thank for Yor reply.
But I do miss a flowchart, showing only the absolute nessesary commands using atcommand.send("at^sxxx=<profile id> \r");
Espcially the write procedure.
The example in the "atcommand.pdf" is somewhat confusing, not showing the complete picture.
A touturial example, would be nice.
Br
This is what I have tryed:
atcommand.send("at^sisw=0,"+e_message.length()+",1 \r");
Response -> at^sisw=0,7,1
^SISW: 0, 0, 00
atcommand.send("at^sisw=0," + e_message + (char) 26 + "\r");
Response e_message -> at^sisw=0,message (and a ctrlz)
+CME ERROR: invalid index
Response -> at^sisi=0
^SISI: 0,3,0,0,0,00
Response -> at^sici?
^SICI: 0,2,1,"10.37.34.189"0
The full code:
atcmdresponse = msotad.atcommand.send("at+cmee=2 \r");
System.out.println("Response -> " + atcmdresponse);
System.out.println("Clears the connection profile. ");
atcmdresponse = msotad.atcommand.send("at^sics=0,conType,\"none\"\r");
System.out.println("Response -> " + atcmdresponse);
atcmdresponse = msotad.atcommand.send("at^sics=0,conType," + connection_type + "\r");
System.out.println("Response -> " + atcmdresponse);
atcmdresponse = msotad.atcommand.send("at^sics=0,apn,\"internet\"\r");
System.out.println("Response -> " + atcmdresponse);
atcmdresponse = msotad.atcommand.send("at^sics?\r");
System.out.println("Response -> " + at^sics?
^SICS: 0,"conType","GPRS0"
^SICS: 0,"alphabet","0"
^SICS: 0,"user",""
^SICS: 0,"passwd","*****"
^SICS: 0,"authMode","PAP"
^SICS: 0,"apn","internet"
^SICS: 0,"inactTO","20");
atcmdresponse = msotad.atcommand.send("at^sici=0\r");
System.out.println("Response -> " + at^sici=0
^SICI: 0,0,0,"0.0.0.0"0 <- missing cr & lf);
atcmdresponse = msotad.atcommand.send("at^siss=0,srvType,\""+server_type_send+"\" \r");
System.out.println("Response -> " + atcmdresponse);
atcmdresponse = msotad.atcommand.send("at^siss=0,conId,\""+connection_profile_id+"\" \r");
System.out.println("Response -> " + atcmdresponse);
atcmdresponse = msotad.atcommand.send("at^siss=0,alphabet,\"1\" \r");
System.out.println("Response -> " + atcmdresponse);
atcmdresponse = msotad.atcommand.send("at^siss=0,address,\"" +mail_server+ "\"\r");
System.out.println("Response -> " + atcmdresponse);
atcmdresponse = msotad.atcommand.send("at^siss=0,smRcpt,\"" +e_mail+ "\"\r");
System.out.println("Response -> " + atcmdresponse);
atcmdresponse = msotad.atcommand.send("at^siss=0,smSubj,\"" +subject+ "\"\r");
System.out.println("Response -> " + atcmdresponse);
atcmdresponse = msotad.atcommand.send("at^siss?\r");
System.out.println("Response -> " + at^siss?
^SISS: 0,"srvType","Smtp"
^SISS: 0,"conId","0"
^SISS: 0,"alphabet","1"
^SISS: 0,"address","mail.server"
^SISS: 0,"user",""
^SISS: 0,"passwd","*****"
^SISS: 0,"smFrom","name@server"
^SISS: 0,"smRcpt","name@server"
^SISS: 0,"smCC",""
^SISS: 0,"smSubj","Just a test"
^SISS: 0,"smHdr",""
^SISS: 0,"tcpPort","25"
^SISS: 0,"smAuth","0"
^SISS: 0,"tcpMR","10"
^SISS: 0,"tcpOT","6000"
);
atcmdresponse = msotad.atcommand.send("AT^SISO=0\r");
System.out.println("Response -> " + AT^SISO=0
0);
msotad.atcommand.send("at^sisw=0,"+e_message.length()+" \r");
System.out.println("Response -> " + at^sisw=0,7
^SISW: 0, 0, 00 <- missing cr & lf);
atcmdresponse = msotad.atcommand.send("at^sisw=0,"+e_message+" \r");
System.out.println("Response -> " + at^sisw=0,message
+CME ERROR: invalid index);
atcmdresponse = msotad.atcommand.send("at^sisi=0 \r");
System.out.println("Response -> " + at^sisi=0
^SISI: 0,3,0,0,0,00 <- missing cr & lf);
atcmdresponse = msotad.atcommand.send("at^sisi? \r");
System.out.println("Response -> " + at^sisi?
^SISI: 0,3,0,0,0,00 <- missing cr & lf);
atcmdresponse = msotad.atcommand.send("at^sici=0 \r");
System.out.println("Response -> " + at^sici=0
^SICI: 0,2,1,"10.33.32.248"0 <- missing cr & lf);
atcmdresponse = msotad.atcommand.send("at^sici? \r");
System.out.println("Response -> " + at^sici?
^SICI: 0,2,1,"10.33.32.248"0 <- missing cr & lf);
Hello,
it is hard to read the log - it would be better to paste the code separately and the output separately.
The response to at^sisw=0,7 indicates that no data can be currently sent.
The response to at^sisi=0 indicates that the service is not connected but still in connecting state.
But at^sici=0 response indicates that internet connection profile is up.
I think that it would be easier to check this first without Java just issuing commands from the terminal.
After this succeeds try with Java. But please add the ATCommandResponseListener to the ATCommand instance that you are using and also print all URC's.
Regards,
Bartłomiej