Sending and Receiving data from Bluetooth Adapter

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.)? [u]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?[/u] 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

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.

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. :slight_smile:

Daniel Abib

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

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 ( 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


this has been done...

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



PS:the picture on this link: was taken by some Mellis person, maybe he knows the answer...


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.



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: It seems to suggest Mobile Processing.

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


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.

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 ?

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