Thursday, July 12, 2007

Finally got Microsoft Bluetooth Generic and ActiveSync working again!

My story so far to repairing bluetooth and activesync when they absolutely refuse to play ball...

Prologue:
(1) Disabled Microsoft ActiveSync to stop my mobile synchronising every time I wanted to charge it.
(2) Updated all software via Windows Update, including Bluetooth drivers.

Synopsis:
(1) ActiveSync refused to work again, even with repeated un-installs and re-installs.
(2) My ePox BT-DG03 Bluetooth USB Dongle stopped working because the latest Microsoft Bluetooth drivers are now called ABE Bluetooth Controller and don't work with it (these replaced the previous Windows XP SP2 bluetooth drivers "Generic Bluetooth Radio" and "Microsoft Bluetooth Enumerator".)

Today:
(1) Took a complete, clean copy of my C:\Windows\Inf, C:\Windows\System32 and all sub-folders onto my iPod and brought them in.
(2) Uninstalled ActiveSync and all associated Bluetooth drivers (Add/Remove Programs and Device Manager.)
(3) Connected Device via USB cable; Machine should recognise Generic RNDIS device and ask for drivers, etc.
(4) PLugged-in bluetooth dongle; Machine should again recognise bluetooth device and ask for drivers, etc.

The Secret:
When drivers are asked for;
(1) Un-install all the existing device drivers to avoid conflicts.
(2) From device manager, perform Update Drivers.
(3) Select "Install from a list or specific location (Advanced)."
(4) Select "Don't search. I will choose the driver to install."
(5) Click "Have disc".
(6) Browse to your backed-up copy of C:\Windows\Inf and select the file "drvindex.inf".
(7) From then on it should find the correct devices and all you have to do is show it where to find the right files.

I had to do this 2 or 3 times before the driver installs stuck, but now it's fairly happy and I can just plug the dongle and mobile phone in and no more reinstalls need to take place.

The key files I found are:
Bluetooth Device;
(1) rfcomm.sys (system32\drivers)
(2) wshBth.dll (system32)
(3) irftp.exe (system32)
(4) irmon.dll (system32)
Standard Modem over Bluetooth link;
(1) bthmodem.sys (system32\drivers)

Be warned, there are more files the auto-installer will ask for, but if/when I need to do this again, I'll try and note them all down.

Epilogue:
(1) I've had one instance where the bluetooth dongle needed to be reinstalled, but with care and forethought, the right drivers can be picked - this is down to selecting Show All Devices (when the option is presented) and always selecting \Inf\drvindex.inf, to give the auto-install the best chance of finding the right driver.

Saturday, July 07, 2007

iTunes Remote Control

Well, after a lot of help from the http://www.32feet.net/ forums, not forgetting Mr. Peter Foot himself, and late night messing, I've finally got a working version of my iTunes remote control (kinda) finished.
Ok, for those interested enough, there's a log window, which shouldn't dump out too much; volume controls work, but there's a bug in that once a volume or position value gets changed, messages start getting thrown back and forth- Once I've re-worked the request and response formats I'll be fixing the synchronisation issues. The format issue will also allow the playlist window to function by feeding from partial list messages.
There is also an iPod look-a-like dialog, which will in time provide full control. This will be waiting until after the other functions/bugs have been sorted out.
You can download the current version here: http://home.freeuk.com/eudoxus/BtChat.2007-07-07.001.rar
Again, thanks to everyone on the 32feet.net forums who helped!
Matt.

Thursday, July 05, 2007

Bluetooth iTunes Remote for Windows Mobile 5.0

Yep, I've been developing (and having problems with) a .NET/C# iTunes remote control for Windows Mobile 5.0. For my own reference, here's the download: http://home.freeuk.com/eudoxus/BtChat.iTunesRemote.2007-07-05.001.rar

[EDIT] This has no changed to: http://home.freeuk.com/eudoxus/BtChat.2007-07-07.001.rar
Please see post for update: http://springboardpillow.blogspot.com/2007/07/itunes-remote-control.html

In theory, I've got the whole thing working:

Queued message sending (from the client) to avoid blocking the BT device
Threaded timer updates of the display
Error log dialog
Back/Next/Play/Pause/Volume/Time controls
Track/Artist/Album display

The problem I'm facing right now is that bluetooth has completely failed on my work machine and I'm finding that the only drivers which work are the Generic Bluetooth Radio and Microsoft Bluetooth Enumerator - which should be one driver and are ONLY available via Windows Update - and of course have now been replaced by a broken driver called ABE.

To add to the fun threading seems to lock up when I kick off my own thread on the device side of the application, as if the two threads used for monitoring in-coming messages are the only threads I'm allowed to run. I'm not sure, but I think it might be the BtListener thread which is causing problems, however the forums say otherwise.