Parking bluetooth device from PC
Login to reply to this topic.
Tue, 2008-04-29 13:52
Joined: 2008-04-29
Forum posts: 1

Hi all,

Can anybody please suggest how I may be able to park bluetooth devices from a PC using standard Microsoft software?

I need to send data from a PC to 50+ bluetooth mobile devices.

I have successfully developed a server application which is sending data up to 7 devices (using Windows Sockets WinSock). I use Visual studio V6.0 C++ or VS2005 C++ and WinXP Professional SP2. Generic Bluetooth - Cambridge Silicon Radio.

To go beyond this number I now need to park some devices to keep active connections below 8.

To park a device I need to use the WinSock function setsockopt as in:

BTH_PARK_MODE BthParkMode;

BthParkMode.beacon_max = 0xffff;
BthParkMode.beacon_min = 0x0001;
BthParkMode.interval = 1200; // 1200 = .75secs

int nLength = sizeof(BTH_PARK_MODE);

int optname = SO_BTH_ENTER_PARK_MODE;

if (setsockopt(ClientSocket, SOL_RFCOMM, optname, (char*)&BthParkMode, nLength) == SOCKET_ERROR)
{
// Error
}

However (*!), this fails - invalid option name ie SO_BTH_ENTER_PARK_MODE is not recognised.

Further investigation reveals there are two ws2bth.h header file versions and only the version in the Windows CE platform contains a #define for SO_BTH_ENTER_PARK_MODE - but I need to use a PC!

It seems parking is not possible from a win32 platform - but surely this can't be true?

Would moving to Visual Studio 2008 be the answer? Or Vista? Or not using MS bluetooth stack?

Has anybody successfully parked a bluetooth device...(from a PC).

Thanks for reading this post...


copyright 2003-2009 NewLC SARL