OBEX File Transfer Connection Problem

110 views
Skip to first unread message

ErisDS

unread,
Jun 22, 2008, 5:45:26 AM6/22/08
to bluecove-users
Hi,
I'm having a problem with creating a connection

I'm using JCreator, I have the MS bluetooth stack, my hardware plugged
in and recognised, and I've included the bluecove implementation.

I can perform a device search, and discover the services provided.
I'm now trying to connect to OBEX File Transfer. I've tried the
following two methods:

FileConnection fc = (FileConnection)Connector.open(connectionURL);


and

ClientSession conn = (ClientSession) Connector.open(connectionURL);



they both throw the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError:
javax.microedition.io.Connector.isNetworkMonitorActive()Z
at javax.microedition.io.Connector.isNetworkMonitorActive(Native
Method)
at javax.microedition.io.Connector.<clinit>(Connector.java:171)
at BluetoothHandler.connect(BluetoothHandler.java:169)
at BluetoothHandler.<init>(BluetoothHandler.java:79)
at Transfer.doBluetooth(Transfer.java:32)
at Transfer.<init>(Transfer.java:19)
at Transfer.main(Transfer.java:24)

I am including jsr75.jar and others from the WTK that came with the
Sony Ericsson SDK. I know you need a further implementation of jsr082
(i.e. bluecove), but I don't think that's the case with jsr75 and
others?
More to the point, extensive searching points to this error meaning
that I have failed to load a dll. Lots of people point to this page:
http://mindprod.com/jgloss/runerrormessages.html#UNSATISFIEDLINKERROR

Wassup doesn't report a value for "java.library.path", which perhaps
points to the problem.

My problem is I have no idea what dll it is I'm missing? Bluecove is
supposed to extract the intelbth.dll to a temp directory and link to
it itself, which is happening, and I have also copied this dll into
system32 to make doubly sure. The only other dll I have come across
mentioned is zayit.dll, I have zayitlib.dll in my C:\SonyEricsson
\JavaME_SDK_CLDC\WTK2\bin folder which is referenced in both CLASSPATH
and Path to no avail.

I have additionally tried using System.loadLibrary and System.load to
included both of those dll's.

If anyone could please point me in the right direction I'd appreciate
it!

Eris

Vlad Skarzhevskyy

unread,
Jun 22, 2008, 12:55:24 PM6/22/08
to bluecov...@googlegroups.com
To the best of my knowlage WTK  does not run under j2se and bluecove does not run under WTK jvm.
--
Vlad

ErisDS

unread,
Jun 22, 2008, 2:44:17 PM6/22/08
to bluecove-users
Hi There,

Firstly, thank you for taking the time to answer.

I'm afraid I'm not the most well versed in Java terminology.
Where should I be getting the jsr75 etc libraries from? J2ME or
somewhere else?

If you could let me know what I need to make this work I'd be much
obliged.

Thanks again,

Eris



On Jun 22, 5:55 pm, "Vlad Skarzhevskyy" <skarzhevs...@gmail.com>
wrote:

Vlad Skarzhevskyy

unread,
Jun 22, 2008, 3:40:28 PM6/22/08
to bluecov...@googlegroups.com
The other project I'm working on is http://www.microemu.org/
It has  jsr-75 file connection working in regular java and also it can be integrated with BlueCove.
--
Vlad

ErisDS

unread,
Jun 28, 2008, 7:43:59 AM6/28/08
to bluecove-users
Hi Vlad,

Thanks for your help before.
I've gotten a few steps further, and now I've gotten to another dead
end. I was wondering if anyone could perhaps help me figure out these
error messages?

I have tried using jsr-75 from both MicroEmu and Sony Ericsson. Both
of them throw the same error when I try to use the FileConnector like
this:
"FileConnection fc = (FileConnection)Connector.open(connectionURL);"

The error thrown is:

"com.intel.bluetooth.obex.OBEXClientSessionImpl cannot be cast to
javax.microedition.io.file.FileConnection"

It seems that FileConnection and ClientSession are conflicting for
Connector? But I'm sure it says that BlueCove supports the
FileConnection API?

I believe that the FileConnection API is easier/better to use than
ClientSession, but I've had a go with ClientSession anyway. Connecting
to Obex File transfer on my Sony Ericsson returns
"OBEX_HTTP_FORBIDDEN", which I guess means that phone won't allow me
to get files via its native service?

My Nokia allows me to connect and fetch a folder listing. However when
trying to get an image file (which is my sole purpose in life at the
moment...retrieve an image from a phone)
op = conn.get(getfile);

returns the IOException
"Invalid ISO-8601 date 20080604T232938"

which is very strange because firstly, I don’t see why reading an
invalid date would stop the software from reading the file (this is
the date the photo was taken), and secondly 20080604T232938 appears to
be a valid ISO-8601 date!!!

So I'm banging my head against a brick wall on three fronts.
1. Why does FileConnector not work? What am I missing?
2. Any ideas why my Sony Ericsson K800 returns OBEX_HTTP_FORBIDDEN,
does it actually forbid obex http or does this mean it requires some
sort of authentication?
3. Why is obex get returning that a valid date is invalid and why does
it care?

If anyone could answer 1 of those 3 questions, I might be able to get
somewhere!

Many, many thanks,
Eris



On Jun 22, 8:40 pm, "Vlad Skarzhevskyy" <skarzhevs...@gmail.com>
wrote:
> The other project I'm working on ishttp://www.microemu.org/

Vlad Skarzhevskyy

unread,
Jun 30, 2008, 7:23:29 PM6/30/08
to bluecov...@googlegroups.com
1.
The jsr-75 is to access local file system, Nothing to do with
bluecove. MicroEmulator have some version of it.
The jsr-82 obex is to access remote file system over bluetooth.
You can cast obex connection to FileConnection

2.
I can't help you. May depend on what files you want to access. pair
you devices when you want to get files from phone.

3.
The problem with date on Nokia is fixed in BlueCove 2.0.3 there is
a bug for this.

--
Vlad

Reply all
Reply to author
Forward
0 new messages