Questions about TGSM

I am using your TGSM component to send sms text message notification of critical error conditions from a data logger that is monitoring the condition of some railway track.

Could you tell me if the following code snippet (at the bottom of the email) is the correct way in which to send plain text messages with your TGSM and TComm components.

Also couple of questions:

From the TGSM and or TComm componets how can I,

  1. extract error code information ?
  2. obtain a unique id number for the sms message so that I can match the message stored in the GSM device with a copy of the message that is stored in a data base. I need to be able to update the data base record of the sms message as sent with its associated delivery details and or error code details.

I can see from your TGSM tutorial that we can obtain status reports of messages sent so how do I obtain,
  1. the time stamp of when the user read the sms text message
  2. details of if the sms message was actually delivered without any error
  3. delivery error details if indeed the delivery failed

With the TGSM and or TComm components how can we obtain details from the GSM device eg service connection details etc.

I am assuming the procedure GSMPhone.SendSMS(SMS) does not return until the actual message has been sent by the attached GSM device.

Is my assumption correct ?

With regards to the TSMSSubmit class what do the following properties represent and there purpose,

  1. PID,
  2. MR,
  3. VP,
  4. VPTZ,
  5. VPF,
  6. SRR,
  7. RD,
  8. RP,
  9. UDHI,
  10. WideUD,
  11. PDUType,
  12. MTI,
  13. DCS,
  14. PDU

What is the purpose of "CreateSMS" in TSMSSubmit class and how is it used.

Sorry about having so many questions but it is absolutely vital that I get this correct as persons lives may be at risk if the code that I am writing is incorrect.

Many thanks in advance

Kind Regards Grant Brown

SMS := TSMSSubmit.Create;
  for T := 0 to TxtMsg_List.Count - 1 do
    TempMsg := TstSmsMsgPtr(TxtMsg_List.Items[T]);
    if TempMsg^.Status = smsStoreForSend then
      TempMsg^.MsgStoreID := Get_AutoInc;
      TempMsg^.Time_Sent := Now();
      SMS.GSM := GSMPhone;
      SMS.DA := TempMsg^.PhoneNum;
      SMS.UD := TempMsg^.MessageText;
        TempMsg^.Status := smsSending;
        TempMsg^.Status := smsSent;
        TempMsg^.Status := smsErr;


  1. Error message is passed via exeption handling but error codes are modem dependant.
  2. modem does not provide unique number (as SCTS or so), you must generate eg. GUID. But relation between Submit and Status report you must estimate by DA, not 100% reliable.
  3. you cannot see when receipient read message, only when message was delivered!
  4. delivery code is operator dependant, actually also differs in case of roaming. No idea about codes, contact operator
  5. connection detail may be obtained via AT commands, see AT command description for particular modem
  6. SendSMS is modal function that waits until message is sent or failed
  7. TSMSSubmit properties correspond to "GSM 07.05 Phase 2/2+" names. WideUD is UTF-8 representation, see HLP
  8. TSMS2.CreateSMS creates instance of type that corresponds to PDU

All functionality is obvious from GSM_Example application. More details in complete sources (Standard version).