Advertisement

12.20.2005 at 11:08AM PST, ID: 21670966
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

OBEX, send file, windows, any language

Zone: Bluetooth
Tags: obex, bluetooth, windows
Hi all,

I am searching for a good way to transfer a specific file to a specific device via bluetooth.

I would like to create a program for this task so I am asking for some hints on where to start.

I would apriciate using some programming language not requiering any libraries installed not in windows xp default installation. But I am also interested in such options if no other exist. (using perl would be especially good, but I have not found any BT library working on perl and windows)

The hardware used can be one of a number of bluetooth usb dongles or an internal bluetooth chip. The microsoft bluetooth stack will be used if there is no better option.

Thanks in advance
//Jens
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: deadlock_
Solution Provided By: afoxley
Participating Experts: 2
Solution Grade: A
Views: 106
Translate:
Loading Advertisement...
12.20.2005 at 10:36PM PST, ID: 15524464

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.20.2005 at 11:22PM PST, ID: 15524557

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.20.2005 at 11:45PM PST, ID: 15524617

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.21.2005 at 01:49AM PST, ID: 15524967

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.21.2005 at 02:34AM PST, ID: 15525183

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.21.2005 at 03:37AM PST, ID: 15525428

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.21.2005 at 05:44PM PST, ID: 15531399

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.21.2005 at 06:16PM PST, ID: 15531522

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.22.2005 at 04:56PM PST, ID: 15539283

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.22.2005 at 05:53PM PST, ID: 15539483

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.25.2005 at 03:58AM PST, ID: 15548790

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.27.2005 at 04:58PM PST, ID: 15559699

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.28.2005 at 08:20AM PST, ID: 15563312

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.28.2005 at 09:08AM PST, ID: 15563701

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
12.20.2005 at 10:36PM PST, ID: 15524464
Hi Jens

I think this url will help u http://www.gatefold.co.uk/obex/ (C#)

Here is another one to send a file over to your phone
http://www.codeproject.com/ce/MbPocketOBEX.asp (C++)

Clement
 
12.20.2005 at 11:22PM PST, ID: 15524557
Thanks, but

http://www.gatefold.co.uk/obex/ seem to be for Windows CE to me, but maybe it is both, I'm not sure...
Anyway it uses the .NET framework and you even have to supply an extra library to use it.
If this works it is realla a last option.

http://www.codeproject.com/ce/MbPocketOBEX.asp is certainly Windows CE only.

I hope there is a better solution...

Thanks
 
12.20.2005 at 11:45PM PST, ID: 15524617
 
12.21.2005 at 01:49AM PST, ID: 15524967
As I wrote I need for Windows XP, not for NetBSD neither Linux.

Thanx anyway

Any other suggestions?
 
12.21.2005 at 03:37AM PST, ID: 15525428
Hi

JSR-82 are for J2ME and not for desktops... That is no use too me as I said in my original post it shoudl be run on windows XP

OpenOBEX is also not for Windows XP yet

And the last link you provided, that is between pocket pc and other device...

I have google too...

//Jens
 
12.21.2005 at 05:44PM PST, ID: 15531399
Well, u are transferring a specific file to a specific device via bluetooth.
Specific device could be a mobile phone/smartphone and u could use J2ME in this case.

okie here is a free program for your OBEX transfers if you are interested
http://intradarma.com/OBEXCommander.html

 
12.21.2005 at 06:16PM PST, ID: 15531522

You mean I can use J2ME on my PC and in that way send a file to a mobilephone/PDA?
I was sure J2ME was run only on the device and had nothing to do with desktop computers. Maybe I were wrong... Sorry if that is the case.

This program sounds a little bit interesting. If it have command line support... Does it?
I need something that integrates into a system I am building, so I need some way of programatically interact with the sender application.

Thanks
//Jens

 
12.22.2005 at 04:56PM PST, ID: 15539283
There seem not to be any way of interacting with http://intradarma.com/OBEXCommander.html via commandline or anything and therefoer this is of no use to me either....

Any other ideas?
 
12.22.2005 at 05:53PM PST, ID: 15539483
Well commandline which also means u can use any language to invoke a batch file to run it, isnt it?

Could you specify what programming languagues u prefer for example?
If you are skilled in C++, I think you can use it to code your own OBEX transfer.

If you want to code as a Windows application, I suggest you get Platform SDK, I think it will meet your needs. You can write a Bluetooth service for any devices to use it.
http://www.microsoft.com/downloads/details.aspx?familyid=EBA0128F-A770-45F1-86F3-7AB010B398A3&displaylang=en

I read some online posting where u can use C++ to code your own socket programming and create a Bluetooth service and let other devices connect to it to perform the service. But what device are you communciating with is important as you know there are mainly 2 Bluetooth stacks - Microsoft and Widcomm.
 
12.25.2005 at 03:58AM PST, ID: 15548790
Yes but it does not have any command line operations possible. at least what I could find.
If this software has commandline options to send a file it would be sufficient for my needs

