Release 1.7 changes

12th October 2008 — release 1.7 (1.7.1012).

In the core library, in brief:

  • The listings produced by some SonyEricsson and LG phones include a user-perm (permissions) attribute with an empty value. This is disallowed by the Folder-Listings DTD in the OBEX specification, and thus the .NET XmlReader fails on reading that attribute, with “The 'user-perm' attribute has an invalid value according to its data type.”. We have included a modified DTD in the library which permits the emtpy string, and the Folder-Listing parser class now uses it by default. For more information see the class documentation for Brecham.Obex.Objects.ObexXmlResolver.UseVerbatimFolderListingsDtd.
  • Previously when reading a Folder-Listing, the operation generally was completed by sending an ABORT pdu to the server. Now a normal GET close is carried out. The ABORT pdu causes no problems as far as I know but thought I’d fix it anyway in case the ABORT appears to server logs and might confuse someone. This occurred due to our workaround for the bug in listings produced by Broadcom/Widcomm where the listing XML ends with a null byte. We previously didn’t read to the very end of the listing as the null byte caused the .NET XmlReader to fail. Now we read to the end of the stream and swallow the error produced, and thus a normal closing GET operation is sent.
  • Added an Authentication class which contains some method to create an parse the various OBEX Authentication headers, and also to do the secure hash of the password. These methods are currently marked as: “Prelimary code, may change or disappear in later versions.” Please give me your feedback!
There were no changes in the samples.

Release 1.6 changes

18th September 2008 — release 1.6 (1.6.0918).

In the core library, in brief:

  • Add option IgnoreBadDateFormats to ObexFolderListingParser, to allow it to continue even when the server produces invalid folder-listing content. For instance the LG K800 phone sometimes produces date values like modified="19800000T-90000" a negative time!
  • Added ObexClientSession.PutFile which takes a pathname parameter of the file to send.
  • Add a Headers property to the ObexResponseException which lists the headers received along with the error response.

In the samples, in brief:

  • In FolderExplorer samples add handling of OBEX failure response in calling SetPath.
  • In FolderExplorer samples a "Ignore Folder Listing Faults" menu option, which set the various ObexFolderListingParser options including IgnoreBadDateFormats.
  • In the desktop FolderExplorer sample add basic printing support.
  • In GetFolderListing use the HasSize property rather than printing a size regardless, or skipping it if it is zero.

Release 1.5 changes

3rd December 2007 — release 1.5 (1.5.1203).

