We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › Bluetooth library working in Processing
Page Index Toggle Pages: 1
Bluetooth library working in Processing? (Read 3094 times)
Bluetooth library working in Processing?
Sep 8th, 2007, 7:44pm
 
Hello,

I've read that the Bluetooth library ( http://mjs.darkgreenmedia.com/site/?service=Sections&task=showSection&sectionID=3&contentID=29 )
is supposed to work in both Mobile Processing and Processing. I need to detect mobile devices around a MacBook. Nonetheless, after following the installing instructions and trying to run the examples, Processing fires a compiler error and directs me to the bug section. I suspect that it might be a problem with intel macs, but want to be sure if anyone has experience with this before going to buy a bluetooth adapter for PC. Anyone?

Thanks
Re: Bluetooth library working in Processing?
Reply #1 - Sep 9th, 2007, 3:51am
 
have you installed the following jars to Processing?
  *Avetana Bluetooth implementacion para Linux incluida (GPL)
  or *Puede utilizar la version de Avetana Bluetooth licenciada para Windows, Linux y MacOSX
  or *Otras implementaciones
and
*Libreria Cliente Servidor (MClientServer)
Re: Bluetooth library working in Processing?
Reply #2 - Sep 9th, 2007, 7:50pm
 
I downloaded Avetana Bluetooth implementation placed it on the Library folder and changed the export.txt file (that's in the instructions for windows: http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Electronics;action=display;num=1159140092
The other Library is installed but it wouldn't help. I run avetanaBluetooth.jar from the terminal and I don't get it quite right but it cannot detect my cellphone??? Actually he warns that the library has only been tested under Linux! so I guess it is indeed an issue of the library in Intel Mac/Mac OS X...Any help regarding mobile detection from a laptop/desktop or a similar library, or anything related is highly welcome!

Else I'll have to install Ubuntu in my macbook to try this! Would that work?
Re: Bluetooth library working in Processing?
Reply #3 - Sep 10th, 2007, 12:34am
 
Ooops, without understanding really how, it looks like the Aventana demo responded, and now there's no more compiler error. Anyway there's an exception that I've found in this part of the forum (also related):

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=os_libraries_tools;action=display;num=1154321908

It's a null pointer exception:


java.lang.NullPointerException
at mjs.processing.mobile.mbluetooth.MBluetooth.deviceName(Unknown Source)

I still hope to get help or an alternative. Fingers are crossed!
Re: Bluetooth library working in Processing?
Reply #4 - Sep 26th, 2007, 12:34am
 
Hi,

I'm getting the same error on a Macbook Pro (Intel) OS 10.4.

And while trying out the pTictactoe example I get another error and wonder if they are related setting up paths:

Highlighted when sketch is run:

 //// initialize Bluetooth library
 bt = new MBluetoothP(this);

And the console reads:

java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sun/kvem/jsr082/bluetooth/DiscoveryAgentImpl

at mjs.processing.mobile.mbluetooth.MBluetooth.<init>(Unknown Source)
at mjs.processing.mobile.mbluetooth.MBluetoothP.<init>(Unknown Source)
at mjs.processing.mobile.mbluetooth.MBluetoothP.<init>(Unknown Source)
at Temporary_3761_9579.setup(Temporary_3
at mjs.processing.mobile.mbluetooth.MBluetooth.<init>(Unknown Source)
761_9579.java:58)
at processing.core.PApplet.handleDisplay(PApplet.java:1285)
at processing.core.PGraphics.requestDisplay(PGraphics.java:680)
at processing.core.PApplet.run(PApplet.java:1454)
at java.lang.Thread.run(Thread.java:613)

Thanks for any help!

Patricio
Re: Bluetooth library working in Processing?
Reply #5 - Nov 13th, 2007, 4:06pm
 
Some months after and I come back to this project. Somehow the Library seems to be useless in either intel macs or new processing versions. I tried it in Linux and is still giving me the same message. Has anyone achieved to work with Bluetooth communication in processing? Basic detection/communication? I cannot find many examples...and I'm not really versed in java matters as to try to implement my own library over the JSR-82...

hope someone has worked around this...Thanks
Re: Bluetooth library working in Processing?
Reply #6 - Nov 14th, 2007, 4:09am
 
these links may be for you, i hope.
http://www.wiili.org/index.php/WiiremoteJ
http://www.wiili.org/forum/wiiremotej-tips-t2815.html
bluetoothDesktop, bluetooth library for processing
Reply #7 - Nov 14th, 2007, 4:59am
 
I recently ported Mobile Processing's Bluetooth library to Proce55ing, because I needed it for a project.

Be warned, it's a quick'n'dirty port Wink but works. You'll need a jsr-82 implementation.
I'll pack it up as a library including documentation shortly. Untill then, try this and let me know if it works for you:
http://www.extrapixel.ch/processing/bluetooth_alpha.zip
UPDATE: download bluetoothDesktop here:
http://www.extrapixel.ch/processing/bluetoothDesktop/

Usage is exactly as described here, only the name of the callback method has changed:
http://mobile.processing.org/reference/libraries/bluetooth/index.php
including the improvements made here:
http://todbot.com/blog/2006/09/12/roombactrl-drive-your-roomba-with-your-cell-phone/
Re: Bluetooth library working in Processing?
Reply #8 - Nov 14th, 2007, 1:51pm
 
Hi! Thanks a lot for the post...I think it will do but since I was playing some time before with the free avetana implementation for mac, now the license is gone and that's the message I get in processing, so I should buy it...or use the free linux version(I have an intel mac with ubuntu7.04 as second OS), but I've wasted half of my day trying to compile that stuff, and I'm just an ubuntu newbie. Do you happen to have one recent compiled version? Or, did you buy it? Just to check, before giving those euros away:)

thanks again
Re: Bluetooth library working in Processing?
Reply #9 - Nov 14th, 2007, 2:59pm
 
i have bought an avetana for my PPCmac.
but there is another open project going on.
http://sourceforge.net/projects/javabluetooth/
Re: Bluetooth library working in Processing?
Reply #10 - Nov 15th, 2007, 2:43pm
 
Hi,

There's a compiled avetanaBT.jar in the download of the MBluetooth library for Mobile Processing. You can grab it from there:
http://mjs.darkgreenmedia.com/site/?service=Sections&task=showSection&sectionID=3&contentID=29

I couldn't test it though, as I don't have a linux box.

You can now download my compiled bluetoothDesktop library:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=LibraryProblems;action=display;num=1195091003;start=0#0

And if you use it and it works with the free avetanaBT & Linux, please report it in the bluetoothDesktop thread.
Page Index Toggle Pages: 1