Problem with Rx/Tx Bluetooth on Arduino Uno

Hey Guys,
I have a problem with my HC-05 Bluetooth module on my arduino uno. I tried the bluetooth tutorial Arduino Playground - Tutorial01 but i didn´t get it to work. When i use the SoftwareSerial Library and connect my rx/tx wires to pin 10 and 11 it works, but when i try to use the official rx and tx pin on the uno nothing happens. It seems like they didn't work. The usb cable is not connected and i tried switching the rx and tx pins of my bluetooth chip.
Any ideas?

Here is some background. You may may just have a simple procedural problem. I have heard that switching the rx/tx doesn't do any damage, but don't do it anyway.

Hope this helps.

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf

http://homepages.ihug.com.au/~npyner/Arduino/BT2way.ino

When I try your program and start the arduino serial monitor I get this: "OK then, you first, say something.....
Go on, type something in the space above and hit Send,
or just hit the Enter key"
I think thats good. But I cant send anything with the arduino monitor. Then I tried to watch it with my osx terminal but when I write
"/dev/cu.HC-05-DevB"
I only get this
"-bash: /dev/cu.HC-05-DevB: Permission denied"
Should i could send normally something over arduino´s serial monitor?

I think there some misunderstandings here.

First, forget the OSX. You are wasting your time with that.

Second, don't use the Arduino serial monitor for bluetooth. Use RealTerm, which is free and is a proper terminal programme, rather than just a debugging tool that looks like a terminal programme. Having said that, you can use the serial monitor for two-way communication using that programme in order to ensure the software is kosher - just make sure the bluetooth is disconnected. Once done, you use that software unchanged to communicate via bluetooth.

Third, it is not even clear that you had successful bluetooth comms with software serial, and that may be the root cause of your problem.

Once you have proven two way comms over cable, disconnect it and connect the HC-05. The connection is entirely arranged from the PC end. The COM port is the same as the one you use with ther Arduino IDE. Note that you can communicate with Arduino via cable using the serial monitor simultaneously with bluetooth connected to a different device. This can be quite useful.

Okay thank you. I will try that later. Do you think there is a problem with my bluetooth adapter. At the moment it´s set to baud 9600, 1 stop bit and 0 parity. I don't know what setting the arduino needs. Maybe I need to change that.

Okay I tried it now with CoolTerm. I can send and receive data via usb but I can't send data over bluetooth. When I connect the Serial monitor via USB and send values to the arduino, I can see them in CoolTerm which is connected over bluetooth. So I thing my problem is, that i can read data from my bluetooth module but I can't send something to the arduino

nightwaxx:
i can read data from my bluetooth module but I can't send something to the arduino

While the above is happening, two questions:

What programme are you using?

What is the LED on the HC-05 doing, steady or flashing?

I use CoolTerm which is a Terminal program for Osx.

  1. Usb
    When I send something with CoolTerm over Usb the Rx led on the arduino flashes. When the value comes back from the arduino the Tx led on the arduino flashes.

2.Bluetooth
When I connect the Serial Monitor of Arduino IDE with the Usb Port and CoolTerm with the bluetooth Port.
When I send something with the SerialMonitor over Usb the Rx led flashes. After a second I can see the value that is coming back in the Serial monitor and in CoolTerm and the Tx Led flashes. But i can´t send something with CoolTerm over the Bluetooth Port. I I Only receive the backcoming data.

Humm. A bit of misunderstanding on both sides, it seems.....

  1. I thought you were running a real computer as well as something on OSX. Apparently this is not the case, you are running all-Apple

  2. I confused CoolTerm with some other Windows or Android programme

  3. You have not read, or refused to accept, line 2 of my reply #3 above. Read it again. This comment is not as helpful as I had hoped, but that does nothing to deny its validity. I now believe it is at the centre of your problem.

