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 question
Page Index Toggle Pages: 1
Bluetooth question (Read 521 times)
Bluetooth question
Dec 12th, 2007, 2:56pm
 
Hello all, quick question.

I've been looking at the bluetooth possibilities but I'm not a pro so I'm having a hard time understanding exactly what is or is not possible. So before I start to make a trillion test versions I just have this really small question.

I want to send a file from my mobile phone to my Mac via Bluetooth. Is it possible to write a program that can understand when this is happening and also read the file name of what I'm sending?

It sounds simple to me but I couldn't quite figure it out on my own.
Thanks in advance,
Renne
Re: Bluetooth question
Reply #1 - Dec 13th, 2007, 10:06pm
 
It is possible, and depending on what kind of file you are sending(image-text...), you can write it as bytes or strings from one device to another and then use the saveBytes() or saveStrings() method to save it on its new destination. This library gives you what you need:

http://www.extrapixel.ch/processing/bluetoothDesktop/examples.html

Check the image transfer example.

If you need to send a file without loading it into processing, it is also possible:

http://www.ibm.com/developerworks/java/library/wi-boogie1/index.html

Hope it helps,


Re: Bluetooth question
Reply #2 - Dec 14th, 2007, 10:35am
 
hi,

it really depends on what exactly you wanna do. It's possible to send files with the bluetoothDesktop library. Like poliph said, you need to send it as bytes and convert them back into a file once it's received. this does not let you read the files name & stuff (you'll need to send it as a separate string, if you really need that info).

BluetoothDesktop does not support OBEX-push yet. OBEX-push is the bluetooth file-sending option you probably know from your mobile phone (e.g. picture->send->via bluetooth on SE phones). So, in practice this means you need to have a custom application on your mobile phone (Mobile Processing examples can be found on the bluetoothDesktop website). This, however is not suitable for many applications (let's say you want to let everybody to send images to your sketch, also poeple that don't have the mobile-app installed).

There is a workaround that just came to my mind. This would work on mac, probably on windows too: in OS X the bluetooth utility can be configured to accept all incoming files over bluetooth automatically. So, just check the in-folder in regular intervalls to check if there are new received files and import them using the standard processing methods.

if you told us more about your particular application, we could give you more of a "yes or no" answer Wink
Re: Bluetooth question
Reply #3 - Feb 25th, 2009, 4:48pm
 
Hi,
Is it still the case that the library doesn't support OBEX push? My code recognises the service "OBEX Object Push" on my device(http://www.polaroid.com/pogo/gb/), but then throws a list of errors and doesn't go any further.

If so is there a way of automating, or controlling Vista's Bluetooth File Transfer Wizard from within processing?

Thanks.
Page Index Toggle Pages: 1