Receiving Message from SMSC

Smpp v3.4 client

Moderator: alt

Chandrasekar
Posts: 2
Joined: Thu Jul 23, 2009 9:22 am
Contact:

Receiving Message from SMSC

Post by Chandrasekar » Thu Jul 23, 2009 9:26 am

Please can anyone suggest how to receive message from smsc
adrianaitken
Posts: 16
Joined: Fri May 08, 2009 1:07 pm
Location: Jersey, UK

Post by adrianaitken » Thu Jul 23, 2009 9:36 pm

http://www.inetlab.ru/support/viewtopic.php?t=565

May 12 on the topic started by me :D
Regards
Adrian

I no longer work so do not use this any more and therefore can not help you with any answers. Bye bye and good luck.
chaoraksa
Posts: 55
Joined: Wed Sep 17, 2008 7:06 am

Post by chaoraksa » Sun Aug 02, 2009 2:00 am

Hi adrianaitken!

I read your post already and i still got sms from smsc but that sms only the first part of the longsms(more than 2) and the other part got nothing and it give me

Code: Select all

Invalid DELIVER_SM packet
What should i do?

Thanks,,
Raksa
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Mon Aug 03, 2009 8:29 pm

Hi Raksa,

Sorry, I'm so overloaded this time.
But I try to solve your problem.

I need "Received Data" from your log.
Possible you disabled evReceiveData event in your code

Code: Select all

private void client_evReceiveData(object sender, byte[] data)
{
	AddToLog("Received Data: "+ByteArrayToHexString(data));
}
Can you post here this invalid packet?
chaoraksa
Posts: 55
Joined: Wed Sep 17, 2008 7:06 am

Post by chaoraksa » Tue Aug 04, 2009 1:24 am

alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Tue Aug 04, 2009 7:32 am

There are only "Sending Data:" lines, but I need "Received Data:" to analyze invalid packet.
chaoraksa
Posts: 55
Joined: Wed Sep 17, 2008 7:06 am

Post by chaoraksa » Tue Aug 04, 2009 8:57 am

Here it is

Code: Select all

3:55:14 PM: SmppClient connected
3:55:14 PM: Binding SmppClient for SystemId: xxxx
3:55:14 PM: SmppClient bound
3:55:14 PM: Bind result : system is NowSMS with status ESME_ROK
3:55:14 PM: Sending Data: 00000023000000090000000040d7bb1c3233363700323336376d61696c000034000000
3:55:14 PM: Received Data: 0000001c800000090000000040d7bb1c4e6f77534d53000210000134
3:55:55 PM: Received Data: 000000ce000000050000000000000002736d7363390001013835353938363130373533000001323336370040000000000100000099472d6765742075700a4f2d6f70656e20796f757220657965730a4f2d6f7574206f6620796f7572206265640a442d6461792068617320726973656e0a4d2d6d65727279206c6966650a4f2d6f6c6420647265616d732063756d20747275650a522d726973652024207368696e650a4e2d6e65772066726e64730a492d69646561206f66206c6966650a4e2d6e696365206675747572650a472d
3:55:55 PM: DeliverSm received :  Sequence : 2 SourceAddr : 85598610753 Coding : 0 MessageText : ine
N-new frnds
I-idea of life
N-nice future
G-
3:55:55 PM: Sending Data: 0000001180000005000000000000000200
3:55:57 PM: Received Data: 00000042000000050000000000000003736d736339000101383535393836313037353300000132333637004000000000010000000d474f4f44444159203420552120
3:55:57 PM: Sending Data: 0000001180000005000000080000000300
3:55:57 PM: Invalid DELIVER_SM packet
[/code]
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Tue Aug 04, 2009 5:09 pm

Both DELIVER_SM packets have enabled UDHI (User-Data-Header-Indicator)
but actually short_message field does not contain user data header.

How did you receive such messages?
chaoraksa
Posts: 55
Joined: Wed Sep 17, 2008 7:06 am

Post by chaoraksa » Tue Aug 04, 2009 5:25 pm

I got nothing just only one part of sms like i told u. Does it's ok with ur library or it wrong because of my code? please i really need it.


Thanks,,
Raksa
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Tue Aug 04, 2009 5:44 pm

My library tries to find user data header in the short_message and it reports
"Invalid DELIVER_SM packet" when UDH cannot be found.
It is not problem in your code.
This problem comes from SMSC side. Please ask them why they send ems_class = 0x40 (which means UDHI is enabled), but short_message field does not contain UDH.
chaoraksa
Posts: 55
Joined: Wed Sep 17, 2008 7:06 am

Post by chaoraksa » Tue Aug 04, 2009 5:57 pm

I don't know too but i try other library it can get all message. does it is problem with smsc?
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Tue Aug 04, 2009 6:08 pm

Normal concatenated message should contain information about
1) msg_ref_num
2) total segments
3) sequence number
But your packets does not have such information neither in UDH nor in SAR parameters.

I'll think how to avoid "Invalid DELIVER_SM packet" in your second case.
But it is not normal for concatenated messages.
chaoraksa
Posts: 55
Joined: Wed Sep 17, 2008 7:06 am

Post by chaoraksa » Tue Aug 04, 2009 6:31 pm

Yes I see that too when i debug ur code i don't get those 3 that why it not work. I need one thing only bec now i really need to complete my project. I just want to got all full sms(long sms) even it not concante. bec your sample can get only first message only.

Thanks,,
Raksa
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Tue Aug 04, 2009 7:41 pm

Your first message is 153 (0x99) bytes length and I believe it contains

"G-get up
O-open your eyes
O-out of your bed
D-day has risen
M-merry life
O-old dreams cum true
R-rise $ shine
N-new frnds
I-idea of life
N-nice future
G-"

and second message is 13 (0x0d) bytes length and it contains
"GOODDAY 4 U! "

And there is no sequence information. You won't be able to concatenate these messages into one message.

Are you able to combine these messages with other library?
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Tue Aug 04, 2009 9:33 pm

I've fixed "Invalid DELIVER_SM packet" problem for your examples.
But again without ability to combine these two messages. I hope you understood why I can not provide this ability.

Please download last version.
Locked