我正在使用EMDKv2.3在Visual Studio2008的C#中开发一个应用程序,以便使用集成在Windows Mobile6.1的HandHeld MC9090G中的RFID读取器来读取标签。我已经阅读了执行此任务的文档,但当我运行代码时,它抛出异常,我找不到原因。我正在使用Symbol.RFID3程序集。
当我使用
1)抛出异常:"OperationFailureException“
string hostname = "localhost";//localhost because the RFID reader is included in the HandHeld
RFIDReader rfid3 = new RFIDReader(hostname, 0, 0);
rfid3.Connect(); // line that throws the Exception2)抛出异常:"InvalidUsageException“
string hostname = "localhost";//localhost because the RFID reader is included in the HandHeld
RFIDReader rfid3 = new RFIDReader(hostname, 5084, 10);
rfid3.Connect(); //line that throws the Exception"对原因有什么想法吗?
发布于 2013-02-07 06:29:49
第一个错误,因为您没有连接到端口0。使用第二个。我建议尝试127.0.0.1而不是localhost。您还应该仔细检查RFID组件正在侦听的端口是否确实是5084。您当前指定的超时时间太短。尝试10000毫秒,而不是10毫秒。最后,RFID组件需要运行。
https://stackoverflow.com/questions/14505827
复制相似问题