Technical Forum

Communication / Networks

CPU 314 , CP340, TC35i SMS send impossible

Thread Starter: S44   Started: 1/18/2014 2:24 PM   Replies: 14

« Previous thread Next thread »
12» Page 1 of 2 (15 items)
  1/18/2014, 2:24 PM
Joined 12/13/2007
Last visit: 10/20/2014
Posts: 100
Rating:
Rated: Excellent [4.33 out of 5 / rated 3 time(s)]. (3) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi All, 

I am trying to set a configuration in order to send SMS message to cellphone.

My config:
CPU314c 2DP : 6es7 314 6cg03 0ab0
cp340-rs232c: 6es7 340-1ah02 0ae0
TC35i

i am using this application available on siemens web page:
"25545680_SMS_MD720_Application_V21.zip"



I follow the manual for this sample application, but never get the application working correctly, so i never been able to send any sms yet.

the only thing i was able to do is to init the GSM modem, 
i never get the "Meld".SMS.READY to 1

i checked the  GMS with hyperterminal , everything is ok , I can also send sms.


i will put in attachement my application, and i will get rid of my Phone Number in the source file SMS_meld for privacy reasons.

if some one did the same application , i will be happy to share with him, 
if you got some idea, thanks in advance.

BR












Attachment: Homesecu.zip  (5 Downloads)

Top
  1/20/2014, 6:39 AM
Joined 12/10/2013
Last visit: 1/20/2014
Posts: 6
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,
maybe you can have a try on CP341, and dont forget to set the baud over 19200
ShaunSu
Top
  1/20/2014, 6:42 AM
Joined 3/20/2013
Last visit: 10/21/2014
Posts: 481
Rating:
Rated: Excellent [4.63 out of 5 / rated 16 time(s)]. (16) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
the CP340 worked fine with me.

But i am wondering, whether the TC35i has the identicel comands to the MD720-3 with which the application works?Rnf:lblSmileyTooltip_  think

Best Regards,
Fafner
Top
  1/20/2014, 11:37 AM
Joined 12/13/2007
Last visit: 10/20/2014
Posts: 100
Rating:
Rated: Excellent [4.33 out of 5 / rated 3 time(s)]. (3) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
HI guys 

thank you for your comments, 

ShaunSu: i have set my TC35i to 9600 baud, and my cp340 also to 9600!
do you mean that i should try to set my TC35 to 19200 baud.
max baud rate for my CP340 is 9600.

i can perform a init of my TC35i, but never get any ready from the TC35.

Fafner: i was wondering the same thing. !?!?, i think that At commands are identical for both devices...

if you get more ideas, thanks in advance
BR

Top
  1/20/2014, 12:33 PM
Joined 10/8/2013
Last visit: 10/22/2014
Posts: 816
Rating:
Rated: Excellent [4.3 out of 5 / rated 43 time(s)]. (43) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello S44
i know, that the MD720 is the replacement for TC35.

But i am not sure, if the other way also works.
Does the TC35 also communicate with 8N1?

************************************************
"Meld".SMS.Ready will be true, if the INIT procedure is done without errors.
So in your case, this is not the case.

In the VAR table "Watch_MELD", theres a parameter shown called "Meld".SMS.n_state and "Meld".SMS.STATUS. What values have this variables after trigger the INIT to true?

Pittiplatsch
Top
  1/20/2014, 8:21 PM
Joined 12/13/2007
Last visit: 10/20/2014
Posts: 100
Rating:
Rated: Excellent [4.33 out of 5 / rated 3 time(s)]. (3) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
HI  Pittiplatsch,

Thanks for your expertise,

"Does the TC35 also communicate with 8N1?"
should be, it is a brand new module, and it is set with default settings 8N1
the only thing i apply via hyperterminal is the baud rate , to 9600 just to be sure.
i will check it again and let you know.

 after trigger the INIT to true:
"Meld".SMS.n_state = hex 012A
"Meld".SMS.STATUS= 0

BR


Top
  1/21/2014, 9:44 AM
Joined 10/8/2013
Last visit: 10/22/2014
Posts: 816
Rating:
Rated: Excellent [4.3 out of 5 / rated 43 time(s)]. (43) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello S44,

with this state of the variables i guess, that there is no communication between the TC35 and CP340.
If the init procedure ends without errors, n_state will be set to 298 (dec) and READY is true.

In your case, the watchdog timer was passed. This happens, if the modem does not answer in a configured time period.
==>The communication between tc35 and CP does not work (wrong baudrate, wrong cable, different syntax of the commands?).

Please check these. You said, that via hyperterminal you can send SMS with the TC35? Perhaps you can record the AT commands and compare these with the commands from the md720?

Greetings.

Pittiplatsch
Top
  1/22/2014, 1:09 PM
Joined 12/13/2007
Last visit: 10/20/2014
Posts: 100
Rating:
Rated: Excellent [4.33 out of 5 / rated 3 time(s)]. (3) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello Pittiplatsch and all, 

to resum:

- I am able to send SMS from TC35 using Hyperterminal.

- if i perform a Init from VAT table, the message goes to TC35, i can see from the Led frequency on the TC35 device that its state has change to ready to recieve SMS. 
then also " n_state" is set to 298 (dec) : condition to recieve sms 
but feedback  READY is not true in VAT Table.
->probably we can say that the communication has passed at least for both direction, and cable probably ok , 

