You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to have support for pairing and IO with bluetooth devices for .net core.
It is perhaps a bit of a niche, but since self hosting is so easy in asp.net core I think more people than myself would be interested in communicating with BT devices from our self hosted web api's.
There is the 32feet bluetooth library, but it does not seem to be very active nowadays.
This is a great idea for independent NuGet package.
I don't believe it fits the scope of CoreFX repo though - it should not be part of the platform, but rather built on top of the platform.
Did you consider following up with 32feet authors if they take contributions or plan to move to GitHub?
I agree with @karelz here. Bluetooth support is really more something that should be a separate package; it doesn't really fit under the "core" libraries. I do think it would be great to have an active, functional package for it on Nuget.
As it doesn't fit for CoreFX, I'm going to close this issue.
Sorry for posting on a closed issue here, but I think adding the some sort of basic support for the AddressFamily Bluetooth (AF_BTH) and the ProtocolType RFCOMM (BTHPROTO_RFCOMM) in System.Net.Sockets could be considered a corefx concern...
I'm also interested in this. I'm on .net-5.0 and am trying to toy around with my bluetooth.
It looks like my timing is nearly right in that #862 happened recently, but I'm currently presented with the error/stacktrace:
System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Net.SocketAddressPal.ThrowOnFailure(Error err)
at System.Net.SocketAddressPal.GetAddressFamily(ReadOnlySpan`1 buffer)
at System.Net.Sockets.Socket..ctor(SafeSocketHandle handle, Boolean loadPropertiesFromHandle)
at System.Net.Sockets.Socket..ctor(SafeSocketHandle handle)
at ns.Bluez.Profile1.<>c__DisplayClass19_0.<ns.Bluez.IProfile1.NewConnectionAsync>b__0() in <myProject>
and I'm guessing that's the last thing holding me back, and which led me to this issue that I hope can be brought back to life.
System.Net.Sockets.SafeSocketHandle lHandle = new System.Net.Sockets.SafeSocketHandle(pFd.DangerousGetHandle(), true);
System.Net.Sockets.Socket lSocket = new System.Net.Sockets.Socket(lHandle);
... the "GetAddressFamily" internal stuff doesn't seem to like what it's being told the socket is all about.
And "lsof" shows me: dotnet 575709 username 85u sock 0,9 0t0 14855571 protocol: RFCOMM which I'm assuming is additional proof that the connection was made.
I follow the understanding that this is not a "corefx" thing ... BUT following this logic (rhetorically) ... why is Socket and TCP/IP in general? Bluetooth is the dominant wireless standard which is not TCP/IP in the last 10 years and most likely the next 20 years. Every household has dozen devices. IoT, Desktop Apps, Store Apps, Android and iOS Apps rely on Bluetooth. It is as core as TCP/IP is, just that the average server does not need it.
ghost locked as resolved and limited conversation to collaborators on Dec 25, 2020
Activity
karelz commentedon Mar 2, 2017
This is a great idea for independent NuGet package.
I don't believe it fits the scope of CoreFX repo though - it should not be part of the platform, but rather built on top of the platform.
Did you consider following up with 32feet authors if they take contributions or plan to move to GitHub?
ianhays commentedon Mar 7, 2017
I agree with @karelz here. Bluetooth support is really more something that should be a separate package; it doesn't really fit under the "core" libraries. I do think it would be great to have an active, functional package for it on Nuget.
As it doesn't fit for CoreFX, I'm going to close this issue.
tkp1n commentedon Jan 12, 2018
Sorry for posting on a closed issue here, but I think adding the some sort of basic support for the AddressFamily Bluetooth (AF_BTH) and the ProtocolType RFCOMM (BTHPROTO_RFCOMM) in System.Net.Sockets could be considered a corefx concern...
danmoseley commentedon Jan 12, 2018
@karelz @ianhays
vindicatorr commentedon Jun 9, 2020
I'm also interested in this. I'm on .net-5.0 and am trying to toy around with my bluetooth.
It looks like my timing is nearly right in that #862 happened recently, but I'm currently presented with the error/stacktrace:
and I'm guessing that's the last thing holding me back, and which led me to this issue that I hope can be brought back to life.
I used the wonderful world of https://github.com/tmds/Tmds.DBus/ (available on nuget) to get the linux bluez stuff going and as you can see in the stacktrace, the "NewConnection" callback is fired and I'm given a file-descriptor, but when I try to make use of it:
... the "GetAddressFamily" internal stuff doesn't seem to like what it's being told the socket is all about.
And "lsof" shows me:
dotnet 575709 username 85u sock 0,9 0t0 14855571 protocol: RFCOMMwhich I'm assuming is additional proof that the connection was made.I don't know if there's already some existing framework within dotnet that would somewhat reasonably allow me to workaround the problem.
I know that there also exists the wonderful world of https://github.com/tmds/Tmds.LibC which I haven't toyed with yet, but may fit the bill for now.
If it's preferred, I could open another issue for this particular error I'm receiving, but I felt it was still applicable to this issue.
tthiery commentedon Sep 28, 2020
I follow the understanding that this is not a "corefx" thing ... BUT following this logic (rhetorically) ... why is Socket and TCP/IP in general? Bluetooth is the dominant wireless standard which is not TCP/IP in the last 10 years and most likely the next 20 years. Every household has dozen devices. IoT, Desktop Apps, Store Apps, Android and iOS Apps rely on Bluetooth. It is as core as TCP/IP is, just that the average server does not need it.