Page 1 of 1

How to configure Address range parameter

Posted: Sat May 02, 2009 12:37 pm
by Thayhor
I need to receive sms from the smsc. I use the following code in the binding for address range.
client.AddrNpi = Convert.ToByte(tbAddrNpi.Text)
client.AddrTon = Convert.ToByte(tbAddrTon.Text)
client.SystemType = tbSystemType.Text
client.AddressRange = ^1234$ 'the input parameter OK or not

I cannot receive sms from Mobile Station to the number "1234". I need a sample code.

Thank you.

Posted: Sun May 03, 2009 9:24 am
by alt
Did you try without AddressRange?

Please make sure that you attached to the event
client.evDeliverSm +=new ALT.SMS.SmppClient.DeliverSmEventHandler(client_evDeliverSm);

How to configure Address range parameter

Posted: Sun May 03, 2009 2:23 pm
by Thayhor
Thank you, for your prompt attention, I usually tried it without address range parameter and still not working.

Secondly you said I should attached to:
AddHandler client.evDeliverSm, AddressOf client_evDeliverSm
My question is that how do I attached to this event. I need an illustration.
Do you mean:

Private Sub client_evDeliverSm(ByVal sender As Object, ByVal data As DeliverSm)
Dim messageText As String = SmppClient.GetMessageText(data.UserDataPdu.ShortMessage, data.DataCoding)

If data.SegmentNumber > 0 Then
... and so on
End Sub


Thirdly is the way I declare my address range okay or not.

Thank you.