BizTalk R2 RFID and working with a real Reader Device (Phidget)

Posted: Saturday, June 09, 2007 7:07 PM by matt
Filed under: ,

This entry discusses using a real RFID reader (Phidget) with BizTalk 2006 R2 RFID Beta 2. There are a couple of RFID samples provided with the RFID install, but they involve simulators for RFID devices. If you want to try a real RFID reader sample with BizTalk 2006 R2 RFID, read below.

Jim Bowyer, a Senior Technical Specialist for Microsoft based in Calgary, sent out a short note about an inexpensive RFID reader that has a community DSPI (Device Service Provider Interface)  for BizTalk R2 RFID.

So I ordered the RFID reader, downloaded the DSPI and then tried against my BizTalk 2006 R2 RFID Beta 2 installation.

If you want to try yourself, perform the following steps:

1) If not already done so, register for public BizTalk 2006 R2 Beta 2, then download.
Follow the instructions to install BizTalk RFID.

2) Order the PhidgetsRFID Reader (USB)

I opted to order the Phidget RFID Kit, that includes a set of read only tags.

I live in Toronto, Canada, so the total cost for the RFID kit was:

$79.99 (US)  Kit
$49.74 (US)  Shipping
$11.98 (CAN) Customs Fees
-------------------
$141.71

If you live in the States, you will probably get a cheaper total cost, for reduced shipping fees and no customs charges. I ordered the kit online on Friday, and received it the next Tuesday. So approximately 2 Business days for delivery.
 
Below is the image of what you get in the kit:

The left hand side of the picture contains the various RFID tags, and the right side is the actual RFID reader. A USB cable is also included, so you can connect the RFID reader to a free USB port on your computer.

3) Connect the Phidget RFID reader to your computer via the USB cable.

My host machine is Windows XP. The Phidget device was picked up immediately. No extra drivers etc. were needed.

As below, I have BizTalk 2006 R2 Beta 2 and BizTalk RFID installed on a Windows 2003 VMWare image.
So as below, the extra step in this case was to configure the VMWare image to pick up the Phidgets USB device.

4) Download and install the Phidget DSPI from Irving De la Cruz's Blog 

http://blogs.msdn.com/irvingd/pages/biztalk-rfid-device-provider-dspi-for-phidget-devices.aspx

The instructions provided with the download are top notch and I had it up and running within a few minutes. To install the DSPI, Irving provides a script file
or a well documented manual process using the RFID Manager console. I used the manual process to install and had only a couple of minor problems as described below:

After installing the Phidget Device provider, it would not start (received RFID Manager Error). See below:

During the configuration of Phidget Device provider, an IIS virtual directory hosting a number of  WCF services is created as below:

As below, when trying to browse to one of the services

A Service Unavailable error was reported (see below)


To fix:

On my Windows 2003 Server, WSS (Sharepoint) Services 2.0 was also present (from a previous install) along with RFID.
Therefore as below, I excluded the PhidgetProvider URL from the WSS managed paths.
Also for the PhidgetProvider Virtual Directory, I changed the Application Pool to one that runs under an Administrator account (just to get it to work). Once this was done, the PhidgetProvider would start in the RFID Manager.
To recap, if you are having problems starting the Phidget Provider, ensure that you can successfully browse without error to one of the
.svc services, before trying to start the Phidget Provider.


Another problem I had similar to the one above:
After configuring the Sql Sink Process to capture the RFID reads (using the BizTalk RFID Manager), the process would not start.
As below, another IIS virtual directory is created hosting a number of WCF services. As explained above with the PhidgetProvider service, errors were reported when trying to
browse to one of the TestProcess .svc services. Therefore as above with the PhidgetProvider URL, I excluded the TestProcess URL from the WSS managed paths
and fiddled with the permissions of the App Pool that the service was running under. When I could successfully browse to one of the .svc TestProcess
services, the TestProcess successfully started in RFID manager.

 

5) Test

After following the instructions in Irving's documentation, and the Phidget Device Provider, Phidget Device and Process to capture the reads are all enabled and have started successfully without errors (use the BizTalk RFID manager to check):
As below to test, place one of the tags within a few inches of the reader.

