I try what you say and I get the same error, Error 500.
The operation complete is:
AT+CMGF=0
AT+CMGS=18
Port.Write sCadena
Port Write Chr(26)
AT+CMGS:ERROR 500
Do you have any idea more?
Thank you
Main Topics
Browse All TopicsHello, I'm developing a program to send SMS through a mobile phone (Siemens C45), this phone doesn't support Text Mode so I have to use PDU Mode. I send this string to the phone:
'SCA
sCadena = sCadena & "00"
'PDU Type
sCadena = sCadena & "11"
'Message Reference
sCadena = sCadena & "00"
'Destination Phone
sCadena = sCadena & "07" & "81" & "56177465F5"
'Protocol Identifier
sCadena = sCadena & "00"
'Data Coding Scheme
sCadena = sCadena & "00"
'Validity Period
sCadena = sCadena & "AA"
'Datos
sCadena = sCadena & "04" & "C8273308"
I get the Error=500. Why?? There is some Routine to convert a SMS to PDU Mode?? Can anyone help me??
Thank you
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Here's mine in RatScript :-
(* PDU Routines *)
function makeNumber(telNr string) as
var str string;
var i,j,leng numeric;
do
(* assumes international + number *)
if §telNr startswith '+' then let telNr be §telNr after '+'; fi;
(* make up the actual encoding *)
let leng be Length(§telNr);
let str be stringToHex(Char(§leng)) & '91';
for i from 1 to (§leng+1) div 2 do
(* first character is the second *)
let j be (§i-1)*2+2;
if §j>§leng then
call Append(§str,'F');
else
call Append(§str,§telNr[§j]);
fi;
(* second character is always the first *)
let j be (§i-1)*2+1;
call Append(§str,§telNr[§j]);
od;
return §str;
od;
function makeMessage(message string; validity string) as
var mymess string;
do
if §charset='8859-1' then
(* encode in 8-bit *)
let mymess be toansi(§message);
if Length(§mymess)>140 then
call Throw('5568: Message too long ' & Length(§mymess));
fi;
return '04' & §validity & stringToHex(Char(length(§m
else
(* default GSM 7 bit *)
let mymess be togsm7(§message);
if Length(§mymess)>140 then
call Throw('5568: Message too long ' & Length(§mymess));
fi;
return '00' & §validity & stringToHex(Char(length(§m
fi;
od;
function makePDU(telNr,message string; var leng numeric) as
var pdu string;
do
(* make up a hex string for the pdu *)
let pdu be '001100' & makeNumber(§telNr) &
'00' & makeMessage(§message,'AA')
(* return in leng the number of REAL bytes *)
(* the first zero byte does not count *)
let leng be (Length(§pdu) div 2)-1;
return §pdu;
od;
Notes
togsm() converts to 7-bit chars (one per byte)
gsmPack() converts 7-bit chars (one per byte) to packed format
numeric is a generic type for integer types and reals
ETSI standards 03.38, 03.40 and 07.05 describe it. It is a PITA, but the information is there. I wrote PDU in VB many years ago from these documents, converting text to PDU.
Most GSM modems now support AT+CMGF=1, so the code's not so relevant now unless you want to send binary data!
Simon
www.tdc.co.uk
Hi All,
I use Siemens TC35 GSM Module. I have to use this as an modem to dial up an ISP, then connect to an Internet connection & then transmit data to an particular website. These datas are then manipulated using the IIS server.
Now tell me, How to I dialup an ISP & provide the Username & password & rest other acknowledgements.
Also is that possible of sending the direct data calls to an other GSM Module & read the datas from them, If so How to do the data calls & how to recive them.
If using the GPRS can we directly connect to the website(IP address), as soon as the GPRS mopdule is switched ON. If so what are the steps to do so??
Pls help me with the source code available or with the Hints or steps to be done.
Its very urgent so pls help me out.
Thanks in advance.
You can contact me at my mail ID somu@softcrylic.com
Regards,
somasundaram.J
somu@softcrylic.com
Hi All,
well i am using SIEMENS SL45i it is also support only PDU mode i am facing problem the conversion of destination number to PDU mode can some one tell me the exact method to convert or any resource, or can some one tell me the excat string of AT+CMGS if the mob number where i wanna send sms is
+923006660933
+92 is our country code (Pakistan)
300 is mobilink code which is 0300
6660933 is the destination mob number.
0001000B812903606690F30000
is a PDU, message is "SMS Message" - created using PDUSpy.
Simon
www.tdc.co.uk
Hi SimonTay,
What will be the number for AT+CMGS=?? in case of my string
i am entered only
at+cmgs=23
>0001000B812903606690F3000
+CMS ERROR: 21
and one more thing the balance in my SIM card is Zero ;) will it cause any problem or i should charge it at first.
Waiting for furthur assistance very badly,
Zahid
Business Accounts
Answer for Membership
by: _nn_Posted on 2003-08-05 at 01:31:03ID: 9078297
> 'Destination Phone
> sCadena = sCadena & "07" & "81" & "56177465F5"
Prueba con
sCadena = sCadena & "09" & "81" & "56177465F5"
The length field is wrong, should be the number of digits.