Go Down

Topic: Sending and Receiving data from Bluetooth Adapter (Read 9121 times) previous topic - next topic

Daniel abib

Jul 19, 2007, 11:52 pm Last Edit: Jul 19, 2007, 11:53 pm by abib Reason: 1
Hello Guys.

I need some help to understand better how do I create a program in my PC or any other device with bluetooth adapter to comunicate with Arduino BT. It was in a wrong session, and I belive that Software >> Interfaceing is more accurance.

As I could understand, Arduino BT uses a simple serial communication with external devices via Bluetooth (computer, phone, palms, etc.). I just have to programming the serial port (bluetooth) for configuration, read the serial port, and as soon as any data is avalilable, I have just to get it and it's ok. If I need send data out, I just have to send it via serial communication.

My question is: In my computer (or mobile phone), bluetooth adapter is not a serial device. I have to create a Java or C++ program to read/write the bluetooth adapter port.  

How it works? Do I have to implement all bluetooth stack (device inquiry, service inquiry, etc.)? Can you share with me a small source code in Java, C++ or C for PC that send or receive data via Blueetoth adapter to/from Arduino BT? I mean, a source code that will be compiled in a computer to send and receive data from/to Arduino?

Thanks for any help...  :)

Regards
Daniel Abib
In a world without a fence, who needs gates?
.... It's a open world.... Let's share.... Arduino Rules....

mellis

It depends on the bluetooth adapter you're using and the interface its drivers provide to other applications.  You might be best off trying to find a bluetooth adapter with a virtual com port driver.  I believe the built-in bluetooth on most Macs does this, for example.

Daniel abib

Hello Mellis,

What about mobile devices? Can I use it as a virtual com port driver?

Can you tell me some bluetooth adapters that offers this capability?

Thanks for you help.  :)

Daniel Abib
In a world without a fence, who needs gates?
.... It's a open world.... Let's share.... Arduino Rules....

mellis

I don't have much experience with bluetooth, so I can't recommend anything, but hopefully someone else can.  Anyone?

Daniel abib

Just to explain better what I need...

I want use my mobile phone (nokia, motorola, ericsson, sony ericsson, etc.) to send some data to Arduino using bluetooth. I mean, I want create a small application and send string commands like "left", "right", "forward", "backward", receive it in Arduino BT and control a device using digital pins. Is is just like a exemple using Phyton (http://www.arduino.cc/playground/Interfacing/Python) but I need send data to Arduino from a Mobile, a computer, a Palm, etc. using a comercial programming language.

The sketch code inside Arduino looks simple. I have to configure the serial port and read the data received from this serial port.  If it's a "left" command, I'll use pin (analogic or digital) to control one servo (eletronic engine - motor). If it's a "right" command, I'll use another pin... and so on...

My question is: How to create a software to use the bluetooth from my mobile or my computer to open a socket or a serial port (I don't know how this two options works over bluetooth) to send this data via bluetooth, and this data will be read by Arduino BT?

I've been reading some bluetooth manuals, and there are a lot of stacks to identify devices, identify services, send files over bluetooth. I don't need this, I just need send "HELLO" from any computer to Arduino using Bluetooth devices.

Can anyone you help me?

Thanks.  :)

Daniel Abib
In a world without a fence, who needs gates?
.... It's a open world.... Let's share.... Arduino Rules....

Daniel

#5
Jul 20, 2007, 12:44 am Last Edit: Jul 20, 2007, 12:48 am by Daniel Reason: 1
hi

this has been done... http://www.arduino.cc/playground/Code/SymbianS60Python

let me just take this opportunity to encourage people to use the Google-machine to find these things, as in:

http://www.google.ca/search?q=arduino+BT+phone

;D

D


PS:the picture on this link: http://tinker.it/now/2006/11/24/arduino-bluetooth-demos/ was taken by some Mellis person, maybe he knows the answer...

Daniel abib

Daniel,

In my comments I told everybody that there is a example in Pynton that is not what I want... I need write a program that can run in different machines... Pynton is not a commercial programming language. It just works in S60 mobiles phone.

Yes, I google my questions/requests all the time. It was the first example I saw. And I also encourage people to use the Google all the time.

What I want is "a small source code in Java, C++ or C for PC that send or receive data via Blueetoth adapter to/from Arduino BT". Pynton is not a option to me.

I will be vey thankfull if someone could help me.

Thanks.
In a world without a fence, who needs gates?
.... It's a open world.... Let's share.... Arduino Rules....

Daniel

#7
Jul 20, 2007, 04:27 am Last Edit: Jul 20, 2007, 05:02 am by Daniel Reason: 1
hi

I Understand now...I didn't understand from your post that Python was out of the question, since it will run on Nokia, Palm and Desktop platforms.  

Anyway, maybe this then: http://todbot.com/blog/2006/09/12/roombactrl-drive-your-roomba-with-your-cell-phone/
It seems to suggest Mobile Processing.

I am sure we will all find this infomration of use when you have found the solution.

D

Daniel abib

Hello My Friend Daniel

That's the solution I was looking for... Thank you so much...

ARDUINO RULES... Let's share the Knowledge... !!!  ;)

Daniel Abib.
In a world without a fence, who needs gates?
.... It's a open world.... Let's share.... Arduino Rules....

jml

Hello Daniel,

I know it's a very old post but i'm very interrested in

Did you succed your application ?

And could you send me the codes ?

_Magneto_

I got a cheap serial Bluetooth adapter from http://www.usconverters.com which works fine, they were even able to help me with a C++ source code example.

Go Up