HC-06 Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Wireless and wired modules including Bluetooth, Ethernet, and IR kits.
Fabienne
Posts: 3
Joined: Wed Jul 16, 2014 12:05 pm

Re: JY-MCU Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Post by Fabienne » Wed Jul 16, 2014 4:10 pm

I have a slave module

I send AT commands using a laptop, through the serial interface

when i send juste AT, I have the answer OK
When I send AT+NAMEdevice1, i have never answer and the name is not changed
Fabienne

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: JY-MCU Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Post by andrew » Thu Jul 17, 2014 7:40 am

If the 'AT' command works with a repose then this is a good sign as it confirms that the serial interface is working and is connected correctly. Issuing the command AT+NAMEdevice1 with no CR or LF should defiantly work and you should see at least see a repose 'OKsetname'. One thing to keep in mind is that some master devices such as android devices don't always immediately see the name change. Where you ever able to change the name? If you still have no success, did you buy the module from us? If not then your module may not be compatible. What name is currently showing?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Fabienne
Posts: 3
Joined: Wed Jul 16, 2014 12:05 pm

Re: JY-MCU Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Post by Fabienne » Thu Jul 17, 2014 1:28 pm

Hi Andrew

We have change the interface tool , and use Putty, instead of the HyperTerminal tool ( we work at 9600, 8 bits, no parity, no control)

So , now it is ok when we change the name
when i send AT+NAMEdevice1
we have the answer OKsetname
The smartphone detects the new Bluetooth module device1

However, If we try to change the PIN ( AT+PIN5678), it does not work ( never answer and always the last default pin code 1234)

Yes, we have bought the modules with you ( we have 3, one version V1.4 two V1.6)

Fabienne

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: JY-MCU Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Post by andrew » Fri Jul 18, 2014 8:14 am

I've just pulled one out of stock to make sure nothing has changed in the firmware but the AT+PIN command is working fine for me. Assuming you are using windows could you try the following terminal program:

https://sites.google.com/site/terminalbpp/

Just select the com port and baud rate then click connect. You can enter the AT command in the box at the bottom of the window below the macro buttons. Make sure that the the +CR checkbox is not not checked then click the ->send button or just hit enter after you type the command. You should see the response OKsetPIN in the output window.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

geoffday67
Posts: 4
Joined: Wed Mar 26, 2014 2:18 pm

Re: JY-MCU Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Post by geoffday67 » Tue Apr 14, 2015 10:48 am

I'm finding this module unreliable, wonder if anyone has any ideas. I'm using an Android phone to connect, both with a simple Bluetooth tester app, and with software I wrote myself. The module is connected to an Arduino Pro Mini which in turn is connected to a stepper motor. It's powered from a 4 x AA battery pack via the on-board regulator. After powering on it connects fine, although sometimes the red LED doesn't light at all. After some time (a few minutes perhaps) it stops accepting connections from my phone; I can still see the device during a Bluetooth scan and I can pair with it, but I can't make an RFCOMM connection. Power cycling the module gets it working again. As it's all housed in an enclosure I need it to keep going without user intervention ieally. Thanks for any thoughts, any questions about the set up please ask...

Geoff

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: JY-MCU Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Post by andrew » Wed Apr 15, 2015 7:55 am

Although it could possibly be a faulty module, there are quite a few things that could be causing the issue. However the LED on the module should defiantly do something and may be a clue.
After powering on it connects fine, although sometimes the red LED doesn't light at all.
When first powered up the LED on the Bluetooth module should flash quickly. How often does is fail to do this?

It's powered from a 4 x AA battery pack via the on-board regulator.
By on board regulator do you mean the regulator on the Bluetooth module or the one on the pro mini? I.e. what exactly is the VCC pin on the Bluetooth module connected to, the battery pack, or a pin on the Pro mini? Also do you have the 5V or 3.3V version of the pro mini?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

geoffday67
Posts: 4
Joined: Wed Mar 26, 2014 2:18 pm

