Arduino Uno + Bluetooth Connectivity Issue

yes he did have it backwards, but in the else he has it set to HIGH, so it would still turn on, just not when he expected it to. But yes, part of the issue :slight_smile:

PS NI$HANT, i like your status thing under your pic :stuck_out_tongue:

Ya it will then also turn on.

NI$HANT,
You are right, I do have them backwards but on purpose. My mistake, I should have mentioned that. I simply wanted to start with the LED on and then toggle it off for testing, but I failed to update the comment. At any rate, it should toggle either way.

Sirbow2,
Thanks for the baud rate tip...I will look into that now.

You guys rock!

Thanks,
Mike

I updated the baud rate in the sketch to 115200 but it still doesn't work.

Regarding the other suggestion, I'm not exactly sure how to confirm my Windows 7 is "Paired" with the Bluetooth module.

In Control Panel > Devices and Printers, I do see the Arduino, but when I right click it and go to Properties > Hardware, I see Standard Serial over Bluetooth Link (Com9) listed in the Device Functions box. The issue here is, in my Processing code, Serial.List() does not return Com9.

I performed a Windows "Troubleshoot" operation on the Bluetooth device but it returned no issues found.

In Device Manager, Under Ports (Com & LPT), I have Com1, Standard Serial over Bluetooth Link (Com9), and Standard Serial over Bluetooth Link (Com10).

So, it looks like I have two serial ports assigned to Bluetooth but only one of these 2 is returned with the Serial.List() function (com1 is also returned).

On a side note, the Bluetooth module has a red LED which doesn't stop flashing.

Should I expect the flashing to stop at some point if things are working properly?

Is it possible this isn't going to work because my bluetooth module is "Master-Only" ?

Sorry for all the questions.

Thanks,
Mike

i cant know exactly because im not at your computer, and ive never done Bluetooth with win7. but it sound as if the computer Bluetooth and Arduino Bluetooth are not syncing correctly.

In Device Manager, Under Ports (Com & LPT), I have Com1, Standard Serial over Bluetooth Link (Com9), and Standard Serial over Bluetooth Link (Com10).

Does your computer has an Inbuilt bluetooth module?

So, it looks like I have two serial ports assigned to Bluetooth but only one of these 2 is returned with the Serial.List() function (com1 is also returned).

What is the other com# out of the 2 serial ports ? one is com1 and the other is........?
I suspect here that there may be a deadlock and two services working over one single port.

My PC doesn't have in integrated Bluetooth.

After disabling my on board serial port, I only have Com1 and Com10 returned by Serial.List()

Device manager shows 2 Bluetooth devices. One on Com9 and one on Com10.

Since my last post, I have installed the arduino software on Windows XP and the same issue is present there. The only difference is, several COM ports are listed, but not both Bluetooth COM ports.

Additionally, I purchased a bluetooth shield and it is suffering from the same error. So, this seems to be a system side issue but not specific to 1 PC or a specific bluetooth module. I have an Ubuntu system as well, but haven't tried it yet because I'm not sure how easy I'll be able to find compatible bluetooth drivers for either one of my dongles.

I'm not sure if it is permitted to post links on this forum, but in case it is permitted, i have documented my struggles in a fairly detailed manner here: http://michaelwittmer.com/wordpress/?p=621

Device manager shows 2 Bluetooth devices. One on Com9 and one on Com10.

2 Com ports returning the same Bluetooth Device?

It should not be like this there must be only one com# port for one Bluetooth dongle connected, as such uninstall and reinstall the Bluetooth dongle software on PC.
Under which heading those both 2 com# ports are listed?

Under which heading those both 2 com# ports are listed?
In device manager under COM Ports, I have:
Communications Port (COM1)
Standard Serial Over Bluetooth (COM10)
Standard Serial Over Bluetooth (COM9)

2 Com ports returning the same Bluetooth Device?
Yes. I have confirmed when I remove the IOGear dongle, both the BT ports disappear from Device Manager.

It should not be like this there must be only one com# port for one Bluetooth dongle connected, as such uninstall and reinstall the Bluetooth dongle software on PC.
I have done this. I agree it is strange. I thought this may be a due to my having installed the Actiontech drivers 1st and then the IOGear drivers later (on Win7), but I was very surprised to have the same behavior on a fresh Windows XP system with only the IOGear Bluetooth dongle installed.

Just a little background. I have been in IT for over 20 years and have an EE, so I'm not a noobie when it comes to the PC, but I am very new to Arduino and of course this BT connectivity. I hope this doesn't come across like boasting - I only mention this to clarify I do know what I'm doing (to some degree) :slight_smile:

I really appreciate you sticking with me here. Thank you.

-m

Might be worth getting rid of one set of drivers. Or wiping both, and just reinstalling the appropriate one. Windows second biggest problem is hardware drivers.

I can see that, but when I installed Windows XP fresh (on a blank hard drive) and only the IOGear BT Dongle, that is essentially what I did.

mwittmer:
On a side note, the Bluetooth module has a red LED which doesn't stop flashing.

Should I expect the flashing to stop at some point if things are working properly?

