如何在HoloLens和MQTT代理之间建立连接?

时间:2019-05-12 12:55:00

标签: mqtt hololens windows-mixed-reality

我对HoloLens开发非常陌生。因此,如果这是一个业余问题,请原谅。我目前正在将HoloLens的手势检测结果传输给外部MQTT经纪人。

我的用例是,当我检测到来自HoloLens的手触摸时,我需要向MQTT代理中的订阅主题发送(发布)消息。

我在GitHub(https://github.com/gpvigano/M2MqttUnity)上找到了此示例。这将发布消息,但没有收到任何消息。我收到以下错误。

Connected to iot.eclipse.org:1883...

(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Test message published

(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

'M2MqttUnity.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\M2MqttUnityVS.Release_x86.per287\System.Diagnostics.StackTrace.dll'. Cannot find or open the PDB file.
Exception thrown: 'System.InvalidOperationException' in Assembly-CSharp.dll
Exception thrown: 'uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException' in Assembly-CSharp.dll
Exception thrown: 'System.AggregateException' in System.Private.CoreLib.ni.dll
The thread 0x13b8 has exited with code 0 (0x0).
The thread 0xfdc has exited with code 0 (0x0).
The thread 0x700 has exited with code 0 (0x0).
The thread 0x179c has exited with code 0 (0x0).
Exception thrown: 'uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException' in Assembly-CSharp.dll
Failed to connect to iot.eclipse.org:1883:
uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException: Exception of type 'uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException' was thrown.
at uPLibrary.Networking.M2Mqtt.MqttClient.SendReceive(Byte[] msgBytes, Int32 timeout)
at uPLibrary.Networking.M2Mqtt.MqttClient.SendReceive(MqttMsgBase msg, Int32 timeout)
at uPLibrary.Networking.M2Mqtt.MqttClient.Connect(String clientId, String username, String password, Boolean willRetain, Byte willQosLevel, Boolean willFlag, String willTopic, String willMessage, Boolean cleanSession, UInt16 keepAlivePeriod)
at M2MqttUnity.M2MqttUnityClient.d__38.MoveNext()

(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

是否有人在存储库之前尝试过此操作,或者对此错误是什么有任何想法?

0 个答案:

没有答案