Difference between revisions of "Northwind Using Emulator"

From RifidiWiki

Jump to: navigation, search
m (Reverted edits by Amesycyxa (Talk); changed back to last version by Kyle)
 
Line 1: Line 1:
----
+
This is Step 2 in the [[Northwind Tutorial|Northwind Application Tutorial]]<br>
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
+
Previous Step: [[Northwind Creating the Application | Step 1: Create the Application]]<br>
----
+
=[http://ynejynezex.co.cc Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly]=
+
----
+
=[http://ynejynezex.co.cc CLICK HERE]=
+
----
+
</div>
+
This is Step 2 in the [[Northwind Tutorial|Northwind Application Tutorial]]&lt;br&gt;
+
Previous Step: [[Northwind Creating the Application | Step 1: Create the Application]]&lt;br&gt;
+
 
Next Step: [[Northwind Esper: Track Packages| Step 3: Esper: Track Packages]]
 
Next Step: [[Northwind Esper: Track Packages| Step 3: Esper: Track Packages]]
 
===What You Will Learn===
 
===What You Will Learn===
Line 16: Line 8:
 
Rifidi Emulator is a developer tool that emulates the interfaces of many popular RFID readers.  It can be used to speed up development of RFID applications, since you can write applications that talk to RFID readers without the need for access for a physical reader.  To get Rifidi Emulator up and running follow the steps in the [[Emulator User's Guide]].
 
Rifidi Emulator is a developer tool that emulates the interfaces of many popular RFID readers.  It can be used to speed up development of RFID applications, since you can write applications that talk to RFID readers without the need for access for a physical reader.  To get Rifidi Emulator up and running follow the steps in the [[Emulator User's Guide]].
  
For the purposes of this tutorial, create two Alien ALR readers.  The first reader will represent the Dock Door.  Assign it IP address &lt;tt&gt;127.0.0.1:20000&lt;/tt&gt; The second reader will represent the weigh station.  Asssing it &lt;tt&gt;127.0.0.1:20001&lt;/tt&gt;.  Create a few tags (does not matter which kind).  Drag and drop the tags onto the antenna.  Start the readers.
+
For the purposes of this tutorial, create two Alien ALR readers.  The first reader will represent the Dock Door.  Assign it IP address <tt>127.0.0.1:20000</tt> The second reader will represent the weigh station.  Asssing it <tt>127.0.0.1:20001</tt>.  Create a few tags (does not matter which kind).  Drag and drop the tags onto the antenna.  Start the readers.
  
Instead of creating the readers yourself, you can load the configuration from [[Image:Northwind-emulator.rfts.zip| this file]].  Simply unizp it and choose File-&gt;Open IDE Configuration and choose the rtfs file.
+
Instead of creating the readers yourself, you can load the configuration from [[Image:Northwind-emulator.rfts.zip| this file]].  Simply unizp it and choose File->Open IDE Configuration and choose the rtfs file.
  
 
[[Image:Tutorial-Emulator.png|thumb|none|600px]]
 
[[Image:Tutorial-Emulator.png|thumb|none|600px]]
Line 28: Line 20:
  
 
Once the edge server is up and going, type the following commands into the console:
 
Once the edge server is up and going, type the following commands into the console:
#&lt;tt&gt;readertypes&lt;/tt&gt; - This lists the kind of reader adapters available.  You should see one called &lt;tt&gt;Alien&lt;/tt&gt;
+
#<tt>readertypes</tt> - This lists the kind of reader adapters available.  You should see one called <tt>Alien</tt>
#&lt;tt&gt;createreader Alien&lt;/tt&gt; - This makes a new instance of a reader configuration with the default properties (including the IP &amp; port, which by default is &lt;tt&gt;127.0.0.1:20000&lt;/tt&gt; for the Alien).  This will connect to the Dock Door, for the purposes of this demo.  You should see output indicating the sensor was created along with it's ID (probably &lt;tt&gt;Alien_1&lt;/tt&gt;).
+
#<tt>createreader Alien</tt> - This makes a new instance of a reader configuration with the default properties (including the IP & port, which by default is <tt>127.0.0.1:20000</tt> for the Alien).  This will connect to the Dock Door, for the purposes of this demo.  You should see output indicating the sensor was created along with it's ID (probably <tt>Alien_1</tt>).
#&lt;tt&gt;readers&lt;/tt&gt; -  This lists the created readers.  You should see your reader listed here.
+
#<tt>readers</tt> -  This lists the created readers.  You should see your reader listed here.
#&lt;tt&gt;createsession Alien_1&lt;/tt&gt; -  This creates a session that you will use to connect to Dock Door Reader.
+
#<tt>createsession Alien_1</tt> -  This creates a session that you will use to connect to Dock Door Reader.
#&lt;tt&gt;commandtypes&lt;/tt&gt; - This lists the available kind of commands you can execute.
+
#<tt>commandtypes</tt> - This lists the available kind of commands you can execute.
#&lt;tt&gt;createcommand Alien-Poll&lt;/tt&gt; -  Like &lt;tt&gt;createreader&lt;/tt&gt; this creates a new configuration with default properties, except this time its a command configuration.
+
#<tt>createcommand Alien-Poll</tt> -  Like <tt>createreader</tt> this creates a new configuration with default properties, except this time its a command configuration.
#&lt;tt&gt;executecommand Alien_1 1 Alien_Poll_1 1000&lt;/tt&gt; -  This tells the edge server to schedule a Alien_Poll command on session 1 of Alien_1 once every second.
+
#<tt>executecommand Alien_1 1 Alien_Poll_1 1000</tt> -  This tells the edge server to schedule a Alien_Poll command on session 1 of Alien_1 once every second.
#&lt;tt&gt;startsession Alien_1 1&lt;/tt&gt; - This tells the session to make the TCP/IP connection to the Dock Door Reader.  At this point you should see activity on the console of the emulator.
+
#<tt>startsession Alien_1 1</tt> - This tells the session to make the TCP/IP connection to the Dock Door Reader.  At this point you should see activity on the console of the emulator.
#&lt;tt&gt;createreader Alien Port 20001&lt;/tt&gt; - This makes a new instance of a reader configuration that connects to &lt;tt&gt;127.0.0.1:20001&lt;/tt&gt; (which is the weigh station, for the purposes of this demo).
+
#<tt>createreader Alien Port 20001</tt> - This makes a new instance of a reader configuration that connects to <tt>127.0.0.1:20001</tt> (which is the weigh station, for the purposes of this demo).
#&lt;tt&gt;createsession Alien_2&lt;/tt&gt; - This creates a session that you will use to connect to Weigh Station Reader.
+
#<tt>createsession Alien_2</tt> - This creates a session that you will use to connect to Weigh Station Reader.
#&lt;tt&gt;executecommand Alien_2 1 Alien_Poll_1 1000&lt;/tt&gt; - You can execute the command that you've previously created on the second session.
+
#<tt>executecommand Alien_2 1 Alien_Poll_1 1000</tt> - You can execute the command that you've previously created on the second session.
#&lt;tt&gt;startsession Alien_2 1&lt;/tt&gt; - This tells the session to make the TCP/IP connection to the Weigh Station Reader.   
+
#<tt>startsession Alien_2 1</tt> - This tells the session to make the TCP/IP connection to the Weigh Station Reader.   
#&lt;tt&gt;save&lt;/tt&gt; - This saves the configurations so that you don't have to type all these commands again.
+
#<tt>save</tt> - This saves the configurations so that you don't have to type all these commands again.
  
 
Once you make sure this configuration is working, you can stop the sessions for now.  Just type  
 
Once you make sure this configuration is working, you can stop the sessions for now.  Just type  
# &lt;tt&gt;stopsession Alien_1 1&lt;/tt&gt; - Stop the Dock Door Reader
+
# <tt>stopsession Alien_1 1</tt> - Stop the Dock Door Reader
# &lt;tt&gt;stopsession Alien_2 1&lt;/tt&gt; - Stop the Weigh Station Reader
+
# <tt>stopsession Alien_2 1</tt> - Stop the Weigh Station Reader

Latest revision as of 19:40, 26 November 2010

This is Step 2 in the Northwind Application Tutorial
Previous Step: Step 1: Create the Application
Next Step: Step 3: Esper: Track Packages

What You Will Learn

  • Using Rifidi Emulator to speed up RFID development.
  • Controlling the edge server from the command line.

Running Rifidi Emulator

Rifidi Emulator is a developer tool that emulates the interfaces of many popular RFID readers. It can be used to speed up development of RFID applications, since you can write applications that talk to RFID readers without the need for access for a physical reader. To get Rifidi Emulator up and running follow the steps in the Emulator User's Guide.

For the purposes of this tutorial, create two Alien ALR readers. The first reader will represent the Dock Door. Assign it IP address 127.0.0.1:20000 The second reader will represent the weigh station. Asssing it 127.0.0.1:20001. Create a few tags (does not matter which kind). Drag and drop the tags onto the antenna. Start the readers.

Instead of creating the readers yourself, you can load the configuration from File:Northwind-emulator.rfts.zip. Simply unizp it and choose File->Open IDE Configuration and choose the rtfs file.

Tutorial-Emulator.png

Connecting to Emulator from the Edge Server

There are two ways (currently) to create a connection to a reader using the edge server. One is to use Workbench.

However, when developing applications on the edge server, it is often quicker to use the Edge Server Console.

Once the edge server is up and going, type the following commands into the console:

  1. readertypes - This lists the kind of reader adapters available. You should see one called Alien
  2. createreader Alien - This makes a new instance of a reader configuration with the default properties (including the IP & port, which by default is 127.0.0.1:20000 for the Alien). This will connect to the Dock Door, for the purposes of this demo. You should see output indicating the sensor was created along with it's ID (probably Alien_1).
  3. readers - This lists the created readers. You should see your reader listed here.
  4. createsession Alien_1 - This creates a session that you will use to connect to Dock Door Reader.
  5. commandtypes - This lists the available kind of commands you can execute.
  6. createcommand Alien-Poll - Like createreader this creates a new configuration with default properties, except this time its a command configuration.
  7. executecommand Alien_1 1 Alien_Poll_1 1000 - This tells the edge server to schedule a Alien_Poll command on session 1 of Alien_1 once every second.
  8. startsession Alien_1 1 - This tells the session to make the TCP/IP connection to the Dock Door Reader. At this point you should see activity on the console of the emulator.
  9. createreader Alien Port 20001 - This makes a new instance of a reader configuration that connects to 127.0.0.1:20001 (which is the weigh station, for the purposes of this demo).
  10. createsession Alien_2 - This creates a session that you will use to connect to Weigh Station Reader.
  11. executecommand Alien_2 1 Alien_Poll_1 1000 - You can execute the command that you've previously created on the second session.
  12. startsession Alien_2 1 - This tells the session to make the TCP/IP connection to the Weigh Station Reader.
  13. save - This saves the configurations so that you don't have to type all these commands again.

Once you make sure this configuration is working, you can stop the sessions for now. Just type

  1. stopsession Alien_1 1 - Stop the Dock Door Reader
  2. stopsession Alien_2 1 - Stop the Weigh Station Reader
Personal tools