I developed and ported a Java application to Windows Mobile. The VM is
Suns PhoneME in a forked version from this website
http://www.cs.kuleuven.be/~davy/phoneme/?q=node/10 with Bluecove /
Bluetooth support (really old 2.0.2 version). No matter, it works
fine.
Some days ago I received a report from a HTC HD2 user. The device is
delivered with the new Windows Mobile 6.5 and the Widcomm stack. The
user told me that the application is not working...
So I started an investigation and I think that’s also important for
you:
The error message says that Bluetooth is not supported on this device.
The reason for this, is the missing BtSdkCE30.dll file. The Windows
directory contains only the BtSdkCE50.dll file.
This means first, no Bluetooth detection because the dll cannot be
found. But that’s not the kicker.
You link against the BtSdkCE30.lib and to the BtSdkCE30.dll in your
binaries (bluecove_ce.dll). That will never work for example on the
HTC HD2.
On the other hand, if I compile / link Bluecove against the new
BtSdkCE50.lib and BtSdkCE50.dll it works on the HTC HD2 but not on
older devices.
Game over.
I think the only solution would be another Widcomm dll. First Widcomm
dll links agains the 5.0 SDK, second links against 3.0 SDK and a
loader which checks which dll is available and loads the right one.
What also could be done, is a wrapper dll without static lib bindings
– but the dirty c++ dll exports of the Widcomm SDK need therefore
“some” hacking.
If anyone has a working solution, it would be great!
In addition to the PhoneME VM, I used the IBM J9 Runtime and the
current Bluecove 2.1.0 version to double check.
Cheers,
Florian
--
You received this message because you are subscribed to the Google
Groups "bluecove-developers" group.
For more options, visit this group at
http://groups.google.com/group/bluecove-developers
Notes: I had to change the Widcomm lib from BtSdkCE30.lib to
BtSdkCE50.lib.
And it’s not enough to recompile the bluecove_ce.dll. You check the
widcomm sdk in intelbth_ce.dll.
It would be better if you do something like that:
#define WIDCOMM_30_DLL L"BtSdkCE30.dll"
#define WIDCOMM_50_DLL L"BtSdkCE50.dll"
And in your LoadLibrary check:
HMODULE h = LoadLibrary(WIDCOMM_30_DLL);
if (h == NULL) {
h = LoadLibrary(WIDCOMM_50_DLL);
if (h == NULL) {
return FALSE;
}
}
What I am doing at the moment is to write a wrapper dll which checks
the widcomm dll dependencies:
bluecove_ce.dll is the wrapper dll. It tries to load bluecove30_ce.dll
which links against BtSdkCE30.dll, if it fails load bluecove50_ce.dll
which links against BtSdkCE50.dll.
I think, the decision can be done in Java and without the wrapper
bluecove_ce.dll above, maybe I’ll test this.
On Feb 22, 7:14 pm, Vlad Skarzhevskyy <skarzhevs...@gmail.com> wrote:
> I think you just need to compile bluecove for WM6 with diferent Widcomm SDK.
> And use the created dll for distributions to clients with this OS.
>
> Vlad
>
> On Mon, Feb 22, 2010 at 4:58 AM, Flo <f...@baimos.de> wrote:
> > Hi there,
>
> > I developed and ported a Java application to Windows Mobile. The VM is
> > Suns PhoneME in a forked version from this website
> >http://www.cs.kuleuven.be/~davy/phoneme/?q=node/10<http://www.cs.kuleuven.be/%7Edavy/phoneme/?q=node/10>with Bluecove /
Yes it don't work, on the other hand the sdk30 won’t work with the
sdk50 which has been delivered with the HTC HD2.
That’s what tried to explain and what my problem is.
If Bluecove want to be sdk version independent, we need a second
bluecove_ce.dll plus a loader who checks, which sdk version is
installed.
intelbth_ce.dll checks with LoadLibrary which Widcomm sdk is
available. This can be BtSdkCE30.dll OR BtCoreIf.dll – so there is no
chance to be version independent. That’s why I posted the LoadLibrary
example patch.
The second step would be to write a wrapper which loads
bluecove_ce.dll for sdk30 OR a bluecove_ce.dll for sdk50.
I hope you understand what I mean.
Florian