user2963943
user2963943

Reputation: 3

Bluetooth -> Winapi/32feet. Two connection from Pc to one device using Spp

It`s possible to establish two connections( or more) between Pc and other device? When I try to do that I have got exception: 10048 -> ex.Message = "A connect request was made on an already connected socket xxxxxxxxxxxx:0000110100001000800000805f9b34fb". If not, there is some workaround? I used 32feet libary to wrote application.

Upvotes: 0

Views: 832

Answers (3)

Veit
Veit

Reputation: 125

i just connected 4 devices (spp) simultanously and transfering data periodically.

so it is definitely possible.

if one device is disconnected the other connection can't get data anymore, but i guess this is just a bug in my code.

it would be very interesting if anyone else has tried this.

Upvotes: 1

alanjmcf
alanjmcf

Reputation: 3440

This an RFCOMM limitation, not a limitation of the lower levels of the Bluetooth stack. See a workaround described in the 32feet.NET documentation https://32feet.codeplex.com/wikipage?title=General%20Bluetooth%20Data%20Connections

  • Notes

[1] The one RFCOMM connection is a protocol limitation. TCP/IP has port numbers on source and destination ends and thus can support multiple connections, RFCOMM has only the remote channel number so only can support one connection.

If you need multiple connection and are in control of the 'server' device then have the service listen on two (or more) RFCOMM channels so the client can connect to different channel numbers.

Upvotes: 0

subbu147
subbu147

Reputation: 356

I guess its not possible. There can exist one connection between a master and slave. A master can be simultaneously connected to as much as 7 active slaves.

And most probably the other device that you are using might support only one connection. In your case it is possible to connect up to 7 device to your pc.

Upvotes: 0

Related Questions