我希望在尝试编写一个允许我从我拥有的串行磁卡读卡器读取数据的软件时得到一些帮助。
我们有这个读卡器,它是一种非常古老的设备,我们用来在我们的场地中获取会员卡的详细信息。读卡器有一个软件可以下载卡的详细信息(存储在读卡器上),然后该软件将详细信息放在 C 驱动器上的文本文件中。我想写一些软件来做同样的事情。
我可能是在叫错树或希望太多,但任何帮助都会很棒。
到目前为止,我已将读卡器连接到我机器的串行端口并运行旧版软件并使用 com 端口监视器来捕获通信。这是我有点卡住的地方,想知道是否有人可以告诉我我捕获的内容是否有用,并希望能指出我正确的方向。
当读卡器上没有存储卡信息并捕获它时,我运行了下载序列。
[12/06/2012 18:28:55] - Open port COM4
[12/06/2012 18:29:02] - Written data
31 00 01 00 00 00 32 1.....2
[12/06/2012 18:29:04] - Read data
31 00 06 00 0c 06 0c 00 00 00 00 55 1..........U
[12/06/2012 18:29:04] - Written data
33 00 01 00 00 00 34 3.....4
[12/06/2012 18:29:05] - Read data
33 00 14 00 06 03 00 00 0c 00 00 0d 00 00 42 00 3.............B.
00 43 00 00 63 00 00 00 01 51 .C..c....Q
[12/06/2012 18:29:06] - Written data
34 00 01 00 00 00 35 4.....5
[12/06/2012 18:29:08] - Read data
34 00 01 00 00 00 35 4.....5
[12/06/2012 18:29:08] - Written data
35 00 07 00 0c 06 0c 12 1c 36 00 00 be 5........6..¾
[12/06/2012 18:29:10] - Read data
35 00 01 00 00 00 36 5.....6
[12/06/2012 18:29:11] - Close port COM4
然后我刷了一张卡,读卡器将其存储在内存中并再次运行下载,这次我得到了
[12/06/2012 18:31:23] - Open port COM4
[12/06/2012 18:31:48] - Written data
31 00 01 00 00 00 32 1.....2
[12/06/2012 18:31:50] - Read data
31 00 06 00 0c 06 0c 00 00 00 00 55 1..........U
[12/06/2012 18:31:51] - Written data
33 00 01 00 00 00 34 3.....4
[12/06/2012 18:31:53] - Read data
33 00 14 00 06 03 00 00 0c 00 00 0d 00 00 42 00 3.............B.
00 43 00 00 63 00 00 00 01 51 .C..c....Q
[12/06/2012 18:31:55] - Written data
34 00 01 00 00 00 35 4.....5
[12/06/2012 18:31:57] - Read data
34 00 01 00 00 00 35 4.....5
[12/06/2012 18:31:57] - Written data
35 00 07 00 0c 06 0c 12 1f 16 00 00 a1 5...........¡
[12/06/2012 18:32:01] - Read data
35 00 01 00 00 00 36 5.....6
[12/06/2012 18:32:01] - Close port COM4
最后我刷了 3 张卡并再次运行下载并捕获了这个
[12/06/2012 18:30:21] - Open port COM4
[12/06/2012 18:30:22] - Written data
31 00 01 00 00 00 32 1.....2
[12/06/2012 18:30:24] - Read data
31 00 06 00 0c 06 0c 00 03 00 00 58 1..........X
[12/06/2012 18:30:24] - Written data
32 00 04 00 03 00 01 00 00 3a 2........:
[12/06/2012 18:30:26] - Read data
32 00 1c 00 03 00 01 00 12 1e 58 28 54 08 33 00 2.........X(T.3.
12 1e 58 28 53 96 95 00 12 1e 58 28 54 12 32 00 ..X(S–•...X(T.2.
05 07 ..
[12/06/2012 18:30:27] - Written data
33 00 01 00 00 00 34 3.....4
[12/06/2012 18:30:29] - Read data
33 00 14 00 06 03 00 01 0c 00 00 0d 00 00 42 00 3.............B.
00 43 00 00 63 00 00 00 01 52 .C..c....R
[12/06/2012 18:30:30] - Written data
34 00 01 00 00 00 35 4.....5
[12/06/2012 18:30:41] - Read data
34 00 01 00 00 00 35 4.....5
[12/06/2012 18:30:41] - Written data
35 00 07 00 0c 06 0c 12 1e 15 00 00 9f 5...........Ÿ
[12/06/2012 18:30:43] - Read data
35 00 01 00 00 00 36 5.....6
[12/06/2012 18:30:43] - Close port COM4
我所知道的是,旧版软件会检查设备是否连接到所选的 com 端口,然后下载数据,然后从读卡器中清除数据
如果它有帮助..如果我没有连接读卡器并尝试下载,我会收到此错误
命令 0x31 未发送
任何人都可以对此有所了解吗?
先感谢您。