Page 1 of 1

I got Error when send sms over the Default 140 character...

Posted: Sat Oct 04, 2008 3:27 am
by chaoraksa
Hi!
I got an error message when i send Text more than 140 character ( The Default ). How to Fix it. I want to send 160 Character.

Thanks in advanced.

Bad thing happen...

Posted: Tue Oct 07, 2008 10:06 am
by chaoraksa
hi!
The bad thing i got is all sms Queue in my SMSC and get some Unreadable text. Please help me
:roll:

Posted: Tue Oct 07, 2008 2:36 pm
by NickAskew
Hi


I use this to send:

Dim sp As New SubmitSm(m_ServiceType, m_SourceAddrTon, m_SourceAddrNpi, SourceMobileNum, m_DestAddrTon, m_DestAddrNpi, DestMobileNum)

sp.DataCoding = m_DataCoding ' = 0 (the default encoding)

sp.ShortMessageBytes = SmppClient.GetMessageBytes(TextMessageBody, DirectCast(sp.DataCoding, Byte))

How are you constructing your message?

Regards
Nick

I got this...

Posted: Wed Oct 08, 2008 2:06 am
by chaoraksa
Thank for your response.
In Log of the InetLab sample
Hex:
000000b3000000040000000009140f18000000313233000101313233004000000000000000008c0500035a04036c69766572656420616e79776865726520617320616c6c2074686520726573706f6e73657320617265206f6e6c79206d6164652d7570206279207468652053696d756c61746f722e205468652053696d756c61746f7220616c736f20737570706f727473206d756c7469706c6520636f6e6e656374696f6e3b207468652061757468656e7469

Text:
³ 123123@ŒZlivered anywhere as all the responses are only made-up by the Simulator. The Simulator also supports multiple connection; the authenti

In Logica SMSC Simulator

Text:

♣ ♥Z♦♥livered anywhere as all the responses are on
ly made-up by the Simulator. The Simulator also supports multiple connection; the authenti

Posted: Wed Oct 08, 2008 6:45 am
by alt
this packet has User Data Header in the short message field
♣ ♥Z♦♥ means
05 UDH length
00 IEI Concatenated short messages, 8-bit reference number
03 IEI length
5a reference number
04 Maximum number of short messages in the concatenated short message
03 Sequence number of the current short message

why i got an unreadable message....

Posted: Thu Oct 09, 2008 1:05 am
by chaoraksa
Thanks!!!
but i got and unreadable message from SMSC and see MMS at SMSC that Queue at my SMSC. What was that??? :wink:

Posted: Thu Oct 09, 2008 3:47 pm
by alt
Please show us your code.

I use your code....

Posted: Fri Oct 10, 2008 1:13 am
by chaoraksa
public void sendSMS(string to, string body)
{
Body = body;
if (body.Length > 160)
{
body = Body.Substring(0, 150);
if (body.LastIndexOf(' ') > 0)
{
body = body.Substring(0, body.LastIndexOf(' '));
body = body + " Con...";
client.SubmitText(SubmitMode.ShortMessage, byte.Parse("0"), byte.Parse("1"), "120",
byte.Parse("0"), byte.Parse("1"), to, DataCodings.Default, body);
body = Body.Substring(body.Length - 6, 150);
client.SubmitText(SubmitMode.ShortMessage, byte.Parse("0"), byte.Parse("1"), "120",
byte.Parse("0"), byte.Parse("1"), to, DataCodings.Default, body);
}
}
else
{
client.SubmitText(SubmitMode.ShortMessage, byte.Parse("0"), byte.Parse("1"), "120",
byte.Parse("0"), byte.Parse("1"), to, DataCodings.Default, body);
}
}

Posted: Fri Oct 10, 2008 5:45 am
by alt
Could you try last version with code

client.SubmitText(SubmitMode.ShortMessage, byte.Parse("0"), byte.Parse("1"), "120",
byte.Parse("0"), byte.Parse("1"), to, DataCodings.Default, body);

or

client.SubmitText(SubmitMode.Payload, byte.Parse("0"), byte.Parse("1"), "120",
byte.Parse("0"), byte.Parse("1"), to, DataCodings.Default, body);

Could you find out maximum length you can send without artefacts?