TLV Parameters getting changed while submitting

.NET library for SMPP protocol
Locked
hishhash2
Posts: 17
Joined: Mon Jan 30, 2012 11:24 am

TLV Parameters getting changed while submitting

Post by hishhash2 » Mon Feb 06, 2017 5:34 pm

Hi,

I am using the below code to add TLV parameters during the submission.

Code: Select all

IList<SubmitSmResp> resp = _client.Submit(SMS.ForSubmit()
	.From(srcAdr, srcTon, srcNpi)
	.To(dstAdr, dstTon, dstNpi)
	.Coding(coding)
	.Text(tbSend.Text)
	.ExpireIn(TimeSpan.FromDays(2))
	.DeliveryReceipt()
	.AddParameter(0x1400, "002760A9")
	.AddParameter(0x1401, "0000146D")
	.AddParameter(0x1402, "000002C3")
);
Our SMSC requires us to pass 3 TLV parameters as above. We are receiving updates from them saying that we are not passing the correct TLV values. After which we took the TCP dump using Wireshark & was able to find out that the values are getting changed. Check below for the screenshot. Please point out if I am doing anything wrong here? FYI: we have purchased the DLL version 1.1.20.0

Image

Regards,
Hisham
Attachments
TLV_parameters_tcpdump.jpg
TLV_parameters_tcpdump.jpg (148.85 KiB) Viewed 13122 times
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: TLV Parameters getting changed while submitting

Post by alt » Fri Feb 10, 2017 8:40 pm

Do you want to submit parameter value 002760A9 as byte array or as string?
hishhash2
Posts: 17
Joined: Mon Jan 30, 2012 11:24 am

Re: TLV Parameters getting changed while submitting

Post by hishhash2 » Sun Feb 12, 2017 11:58 am

I want to submit the TLV parameter values as String.
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: TLV Parameters getting changed while submitting

Post by alt » Sun Feb 12, 2017 8:18 pm

string "002760A9" in ASCII encoding is 0x3030323736304139
library didn't change the value. it has converted the string in byte array.
hishhash2
Posts: 17
Joined: Mon Jan 30, 2012 11:24 am

Re: TLV Parameters getting changed while submitting

Post by hishhash2 » Mon Feb 20, 2017 1:06 pm

alt wrote:string "002760A9" in ASCII encoding is 0x3030323736304139
library didn't change the value. it has converted the string in byte array.
Our SMSC has sent us the pcap file which they had generated from their end, to show that the additional parameter value has to be in the same format.

Basically the requirement from SMSC is that we have to sent the TLV parameters as 8 bit Hexadecimal values.
0x1400 - "2580649" Its equivalent 8 Bit Hexa decimal value is "002760A9"
0x1401 - "5229" Its equivalent 8 Bit Hexa decimal value is "0000146D"
0x1402 - "707" Its equivalent 8 Bit Hexa decimal value is "000002C3"
Attachments
inetlab_pacp_screenshot_from_smsc.JPG
inetlab_pacp_screenshot_from_smsc.JPG (92.46 KiB) Viewed 13053 times
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: TLV Parameters getting changed while submitting

Post by alt » Mon Feb 20, 2017 8:24 pm

You should use byte array:

Code: Select all

   .AddParameter(0x1400, new byte[] {0x00,0x27,0x60,0xA9})
Locked