使用 R 序列包提取存储在 Trovan GR250 RFID 中的信息 reader

Use R serial package to extract information stored in a Trovan GR250 RFID reader

我尝试使用 R 串行包通过串行端口访问存储在 Trovan reader 中的信息。 Connexion 似乎有效,因为当 serialConnection 函数为 运行 但
时,reader 红色 LED 很快被激活 read.serialConnection 函数给出一个空字符串而不是预期的标记代码。有人有什么想法吗? link 下方的 reader 文档和 R 脚本。 非常感谢

http://www.vantro.biz/GR-250%20Computer%20Interface%20Manual.pdf

 trovan<-serialConnection(NA,port = "com1", mode =   "9600,N,8,1",translation = 'cr', handshake = 'xonxoff') 
 open(trovan)
 res<-read.serialConnection(trovan)
 close(trovan)
 res

[1]“”

library(serial)

library(radio)###have to add some waiting time between each step

trovan<-serialConnection("get_rfid", port = "COM4", mode ="9600,N,8,1", newline = 1, translation = "cr", handshake = "xonxoff") ##windows os

open(trovan)

wait(1)

write.serialConnection(trovan,"N")

wait(2.5)

res<-read.serialConnection(trovan)

close(trovan)