In case you need me to spell it out again, Apple products will not work with HC-05 and, as I understand it now, you have two solutions

  1. Get a real computer and the HC-05 will communicate with it just fine. There is probably nothing wrong with it, and no configuration is needed.

  2. Ditch the HC-05 and get a bluetooth shield or whatever that is Apple-compatible. Good luck with that, I understand it is now possible by using Bluetooth4, but I also understand the situation is still nebulous.

In my previous, I specifically asked about the LED on the HC-05, not Arduino. I guess this is no longer relevant but I'm betting that, if you have ever seen the LED on the HC-05, it has always been flashing.

nightwaxx:
"-bash: /dev/cu.HC-05-DevB: Permission denied"

I use CoolTerm which is a Terminal program for Osx.

nightwaxx:
I use CoolTerm which is a Terminal program for Osx.

  1. Usb
    When I send something with CoolTerm over Usb the Rx led on the arduino flashes. When the value comes back from the arduino the Tx led on the arduino flashes.

2.Bluetooth
When I connect the Serial Monitor of Arduino IDE with the Usb Port and CoolTerm with the bluetooth Port.
When I send something with the SerialMonitor over Usb the Rx led flashes. After a second I can see the value that is coming back in the Serial monitor and in CoolTerm and the Tx Led flashes. But i can´t send something with CoolTerm over the Bluetooth Port. I I Only receive the backcoming data.

I use Coolterm on OS X for Bluetooth because it's all Apples here.

Works just fine so long as you don't connect the bluetooth module to the tx/rx pins on the Arduino UNO because they will fight for control if you try to use the Arduino serial monitor at the same time. There's a good reason to use Software Serial on different pins to avoid this.

I also wrote an OS X hc-05 configuration utility you can use in OS X where you can set the parameters of the HC-05 like name, uart, mode, etc.

Link for the HC-05 programmer application: http://www.wabbitwanch.net/blog/?p=915

Mel

Nick_Pyner:
In case you need me to spell it out again, Apple products will not work with HC-05

Just to clarify, Apple computers with built-in Bluetooth will work perfectly with any HC-05.

Apple mobile devices, iPad, iPhone, etc only work with BLE modules (Bluetooth Low Energy). For BLE, check RedBearLab.com

Thanks. My bad, as some say, a bit too sweeping........

Nick_Pyner:
Thanks. My bad, as some say, a bit too sweeping........

No problem Nick, you should have heard my initial mutterings when I found I couldn't connect to the HC-05 with my iPhone or iPad... :astonished:

Yes, I'm sure I heard them...........

On this matter, do I understand correctly that there is a distinct difference between OSX (desktop/laptop - MacStuff) and iOS (iStuff)

Nick_Pyner:
On this matter, do I understand correctly that there is a distinct difference between OSX (desktop/laptop - MacStuff) and iOS (iStuff)

Huge difference.

The OS X laptops/desktops are pretty much run of the mill. Apps obtained through Apples App store are tightly controlled to keep the nefarious junk out. However, software that falls outside the MacApp Store guidelines can still be downloaded and installed on any system. Hardware wise, just the usual gamut of stuff; bluetooth, wifi, drives/ssd's, ram, Intel processors,BT keyboards & rats..er mice. :smiley:

Mobile devices like the iPhone, iPad, extremely tight controls. Published API's that are allowed to be used for Apps in the iTunes store, so things like a Bluetooth terminal program simply don't exist. And the only way you can get an App on the mobile devices is via the iTunes store unless you're a developer and writing an app. Very closed world, which obviously has its pros and cons.

You can jailbreak the mobile gear though, but from that point on, it's a duck shoot as to what you get, how it works and what issues it might have. The majority rarely do it.

Okay guys, first, thank you all for your help.

I didn´t get the HC05 to work without the SoftwareSerial Library. I tried it now with a BlueSmirf Silver and it works with the normal Rx and Tx Pins of the Arduino. So I will use this for Bluetooth.