ObexServer r6

Rating: No reviews yet
Downloads: 28
Released: Mar 13, 2010
Updated: May 14, 2014 by alanjmcf
Dev status: Stable Help Icon

Recommended Download

Application ObexServer r6.zip
application, 311K, uploaded May 14, 2014 - 28 downloads

Release Notes

An implementation of an OBEX Server using the Brecham.OBEX library.

Andy Hume, 13th March 2010

This is a sample implementation of an OBEX Server using the Brecham.OBEX library. It includes the source for both the concrete implementation of both a PUT / Inbox Server and a GET / Folder Browsing server, as well as the implementation of base OBEX Server infrastructure. A sample command-line program is also included which writes the files it receives to disk, and can handle GET of files and Folder Listings, and can listen on Bluetooth, IrDA, or TCP/IP. A similar NETCF WinForms program is also included.

Things may change later on, but for now at least the code isn't a simple ‘create a new instance of this class, and it will do the job just like that’. With server side code I feel that there will always be some different behaviour wanted, for instance to write the received files to a MemoryStream instead of to disk, or to also support GET and SETPATH, or to listen or more protocol at once, or to support multi connections simultaneously, etc. To provide only a closed binary implementation would likely not be the most useful delivery.

So I intend not to release an official complete version as such but instead let the community improve it as it sees fit. So the code here is provided to be added into your project, with some integration work likely needed. Of course I welcome any changes to the code, let me have you diffs and I’ll integrate them for later version. It could even become a CodePlex project if there was demand and support for that.

In brief the main changes in this version is support for running on 32feet.NET's new Widcomm support.


The code is of course copyright me, but is free for any use. All I ask is for a note in your product stating that it uses Brecham Obex, this should be in the About Box or equivalent and/or in a readme-type document.


The sample server can listen on IrDA, and TCP/IP, and Bluetooth (thanks Alan). It currently supports two modes, supports either one or multiple concurrent connection, and will also kill any session if it has been idle for three minutes. Since r6 there is support for running on 32feet.NET's new Widcomm support. Widcomm includes built-in OPP and FTP services, they will need to be stopped before this server is used.

All the reading and writing of the PDUs from and to the client is done with (Network-)Stream’s asynchronous methods, that is using BeginRead/BeginWrite etc. So no dedicated thread is required. (Since r2 a synchronous server host is also implemented, and r6 includes a asynchronous-Sockets server host implementation). The application calls Start which starts the read for the first PDU and then returns, the server then runs in the background on a thread pool thread whenever there's work to be done (note that writes to the peer and to the PUT storage stream are done synchronously, as it is presumed to be relatively fast, so not needing asynchronous handling). The server signals that the session has completed by setting an event.

The code includes a set of unit-tests, covering the various sequences of PDUs in the PUT and GET operations, various errors on the content stream etc, and very simple folder listings, a number of areas need test coverage. Those items and more are listed below.


Reviews for this release

No reviews yet for this release.