question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there any way to get the COM port for a ServiceRecord?

See original GitHub issue

Lets say i have the following code:

var client = new BluetoothClient();
Console.WriteLine("DiscoverDevices");
var devices = client.DiscoverDevices();
foreach(var device in devices)
{
    foreach(var serviceRecord in device.GetServiceRecords(BluetoothService.SerialPort))
    {
        //Get comport for ServiceRecord
    }
}

How would i get the Com Port? (If i look in the bluetooth dialog i can see that the device has multiple COM ports).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
peterfootcommented, Jul 26, 2017

Sorry, Registry is for Windows CE only. For desktop Windows you’ll need the Setup API. I’ve put some code into a Gist here:- https://gist.github.com/peterfoot/b4f61c81023a1e181b9f3940bca344ba

Need to integrate this into a sample app at some time.

0reactions
peterfootcommented, Aug 11, 2017

Thanks, I have posted a response there with a link to the gist

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get COM port using 32feet in c#? - Stack Overflow
First, you will need to get the device address using: string comPort = GetBluetoothPort(device.DeviceAddress.ToString()); if(!string.
Read more >
How to identify Com Ports in Windows10
Open Device Manager. · Click on View in the menu bar and select Show hidden devices. · Locate Ports (COM & LPT) in...
Read more >
How to obtain a Customer Service Record – Index Help Center
Note: Obtaining a CSR is not a requirement for porting your number into Index. We simply recommend obtaining it prior to porting your...
Read more >
What Is a Customer Service Record (CSR) In Telecom?
For your new carrier to port the number, they'll need certain details from your CSR such as the account number, address, and customer...
Read more >
How to Redirect DNS to Different Ports
In this way, SRV records can redirect DNS addresses by dividing different subdomain requests to different physical servers or ports.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found