GPS中间驱动程序问题 [英] GPS Intermediate Driver Issues

查看:175
本文介绍了GPS中间驱动程序问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在GPS中间驱动程序中遇到了一些问题,我在我们的相机/ GPS硬件上添加了一个虚拟串行端口,以暴露原始NMEA数据,并且现在可以正常工作,任何需要原始NMEA数据的应用程序都可以连接到如果涉及GPS中间驱动程序,即Setting | External GPS的硬件端口设置为COM8,程序端口设置为COM7。然后,当应用程序从COM7请求数据时,数据看起来不同。我只说出现,因为我无法检查物理输出,请参阅下面的注释A.



差异似乎是返回比直接连接到COM8要慢,而且像VisualGPS这样的应用程序,虽然它们显示锁定在6颗卫星上,但不会显示3D GPS定位。只有当连接到COM8时,我才会收到一个3D GPS修复程序,这对我来说,表示Microsoft软件正在更改数据而不是简单地共享数据,因此导致希望使用该驱动程序的用户在多个应用程序间共享数据时出现问题。 p>

任何人都有关于为什么微软中间件驱动程序导致我遇到这样的问题的任何想法,似​​乎关于它的信息很少。



注意A) - WM6专业版似乎没有诊断程序,它将读取COM端口或至少将流量重定向到连接到PC的COM端口。如果任何人都可以推荐一个WM6的程序来连接和查看来自COM端口的数据,理想情况下有时间戳。或者一个程序来重定向通信,即从COM7读取,打开COM6并通过COM6发送数据。我可以将数据推送到系统中,只要没有可以找到的程序就会将数据推送出去。 我已经使用手机设备制造商来诊断这一点。他们不得不使用我们的设备和操作系统的调试版本来隔离它,即使这样它也不是一行代码(驱动程序和操作系统),这就是问题所在。我们的read方法没有超时,它是一个软件端口,它并不重要,但它是必需的。



必须添加类似这样的东西。

  if(WaitForSingleObject(driver-> GPSDataAvailableThread,driver-> GPSTimeouts.ReadTotalTimeoutConstant)!= WAIT_OBJECT_0)
{
//调试消息,没有要读取的数据
return 0; //返回0字节读取
}
//否则进行正常的读取操作。

即使超时时间为0,它也允许线程进入休眠状态并继续其他进程。问题是没有它,应用程序正在读取COM端口,导致中间层驱动程序进行调用并创建互斥锁造成开销。像pocketcointy这样的读取1字节的应用程序会导致这个问题,但SatNav软件像copilot 1024每秒读取一次没有问题。

Im having some issues with the GPS intermediate driver, I have added a virtual serial port to our Camera/GPS hardware to expose the raw NMEA data and this is now working without a problem, any application requiring raw NMEA data can connect to COM8 and receive it.

If the GPS Intermediate Driver is involved, i.e. "Setting | External GPS" has hardware port set to COM8 and program port to COM7. Then when applications request data from COM7 the data appears to be different. I only say appears as I am unable to check the physically output, see Note A below.

The difference appears to be it is returned noticeably slower than connecting to COM8 directly, but also applications like visualGPS whilst they show locked onto 6 satellites will not show a 3D GPS fix. Only when connected to COM8 will I receive a 3D GPS fix, this to me indicates the Microsoft software is changing the data rather than simply sharing it and thus causing issues for users who want to use the driver to share data across several applications.

Anyone have any ideas on why the Microsoft intermediate driver is causing me such issues, there seems to be very little information about it.

Note A) - There seems to be no diagnostic program for WM6 professional that will read COM ports or at least redirect traffic to a COM port connected to the PC. If anyone can recommend a program for WM6 to connect and view data from COM ports, ideally with timestamps. Or a program to redirect traffic i.e. read from COM7, Open COM6 and send data over COM6. I can push data into the system, just no programs I can locate will push data out.

解决方案

I have worked with the mobile device manufacturer to diagnose this. They had to use our device and a debug version of the OS to isolate it, and even then its not a line of code on either side (driver vs OS) that is the problem. Our read method does not have a timeout, being a software port it doesn't really matter but it is required.

Something like this MUST be added.

if(WaitForSingleObject(driver->GPSDataAvailableThread, driver->GPSTimeouts.ReadTotalTimeoutConstant) != WAIT_OBJECT_0)
{
   //debug message, no data to read
   return 0; //return 0 bytes read
}
//otherwise carry on a normal read operation.

Even with a timeout of 0, it allows the thread to sleep and other processes to continue. The problem was without it, applications were reading the COM port so much it was causing a overhead in the intermediate driver making calls and creating mutex locks. Applications that do many reads of 1 byte like pocketputty cause this issue, but SatNav software like copilot reading 1024 once a second have no issue.

这篇关于GPS中间驱动程序问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