In the core library, in brief:

  • Support for NETCFv1.
  • All NETCF code has been tested on real devices including running the full test-suite there (~700 unit tests, plus IrDA-specified tests and the sample programs).
  • Support for Mono (, tested on Windows and on Linux, on versions 1.2.4, 1.2.5 and 1.2.6. For the library in 1.2.4 some differences in behaviour remain, for instance on certain invalid Folder-Listings a NullReferenceException occurs (Mono bug 80231) instead an XML exception, and in certain cases of calling Abort with an ObexPutStream/ObexGetStream a MissingMemberException occurs rather that an ObjectDisposedException. The samples work fully in 1.2.6 and some of them work in earlier versions, however the BackgroundWorker component in Mono prior to 1.2.6 is not thread-safe so bad behaviour can occur in samples that use it.
  • Added a HasSize property and a corresponding ResetSize method to ObexFileOrFolderItem class, and thus to ObexFolderItem, and ObexFileItem classes. This allows one to know whether a size was included in the folder-listing, or whether the folder-listing item simply did not have a size value. See the FolderExplorer sample Details view for an example of using these properties.
  • The ProtocolViolationException message when parsing an incorrectly formatted received PDU now reports information about the location of the fault, for example “Overrun PDU in parsing at index: 3, location: 'pre-header-bytes', pduLength: 3.”
  • A fix to workaround the bug in various servers where a connect response packet signalling an error is in a bad format (it doesn't contain the necessary connect bytes). We detect the short response when it has an error code and suppress the ProtocolViolationException in that case so that the ‘bad response code error’ can occur.
  • A fix to workaround the bug in the Widcomm servers, where a connect response packet signalling an error has zero in the maximum-packet-size field.
  • A fix to workaround the Widcomm Abort fault where it returns an illegal Final PDU. We now ignore any such invalid responses in that case.
  • Adding null Byte-Array headers disallowed.

In the samples, in brief:

  • Updated to use version 2.2 of the InTheHand 32feet.NET library. Note that the NullReferenceException that would occur when attempting a Bluetooth connection on a CE/PPC device without the Microsoft Bluetooth stack was an issue in that library and has been fixed (their workitem 11744).
  • Added TraceStream to the TransportConnections library, providing simple diagnostic of stream operations for NETCF. Use network tracing on the full framework, see the “Samples/Enable Network Logging, rename to app.exe.config” file.
  • UriObexSessionConnection did not support the scheme "obex:" and new constructors taking a BluetoothAddress or IrDAAddress and a scheme. Some checking of command format in GetFolderListings.
  • A fix to workaround a fault in the NETCFv1 where TcpClient fails to connect to a peer where the target is an IPAddress string.
  • Form titles all made to match the application’s name.
  • FolderExplorer opens the GET operation in the sub form which also provides must better error handling and reporting.
  • FolderExplorer on NETCF, fix the Close button state after cancel/fail fix.
  • FolderExplorerSp (SmartPhone) renaming of Soft Key menu 2.
  • Mark manual new threads as ‘IsBackground=true’ to ensure that they don't keep the program around after the form is closed.
  • Handle IOException on conn.Connect()

Beta 3

26st November 2006 — Beta 3 (1.3.2521).

In the core library, In brief:

  • Access to the response metadata headers in a GET request is provided via the ResponseHeaders property on ObexGetStream. This can be used to find the length of the object being downloaded. See the FolderExplorer2 sample which uses this feature to update the progress bar.
  • GET (GetTo/Get) did not work on the NETCF; failing with an InvalidCastException. This has been fixed.
  • Code to run the NUnit-based unit-tests on the NETCF has been created to ensure the code quality of the complete library on that platform.
  • The Folder Listing parser failed on the NETCF when reading listings from most peer devices. This is due to a lack of support for DTDs in the NETCF XmlTextReader class, if used on a document that contains a DOCTYPE element it throws a NotSupportedException. This is bad, as the Folder Listing document is defined in the OBEX specification by a DTD and all the documents I've see do contain the document type declaration. This has been worked-around by creating code to strip any DOCTYPE element from received documents.
  • It also has been reported that some devices produce Folder Listing XML documents containing null bytes. When first writing the parser I had been aware that some devices included null bytes at the end of the document, and thus the parser is careful to read no further that the document end tag. However due to reports of some documents having null bytes in the middle of the document has meant creating another bit of ‘stripping’ code. This is disabled by default as I’ve seen no such documents showing this. This applies to both platforms.
  • The SetPath, SetPathUp, and SetPathReset methods have been changed to set the flag that indicates not to create a folder when it doesn't already exist by default. This was done particularly to suit some device types which prompt the user to allow an 'up' change even though the parent folder does exist. This could be a breaking change for code which uses the SetPath(String) method in particular. The method which used to take booleanarguments for the flags have also been changed to use enum values instead.
  • There has been one breaking change in the Pdus namespace, the values of the ObexPduType enum have changed. So don't redirect a application compiled against Beta 2 to this version, instead recompile. I aim for this to be the last such change.
  • Class documentation has been completed on all the main library classes, in particular on the ObexPduFactory class.
  • The class methods meant only for ‘advanced’ usages have been marked as such; firstly with the text “Advanced usage” in their parameter documentation, and secondly withSystem.ComponentModel.EditorBrowsableState.Advanced to control their appearance in Intellisense.

In the samples, in brief:

  • The NETCF Windows Forms samples in the previous version were pretty much useless. Whilst the library (and the command-line program) did work, the UI samples (and the IrDA-specfied tests) did not — due to threading issues. The samples have now been recreated in a full version of VS, tested, and they all seem to work fine.
  • Both the GuiObexSessionConnection class and the ConsoleMenuObexSessionConnection in the TransportConnection library now support TCP/IP connections. They connect to the specified default port of 650, with theGuiObexSessionConnection class displaying a prompt dialog box for the IP Address or hostname, and the ConsoleMenuObexSessionConnection class prompts on the console. With Alan's help support for both IPv4 and IPv6 has been verified.
  • A new Forms Control ProtocolComboBox is included in the TransportConnection library, it represents a drop-down list from which the user can select Bluetooth, IrDA, or TCP/IP. It returns the selected protocol as aSystem.Net.Sockets.ProtocolFamily value. All the UI samples have been updated to use this control.
  • FxCop has been run on the library and all major recommendations followed.

Beta 2

10th August 2006

In brief:
  • Folder-Listing XML parser. See classes Brecham.Obex.Objects.FolderListing and Brecham.Obex.Objects.FolderListingParser, and method GetFolderListing on class Brecham.Obex.ObexClientSession.
  • GetFolderListing sample updated to use the folder-listing parser, printing folder contents in the same style as Windows’ DIR command, also now supports download of any file types.
  • ObexClientSession. Addition of GetFolderListing method. It is also now implements IDisposable, calling its Dispose method will close the underlying stream. Also one fix, Connect and Delete can be called after after Abort.
  • The are also a number of new sample projects all for VB.NET, as the feedback clearly showed that they were important. They are VbPutSample, PutGuiVb, GetFirstListedFile, and FolderExplorerVb. See below. Also the source for the GetFolderListing is now included.
  • The samples now includes a library to handle creating connection to OBEX servers over both Bluetooth or IrDA, and also handle disconnect and clean-up. It includes three classes, one to handle connections in a GUI application, one for console menu-driven applications like GetFolderListings, and one that accepts a URI of a similar format to that used by 32feet.NET’s ObexWebRequest class.
  • In Beta 1 the command-line programs built for the NETCF were incorrectly being compiled as type WinExe so produced no console output, this has been fixed in this release. Unfortunately the VB samples could not be compiled for the NETCF, the VB compiler exploding when asked to do so…
  • Exceptions now serializable. Also, ObexCreateTooLongException was moved to the Pdus namespace.

Beta 1

16th July 2006
Initial release

Last edited May 15, 2014 at 7:34 PM by alanjmcf, version 3