- I check the TC35i :
baudrate :same as Cp340(9600)
Frame: Same as CP340 8N1.
cable is from siemens (delivered with the device) i believe it is ok!

-I compared the AT command bellow from  FB18 with a reference manual. 
  ->all commands are standard. 
  ->it should be the same commands for a TC35 or MD720

---------------------
Modem Init Strings
        MD720_Init := '$R$LATE0$R';         //local  dataecho off 
        MD720_ok:= '$R$LOK$R$L';            // "OK" Answer of Modem
        MD720_PIN_enter := '$R$LAT+CPIN=';  //Commando for sending PIN
        MD720_SCA_enter := '$R$LAT+CSCA=';  //SMS service center address
        MD720_PIN_query := '$R$LAT+CPIN?$R'; //query of PIN
        MD720_SIM_ready := '$R$L+CPIN: READY$R$L'; //Answer of Modem: PIN is saved in Modem and doesn´t need input
        MD720_SIM_unready := '$R$L+CPIN: SIM PIN$R$L'; //Answer of Modem: Waiting for PIN input
        MD720_SMS_Textmode := '$R$LAT+CMGF=1$R'; //Commando for setting SMS format
        MD720_Speed:='$R$LAT+IPR='; //Commando for setting local interface speed
        MD720_Memory:='$R$LAT+CPMS="MT"$R'; //Commando for setting memory storage
        SMS_Indications:='$R$LAT+CNMI=2,0,0,0,0$R';//Settings for the display of a new SMS: 2:=Buffer unsolicited result codes in the device when the link between the device
                                                                                        //and the connected application is reserved
                                                                                        // 1:=indication of the memory location is routed to the connected application using unsolicited result code +CMTI:
                                                                                        // 0:=No CBM indications are routed to the connected application.
                                                                                        // 0:=No SMS-STATUS-REPORTs are routed to the connected application.
     // SMS send Strings
        SMS_Textmode_Attr := 'AT+CSMP=17,167,0,0$R';//Settings for Text mode: 167:=SMS are saved in SMS ServiceCenter 24hours
        SMS_Telefonnr := '$R$LAT+CMGS='; //Commando for sending a SMS
        SMS_Separator := '$R$L> '; // Sign to enter SMS Text
        SMS_Sign_End := '$1A'; //Means <CTRL Z> and shows the end of the SMS Text and the Commando to send SMS to recipient
        SMS_Affirmation_Send := '$R$L+CMGS:'; //Answer of Modem that SMS was send
        SMS_CPMS:='+CPMS';//Preferred Message Storage
        
     // SMS receive Strings  
        SMS_Affirmation_Receipt:= '+CMGL';//shows that a new SMS reached Modem
        SMS_Affirmation_Read:= '+CMGR'; //String, that shows tge Beginn of reading SMS
        SMS_Readout := '$R$LAT+CMGR='; //Commando for reading out SMS
        SMS_Delete_Message := '$R$LAT+CMGD=';//Commando to delete SMS Message
        
        SMS_List:='$R$LAT+CMGL$R$L'; //command lists messages received on the GSM modem
        SMS_Delete_List:='$R$LAT+CMGD=1,4$R';//delete all messages in the ME storage
        empty := ''; 
        strReturn := '$R'; 
        strComma := ',';
        strStartSign := '"';
-----------------------------------------
-also i did the basic checking:
Block consistancey is ok.
no fault on the PLC 

If you get other ideas...

BR, 


Top
  1/22/2014, 2:16 PM
Joined 5/7/2007
Last visit: 9/5/2014
Posts: 51
Rating:
Rated: Outstanding [4 out of 5 / rated 1 time(s)]. (1) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello
do you need to also receive the SMS-messages to the PLC?.

If not then you might want to use Teleservice adapter instead of the CP card, and you can use the readily made FB48 SMS_SEND, you only need to remember to change the init-string from the TS adapter to enter the PIN code into the TC35 (AT+CPIN="XXXX").

I have written also my own software to send and receive SMS with CP340 and TC35 in the past, and this was needed to initialize the modem:
ATE0V0
AT+CPIN=0000
AT+CMGF=1

and then just send-command:

AT+CMGS=342344.....



=== Edited by ramiv @ 1/22/2014 2:32 PM [GMT ] ===


=== Edited by ramiv @ 1/22/2014 2:20 PM [GMT ] ===


Top
  1/22/2014, 2:58 PM
Joined 10/8/2013
Last visit: 10/22/2014
Posts: 816
Rating:
Rated: Excellent [4.3 out of 5 / rated 43 time(s)]. (43) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello S44,

i checked the AT commandos between TC35 and MD720 and there is a difference between these module while the initialization.

The code for MD720-3 implements the command AT+CPMS= "MT".
This does not exists with the TC35. Here, it is AT+CPMS = "SM".

The same with AT+CNMI=2,0,0,0,0 (MD720) and AT+CNMI=(0/1/3),0,0,0,0 (TC35)

Perhaps you can proof these commandos via Hyperterminal and AT+CNMI=? and AT+CPMS=? and look the answer of the modem TC35.

Greetings...

Pittiplatsch
Top
12» Page 1 of 2 (15 items)
Actions