Re: JY-MCU Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Post by geoffday67 » Wed Apr 15, 2015 3:22 pm

andrew wrote:Although it could possibly be a faulty module, there are quite a few things that could be causing the issue. However the LED on the module should defiantly do something and may be a clue.
After powering on it connects fine, although sometimes the red LED doesn't light at all.
When first powered up the LED on the Bluetooth module should flash quickly. How often does is fail to do this?

GD: It almost always does flash/appear steady as expected, but I did observe it maybe 5 times in a row not light at all (although it did work correctly during that time). That was with power cycling between tries.
It's powered from a 4 x AA battery pack via the on-board regulator.
By on board regulator do you mean the regulator on the Bluetooth module or the one on the pro mini? I.e. what exactly is the VCC pin on the Bluetooth module connected to, the battery pack, or a pin on the Pro mini? Also do you have the 5V or 3.3V version of the pro mini?
GD: The regulator on the BT module. The battery pack supplies the BT module via its regulator on the VCC pin, the Pro Mini (3.3V) via its regulator on the RAW pin, and a stepper motor. I'm wondering if there needs to be some supply decoupling added around the BT module and/or the Pro Mini - what would you suggest if anything?

Thanks.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: JY-MCU Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Post by andrew » Wed Apr 15, 2015 6:00 pm

Well the first thing to check is the power supply. Dips in the power supply could cause the module to crash or temporally be kicked off frequency. Batteries generally provide a very clean power supply source but if your also powering a motor from the same supply it could be causing problems.

Does the problem occur if the motor isn't running? I.e. If you disconnect the motor would it still drop the connection?

One other thing you could try if possible is to power the module from a different supply. That would help confirm if it was a power supply issue.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

geoffday67
Posts: 4
Joined: Wed Mar 26, 2014 2:18 pm

Re: JY-MCU Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Post by geoffday67 » Wed May 06, 2015 11:02 am

andrew wrote:Well the first thing to check is the power supply. Dips in the power supply could cause the module to crash or temporally be kicked off frequency. Batteries generally provide a very clean power supply source but if your also powering a motor from the same supply it could be causing problems.

Does the problem occur if the motor isn't running? I.e. If you disconnect the motor would it still drop the connection?

One other thing you could try if possible is to power the module from a different supply. That would help confirm if it was a power supply issue.
Sorry it's taken a while to get back. I've removed the batteries and replaced them with a regulated 5v supply - even idling the BT module was consuming 25mA on average. Then I disconnected it from everything else (Arduino, motor, etc.) and wrote a simple test app on an Android phone which made a BT connection, paused a second then closed it, then paused another second then repeated forever. Generally the module behaved but I was able to get it into a state where it was immediately rejecting incoming BT connection attempts - no time out was happening, the Android API call gave an immediate error. When it was in that state I was able to 'forget' the module and re-pair with it - but then I still couldn't make a BT connection with it. So the module wasn't dead in that state, I would guess somehow its firmware was in a 'confused' state.

Do you have any other ideas? I realise these intermittent problems are really tricky. Could the module itself be at fault? I've not used one before so not sure if this is expected behaviour. The module is soldered into my circuit so removing it for return would be tricky but I can if you think that's best.

Thanks for your help,

Geoff

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: JY-MCU Bluetooth Serial Module (HCARDU0004 & HCARDU0064)

Post by andrew » Thu May 07, 2015 8:19 am

With your test program does the error message you get give any clues? I don't know how repeatable the lock up with your test program is but when you do get the lock up have you tried the following:

Not attempting to reconnect for a few seconds to see if the problem goes away (ie a timeout is triggered).
Turning off the module to see if your Android device still reports the same error even though the module is no longer there.
Using a slower reconnect cycle in case you are reconnecting too fast.

Also two other things to check is that you don't have the module too close to your Android device and there are no other 2.4GHz devices close by.


We can never rule out a possible faulty module without getting it back and testing it ourselves but I don't recall getting this type of intermittent problem reported before.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “Wireless / Wired”