Create a Socket from a MAC address?
-
I'm trying to use a bluetooth device as though it were a socket. I am aware that this can be done using WINSOCK and P/Invoke, but to be honest I really don't want to put myself through that just yet X|. With WMI I can get the MAC address that the BT Dongle is using, but can I use the MAC Address to create a socket with .NET? Scott P
"Simplicity carried to the extreme becomes elegance."
-Jon Franklin -
I'm trying to use a bluetooth device as though it were a socket. I am aware that this can be done using WINSOCK and P/Invoke, but to be honest I really don't want to put myself through that just yet X|. With WMI I can get the MAC address that the BT Dongle is using, but can I use the MAC Address to create a socket with .NET? Scott P
"Simplicity carried to the extreme becomes elegance."
-Jon FranklinNope. The MAC address sits in the DataLink layer of the network stack, whereas sockets exist in the Network layer. You can't combine the two with any meaning. You'd have to resolve the MAC address to a Network layer address in order to create a socket.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
I'm trying to use a bluetooth device as though it were a socket. I am aware that this can be done using WINSOCK and P/Invoke, but to be honest I really don't want to put myself through that just yet X|. With WMI I can get the MAC address that the BT Dongle is using, but can I use the MAC Address to create a socket with .NET? Scott P
"Simplicity carried to the extreme becomes elegance."
-Jon FranklinMicrosoft has encapsulated bluetooth communciation in their socket layer as an extension to Winsock. There are a few APIs also provided that have the name BluetoothXXX. Winsock would be your best bet on this. Or you would have to go very low level as Dave mentioned.
«_Superman_»