2
\$\begingroup\$

I am using an HC_05 Bluetooth module and an Arduino Uno to try and set up a simple bluetooth connection with my Windows Phone (HTC 8X). I am following the online tutorial here.

When I go into settings, my phone sees the "HC_05" bluetooth signal. I click on it, and it connects right away. It stays connected for 5-10 seconds, then suddenly disconnects.

I am thinking that my phone is not receiving any data from the bluetooth module, and thus deciding that the signal is worthless, and dropping it. But even if that, why? When I call btSerial.read() from the linked code, isn't that talking to the device?

I'm have tried directing RX/TX directly into 0/1 on the UNO, with a voltage divider, into ports 10/11, redirecting the power to 3.3V, all show the same problem of not holding a bluetooth connection with either my phone or computer.

\$\endgroup\$
7
  • \$\begingroup\$ did you try setting you phone so that it never goes in sleep mode or just keeping it alive by touching the screen? If the connection is not lost this way, the problem is clearly on the phone side. \$\endgroup\$
    – pcantin
    Mar 5, 2014 at 3:35
  • \$\begingroup\$ It's not that it goes into sleep mode, I literally watch it say "Connected" and then after 10 seconds of staring, and the screen not dimming, it just loses connection. The same thing happens on my computer too. \$\endgroup\$
    – JcKelley
    Mar 5, 2014 at 3:37
  • \$\begingroup\$ Did you try to simply power up the HC-05? (no code needed on the Arduino side) If it fails still, the problem is in the settings of the module itself. \$\endgroup\$
    – pcantin
    Mar 5, 2014 at 3:48
  • \$\begingroup\$ Just tried it. Gnd -> Gnd and VCC -> 3.3V. Still connects and drops. So this means my module is a dud? \$\endgroup\$
    – JcKelley
    Mar 5, 2014 at 4:02
  • \$\begingroup\$ try resetting it as slave using AT commands: "AT+RESET" and "AT+ROLE=0" \$\endgroup\$
    – pcantin
    Mar 5, 2014 at 4:06

1 Answer 1

1
\$\begingroup\$

i had similar problem ..the HC 05 used to get disconnected just after 5 seconds of connection with PC but worked fine with android. But what actually worked out for me was the AccessPort .... The module remains disconnected until the Serial port is switched on in accessport. its the same case with processing ..once the sketch runs the module gets connected automatically.Make sure you add the device to your computer and note down the outgoing and incoming ports.. :) Hope this helps

link for accessport download http://www.sudt.com/en/ap/download.htm

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.