Share via

CS_UWP_BluetoothRFCOMM SDP and SDP Attribute ID Question

Mingi Kim 21 Reputation points
2021-07-19T05:02:27.517+00:00

Hi, Microsoft.

I know you are very busy, but please read my question, thank you.
Anyway I'm making an app uses RFCOMM. Because I have to measure my brainwave by using Neurosky's MindWave Mobile2. However, This headset device is now work in Windows 10. It worked in Windows 7 & 8 (My friend bought this before Windows 10 exist). Detail: the device can pair with Windows 10, and also The ThinkGearConnector Program(Neurosky's base program) run in Windows 10, but the public app can't connect with device.
So I focused on this device uses bluetooth. I thought "let's connect this device with bluetooth and handle or parse the program directly myself". I found your samples and documents but I can't uderstand some kinds of things. Let's read this => send-or-receive-files-with-rfcomm

When you read it, you can see these in client part :

  • const uint SERVICE_VERSION_ATTRIBUTE_ID = 0x0300;
  • const byte SERVICE_VERSION_ATTRIBUTE_TYPE = 0x0A; // UINT32
  • const uint MINIMUM_SERVICE_VERSION = 200;

I can't understand these What means ATTRIBUTE_ID? What means the ATTRIBUTE_TYPE?

So, I searched some kinds of examples and I found this project
https://ilovecsharp.com/tag/bluetooth/

In this project show me these:

  • private static readonly Guid RfcommServiceUuid = Guid.Parse("482af5ed-3faf-4a51-9dd0-718c85aa64d0");
  • private const UInt16 SdpServiceNameAttributeId = 0x100;
  • private const byte SdpServiceNameAttributeType = (4 << 3) | 5;

And I can compare between your example and this project, and I realize I have to use Guid, uint Service Attribute Id, and Attribute type.
But, I still can't understand about Id, and type. I suppose this Id, and Type follow the SDP.

Ok, Let's unite my question what I want to know

  1. I want to know about What means This Guid, Id, Type
  2. Is these attributes follows SDP or SDP's component?
  3. Whether 2. is correct, Is there any uint codes named public codes?

Thankyou, Microsoft. Please teach me.

Developer technologies | Universal Windows Platform (UWP)
0 comments No comments

Answer accepted by question author

Anonymous
2021-07-19T08:16:16.903+00:00

Hello,

Welcome to Microsoft Q&A!

I want to know about What means This Guid, Id, Type

SERVICE_VERSION_ATTRIBUTE_ID is the service identifier. It will be simply a 128-bit GUID(Globally Unique Identifier), it is also commonly specified as either a 16- or 32-bit integer.

An SDP service is described by service attributes, which provide information a client, needs to use the service, for example, service identifier.

Attributes have values, and those values can have various types and sizes. So that a device receiving an attribute knows what type and size it is receiving, attributes are sent in data elements. That's SERVICE_VERSION_ATTRIBUTE_TYPE.

Is these attributes follows SDP or SDP's component?

The Service Attributes are a part of the SDP.

Thank you.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.