本文介绍了" GET_NAME"在IDeviceInformation中,wrl api不一致的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

   使用wrl api调用"get_Name"时ABI中的例程:Windows:设备:枚举:IDeviceInformation随机返回的值在"CC2650 SensorTag"之间切换。和"SensorTag 2.0"和"SensorTag 2.0"。使用我的TI SensorTag
设备。一旦IDeviceInformation对象已经创建,它似乎不会切换,但似乎系统将在最初发现时指定一个名称或另一个名称。换句话说,调用"get_Name"反复在
上相同的对象将始终返回相同的值,但它将随机地成为列出的两个中的一个(尽管出于任何原因"CC2650 SensorTag"似乎更有可能),直到设备被重新发现,配对或未配对。 



   可以说它可能是sensortag固件中的东西,但是当我在桌面上运行完全相同的代码时,问题几乎不会发生。在那里,名称始终返回为"CC2650 SensorTag"。我认为很可能在这个视频中可以看到相同的问题
我在RP的Windows设备门户的连接/蓝牙屏幕上显示了名称切换。在配对和取消配对设备时,您将看到显示的名称开关。请注意,如果我在配对/取消配对之间等待几秒钟
,似乎会发生更多事情,这就是为什么偶尔暂停视频的原因。无论如何这里是视频 -







请注意,我在包括最新版本在内的多个版本中都观察到了此行为。任何其他问题,请告诉我。谢谢......

   When using the wrl api to call the "get_Name" routine in ABI:Windows:Devices:Enumeration:IDeviceInformation the value returned randomly toggles between "CC2650 SensorTag" and "SensorTag 2.0" with my TI SensorTag device. It doesn't appear to toggle once the IDeviceInformation object is already created, but rather it seems that the system will assign one name or the other when it is initially discovered. In other words calling "get_Name" repeatedly on the same object will always return the same value but it will randomly be one of the two listed (though for whatever reason "CC2650 SensorTag" seems to be more likely) until the device is rediscovered, paired, or unpaired. 

   Arguably it could be something in the sensortag firmware but the issue virtually never happens when I run the exact same code on the desktop. There the name is always returned as "CC2650 SensorTag". I think most likely the same issue can be seen in this video I made showing the name toggling in the Connectivity/Bluetooth screen of the RP's Windows Device Portal. You'll see the displayed name switch as I pair and unpair the device. Note that it seems to happen more if I wait a few seconds between pairing/unpairing so that's why the occasional pause in video. At any rate here's the vid -

https://youtu.be/i6cSp6nK7Tc

Note that I have observed this behavior in several releases including the most recent. Any additional questions please let me know. Thanks...

推荐答案

我相信Windows会从驱动程序中获取此名称。  Ti是否提供了一个标签为何可以发布两个不同名称的详细信息?

I believe Windows gets this name from the Driver.  Does Ti offer any detail on why the one tag might post two different names?

此致

IoTGirl


这篇关于" GET_NAME"在IDeviceInformation中,wrl api不一致的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 23:43