I am using the microsoft stack.

I would need some real samle code... I have already searched MSDN for bluetooth and there are some hints about how to use it from winsock, however I need somethign to look at. Writing it from scratch would just take too much time. Or I need somewhere where this whole process with bluetooth via winsock is described in detail so I know what I should do.

Thanks
 
12.27.2005 at 04:58PM PST, ID: 15559699
I've done this before, but i cannot post the full source code unfortunately. I will post some snippets to help you out. I'm using c++ with the ATL/WTL libraries, so that's where some of the class names come from.

This is what you need to do:

-do device discovery to get the bluetooth address
you will do this through the well documented (on msdn) BluetoothFindFirstRadio, BluetoothFindNextDevice, etc... functions

-next you will use winsock to establish a socket connection to the specified device...here's how to create the socket (roughly)

bool Init()
{
      WORD versionRequested = 0x202;
      WSADATA data;
      if(!WSAStartup(versionRequested,&data))
      {
            s = socket(AF_BTH,SOCK_STREAM,BTHPROTO_RFCOMM);
            if(s == INVALID_SOCKET)
                  return false;

            int protocolInfoSize = sizeof(protocolInfo);

            if(getsockopt(s,SOL_SOCKET, SO_PROTOCOL_INFO,(char*)&protocolInfo,&protocolInfoSize))
                  return false;

            return true;
      }
      else
            return false;
}

-once you have the socket here's how to connect to a device. This was pulled out of a class i wrote. the class members should be self evident.

bool Connect(BluetoothDevice dev)
{
                  SOCKADDR_BTH sab;
                  memset(&sab,0,sizeof(sab));
                  sab.addressFamily = AF_BTH;
                  sab.serviceClassId = OBEXObjectPushServiceClass_UUID;
                  sab.btAddr = dev.Address.ullLong;
                  sab.port = (ULONG)BT_PORT_ANY;

                  sockaddr* pAddr = (sockaddr*)&sab;

                  if(0 == connect(s,pAddr,sizeof(SOCKADDR_BTH)))
                  {
                        CCOMByteArray data;
                        BYTE recvBuff[3];

                        data.Append(OBEX_CONNECT);
                        data.Append(0x00);
                        data.Append(0x07);
                        data.Append(OBEX_VERSION);
                        data.Append(OBEX_CONNECT_FLAGS);
                        data.Append(0x20);
                        data.Append(0x00);


                        if(SOCKET_ERROR == send(s,(char*)data.GetData(),data.GetSize(),0))
                              return false;

                        if(SOCKET_ERROR == recv(s,(char*)recvBuff,3,0))
                              return false;

                        if(recvBuff[0] == OBEX_SUCCESS)
                        {
                              int plength = (0xff * recvBuff[1]) + recvBuff[2];
                              BYTE* buf = new BYTE[plength-3];
                              recv(s,(char*)buf,plength-3,0);
                              NegotiatedPacketSize = (0xff * buf[2]) + buf[3];
                              return true;
                        }
                        else
                              return false;
                  }
else
      return false;
}

here are some defines i used and will be useful:
// OBEX Operation codes
#define OBEX_PUT                        (BYTE)0x02
#define OBEX_PUT_FINAL                  (BYTE)0x82
#define OBEX_GET_FINAL                  (BYTE)0x83
#define OBEX_CONNECT                  (BYTE)0x80
#define OBEX_DISCONNECT                  (BYTE)0x81
#define OBEX_ABORT                        (BYTE)0xFF
 
// OBEX Header codes
#define OBEX_NAME                        (BYTE)0x01
#define OBEX_LENGTH                        (BYTE)0xC3
#define OBEX_DESCRIPTION            (BYTE)0x05
#define OBEX_BODY                        (BYTE)0x48
#define OBEX_END_OF_BODY            (BYTE)0x49
 
// OBEX Response codes
#define OBEX_CONTINUE                  (BYTE)0x90
#define OBEX_SUCCESS                  (BYTE)0xA0

#define OBEX_VERSION                  (BYTE)0x10
#define OBEX_CONNECT_FLAGS            (BYTE)0x00


And finally I will refer you again to the excellent obex client implementation (in C#) at http://www.gatefold.co.uk/obex/
for the logic to do the obex transfer. It will need to be modified if I remember correctly to support sending arbitrary length files...(which is fun :-)

If you get lost, get the obex spec from irda

Accepted Solution
 
12.28.2005 at 08:20AM PST, ID: 15563312
This sounds like exactly what I need. I then just have to ask before I begin to grab the spec of OBEX. Do I really have to implement OBEX by myself or is there some nice dll library builtin to windows I can just import?

Thank you for your help!

//Jens
 
12.28.2005 at 09:08AM PST, ID: 15563701
Microsoft didn't export it to make it available. You can send files using their UI, but no, no library.

Here's a link to the obex spec...

http://abstract.cs.washington.edu/~austinf/OBEX13.pdf
 
 
20080236-EE-VQP-29