Then as below to see if it worked, using the RFID manager you can view the read tags with the View Tags dialog.


As above in the dialog, each tag has a unique Tag Id associated.

Final thoughts:

- Easy to set up.
- The RFID reader is inexpensive, shipping costs may be expensive though, depending on where you live.
- So far has been stable.
- A great way to prototype/experiment with BizTalk RFID and a real RFID device.

Comments

Anil

June 26, 2007 3:03 AM

Thanks for sharing this Matt. Very useful. If you want to use WSS for using Forms etc; how do we do that?

Alexander Georgiou

February 5, 2008 10:03 AM

Great information about BizTalk RFID & Phidgets! The only thing is that I cant get the two to peacefully work together.

When I try to manually install the DSPI and add a new device provider in RFID Manager, I get the following error:

Could not load file or assembly 'Microsoft.PhidgetDevices.DSPI, Version=0.9.0.0, Culture=neutral, PublicKeyToken=7b111e90aae1ee27' or one of its dependencies. The system cannot find the file specified.

Any idea on how to fix this?

matt

February 5, 2008 11:11 AM

Yes, I had the exact same problem, that you mentioned above, when I tried to get the Phidget device to run on the final Release Candidate Version of BizTalk RFID Server. That supplied DSPI dlls from Irvings download, only seem to work on the Beta 2 version. To fix do the below:

1) Irving also supplies the source DSPI code in his download.

2) Open up his DSPI source code in Visual Studio, in one of his projects (can't remember which) has couple of the dll references which are invalid. Fix the references by  removing the invalid ones and then point to the valid references. The version numbers for these invalid referenced assemblies have changed. Just find the same assemblies with new version number, (I think they were in c:\program files\BizTalk RFID server , do a search)

3) Once the references are updated with dlls with new version number, rebuild.

4) Use the dlls from you build in place of the ones that Irving supplied.

5) The Phidget DSPI should then install fine, and then you should be able to continue on and get the Phidget device to properly start reading. (At least it did when I tried).

4) Then use these dlls

Alexander Georgiou

February 5, 2008 12:17 PM

Thanks for the prompt reply Matt!

As you said, I have edited the PhidgetDSPI project and replaced the three incorrectly referenced dlls gathered from the dir: C:\Program Files\Microsoft BizTalk RFID\bin. One of them (Microsoft.PhidgetDevices.dll) was obtained from Irvings zip file. Now when I try to build this project, VS returns the following error:

The command ""%RFIDINSTALLDIR%\bin\rfidclientconsole.exe" copyproviderfile "Phidget Provider" C:\Documents and Settings\Administrator\Desktop\PhidgetPackage_Src\PhidgetDSPI\bin\Debug\Microsoft.PhidgetDevices.dll

"%RFIDINSTALLDIR%\bin\rfidclientconsole.exe" copyproviderfile "Phidget Provider" C:\Documents and Settings\Administrator\Desktop\PhidgetPackage_Src\PhidgetDSPI\bin\Debug\Microsoft.PhidgetDevices.DSPI.dll

" exited with code 1.

Have you seen/heard of this before? I am assuming that it doesn’t like the version of PhidgetDevices.dll  ?

Cheers

NB. I am running Win Server 2003 SP2

Alexander Georgiou

February 5, 2008 5:00 PM

Ok I have managed to sort it out so no need to reply to my previous post.

Thanks alot for your help though.

Vincent Scheel

May 13, 2008 8:48 AM

Hi Matt,

Recently I ordered the Phidget device as well. It should arrive tomorrow, but I already started to build a small test process. My question is as follows: After you have some reads in the database, how do you get them seperatly into BizTalk?

I used the generated schema for the "GetAndDeleteEventsForBiztalk" stored procedure and made that into an envelope. I also created a schema for seperate tag-reads with the TagIdAsHex attribute promoted. When I call the stored procedure using a SQLAdapter, it receives the tags, debatches it, but does not promote the TagIdAsHex attribute on any of the messages. Could you explain how to get the tag-reads into BizTalk as seperate messages with promoted properties (eg. TagIdAsHex).

I can't find any article on how to do this and I'm not sure what I'm doing wrong at the moment.

Thank you very much in advance,

Kind regards,

Vincent Scheel

Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS