Open GoogleCodeExporter opened 8 years ago
The BlueCove library for OS X only compiled for 32-bit and would not run on
64-bits
You should compile the libbluecove.jnilib on your 64-bit computer.
See how to do this here: http://developer.apple.com/macosx/64bit.html
I don't have a 64-bit Mac to compile and test the library.
Original comment by skarzhev...@gmail.com
on 30 May 2008 at 2:24
I get the following error with the compiled library:
BlueCove version 2.0.3-SNAPSHOT on mac
java.lang.IllegalStateException: Bluetooth failed to initialize. There is
probably a problem with your local
Bluetooth stack or API.
at wiiremotej.WiiRemoteJ.<clinit>(WiiRemoteJ.java:57)
at WRLImpl.main(WRLImpl.java:46)
Caused by: javax.bluetooth.BluetoothStateException: Bluetooth Device is not
ready
at com.intel.bluetooth.BluetoothStackOSX.getLocalDeviceBluetoothAddress(Native Method)
at javax.bluetooth.LocalDevice.<init>(LocalDevice.java:73)
at javax.bluetooth.LocalDevice.getLocalDeviceInstance(LocalDevice.java:80)
at javax.bluetooth.LocalDevice.getLocalDevice(LocalDevice.java:97)
at wiiremotej.WiiRemoteJ.<clinit>(WiiRemoteJ.java:49)
... 1 more
^CBlueCove stack shutdown completed
For the record, with the latest XCode, you can compile for 64-bit even if you
don't have a 64-bit computer.
Obviously you can't test it, but you can compile it. All you have to do is set
some flags. Anyways, do you know
why I'm getting that error?
Original comment by ctt...@gmail.com
on 30 May 2008 at 3:25
Ok I compiled the library that should support 64 bit.
This is for latest 2.0.3 build.
Can you please confirm that it is working on OS X 64 ?
Regarding the error. Are there any other BT application working on your
computer?
You testing on 64 bit your own compiled binary library?
Regards,
Vlad
Original comment by skarzhev...@gmail.com
on 30 May 2008 at 4:43
Attachments:
No, that version (attached library) doesn't support 64-bit (I got the same "not
available" message when I
added it to the latest snapshot). If you're using the XCode project, you need
to set not only the valid
architectures, but also the actual architectures field itself to support x86_64.
I tried adding my jnilib to the latest snapshot from the day and got the same
error as above. I then switched
my Java version down to 1.5.0 and it worked (but 1.6.0 is only available in a
64-bit version :( ). I think there's
some difference in how the 64-bit stuff works. One issue could be storing
pointers in ints. Since pointers are
64-bit, any pointers stored in ints will not actually have the full memory
address (very informative, that Apple
page was). In any case, here's my java version information, though I'm not sure
if that will help:
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13-120)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_05-b13-52, mixed mode)
Michael
P.S. I wasn't running any other BT apps, and, as I mentioned, it worked just
fine when I used the 1.5.0 VM
seconds later.
Original comment by ctt...@gmail.com
on 30 May 2008 at 5:45
Before I sent you the file I change the architectures to: i386 ppc ppc64 x86_64
Also I change: Use 64-bit Integer Math [x]
May be I did not installed the 64-bit when installing XCode? There was no
questions
regarding this....
And I think that I don't use pointers as int in the code....
If you managed to solve the build problem on your computer can you send me the
bluecove.xcodeproj/project.pbxproj you have used to build the project?
My current build file in svn.
Original comment by skarzhev...@gmail.com
on 30 May 2008 at 5:58
You can set the option in the target section. Just right-click/control-click
"bluecove" (under Targets) and select
Get Info. Then, in the Build tab, under Architectures, double-click
"Architectures" (NOT "Valid Architectures" ).
Check both the boxes for 32-bit and 64-bit. Then when you build it, it should
be 64-bit compatible. If this
doesn't work out, I can send the file.
Original comment by ctt...@gmail.com
on 30 May 2008 at 6:05
So the file would be 600K instead of 300K. This is fine....
Lets try again. Probably I changed the project settings and not target...
Strange....
Original comment by skarzhev...@gmail.com
on 30 May 2008 at 6:11
Attachments:
Hrmm... I'm still getting "Native Library bluecove not available," though it
does appear to be the roughly the
right size. What version of Mac OS X/XCode are you working with? It may not
have the x86_64 setting (you don't
have to have an Intel computer, but you do needed the latest XCode). I'm
running OS 10.5.3 with XCode 3.0
(Component versions: Xcode IDE: 921.0, Xcode Core: 921.0, ToolSupport: 893.0).
Anyways, attached are my project file and my jnilib (which doesn't work, due to
the error mentioned above).
Original comment by ctt...@gmail.com
on 30 May 2008 at 6:26
Attachments:
I will take a look at build later.
But the problem may be that BT API is not supported on OS X 64-bit.
Can you try any BT examples from XCode and compile it for 64 bit does they work?
Original comment by skarzhev...@gmail.com
on 30 May 2008 at 7:25
I ran some of the bluetooth examples in XCode and discovery worked just fine. I
don't have a Bluetooth device
with OBEX lying around, so I don't if anything works beyond that, but I
definitely managed to discover devices
(my Wii Remote) without a problem.
Original comment by ctt...@gmail.com
on 30 May 2008 at 8:49
Did you compiled examples for 64-bit only? May be the example have been running
in
32-bit mode. Also add the function call IOBluetoothLocalDeviceReadAddress to
examples does it work?
Anyway I can't do anything since I don't have appropriate 64bit Mac. You are
welcome
to discover the problem and submit the patch.
I'll give some hints what to look for:
----
Get the code latest from svn/ Use yours project.pbxproj
Run bluecove with -Dbluecove.debug=true
It should print allot of stuff.
Look for: LocalDeviceReadAddress error [0x
Find the error code
http://developer.apple.com/documentation/Darwin/Reference/IOKit/IOReturn/Composi
tePage.html
----
If IOBluetoothLocalDeviceReadAddress not working in 64 bits try using
Objective-C API
IOBluetoothHostController. But I think it is not available in Tiger so switch
should
added at runtime to use older functions on Bluetooth api before version 2...
----
The bluecove OBEX code is completely in java so is irrelevant.
----
Also this is extract from Apple docs:
I/O
64-bit applications can use posix read, write, and ioctl APIs to access storage
devices and can use sockets for network I/O. However, they won't be able to use
IOKitLib and IOUserClient plug-ins to access devices.
-----
The Bluetooth API on OS X is build on top of IOKit.framework ....
PS
If you are going to make some changes please switch to e-mail for other talk on
subject skarzhevskyy@gmail.com
Original comment by skarzhev...@gmail.com
on 31 May 2008 at 12:16
[deleted comment]
[deleted comment]
For some reason, I can't see your comment 12 here and thus can't download the
attachment for testing (I got the
comment in my email, but no attachment). Could you repost or send it directly?
My address is: my username
@gmail.com.
Original comment by ctt...@gmail.com
on 25 Jun 2008 at 10:17
I can confirm that I can reproduce exactly the same issue on a Mac with Java SE
6 (64 bits)
I modified my code to use, and compile with, Java 5 and with this JRE Bluecove
works as expected.
I got kind of lost in the mix of comments that you guys have posted. I would
happily help you porting and
testing the platform on JavaSE 6 if you could give me an update on the previous
matter.
Original comment by jaumedej...@gmail.com
on 21 Sep 2008 at 4:52
Hey is there anymore news on this issue? Id really like to use javafx with
bluecove in my final year project for
university but I believe javafx requires 1.6, im happy to do testing if
required.
Original comment by peterp...@googlemail.com
on 12 Oct 2008 at 3:06
By modifying my project.pbxp to include x86_64, I was able to compile a version
of
the jnilib that loads successfully under Java 1.6 (64 bits) on OS X.
Unfortunately, as others have suggested, we have a much larger problem. Mac OS X
Bluetooth isn't really 64 compatible.
Bluecove now throws a "Bluetooth Device is not ready" exception. The underlying
error
appears to be:
3/5/09 8:32:15 AM kernel IOMemoryDescriptor: attempt to create 32b virtual in
64b
task, use ::withAddressRange()
This is thrown during memory descriptor initialization while attempting to get
the
controller's address. You can see the IOKit code responsible here:
http://fxr.watson.org/fxr/source/iokit/Kernel/IOMemoryDescriptor.cpp?v=xnu-1228
We're not the only ones with this problem either.
http://lists.apple.com/archives/Bluetooth-dev/2008/Sep/msg00011.html
http://lists.apple.com/archives/Bluetooth-dev/2008/Jun/msg00003.html
Unfortunately, no one seems to have any solutions. Guess we cross our fingers
and
hope Snow Leopard fixes it?
Original comment by christop...@gmail.com
on 5 Mar 2009 at 2:52
Are there a way to switch temporary to 32 bit task in Mac OS?
Because the connection classes are working under 64 bit. It is Only reading
devices
address have the problem.
Original comment by skarzhev...@gmail.com
on 5 Mar 2009 at 3:43
Hi, I didn't read through all of the comments but this might be a solution for
Java apps wrapped in proper Mac
application bundles: http://www.uweschmidt.org/comment/528
Uwe
Original comment by uschmidt83@googlemail.com
on 1 Apr 2009 at 2:38
Uwe, unfortunately the solution listed under that link doesn't work. At least
it
doesn't on my machine. Besides, there seems to be a greater issue here.
Apparently
some IO libraries that Bluecove uses are not 64-bit enabled so they don't talk
to the
BT device correctly. Anyone know of a fix?
Original comment by acha...@gmail.com
on 1 Apr 2009 at 6:52
You can disable the 64-bit VM for all Java apps:
http://www.uweschmidt.org/comment/686
Uwe
Original comment by uschmidt83@googlemail.com
on 20 May 2009 at 9:14
Three ways to disable 64-bit mode: http://support.apple.com/kb/TS2827
Uwe
Original comment by uschmidt83@googlemail.com
on 24 Jul 2009 at 11:26
FYI in eclipse you can get 1.6 to run in 32bit mode by passing the argument
-d32 as a
"VM arguments" under the run profile settings. - that is run target specific of
course :)
Original comment by antony.s...@gmail.com
on 8 Dec 2009 at 3:40
With snow leopard the BT stack should be 64-bit native. Is there any way to get
bluecove working with 1.6 64bit
on 10.6?
@christophercyll: how did you get it to compile?
Original comment by j0t...@gmail.com
on 14 Dec 2009 at 1:43
Bluecove is working for me on Snow Leopard with a 64 bit JVM.
I just added the x86_64 arch to the xcode project (although I did need the
patch I
attached to bug 95 for an unrelated issue) and Snow Leopard seems to have done
the rest.
Given that Snow Leopard has fixed this problem, I'd be interested in seeing the
next
released jar contain a mac native library built to also support 64 bit.
The one complication would be making sure the it wasn't loaded on 10.5 with a
64 bit
JVM. I've seen some pretty wild behavior when trying to use that combo,
including
machines hard freezing temporarily after the failed attempt to read the local
address
(yikes!). So blacklisting that combo from loading the native library might be
in order.
Original comment by christop...@gmail.com
on 6 Jan 2010 at 8:29
@christophercyll: is it possible to get a copy of your compile result, i can
get it running?
thanx,
Michael
Original comment by michael....@m-strick.de
on 16 Jan 2010 at 10:09
Hi, we just got this running on SnowLeopard using latest SVN Top. Was basically
a
question of adding the target, recompiling native, building jars and making
sure the
right files were being used.
If I can help with testing on Mac platforms let me know. When is the next
release due?
Original comment by rich.d.r...@gmail.com
on 9 Feb 2010 at 3:33
I was recently working on a project using the eclipse IDE when i ran into the
problem (OS X SL 10.6.2). I set it to
run in 32-bit mode as suggested earlier (thanks for that). Would be nice to see
64 bit support out of the box.
Thanks for the short-term fix and im open to giving a helping hand.
Original comment by ade...@cis.strath.ac.uk
on 14 Mar 2010 at 11:56
Oh how I wish I could build this in 10.6. I keep getting an error
com_intel_bluetooth_BluetoothStackOSX.h not
found.
Original comment by Timothy....@gmail.com
on 25 Mar 2010 at 4:47
x86_64 added to default build.
Anybody may confirm that latest build 2.1.1-SNAPSHOT.61 works on Snow Leo ?
http://snapshot.bluecove.org/distribution/download/2.1.1-SNAPSHOT/2.1.1-SNAPSHOT
.61/
Also there is a bug http://code.google.com/p/bluecove/issues/detail?id=104 that
RFCOMM is not working on 10.6.2 x86_64 Can anybody confirm this bug as well?
Original comment by skarzhev...@gmail.com
on 31 Mar 2010 at 6:31
I have downloaded and tested the snapshot on my Mac using Snow Leopard and it
appears to be working fine. I
have not specifically tested RFCOMM yet, so cannot confirm that the RFCOMM bug
is fixed. I will continue
testing and let you know if I do encounter any problems.
Original comment by drsteven...@gmail.com
on 8 Apr 2010 at 3:52
The snapshot seems to work on snow leopard 10.6.2. Did not try to reproduce the
RFCOMM bug.
Original comment by d.de...@gmail.com
on 11 Apr 2010 at 12:31
[deleted comment]
Hi,
just use -32d in "Default VM Arguments". This will start the VM in 32bit mode
instead of 64bit. That worked for me! I use Mac OS X 10.6, Eclipse 3.1.1. Just
follow the steps her:
http://www.christian-straube.de/2010/05/10/junit-4-0-testing-in-eclipse-und-snow
-leopard/ (if you want to contact me, you'll find my adress here
http://www.christian-straube.de/about/).
Original comment by strauber...@googlemail.com
on 1 Jul 2010 at 6:47
-d32 works for me, -32d gave an error.
Original comment by lrumin...@gmail.com
on 1 Sep 2010 at 10:33
Dear all;
Exception in thread "main" java.lang.NoClassDefFoundError: javax/bluetooth/Bluet
oothStateException
at WRLImpl.main(WRLImpl.java:46)
Caused by: java.lang.ClassNotFoundException: javax.bluetooth.BluetoothStateExcep
tion
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.misc.Launcher$ExtClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
i download JSR82 to excute with Wiiremotej,what the problem, can u give me a
hints
Original comment by thethlai...@gmail.com
on 6 Nov 2010 at 8:38
@Timothy.Overly : run ant to compile java before compiling the jnilib in Xcode.
Original comment by shimniok
on 27 Dec 2010 at 7:01
use "java -d32" which runs the JVM in 32bit mode and your bundled jnilib will
still work.
Original comment by loni...@gmail.com
on 25 Oct 2011 at 9:37
Original issue reported on code.google.com by
ctt...@gmail.com
on 30 May 2008 at 12:52