Friday, July 30, 2010

HTC Desire SPP 2.1 Issues

If you have an HTC Desire and you are having issues with your Bluetooth code, such as:

  • Service Discovery doesn't work or flaky
  • Can't see Misc devices, i.e. those with a Bluetooth device type of Headset, Phone or Comp
  • If you have issues communicating via SPP (Serial Port Profile)
  • Just plain not working
You will need to upgrade the ROM on the phone, these may all be fixed with HTC Desire 2.2 update which out "today", but if not its the bluez bluetooth code that has been fixed.

The only ROM that fully supports all of this is the ROM, I've tried all ROMS this one is the only one that works correctly, but its based on the Nexus One ROM, so you won't have Sense, but if someone updates the ROMs with the latest BlueZ stuff, it *should* work.

OpenSource ftw?

I had similar issues when developing for a J2ME app on my old K800i, but what could I do?

Finding Bluetooth Service Address on Windows

If you have connected to a device, but want to write code to discover it, you need to know the service address/guid of the bluetooth device, in order to talk to it.

On Windows if you navigate to


You will see the devices connected and then in HardwareID you will see the value at the end for SPP it is usually.


Wednesday, July 14, 2010

Could not create the driver from NHibernate.Driver.SqlServerCeDriver

Using Fluent NHibernate and MsSqlCeConfiguration, I wanted to use an SQL Compact DB for my Database by changing the FluentConfiguration but I started getting the errors from the InnerException.

"Could not create the driver from NHibernate.Driver.SqlServerCeDriver"

The fix is simples,

You need to add a reference to


Located in

"C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Desktop\System.Data.SqlServerCe.dll"

If you don't have it, you'll need to install it from.

Once you've added it you need to set the

"Copy Local" to true.

Then you should be good to go.

Wednesday, July 07, 2010

Failed object initialization (ISupportInitialize.EndInit). Error on Windows XP

Failed object initialization (ISupportInitialize.EndInit). Method not found: 'System.Windows.Threading.DispatcherOperation System.Windows.Threading.Dispatcher.BeginInvoke(System.Delegate, System.Object[])'

If you get this error, looking at the MSDN page for the method call

It says at the bottom:

Version Information
.NET Framework
Supported in: 3.5 SP1, 3.0 SP2

The computer was running 3.5 vanilla, install the update and you'll be good to go.