简体   繁体   English

USB GPS 伪装成串口

[英]USB GPS pretends its a serial port

I'm trying to get data out of a USB GPS device, PL-2303.我正在尝试从 USB GPS 设备 PL-2303 中获取数据。 USB to Serial Bridge Controller. USB 到串行桥 Controller。

So I tried this.所以我尝试了这个。

sp = new SerialPort(portname, 9600, System.IO.Ports.Parity.None, 8, StopBits.One);
sp.Open();
while (sp.IsOpen)
{
string serialPortData = sp.ReadLine();
}

The connection is open - but no data is received.连接已打开 - 但未收到任何数据。 Do you think its because I'm trying to connect to a USB device by opening a serial port?你认为是因为我试图通过打开串口连接到 USB 设备吗? Or do you think its because the GPS data isn't being received?还是您认为是因为没有收到 GPS 数据?

You probably have the wrong baud rate.你可能有错误的波特率。 Try the standard settings for NMEA .尝试NMEA 的标准设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM