Either download (buy) a widcomm SDK, use MS's BT stack (so your app wont work on anything bar WinXP SP2) or use RFCOMM and serial ports (see here for a good example http://bemused.sourceforge.net)
Either download (buy) a widcomm SDK, use MS's BT stack (so your app wont work on anything bar WinXP SP2) or use RFCOMM and serial ports (see here for a good example http://bemused.sourceforge.net)
Thank you didster!
I was trying the first way, using the WinXP SP2 SKD... I managed to do a program that uses bluetoothapis.h and it was builded correctly. But when I launched it the BluetoothFindFirstDevice always return a null object, even if there where other two bluetooth device in the room (visible by the Pc in the bluetooth resources).
Now, thanks to you, I'm trying the second way... I downloaded the example but I was not able to compile it because it gives me more than 100 errors like:
Are you perchance building it with VS.NET??? It will only build with VS 6.
You don't need to build it really - just look at it. All it does is opens a serial port with CreateFile(...) and uses ReadFile/WriteFile to read and write from that port. All the magic happens on the phone side of the code - which basically does an SDP decovery on the PC, finds the channel number associated with RFCOMM, and connects to it.
Your probably best off moving to a Windows development forum now though.
Bare in mind this sort of app only works when its the phone (or any other device) that starts the connection. If you wish to discover and connect to a device from the PC, then you must use an SDK
didster
 
Wed, 2004-11-17 16:24
Anonymous (not verified)
Forum posts: 2019
Windows programming bluetooth
hmm, what you are trying to do? If you are just gonna transfer information between mobile phone and computer then there is also couple work around options, not really bt, but anyway.
1.) one option use tcp/ip connection when mrouter connection is up, from phone. Computer is named then wsockhost.mrouter , but you cannot make connection from computer to phone.
2.) Another option is to use Symbian Connectivity SDK from symbian.com, where is some stuff for that, but again not really bt stuff.
I'm trying to make a software in a context of Ambient Intelligence. I want that when someone arrives in my Ambient, his phone automatically receive message (message box, not sms) giving informations needed... The way the software arrives in the users phone and start a bluetooth discovery is already been solved.
I only need a sort of server on windows ready to manage the informations given by the phones.
With the didster's link I think I will be able to solve this problem... At least I hope it...
hey corben! i have a project almost similar to yours but i don't know how to start.. can you please help me? how did you automatically send messages to phones? can you give me some ideas? thank you very much
No, sorry, there was a misunderstanding... In MY case was solved, because my application target was to make just a demonstration, not a commercial software!
hi corben i have a project on bluetooth devices. I'm currently trying to send files to a mobile phone without authentication and without additionnal soft on the phone. I'm using Visual C++ .NET. Is it possible using winsock ? Creating a socket with OBEX_PROTOCOL_UUID as serviceClassId is enough to connect to a mobile phone and send files or there is something else to do ? And are there alternatives to winsock ? Did u find any code ? Regards. Choueiry
hi corben i have a project on bluetooth devices. I'm currently trying to send files to a mobile phone without authentication and without additionnal soft on the phone. I'm using Visual C++ .NET. Is it possible using winsock ? Creating a socket with OBEX_PROTOCOL_UUID as serviceClassId is enough to connect to a mobile phone and send files or there is something else to do ? And are there alternatives to winsock ? Did u find any code ? Regards. Choueiry
I don't think it is possible to send files without authentication. The only thing that I know is that with some software on linux you can read personal data (agenda, phonebook, messages...) on the phone without authentication, but I don't know if it is possible also to write files. In any case this is not so "legal".
To know how to program bluetooth under windows take a look at the didster first reply, that are the only way to program bluetooth I've found.
Only way to receive files "without authorization" is to pair the devices and set the sending device as parmanently authorized from the phone. So this won't really help you because I think you are trying to send files and stuff to phones unknown to you.
My app on windows should send and receive a number to a known phone. To only one phone that will act as the master. The app on windows will ack as the client.
Forum posts: 1379
didster
Forum posts: 81
Thank you didster!
I was trying the first way, using the WinXP SP2 SKD... I managed to do a program that uses bluetoothapis.h and it was builded correctly. But when I launched it the BluetoothFindFirstDevice always return a null object, even if there where other two bluetooth device in the room (visible by the Pc in the bluetooth resources).
Now, thanks to you, I'm trying the second way... I downloaded the example but I was not able to compile it because it gives me more than 100 errors like:
"..\release\MSO.tlh(2598) : error C2872: 'MsoTriState' : ambiguous symbol"
Can you help me again?
Thank you!
Corben
Forum posts: 1379
You don't need to build it really - just look at it. All it does is opens a serial port with CreateFile(...) and uses ReadFile/WriteFile to read and write from that port. All the magic happens on the phone side of the code - which basically does an SDP decovery on the PC, finds the channel number associated with RFCOMM, and connects to it.
Your probably best off moving to a Windows development forum now though.
didster
Forum posts: 81
Ok I will try to undestand the example... Really thank you for the help!
Corben
Forum posts: 1379
Bare in mind this sort of app only works when its the phone (or any other device) that starts the connection. If you wish to discover and connect to a device from the PC, then you must use an SDK
didster
1.) one option use tcp/ip connection when mrouter connection is up, from phone. Computer is named then wsockhost.mrouter , but you cannot make connection from computer to phone.
2.) Another option is to use Symbian Connectivity SDK from symbian.com, where is some stuff for that, but again not really bt stuff.
3.) You can try find widcomms debugger and parse stuff from it log. There is example for that kind application from here http://www.ephebe.f2s.com/ProximityConnector.htm
anyway bluetooth is used to be badly supported under windows..
Forum posts: 81
I only need a sort of server on windows ready to manage the informations given by the phones.
With the didster's link I think I will be able to solve this problem... At least I hope it...
Bye!
Corben
Forum posts: 5
Forum posts: 85
Really?! How?! That would be quite magical if it all happened automatically. Do you need any user intervention to receive/install the application?
Forum posts: 81
I'm sorry!
Corben
Forum posts: 1
i have a project on bluetooth devices.
I'm currently trying to send files to a mobile phone without authentication and without additionnal soft on the phone. I'm using Visual C++ .NET. Is it possible using winsock ?
Creating a socket with OBEX_PROTOCOL_UUID as serviceClassId is enough to connect to a mobile phone and send files or there is something else to do ?
And are there alternatives to winsock ?
Did u find any code ?
Regards.
Choueiry
Forum posts: 81
i have a project on bluetooth devices.
I'm currently trying to send files to a mobile phone without authentication and without additionnal soft on the phone. I'm using Visual C++ .NET. Is it possible using winsock ?
Creating a socket with OBEX_PROTOCOL_UUID as serviceClassId is enough to connect to a mobile phone and send files or there is something else to do ?
And are there alternatives to winsock ?
Did u find any code ?
Regards.
Choueiry
I don't think it is possible to send files without authentication. The only thing that I know is that with some software on linux you can read personal data (agenda, phonebook, messages...) on the phone without authentication, but I don't know if it is possible also to write files. In any case this is not so "legal".
To know how to program bluetooth under windows take a look at the didster first reply, that are the only way to program bluetooth I've found.
Bye!
Corben
Forum posts: 7
I downloaded the ms sdk sp2 but i have no idea as how to compile and run programs. should i install visaul studio 6 or 7 ?
thanks
Forum posts: 11
Forum posts: 7
My app on windows should send and receive a number to a known phone. To only one phone that will act as the master. The app on windows will ack as the client.
Thanks