Link to home
Start Free TrialLog in
Avatar of JackMartin
JackMartin

asked on

Problem with sending sms with hyperterminal a pc connected to T39m via Irda

Hi there,

I can't send sms using at command from my pc connected to T39m via Infrared.
as you know T39m works only in pdu.

the sample is:

AT+CMGS=18<Enter>
> 0001000B919021330726F0000005F4F29CEE02<ctrl-z>

and return result is +CMS ERROR: 500

I can't figure out what is the problem? and how to solve it!

I will appreciate your help.

Best regards,

Jack
Avatar of joghurt
joghurt

I presume you've sent AT+CMGF=0 before.

You've probably converted the phone number with a mistake:
0B means a length of 11 digits (91 for international format), so you've got 0921330726x [x indicating a character missing before 'F'].

As the total length of the PDU is 38 charachters, you've got another character missing.

Check this out:
http://www.dreamfabric.com/sms/
I've meant 0912337062x
The answer you will find on http://www.gsm-modem.de/sms.html
and http://www.gsm-modem.de/gsm-modem-faq.html may be.

Best regards
Meff
Do you know the software PDUSPY on http://www.nobbi.com/pduspy.htm ?
Text from the website:
After lots of people have asked for it (and I do not really want to hear any more requests for it), I made this little manual for PDUspy.
Please keep in mind that PDUspy is a highly technically oriented tool, that will help you understand what is inside a short message, and that will enable you to create short messages that will do some very strange things.
You may as well use PDUspy as a every-day-tool to send out messages, but you should have a basic understanding of the parameters which could be achieved by reading (and understanding!) chapter 9 of 3GPP TS 23.040 (Technical realization of the Short Message Service). Download it at http://www.3gpp.org.
Regards
Meff
Avatar of JackMartin

ASKER

Dear Sirs,

I think I could make sms pdu string. I check it with pduspy and it decods it correctly.

here is a sample: 0691891901500031000B819021330726F000000B0CC8F71D14969741F977FD07

but in hyperterminal is the following error

at+cmgs=31<cr>
> 0691891901500031000B819021330726F000000B0CC8F71D14969741F977FD07<ctrl-z>
+CMS ERROR: 304

and also:

at+cmgs=1f<cr>
ERROR

so what is the correct length of following pdu string and is there any algorithm?

Thank you very much.
Many phones don't support SMSC within the PDU.
So leave it out and use 0001500031000B819021330726F000000B0CC8F71D14969741F977FD07 instead.
of course my phone supports SMSC number in pdu format

for example the following is return ok.

at+cmgs=15
> 0691891901500031E90B819021330726F000000B0131<ctrl-z>
+CMGS: 204

OK

but your samples return error:

at+cmgs=1c<cr>
ERROR
at+cmgs=28<cr>
> 0001500031000B819021330726F000000B0CC8F71D14969741F977FD07<ctrl-z>
+CMS ERROR: 500
at+cmgs=29<cr>
> 0001500031000B819021330726F000000B0CC8F71D14969741F977FD07<ctrl-z>
+CMS ERROR: 304

the real queastion is how we can I pass length of pdu string to cmgs at command? and then length of pdu string have to be in hex or integer?
and finally what is the length of following pdu string?

0691891901500031000B819021330726F000000B0CC8F71D14969741F977FD07

ASKER CERTIFIED SOLUTION
Avatar of joghurt
joghurt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you very much.

I've never set UDHI flag, as I know it is a name for bit 6. and 0x31 is equall to 110001 so bit 6 sets to zero.

and 0x31 means:

MESSAGE HEADER FLAGS      (0x31)
      MESSAGE TYPE :      SMS SUBMIT
      REJECT DUPLICATES :      NO
      VALIDITY PERIOD :      RELATIVE
      REPLY PATH :      NO
      USER DATA HEADER :      NO UDH                              <<<----- look at it UDH doesn't set
      REQ. STATUS REPORT :      YES
      MSG REFERENCE NR. :      0 (0x00)


The "type of number" field is set to 0x81 although it works but you are right it is better to use the national format or even international one.

unfortunately I found a document sms_pdumode.pdf with title: "Developer’s Guide: SMS with the SMS PDU-mode" in page 6 they wrote "81H: the following number is national". so I used that. after your message i tried to find something better and in ericsson I found the following:

<type>       Description

128       Unknown numbering plan, national / international number unknown
129       ISDN / telephony numbering plan, national/international unknown
145       ISDN / telephony numbering plan, international number
161       ISDN / telephony numbering plan, national number

and all shows you are right.

Thank you very much for your help and time.

Hello jackmartin,
                       I am using Sony ericson T100 to communicate with my Hyperterminal if I type AT it is not responding with OK , So can U please send me the settings requirement for Hyperterminal.
Thanking You,
Sundeep.
Hi Sundeep,

first of all you need to install required software driver for Sony ericson T100. may you can find in CD package  or sony-ericsson web site.
Hi J'Martin,

       I am really Sorry Sorry for the delay........

        Initially I tried with Sony but later switched to Nokia.

        I am sandy here,my intention is to access my mobile(Nokia 3310)using serial port(F-bus). I have written a program for that with port settings(115200 bps) , and i am sending a command to access serial number of my mobile,  it is responding, but I am not able to get the entire data. I am confirmed with the working of the caable b'caus it is communicating using Oxygen2 software.Here is copy of my programme, please help me.. . . . . .  

        program :
#include<stdio.h>
#include<conio.h>
baud();

int comp=0x3f8;
int a[16]={0x1e,0x00,0x0C,0xd1,0x00,0x07,0x00,0x01,0x00,0x03,0x00,0x01,0x60,0x00,0x72,0xd5};
int d[200],k=0;

main()
{
    int i,j,l;
     clrscr();
     baud();
     printf("\n entered serial communication\n\t\t\t\t");
  for(j=0;j<16;j++)
{
outportb(comp,a[j]);
while((inportb(comp+5)&0x01)==1)// waiting for data arrival form mobile.
{
d[k++]=(inportb(comp));
printf("%x",d[--k]);
}
}
getch();
}

//;;;;subroutine for generating the baud rate
baud()
{
outportb(comp+3,0x83);
outportb(comp+1,0x00);
outportb(comp,0x01);
outportb(comp+3,0x03);
}


I have samsung mobile phone
i just want to send a sms in text format through hyper terminal.
I have spend a week. I checked expert exchange. No solution
please help me
the mobile simply gives an arrow symbol and does not respond to CTRL-Z
what to do? It is amazing i got stuck here for a week now. please any body, please help me.
I am desperate.
nainskum2: Can you copy all your commands here?