Link / dll issues on WM 6.5 and Widcomm Stack 5.0

76 views
Skip to first unread message

Flo

unread,
Feb 22, 2010, 4:58:02 AM2/22/10
to bluecove-developers
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 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

Vlad Skarzhevskyy

unread,
Feb 22, 2010, 1:14:26 PM2/22/10
to bluecove-...@googlegroups.com
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



--
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

Flo

unread,
Feb 24, 2010, 5:35:43 AM2/24/10
to bluecove-developers
Yepp, that’s what I did. But it sucks to offer two or even more cab
installer for different Windows Mobile versions.

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 /

Vlad Skarzhevskyy

unread,
Feb 24, 2010, 10:39:18 AM2/24/10
to bluecove-...@googlegroups.com
See file WIDCOMMStack.h
 I select the dll base on SDK used to compile our dll.
 I don't think that dll compiled for sdk50 would work with sdk30 widcomm dll.
 Vlad

Flo

unread,
Feb 24, 2010, 11:05:53 AM2/24/10
to bluecove-developers
>> I don't think that dll compiled for sdk50 would work with sdk30 widcomm

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

Jacek.lewand

unread,
Apr 25, 2010, 10:35:15 AM4/25/10
to bluecove-developers
Florian,

Could you provide more detailed info how you achieved/ how you
compiled bluecove to work with HTC HD2 on WM 6.5, please?

Mayby you could provide already compiled stack that worked for you as
well?

I would appreciate for this as I am having the same problem to run
bluecove with phoneME on HTC HD2.

Thank you in advance

Jacek

On 24 Lut, 17:05, Flo <f...@baimos.de> wrote:
> >> I don't think that dll compiled for sdk50 would work with sdk30 widcomm
>
> 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
> > > > > - 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
>
> > > --
> > > 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- Ukryj cytowany tekst -
>
> - Pokaż cytowany tekst -

Flo

unread,
Apr 26, 2010, 4:23:55 AM4/26/10
to bluecove-developers, aa6...@coventry.ac.uk
Hi,

I uploaded the explained wrapper dll and its source to our webserver:

- http://staticupdate.blueid.eu/bluecove/BlueCove.zip (binary)
- http://staticupdate.blueid.eu/bluecove/bluecove_mod_files.zip
(source)

How does it work:

Intelbth_ce.dll checks if the widcomm stack or MS stack is available
-> that’s the point for the first LoadLibrary patch (see the older
posts)

If the widcomm is installed, load the bluecove_ce.dll, but now that’s
a simple c-wrapper dll, which tries to load first the 3.0 sdk and if
it fails, the 5.0.

I think now you have all what you need.

- intelbth_ce.dll (is the recompiled 2.0.2 version with the patch I
posted to the mailing list)
- bluecove_ce.dll (is the wrapper, who decides which Widcomm stack
version is installed)
- bluecove30_ce.dll (is the original bluecove_ce.dll from the BlueCove
2.0.2 archive)
- bluecove50_ce.dll (is the bluecove_ce.dll from the current BlueCove
2.1.0 version with some merged functions to be compatible with 2.0.2
and linked against the 5.0 sdk)

BTW: I talked to Davy (phoneME project). And he is (or was) working on
this issue, too.

But in the matter of fact, it’s a Bluecove Windows Ce issue. I think
it has to be resolved here in Bluecove, not in phoneME or anywhere
else.


Good luck,

Florian
> > - Poka¿ cytowany tekst -
>
> --
> You received this message because you are subscribed to the Google
> Groups "bluecove-developers" group.
> For more options, visit this group athttp://groups.google.com/group/bluecove-developers

Jacek Lewandowski

unread,
Apr 26, 2010, 4:40:50 AM4/26/10
to bluecove-...@googlegroups.com
Hi Florian,
 
Huge thanks to you for this!
 
Works perfectly now!
 
Vlad,
what do you think to put this fix in the next bluecove release? It would be highly desired I think.
 
 
Great work again
 
Cheers,
Jacek

2010/4/26 Flo <f...@baimos.de>



--
Pozdrawiam,
Jacek Lewandowski
Reply all
Reply to author
Forward
0 new messages