Turn your Mobile Apps into m-commerce apps – Learn More!

You're Browsing As A Guest! Register Now...
Become a C++ Expert!

Join 415,713 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 114 people online right now.Registration is fast and FREE... Join Now!



bluetooth and obex Rate Topic: -----

#1 bizzehdee  Icon User is offline

  • New D.I.C Head
  • Icon

Reputation: 2
  • View blog
  • Posts: 45
  • Joined: 06-April 08


Dream Kudos: 200

Share |

bluetooth and obex

Posted 11 June 2008 - 08:10 AM

are there any examples of sending a contact to a mobile phone via a windows based pc?

i have a project and so far i can scan for all bluetooth devices hooked into the pc, and then use those to scan for all bluetooth devices within range, what i am missing now is the ability to pair with one of those and pass on a contact.

i cant really find much to do with C++ via this site, code project or google on obex transfers that dont use MFC, which is not an option, as this all has to be writen in native api.

thanks in advance.
Was This Post Helpful? 0
  • +
  • -


#2 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • Icon

Reputation: 141
  • View blog
  • Posts: 4,634
  • Joined: 26-November 04


Dream Kudos: 2825

Expert In: J2ME, 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

Re: bluetooth and obex

Posted 11 June 2008 - 08:46 AM

That depends on the type of Bluetooth Enumerator Device you have.
Use the WIDCOMM Bluetooth API if you have a WIDCOMM device.
Was This Post Helpful? 0
  • +
  • -

#3 bizzehdee  Icon User is offline

  • New D.I.C Head
  • Icon

Reputation: 2
  • View blog
  • Posts: 45
  • Joined: 06-April 08


Dream Kudos: 200

Re: bluetooth and obex

Posted 11 June 2008 - 02:28 PM

so theres no native windows api for doing this then? you need 3rd party sdk's to do this?
Was This Post Helpful? 0
  • +
  • -

#4 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • Icon

Reputation: 141
  • View blog
  • Posts: 4,634
  • Joined: 26-November 04


Dream Kudos: 2825

Expert In: J2ME, 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

Re: bluetooth and obex

Posted 11 June 2008 - 11:35 PM

Sadly, no.
But it's not that difficult.

You don't need an external API to simply transfer a file to a bluetooth device.
You just need to figure out what device the User has and send the file path to the appropriate bluetooth application as a command-line parameter.

This is what I've found when I disassembled a popular Bluetooth Application.
  • This App supports transfers for WIDCOMM and Toshiba Devices.
  • It checks if two registry keys HKEY_LOCAL_MACHINE\Software\Widcomm\Install and HKEY_LOCAL_MACHINE\Software\Toshiba\BluetoothStack exist for the presence of a Toshiba and WIDCOMM Bluetooth device respectively.
  • If a Toshiba Device is found:
    • The String Value InstallPath is read to get the directory of the Toshiba Bluetooth App.
    • The Path of the file to be transferred is sent as a command-line parameter to WirelessFTP.exe which is present in the directory pointed to by the InstallPath String Value.

  • If a WIDCOMM Device is found:
    • The String Value INSTALLDIR is read to get the directory of the WIDCOMM Bluetooth App.
    • The Path of the file to be transferred is sent as a command-line parameter to btsendto_explorer.exe which is present in the directory pointed to by the INSTALLDIR String Value.
That's it!

To be honest, I didn't know how this was done until I disassembled this Application myself right now. ;)
Was This Post Helpful? 0
  • +
  • -

#5 Guest_Avishkar*


Reputation:

Re: bluetooth and obex

Posted 08 May 2010 - 12:53 PM

Hey, sorry to resurrect a dead thread, but I came across this in a google search and the information presented is not correct. I also know how difficult it is to find information on this topic.

Windows XP SP2 and higher have the Microsoft Bluetooth Stack included. There are Bluetooth-specific functions to enumerate devices, enable discovery, etc. However, you establish connections and do transfers using the Winsock API (see here).

For file transfers, you need a devices with supports the File Transfer Profile, and you'll need to understand the OBEX protocol which underlies it. However, for pushing a contact, you need the Object Push Profile (which is also built on top of OBEX).

I wrote a library which deals with the File Transfer Profile, but it could serve as a starting point for those looking to implement the Object Push Profile or for dealing with OBEX.
Was This Post Helpful? 0



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users