Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: [1]   Go Down
Author Topic: Sending and Receiving data from Bluetooth Adapter  (Read 8785 times)
0 Members and 1 Guest are viewing this topic.
Sao Paulo - Brazil
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino Rules
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...  smiley

Regards
Daniel Abib
« Last Edit: July 19, 2007, 04:53:45 pm by abib » Logged

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

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Sao Paulo - Brazil
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino Rules
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley

Daniel Abib
Logged

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

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Sao Paulo - Brazil
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino Rules
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley

Daniel Abib
Logged

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

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
« Last Edit: July 19, 2007, 05:48:23 pm by Daniel » Logged

Sao Paulo - Brazil
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino Rules
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: July 19, 2007, 10:02:00 pm by Daniel » Logged

Sao Paulo - Brazil
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino Rules
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello My Friend Daniel

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

ARDUINO RULES... Let's share the Knowledge... !!!  smiley-wink

Daniel Abib.
Logged

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: