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 for processing
Pages: 1 2 3 4 
Bluetooth library for processing (Read 25569 times)
Re: Bluetooth library for processing
Reply #45 - Mar 17th, 2009, 11:12pm
 
Hi, I am wondering is it possible to search every say 2 minutes for bluetooth devices and update the devices that have previously been shown. I am quiet new to processing and have a feeling I am missing a simple way of doing this!  I have been working off the simpleBluetooth example as it searches devices and prints them out. I just need it to do this at specified intervals. Any help would be greatly appreciated. Also thanks extrapixel for developing the library.
Re: Bluetooth library for processing
Reply #46 - May 6th, 2009, 3:38pm
 
I have some basic problems, i guess. I installed and try to run it on both, windows vista and windows XP. but all i get is "error is your bluetooth on?"
Loading library BTCheckMS from ld.library.path
java.lang.RuntimeException: No supported stack installed or no dongle available


bluetooth works on both devies, laptop and PC i can search for my mobilephone and connect. So i guess bluetooth is working fine.
Any idea why it still doesnt work? I have no glue what else to do...

Thx
Cedric
Re: Bluetooth library for processing
Reply #47 - May 28th, 2009, 12:19am
 
nelsonenzo wrote on Nov 3rd, 2008, 7:42pm:
For those on Winblows that keep getting this error:

"java.lang.RuntimeException: No supported stack installed or no dongle available"

The first thing you should do is remove the "avetanaBT.jar" file from:processing\libraries\bluetoothDesktop\library

Then, if it still doesn't work, you may need to remove whatever bluetooth 'stack' windows is using and re-install one that works by re-installing your bluetooth drivers (I have heard issues with some versions of BlueSoliel's  drivers exist, but can't say for sure).

I'm only posting this 'cause it took me two days to figure out all i needed to do was delete one little file and hope to save someone else the struggle.  Good Luck!


Thanks, this solved my problems as well.

EDIT: Does anyone know how to get this working on Linux I'm running Ubuntu 9.04, and I'm trying to test simplebluetooth.pde (example in the library). I get the following error message:

java.lang.RuntimeException: BlueCove not available

Thanks...
Re: Bluetooth library for processing
Reply #48 - Oct 10th, 2009, 7:45pm
 
nelsonenzo wrote on Nov 3rd, 2008, 7:42pm:
For those on Winblows that keep getting this error:

"java.lang.RuntimeException: No supported stack installed or no dongle available"

The first thing you should do is remove the "avetanaBT.jar" file from:processing\libraries\bluetoothDesktop\library

Then, if it still doesn't work, you may need to remove whatever bluetooth 'stack' windows is using and re-install one that works by re-installing your bluetooth drivers (I have heard issues with some versions of BlueSoliel's  drivers exist, but can't say for sure).

I'm only posting this 'cause it took me two days to figure out all i needed to do was delete one little file and hope to save someone else the struggle.  Good Luck!


This works!! The Bluesoleil's version 2.7.0.13 works! (The example simplebluetooth run!)
But the superior version of BlueSoleil, 3.2.2.8 070421, doesn't work in my case
Re: Bluetooth library for processing
Reply #49 - Nov 16th, 2009, 7:25am
 
Hi,

Seems to work fine on Windows Seven...

...but, I need a little explanation with the "simpleBluetooth" example, because I have "servives" listed but nothing in the "client" list.

could you help me please ?
Re: Bluetooth library for processing
Reply #50 - Nov 16th, 2009, 9:48am
 
hello, nice to hear it works with win7.