Is it possible this isn't going to work because my bluetooth module is "Master-Only" ?

If led blink all time that mean you dont have paired it. when paired led stop blinking .
in device manager you can see all modules connected, not current one

go bluetooth devices and do search to see if you can find module

is it's name linvor or hc05?
are you sure it is master?

I recorded a screenshare video this morning to show in a bit more detail some of the configuration I mention above.
Please let me know your thoughts.
http://michaelwittmer.com/wordpress/?cat=82

Also, I did uninstall all the drivers per dxw00d's suggestion. Issue still exists.

uk350,
How do I initiate the pairing?
My device shows listed in control panel and when I detected the bt device, I entered a pairing code which was gracefully accepted, but how to I initiate a "pair" once the device is installed?

I cant see any slave bt devices in device manager, i see only bt dongle and btcomports. maybe that is your btdongle driver/software thing.
i made dirty video for you how i make connection/pairing.
- YouTube (hope that doesnt break any rules here)
Once slave device is paired, i only need right click BT_AMEGA and click "connect serialport com10"
or if it's configured as "autoconnect", connection is made by software when needed.

if your module is configered as master i dont know if it can be paired.
if its master it must have HC05 firmware and it can be changed to slave by AT commands.

Thanks for the video. Very cool of you to take the time. I think it might help. What OS are you running? Some of your screens look quite different from mine but I'll see if I can recreate the steps somehow in Win7. If not, I have an XP machine I can try as well.

windows 7

if you cant see bluetooth icon in taskbar, try to find bt software somewhere from hard-disk(look image).

About master/slave, as you think your module is master there is simple way check it. can you look tracks or measure where status led on your btmodule is connected. if it's connected to pin 24 of module it then have hc04 firmware and its slave only. if led goes pin 31 or 32 then hc05 firmware and it can be master or slave.
to find right pins, tx and rx are 1 adn 2 and opposite side last pin is 34
pin 1 is also marked with white point

If its hc04 its ok for you as its slave and default baudrate is 9600, but if its hc05 you can change it to slave sending AT+ROLE=0\r\n command from arduino or terminal via tx/rx pins. before that you must put it in at mode by setting pin 34 of module to high state, dont use 5v but 3.3v for this, and powerup it. its now in at mode and baudrate must be now 38400.
when paired defaul baudrate for both is 9600.
you can also test ttl serial communication by sending AT (for hc04) or AT\r\n(hc05), module should reply OK, you can use led off/on to show ok reply.

Other thing, that module have onboard regulator so it can be connected to 5v, but rx and tx are still 3.3v tolerant. im not sure about atmel chips(i use schottky & pullup) but some other cases ttl serial communication is not working if it is connected to 5v logic. i suggest to add atleast resistor(maybe 1k)from arduino tx to module rx line.

hope that help you or someone else if your module is wrong mode.

Hi, I am using several cheap bt modules with my dev systems. I am using IVT BlueSoleil (the application/driver comes with the Sweex usb bt dongle) and I am in doubt whether it will work without this application (under XP). There are always two ports listed (ie com15, 16) - no idea why, when connected to the first bt module the third com appears (com17) and this is the com I connect myself to via ie teraterm. When you connect to the second bt module the com18 appears and so on. I do not care what XP device manager says, never checked that, everything is managed via BlueSoleil application/driver (a small BT icon in the taskbar). The bt modules need to be set to a specific baudrate, default was 9600 with mines. P.

I'm still not getting anywhere on this, but I very much appreciate all the details you have provided. Since my original post, I moved on to a BT shield which is master/slave so I don't believe that is the issue currently (but then again, it still could be). I will check the traces on the original module I was using to answer that question as suggested.

Currently, I'm trying to connect the itead module found here: http://iteadstudio.com/product/arduino-bluetooth-shield-upgrade-to-v2-2/
Here's the datasheet: http://iteadstudio.com/store/images/produce/Shield/BTshieldv2.2/BTShieldV2.2_DS.pdf

The data sheet it a bit hard to follow. I've tried using tera-term to connect to the module but am not having success there either. The problem connecting to the module via tera-term is the terminal is not echoing any of the keys pressed. Not sure what the deal is but I assume it is some configuration issue I haven't worked out yet. At any rate, any tips there would be appreciated.

As for the general bluetooth connectivity issue, it seems, based on what I understand from UK350, that my bluetooth module is connected but not "paired". I do have an entry in device manager for the module: Ports (COM & LPT) > Standard Serial Over Bluetooth Link (COM14). This coincides with port associated with the bluetooth module in control panel > devices & printers > bluetooth devices > itead.

The status of itead in control panel show it was last connected April 1, 2012 (today) but is not currently connected. And, the connection type is "authenticated." This seems to agree with UK350's assessment.

I have confirmed that no other services are using COM14 when attempting to run my Processing code, however, COM14 does not show in the Serial.write() output. I suspect this is normal for a device that is not paired.

So, I think at this point, I need to figure out how to connect to the module through the arduino using tera-term or PuTTy. Anyone have some experience with this that can offer some guidance?

Thanks again for all the support.