473,395 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Bluetooth API calls (not using Sockets)

Hi,

I am trying to make this simple code work but I have no success doing
so:

BLUETOOTH_DEVICE_SEARCH_PARAMS btsp = { sizeof(btsp) };
BLUETOOTH_DEVICE_INFO btdi = { sizeof(btdi) };

btsp.fReturnAuthenticated = TRUE;
btsp.fReturnRemembered = TRUE;
btsp.cTimeoutMultiplier = 40;
btsp.fReturnUnknown = TRUE;
btsp.fReturnConnected = TRUE;
btsp.fIssueInquiry = TRUE;

hFind = BluetoothFindFirstDevice( &btsp, &btdi );

GetLastError(...);....
When I call GetLastError; It tells me that => "1722 The RPC server
is
unavailable."
I am developping with SDK SP1 under Windows XP SP1 with Visual Studio
.NET. My bluetooth interface is an IOGEAR (USB). ( I tried with
Belkin
USB interface as well and it did not work). I have installed
q323183_wxp_sp2_x86_enu.exe which resolved some problems but I still
cannot see the Bluetooth device around the computer.

Although, if I use the "Explore my Bluetooth place" I do find my
bluetooth device (2 of them actually).

Any advice ???
*---------------------------------*
Posted at: http://www.GroupSrv.com
*---------------------------------*

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 17 '05 #1
1 5754
Hello !

Although you're not using Windows Sockets, try including all WSA2 headers
(standard and Bluetooth ones), then calling WSAStartup properly before
attempting to use Bluetooth.

There's a small tidy undocumented section somewhere stating that Bluetooth
cannot be used without dows Sockets. But I think it was left out of the
actual docs.

If that doesn't help, try looking for Bluetooth radio devices. It's much
alike, but with BluetoothFindFirstRadio instead.

Calling WSAStartup should clear the RPC server error.

-Antti Keskinen
"cmartin64x" <cm********@hotmail-dot-com.no-spam.invalid> wrote in message
news:41********@127.0.0.1...
Hi,

I am trying to make this simple code work but I have no success doing
so:

BLUETOOTH_DEVICE_SEARCH_PARAMS btsp = { sizeof(btsp) };
BLUETOOTH_DEVICE_INFO btdi = { sizeof(btdi) };

btsp.fReturnAuthenticated = TRUE;
btsp.fReturnRemembered = TRUE;
btsp.cTimeoutMultiplier = 40;
btsp.fReturnUnknown = TRUE;
btsp.fReturnConnected = TRUE;
btsp.fIssueInquiry = TRUE;

hFind = BluetoothFindFirstDevice( &btsp, &btdi );

GetLastError(...);....
When I call GetLastError; It tells me that => "1722 The RPC server
is
unavailable."
I am developping with SDK SP1 under Windows XP SP1 with Visual Studio
NET. My bluetooth interface is an IOGEAR (USB). ( I tried with
Belkin
USB interface as well and it did not work). I have installed
q323183_wxp_sp2_x86_enu.exe which resolved some problems but I still
cannot see the Bluetooth device around the computer.

Although, if I use the "Explore my Bluetooth place" I do find my
bluetooth device (2 of them actually).

Any advice ???
*---------------------------------*
Posted at: http://www.GroupSrv.com
*---------------------------------*

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: skilpat | last post by:
My Python script is basically glue for a lot of batch files and whatnot, so it uses os.system liberally. However, there is a strange problem where the scripts called by os.system do not function...
1
by: Karl Irvin | last post by:
On some customers computers, my custom menus are overwritten. On a menu with seveal choices, my choices are replaced with a single "Other....." and when this is clicked, a message pops up and says...
2
by: Alvin Lau | last post by:
Can I write pocket PC bluetooth program by using C# ? It seems so difficult to find the library? If it is possible , where can i find the reference of these kind of program ? *** Sent via...
0
by: Lau Alvin | last post by:
How to write a bluetooth application by using C# to communicate with Pocket PC ? And where can I found some reference and sample ? Thanks very much ! *** Sent via Developersdex...
2
by: Vinod | last post by:
All, .NET Web Service needs to talk to third party software through TCP/IP sockets. Do we have any .Net Framework in place which can do a TCP/IP
9
by: Mike Curry | last post by:
I am looking for a simple sample of using sockets to download a page into a string. If anyone knows where I could get a sample, or post one here, that would be great.
7
by: sareel | last post by:
I need the explanation/code to transmit a complex datastructure like Linked list or binary tree using sockets from client to sever...
3
by: prognoob | last post by:
I need help coding a file transfer in C#. It would be over TCP/IP using sockets... most of the solutions i have come across, they use networkstream and i have read online that there is no need to...
2
yashg
by: yashg | last post by:
I am building a data backup application in C# using Sockets. It has a server component and a client component. The client is going to upload files to the server through TCP sockets. I've got all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.