如何在没有任何驱动程序的情况下从USB读取数据? [英] How to read from USB without any driver?
问题描述
我们正在创建具有GPS接收器和PC的小型系统。我们想测试我的GPS接收器,我们不想第一次去找司机。首先,我想测试我的电路是否正常工作。 GPS IC已设置为输出NMEA语句。我们需要一个仅从USB端口读取数据并将其打印在屏幕上的程序。
We are creating small system which has GPS receiver and PC. We want to test my GPS receiver, We do not want to go for a driver on the first go. First I would like to test my circuit works or nor. GPS IC has been set to output NMEA sentence. We want a program which just reads data from USB port and print it on the screen.
我们可以轻松编写这样的东西吗?我们是否有任何开源工具可以实现此目的?
Can we write something like this easily ? Do we have any open source tool which will achieve this purpose ?
平台:Windows 7
Platform : Windows 7
推荐答案
所有设备都需要一个驱动程序,因此我将解释为我如何仅使用操作系统提供的驱动程序从GPS读取NMEA数据,所以我不必写我的驱动程序。拥有吗?
All devices need a driver, so I'm going to interpret your question as "how can I read NMEA data from my GPS using only drivers provided by the OS, so I don't have to write my own?"
如果GPS芯片具有USB接口,那么您应该已经有了驱动程序。但是大多数GPS芯片都有一个UART接口,在您看来,它听起来像是连接到单独的USB-UART转换芯片上。该转换芯片很可能也附带了驱动程序,但是,如果没有,您可以跨接转换芯片的复位引脚,将其禁用,然后将TTL / RS-232电平转换器(现成的)连接到
If the GPS chip has a USB interface, then you should have gotten a driver with it. But most GPS chips have a UART interface which in your case sounds like it is connected to a separate USB-UART conversion chip. That conversion chip most likely came with a driver as well, but if not, you could jumper the reset pin of the converter chip, disabling it, and then attach a TTL/RS-232 level converter (available off-the-shelf) to the UART traces and then to your computer's serial port.
除非您怀疑USB-UART转换器的驱动程序会引起问题,否则我不会打扰。
Unless you suspect that the driver for the USB-UART converter is causing problems, I wouldn't bother.
这篇关于如何在没有任何驱动程序的情况下从USB读取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!