Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Bluetooth RFCOMM chat sample

Hello,

I would like to use the Hololens as an rfcomm server to receive messages from a paired device. I was able to transfer the functionality of this windows universal sample onto the Hololens -- that is to say, the modified server code builds and deploys to the hololens AND when I run the unedited Bluetooth Rfcomm Chat Sample on my laptop, the server running on the hololens does show up in the client window. But when I click "Connect to Selected Device" on the client, the hololens throws an error in the OnConnectionReceived(...) method on the line

socket = args.Socket

(where args is of type StreamSocketListenerConnectionReceivedEventArgs) with the error

Exception thrown: 'System.InvalidOperationException' in Assembly-CSharp.dll

Is the problem that I can't use Rfcomm on the hololens? I know that the hololens supports GATT and HID, but looking through the documentation for GATT, I did not see how I would be able to implement the functionality to send strings over bluetooth using GATT, whereas the Rfcomm chat sample seems to be exactly what I would like to do.

Thanks

Tagged:

Answers

  • Probably a bit late for answer, but maybe it would be helpful for someone.
    I faced same issue and in my case it was because of permission lack. The "manual" solution is go to "Settings -> Privacy -> Other devices" on hololens and toggle on switch button for device\app pair after first failed attempt. Some details here

  • @hololenstherapy Would you be able to share how you ported the sample project into hololens? I am working on something similar but I am trying to get bluetooth on hololens to accept GPS info from a bluetooth GPS device. Any help would be greatly appreciated.

  • edited April 2017

    @Pavel Thank you for posting that answer. I've been on this for more than a day now, and this is literally the only place where I've found someone reference the same problem, and a solution provided. For the sake of other people googleing this issue, the message from the exception was "a method was called at an unexpected time" and the error code 0x8000000e .

Sign In or Register to comment.