Access violation exception in socketListener.BindServiceNameAsync method in windows store bluetooth RFcomm app development RRS feed

  • Question

  •  private static readonly Guid RfcommChatServiceUuid = Guid.Parse("e0cbf06c-cd8b-4647-bb8a-263b43f0f974");

            private const UInt16 SdpServiceNameAttributeId = 0x100;
            private const byte SdpServiceNameAttributeType = (4 << 3) | 5;

            private const string SdpServiceName = "Bluetooth Rfcomm Chat Service";

            private StreamSocket socket;
            private DataWriter writer;
            private RfcommServiceProvider rfcommProvider;
            private StreamSocketListener socketListener; 

    here is Rfcomm intilization method

    rfcommProvider = await RfcommServiceProvider.CreateAsync(RfcommServiceId.FromUuid(RfcommChatServiceUuid));
                    socketListener = new StreamSocketListener();
                    socketListener.ConnectionReceived += OnConnectionReceived;
                   await socketListener.BindServiceNameAsync(rfcommProvider.ServiceId.AsString(),
                        SocketProtectionLevel.BluetoothEncryptionAllowNullAuthentication);/*am getting access violation exception in this line*/
                    // Set the SDP attributes and start Bluetooth advertising 

            For binding socket to RFCOMM service am getting access violation exception HRResult: 8007005                           

    • Edited by D Mahesh Wednesday, November 12, 2014 9:22 AM
    • Moved by Marvin_Guo Thursday, November 13, 2014 7:59 AM Move to a more appropriate forum
    Wednesday, November 12, 2014 9:20 AM

All replies

  • Hello Mahesh,

    Since this issue is related with windows store app, i would ask the moderator to help move it to the appropriate forum, the current form you post to is used to discuss general issues about developing applications for Windows.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, November 13, 2014 7:55 AM