EPC Tag Decoding problem
- We were using the following code to do SGTIN Decoding to extract the Item Reference of an Item.
byte[] byteArray = HexUtilities.HexDecode(tagId);string itemReference = string.Empty;
string companyPrefix = string.Empty;
string serialNumber = string.Empty;
if (IdentityEncoding.TryParse(byteArray, out ie))
{
if (ie.GetType() == typeof(Sgtin96Encoding))
{
Sgtin96Encoding sgtinEncoding = (Sgtin96Encoding)ie;
itemReference = sgtinEncoding.ItemReference;
companyPrefix = sgtinEncoding.CompanyPrefix;
serialNumber = sgtinEncoding.SerialNumber;
}
}
It worked great till yesterday but from today onwards, this has stopped working (The parsing fails if byte array is passed). It works fine if I use URN encoded string ("urn:epc:tag
gtin-96:0.0652642.000031.1000") but fails if I use the byte array. Can anyone help me in this regards? It seems that today's windows update created this problem.
Answers
Hi Ashish,
Go to http://www.microsoft.com/biztalk/en/us/rfid-mobile.aspx and click on "Get Details" (around the centre position of the page) .
Click on "Downloads" at the left side of page that opens up.
Click on "Sign-In" and enter your credentials for the microsoft connect site. After successful login, you should see "BizTalk RFID Mobility and Standards Pack BETA" at the bottom of the table.
Please let us know if you still face issues. Send an email to rfidsupp@microsoft.com if you are unable to login.
All Replies
Can you give the error details?
- There is no error. The output variable to the Try Parse method (ie) simply returns as NULL. The IdentityEncoding.TryParse method is not able to parse the SGTIN encoded hex string "301427D5880007C0000003E8", which I encoded using the following code:
Sgtin96Encoding encoding = new Sgtin96Encoding(Sgtin96FilterValues.AllOthers, "0652642", "000031", "1000");
string tagId = encoding.ToHexString();
This works fine if instead of Byte Array, I pass in the URN encoded string ("urn:epc:tag
gtin-96:0.0652642.000031.1000") The data seems fine. Can you try using IdentityEncoding.Parse instead of TryParse and see what exception is thrown?
- The following error is returned on using Parse method:
TimeBombExpired
" at Microsoft.SensorServices.Rfid.Utilities.Timebomb.ValidateTimebomb()\r\n at Microsoft.SensorServices.Rfid.TagDataTranslation.EncodingFactories.GetEncodingFactory(Byte header)\r\n at Microsoft.SensorServices.Rfid.TagDataTranslation.IdentityEncoding.ParseAndThrowOrReturn(Byte[] encodedValue, IdentityEncoding& decodedValue, Boolean canThrow)\r\n at Microsoft.SensorServices.Rfid.TagDataTranslation.IdentityEncoding.Parse(Byte[] encodedValue)\r\n at ...
It seems to indicate that the BizTalk RFID is expired but that's not the case. I am trying to find the latest versions of Microsoft.Rfid.ObjectModelExtensions.dll, which is not available with the BizTalk RFID installed. May be the version I have (Assembly Version - 3.7.0.0) has expired.
Any clues? Looks like you have the CTP version which has expired. You should get the Beta bits.
Please use the Beta drop from
https://connect.microsoft.com/Downloads/DownloadDetails.aspx?SiteID=65&DownloadID=11600
Looks like you are using our CTP bits, which has expired.
- Hi Ambuj... The link provided is not working... Its saying 'Page not found'.
Hi Ashish,
Go to http://www.microsoft.com/biztalk/en/us/rfid-mobile.aspx and click on "Get Details" (around the centre position of the page) .
Click on "Downloads" at the left side of page that opens up.
Click on "Sign-In" and enter your credentials for the microsoft connect site. After successful login, you should see "BizTalk RFID Mobility and Standards Pack BETA" at the bottom of the table.
Please let us know if you still face issues. Send an email to rfidsupp@microsoft.com if you are unable to login.