420 likes | 589 Views
RFID Reader 模擬器. 內容. RIFIDI Emulator LAB-1 install RIFIDI RIFIDI Alien ALR9800 LAB-2 Alien ALR9800 (Telnet, Gateway, Example Client) RIFIDI AWID MPR LAB-3 AWIDMPR (Null Modern). RIFIDI Emulator. http://www.rifidi.org/ http://sourceforge.net/project/showfiles.php?group_id=170933
E N D
內容 • RIFIDI Emulator • LAB-1 install RIFIDI • RIFIDI Alien ALR9800 • LAB-2 Alien ALR9800 (Telnet, Gateway, Example Client) • RIFIDI AWID MPR • LAB-3 AWIDMPR (Null Modern)
RIFIDI Emulator • http://www.rifidi.org/ • http://sourceforge.net/project/showfiles.php?group_id=170933 • RIFIDI Emulator • RIFIDI Designer • RIFIDI Tag Streamer
LAB-1 install RIFIDI • download rifidi-emulator-1.6.exe (18.2MB) • system requirement • Microsoft Windows 2000/XP/2003 or Linux (Ubuntu, Red Hat, SuSe) • Sun Java Runtime Environment 1.6 (J2SE 6.0) update 4 or higher
RIFIDI Alien ALR9800 • Alien 9780 / Alien 9800 • 4 antennas • EPC C1Gen1 / Gen2
Alien 9800 • 新增 Reader ALien 9800 • 新增 Tag GID-96 • Start • Telnet 127.0.0.1 20000 • username > alien • password> password
Tag Type • GID-96 : General Identifier (GID-96) • SGTIN-96: Serialized Global Trade Item Number • SSCC-96: Serial Shipping Container Code • DOD-96:United States Department of Defense.
Alien commands • get TagList • get $PROPERTY (ex. get ReaderName) • set $PROPERTY=$VALUE • set function = programmer • program tag = 30 11 22 33 44 55 66 77 88 99 AA BB • q
實習 : • 安裝 Rifidi 1.6 • 增加 Alien Reader, Tag • 使用超級終端機 或 Telnet • 觀察 Tag 的 EPC • 改變 Tag 的 EPC code
使用 Alien Gateway 連結 Reader 1. 安裝 Gateway V2.1.8
Connect • Connect 失敗 – Reader 未 start
練習 : • 安裝 Gateway • 觀察 Tag 的 EPC • 改變 Tag 的 EPC code • 改變 Tag 圖示為產品圖
練習 • 觀查 Tag 與 Gateway 活動 • 改變圖示為產品圖, 做為監控畫面 • 練習 Gateway 其他功能
Alient Client 程式 • 使用 MSWINSCK
TestAlien client program(1) Public Class Form1 Private Sub btnConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConnect.Click 'Dim strData As Object AxWinsock1.RemoteHost = Trim(txtIP.Text) AxWinsock1.RemotePort = Convert.ToDouble(txtPort.Text) AxWinsock1.LocalPort = 0 AxWinsock1.Connect() End Sub Private Sub btnDisconnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisconnect.Click AxWinsock1.Close() End Sub Private Sub AxWinsock1_DataArrival(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles AxWinsock1.DataArrival Dim strData As Object strData = "" AxWinsock1.GetData(strData, vbString, 255) txtMessage.AppendText(Trim(strData)) End Sub
TestAlien client program(2) Private Sub btnGetTagList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetTagList.Click Dim strData As Object strData = "get taglist" + Chr(13) Me.AxWinsock1.SendData(strData) End Sub Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click End End Sub Private Sub delay(ByVal delay_time As Integer) System.Threading.Thread.Sleep(delay_time * 1000) End Sub
TestAlien client program(3) Private Sub btnUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUser.Click Dim strData As Object strData = "alien" + Chr(13) Me.AxWinsock1.SendData(strData) End Sub Private Sub btnPassword_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPassword.Click Dim strData As Object strData = "password" + Chr(13) Me.AxWinsock1.SendData(strData) End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click txtMessage.Text = "" End Sub End Class
AWID Reader • MPR emulator • AWID Protocol • Checksum program
MPR emulator Client 127.0.0.1 Port: 4000 LAB-3 AWID MPR (TCP)
System Command • 4.1 SYSTEM COMMAND (0X00) ...........................................................................15 • Firmware Version (0x00) .......................................................................................15 • Temperature (0x01) ................................................................................................16 • RF Power ON (0x05) ..............................................................................................17 • RF Power OFF (0x06) ............................................................................................18 • I/Q Chip Version (0x08)..........................................................................................19 • Reader Status (0x0B) ..............................................................................................20 • Antenna 1 (0x0D)....................................................................................................23 • Antenna 2 (0x0E) ....................................................................................................24 • Antenna Switch (0x0F)............................................................................................25 • RF Power Level Control (0x12) ..............................................................................26 • Portal IDs Filter (0x13) ..........................................................................................27 • Protocol Data Rate (0x16) ......................................................................................28 • Antenna Switch Rate (0x1D) ...................................................................................29 • Write RF Power Level Control (0x32).....................................................................30 • Pulse Shaping Control (0x51) .................................................................................31 • Antenna Source (0x53)............................................................................................32 • Debug Message (0x57)............................................................................................33 • Soft Reset (0x80) .....................................................................................................34 • Stop (0x00) .............................................................................................................35
C1G2 Command • 4.9 EPC CLASS 1 GENERATION 2 COMMAND (0X20) ..........................................113 • Read Single Tag ID (0x00)....................................................................................113 • Write ID (0x03).....................................................................................................114 • Lock ID (0x05)......................................................................................................116 • Kill Tag (0x06)......................................................................................................117 • Sensitivity Control (0x07)......................................................................................118 • Read Block Data (0x0D) .......................................................................................119 • Write User Data (0x0F) ........................................................................................121 • Read Single Tag ID with Time-Out (0x10).............................................................122 • Single Tag Meter (0x11)........................................................................................123 • Unlock ID (0x15) ..................................................................................................124 • Read User Data (0x1D) ........................................................................................125 • Portal IDs (0x1E)..................................................................................................126 • Write Kill Code (0x1F)..........................................................................................128 • Lock Memory (0x25) .............................................................................................129 • Write Access Code (0x2F).....................................................................................130 • Unlock Memory (0x35) .........................................................................................131
MPR 2010 Protocol • 05 00 00 D8 93 Response 17 00 00 46 69 72 6D 77 61 72 65 20 56 65 72 20 33 2E 30 38 4D 3F
C1G2 Command (0x20) • Read Single Tag ID (0x00) 05 20 00 DE 75
EPC Reader Protocol • RP • LLRP
LLRP Command (1) • READER DEVICE CAPABILITIES • GET_READER_CAPABILITIES • GET_READER_CAPABILITIES_RESPONSE • READER OPERATION(RO) • ADD_ROSPEC • DELETE_ROSPEC • START_ROSPEC • STOP_ROSPEC • ENABLE_ROSPEC • DISABLE_ROSPEC • GET_ROSPECS
LLRP Command (2) • ACCESS OPERATION • ADD_ACCESSSPEC • DELETE_ACCESSSPEC • ENABLE_ACCESSSPEC • DISABLE_ACCESSSPEC • GET_ACCESSSPECS • CLIENT_REQUEST_OP • READER DEVICE CONFIGURATION • GET_READER_CONFIG • SET_READER_CONFIG • CLOSE_CONNECTION
Ex. Get readerCapabilities • BYTES (size: 11): 04 01 00 00 00 0B 00 00 00 00 00 • XML: <Message type="GetReaderCapabilities"> <RequestedData value="0"/> </Message> • GetReaderCapabilitiesResponse BYTES (size: 188): • 04 0B 00 00 00 BC 00 00 00 00 01 1F 00 0F 00 00 00 07 53 75 63 63 65 73 73 00 89 00 39 00 01 00 00 00 00 00 00 00 00 00 00 00 0E 4C 4C 52 50 5F 52 65 61 64 65 72 31 2E 34 00 8B 00 08 00 00 00 00 00 8D 00 08 00 00 00 00 00 8C 00 09 00 01 00 01 01 00 8E 00 1C 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 8F 00 47 00 00 00 00 00 90 00 3F 00 91 00 08 00 00 00 00 00 92 00 0F 00 00 94 00 0A 00 01 00 00 00 00 01 48 00 24 01 49 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 47 00 07 00 00 00
LLRP Commander • AddROSpec • EnableROSpec • StartROSpec