the simpleBluetooth example opens a service (you'll find the service-name in the source). if someone connects to that service, it will be listed under "clients".

I have a new version of the library here, with new/cleaned up examples. i did not yet have time to update the docs... that's why it isn't published yet. i've sent the new version to several people to test it, unfortunately nobody really tested it.

If you're interested in testing the new release, pls send me a pm with your email-address. (Testing in this case means basically downlad/install/run simpleBluetooth/send me the error if any)
The new release should eliminate most of the problems people described in this thread.
Re: Bluetooth library for processing
Reply #51 - Dec 7th, 2009, 6:55pm
 
Hi,

I just started using the bluetooth library (both on the pc and on mobile). Works great, but I wonder if it is possible to connect several clients to the same server at the same time (or if the bluetooth object is limited to one client connection only).

The problem I seem to have is this: Once i have a client connected to my service, it no longer shows on other devices. So I am asuming it can only be used by one device.

My project involves several clients (in this case cellphones) connected to the same server (a pc). Some of the aproaches i have tried (may seem rough, keep in mind that im just begining using processing  Smiley and using the library too):

Creating an array of clients on the server, so every time a clientConnect event happens, a client is added to the array (failed, because the cellphone cant see the service after the first one connects. Works ok with the first client). Creating an array of bluetooth objects, so every time a client connects, a bluetooth object is created, initialized, and starts a new service (my original service, plus one char, so every service is different). The cellphone connects to a service whose indexOf(myServiceName) is 0, so no problem there. Again, failed. Apparently the bt object is created, the service seems to start (there is no warning on the message window), but the cellphone doesnt see new services.

Smiley Trying to figure it out. Is it possible? Perhaps with a different aproach, a more elegant one? What am i missing?

Thanks!
Re: Bluetooth library for processing
Reply #52 - Dec 8th, 2009, 11:46am
 
many clients connecting to the same service shouldn't be a problem (i actually created the library cause i had a project doing just that Wink)
could you post the most simple, stripped-down example that shows your problem? honestly i haven't used the library in a while so i can't help you  just out of my mind.
Re: Bluetooth library for processing
Reply #53 - Dec 8th, 2009, 12:53pm
 
Great news! And thanks for the reply.

Well... this is the stripped down version of the code im using for testing on the server side. Its built around one of the examples.


final String SERVICE_NAME = "myService";
Bluetooth bt;
boolean connected = false;
Client[] misclientes = new Client[0];

void setup(){
        size(600,300);
        background(0);
        bt = new Bluetooth(this);
        bt.start(SERVICE_NAME);
}
void draw(){
       if (connected == true){

             for(int i = 0; i < misclientes.length; i++){
                    if(misclientes[i].available() > 0){
                           recibido = misclientes[i].readInt();
                           println(recibido);
                    }  
              }  
        }
}

void clientConnectEvent(Client client){
 
 misclientes = (Client[])append(misclientes, (Client) client);
 conectado = true;
}

void keyPressed(){
 println(misclientes.length);
 for(int i = 0; i < misclientes.length; i++){
   println(misclientes[i].device.name);
   misclientes[i].write(1);
   flush();
 }
}


The first cellphone client has no problems finding the service and connecting. The second cant find the service at all. This is what the cellphone does:

final String SERVICE_NAME = "myService";
boolean conectado = false;
Bluetooth bt;
PFont font;
String[] msgs = new String[90];
Client server;
int recibido = 0;
String temporal = "";
int temporal2;

void setup(){
 font = loadFont();
 textFont(font);
 p = new Phone(this);
 bt = new Bluetooth(this,0x0003);
 bt.find();
 for (int i = 0; i < length(msgs); i++){
   msgs[i] = "-";
 }
}

void draw(){
 background(0);
 fill(255);
 for (int i2 = 0; i2 < length(msgs); i2++){
   text(msgs[i2], 4, 25+15*i2+6);
 }
 if (conectado == true){
       if (server.available() > 0){
             recibido = (int)server.read();
        }
 }
}

void libraryEvent(Object library, int event, Object data){
 if (library == bt){
   if (event == Bluetooth.EVENT_DISCOVER_SERVICE_COMPLETED ){
     Service[] services = (Service[])data;
     for (int i = 0; i < length(services); i++){
     msgs[i] = "Servicio: " + services[i].name;
     temporal = services[i].name;
     temporal2 = temporal.indexOf(SERVICE_NAME);
     if (temporal2 == 0){
         try {
           server = services[i].connect();
           conectado = true;
           return;
         }
       }
  }
}
}
}

void keyPressed(){
 if (conectado == true){

   server.writeInt((int)key);
   server.flush();
 }
}

At first I tought the problem might be that the service cound only connect to one client at a time. If that was the case, the solution might have been creating more than one service, and more than one bt object, so i changed the server to this:

bt[0] = new Bluetooth(this);

And on every ClientConnectEvent:

bt = (Bluetooth[])append(bt, new Bluetooth(this));
bt[bt.length].start(SERVICE_NAME + "any character");

I managed to create two simultaneous services (cant create more). The first one connects to the first object created fine. But the second couldnt see neither.

So...  Smiley I have the feeling i am doing wrong something simple, that there is something im doing wrong on the clientConnectEvent. Its great news to know I only need one service, makes the code cleaner.

Thanks!

Re: Bluetooth library for processing
Reply #54 - Dec 10th, 2009, 2:53am
 
nelsonenzo wrote on Nov 3rd, 2008, 7:42pm:
For those on Winblows that keep getting this error:

"java.lang.RuntimeException: No supported stack installed or no dongle available"

The first thing you should do is remove the "avetanaBT.jar" file from:processing\libraries\bluetoothDesktop\library

Then, if it still doesn't work, you may need to remove whatever bluetooth 'stack' windows is using and re-install one that works by re-installing your bluetooth drivers (I have heard issues with some versions of BlueSoliel's  drivers exist, but can't say for sure).

I'm only posting this 'cause it took me two days to figure out all i needed to do was delete one little file and hope to save someone else the struggle.  Good Luck!


I'm using Windows 7 with an onboard bluetooth device with a driver from Toshiba (ALPS/UGPZ6).

After getting the No supported stack installed or no dongle available I've deleted the avetanaBT.jar file, but now I'm getting the error:

BluetoothStack not detected
com.intel.bluetooth.BlueCoveImpl.<init>(BlueCoveImpl.java:180)


What can I do to fix this :/
Re: Bluetooth library for processing
Reply #55 - Apr 8th, 2010, 9:16am
 
the desktop-side works great, but I can't launch the Client because I get an "java.lang.NoClassDefFoundError".

Is it btw possible to send a message to a phone so that the phone displays the text but has no installed client running on it?

best regards, tom
Re: Bluetooth library for processing
Reply #56 - Apr 13th, 2010, 7:07pm
 
I apologize if this is off topic, but I am having a problem with processing and bluetooth on Ubuntu and this thread is the closest to my question that I have found.  
Using processing on WinXP, when I execute println(Serial.list()) it displays the Com ports including my bluetooth port, and I can connect to my BlueSMiRF perfectly with the follwing statement:
serialServoPort = new Serial(this, Serial.list()[3], 9600);
On Ubuntu however, the Serial.list() does not include the RFCOMM port, so I can not connect.  I can connect using BlueMan just fine however.  Would the bluetooth library do the trick?  
Thanks
Re: Bluetooth library for processing
Reply #57 - Apr 19th, 2010, 4:26am
 
I wonder if anyone could answer a quick question for me regarding this bluetooth library?
I just wonder whether it's possible for a mobile without any kind of mobile processing app on it; to send an image to this library for processing to do something with it? I'm guessing this might be acheived with this library and obex? If someone could put me in the right direction that'd be great.
I wish to, if possible allow an audience to send images to a computer and use them in a processing sketch.
Thanks for any replies,

Tim
Re: Bluetooth library for processing
Reply #58 - Apr 19th, 2010, 4:45am
 
Hi!

I'm sorry if this could sound strange...

I'm a totally newbie at Processing, but to a school project, we want to creat a mobile phone system that provides a way to know how many people are before you in a waiting line (I hope you understand...)

I've tried the examples shown here but nothing works!

I'm trying the example that shows the devices, but always show "bluetooth off?", even when my pc bluetooth is on, and appears the error:

java.lang.RuntimeException: license not valid for address 00-21-86-63-12-bd


Can you help me?

I've already deleted the file you said to, and I'm transfering bluesoleil 6.

But, it seems not working too. Sad

What can I do?

Thanks

Marta
Pages: 1 2 3 4