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.

BluetoothEndPoint does not contain a constructor that takes 2 arguments

See original GitHub issue

On version 4.0.4 when I code the following line in a Visual Studio 2017 .NET Framework 4.6.1 Windows Forms application:

BluetoothEndPoint blep = new BluetoothEndPoint(BluetoothAddress.Parse("001122334455"), BluetoothService.SerialPort);

I get the error “BluetoothEndPoint does not contain a constructor that takes 2 arguments”

As per the documentation BluetoothEndPoint has constructor that takes 2 or 3 arguments.

Note: I am using 4.0.4 version because 4.0.5 nuget package fails to install as per #74

Thanks!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:34 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
steam3dcommented, Jul 4, 2023

@m1adow Check Microsoft Rfcomm example on their GitHub. You do not need use while(true). https://github.com/microsoft/Windows-universal-samples/tree/main/Samples/BluetoothRfcommChat

You also need to know that enable and disable SetServiceState is incredible complicated task for windows. Windows will destroy audio endpoint and then create a new one (include a lot of GUID and other data), some app that use headset could stuck.

1reaction
steam3dcommented, Jul 3, 2023

@m1adow I suppose mac can’t get battery because it is Fake AirPods. You code does nothing because headphone waiting for response. You need read about AT+ commands. You must response on each request from headphones.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does not contain a constructor that takes 2 arguments?
You need to declare the constructor for your ContactNo class. Classes only provides a default constructor with no arguments. The constructor you ...
Read more >
Compiler Error CS1729
'type' does not contain a constructor that takes 'number' arguments. This error occurs when you either directly or indirectly invoke the ...
Read more >
Does not contain a constructor that takes 2 arguments
Solution 2​​ constructors. Of course the compiler cannot accept that. You have either to add the required two arguments constructor or modify the ......
Read more >
'Chunk' does not contain a constructor that takes 2 arguments
I've wrote a script that spawns chunk, but i've got this error and i don't know how to fix it. This is my...
Read more >
C# Error: Class does not contain a constructor that takes ...
This is a build error in C#. This error ClassName does not contain a constructor that takes N arguments is thrown when you...
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