Go Down

Topic: How to get the JY-MCU bt board to work (Read 87 times) previous topic - next topic

Docedison

@ FLYBD?? WHAT ARE YOU TALKING ABOUT... NO one mentioned anything but TTL RS232, The kind Arduino's use...
Funny things, You "SAY" are impossible work quite nice on a Tiny84, 85, 328 and Mega and I didn't have to "Invert" anything.
Parhaps If you did some reading and not talking about which, You Know LITTLE.. It might help.
Try Here First : http://en.wikipedia.org/wiki/RS-232
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

flybd5

Shh. Be quiet, sonny. =I= said TTL, and I said nothing about impossible. The reality is very simple. This device says it talks RS-232. It doesn't. It does not meet the RS-232 signal standard. If you don't know how to read English please refrain from posting inane messages.
A black hole is where divided by zero.

flybd5

A black hole is where divided by zero.

myweb

Dear All,

Could you please help to reset baud rate of JY-MCU.
I am using it with an Arduino NANO with great success, but tried to increase it's speed (via softserial) and set baud rate to 230400bps by mistake. The JY-MCU accepted the AT command, but then I realized that my arduino doesn't support that speed. Now I have the problem of not being able to connect at that speed to send any more AT commands (as I was connecting through the arduino). Is there something I can do to reset the device and bring it back to the default speed?

Thank you in advance.

kas

Upload this sketch
Code: [Select]
void setup()  {
  Serial.begin(230400);
  delay(1000);
  Serial.write("AT+BAUD4");           // 9600 BPS
}

void loop() { }

Connect BT card RX to Pin #1
Reset Arduino

jamesdanielv


Pawel19

I am trying to connect the HC-06 to an android app such as BlueTerm.  I was able to get a few of the AT commands to work, with the exception of AT+NAME which did not return anything in the serial monitor.

However, I set the baud rate to AT+BAUD7 and now none of the commands give me any response in the serial monitor.  Also, no matter what I did, I could not get my phone to pair or recognize the BT module.  Thanks for any help.

Nick_Pyner

#67
Oct 12, 2013, 06:57 am Last Edit: Jan 02, 2014, 12:19 am by Nick_Pyner Reason: 1
You don't need to set anything on the HC-06 in order to get it to work with BlueTerm.
If you have changed the baud rate on the bluetooth, you need to ensure the rate is the same on the serial monitor. I don't think the rate can be changed on BlueTerm. If you revert to 9600, you might find you can pair OK, and it will work with BlueTerm.

Pawel19

Hmm I never could get it to link to BlueTerm.  I know it's unlikely, but maybe a defective unit?

Nick_Pyner

#69
Oct 14, 2013, 01:54 am Last Edit: Oct 14, 2013, 05:10 am by Nick_Pyner Reason: 1

I know it's unlikely, but maybe a defective unit?


Yes it is, so no, it probably isn't. The fact that you have successfully sent some commands suggests it is OK and the problem is more likely to be pilot error, but it only costs about $7 to get a replacement.  I have never had to touch anything and I don't know if there is a reset system.

BUT note particularly that the problem could be at the other end. It may even be simply procedural.  One reason why I got an android tablet was to use it with arduino. I have never been able to do this and thought it was a complete dud, but now I have recently had success with it and a bluetooth keyboard that I bought for the phone. I have also despaired of having any success with a dongle in the desktop. In the meantime, arduino works perfectly with BlueTerm on my phone and RealTerm on my laptop.......

Pawel19

So I realized after a long time that the problem with my last HC-06 was that it was a master device, therefore I couldn't get it to pair with my phone. Not sure how one would go about getting it to pair with a slave since it only accepts a few AT commands.

I ordered an HC-05 but had tons of problems with it. None of the AT commands I tried gave me anything back.  I know I entered AT command mode using the key due to the led on the board. Tried every sketch I could imagine. I finally did find a sketch which allowed me to enter the MAC address of my slave device (HC-06) and they successfully paired.  This was written in the sketch automatically, I never got ANY response from AT commands through the serial monitor.

I will try to find the sketch (don't have it here at home, thought I saved it). One thing I do know is that my board's TX and RX pins are switched. Luckily I heard this was a problem on some boards so I did try both ways and got the sketch uploaded which let me pair my devices.

Still no idea why the AT commands didn't work through the serial monitor. Seems very straightforward from other people's experiences.

Nick_Pyner

#71
Nov 18, 2013, 01:08 am Last Edit: Nov 18, 2013, 02:02 am by Nick_Pyner Reason: 1
The HC-06 is not a master, it is a slave, and even if it was a master, that isn't the reason why it won't pair with the phone.  By far the most likely reason why it won't pair is user error - probably several of them.

I submit the first user error is the refusal to come to terms with the fact that you don't need send any AT commands or MAC addresses in order to establish communication. If you just do that, you at least get to prove there is nothing wrong with the module, the Arduino, the wiring, the code, or the phone, and there was probably no need to order an HC-05 either. As things are, you have no idea if there is anything wrong with any of them, but the chances are good that there is nothing wrong, with the exception of the code, and there is a good chance there is a lot wrong with that. You can prove the code without the bluetooth wired to the Arduino, indeed it is better that it isn't.

Further, there is no evidence of any need to change the configuration after you have proven that your equipment is kosher, and you could be confronted with a dog-chases-car situation if you did change it.

There is some discussion here:
http://forum.arduino.cc/index.php?topic=199045.msg1469995#msg1469995

It is possible that the procedures for sending AT commands to the HC-05 and HC-06 are different.

Quote

So I realized after a long time that the problem with my last HC-06 was that it was a master device, therefore I couldn't get it to pair with my phone



TheBearF8

So is there an Arduino Bluetooth module/shield  that does work with both  iOS and Android ?

arduinorotto

#73
Jan 01, 2014, 11:20 am Last Edit: Jan 01, 2014, 12:51 pm by arduinorotto Reason: 1
Here is my experience with a JY-MCU Modul:
The back of the board is labeled: BT_BOARD V1.05
It has four pins going out:
VCC (Arrow in)
GND (Arrow in)
TXD (Arrow out)
RXD (Arrow out)

There are 2 soldering points without pins labeled :
KEY (Arrow in)
State (Arrow out).

I can SEND successfully FROM the Module (all works: Hard/SoftSerial, USBTTL) to another module (not a JY-MCU), with 9600 8N1 (this default is set), but cannot receive, it never receives anything.
It paires automatically with another HC-06 (not a JY-MCU ) instantly, but never  with a Bluetooth-Dongle on the PC, even in scan mode it ist very hard to detect. And if it is detected after entering the key it disappears. The other Module (not an JY-MCU) can bei paired and detected without problems to the PC-Dongle.

AT-Mode:
Module is unpaired (blinking) and does not respond to any AT-Commands. Tried with \r\n, \n\r and without, it never responds. Even if I try to change the baudrate in hope it changes it but gives no response it stays in 9600,8N1, it still can only send but not receive.
If I play with the KEY-Pin, sometimes it will blink slower and remains in that mode or even the LED goes off and stays off, but again it does not respond to AT-Commands. Documentation says KEY is only to give the module a hint to re-pair with another module and that it is what it does when the other module is on the air. STATE is for asking the paired or unpaired state from this pin.

I think it has a special Firmware for special purpose Modules. They pair automatically and are not for full duplex, only sending to another slave device with 9600,8N,1 is possible. That's what it does, not more. The weired documentation in strange chinese-english makes now sense, it tries to describe something like that, but it says it has an AT-Mode, baudrates are changeable,... but not exactly how.



kayrangandhi


So is there an Arduino Bluetooth module/shield  that does work with both  iOS and Android ?


Only with Bluetooth 4.0, aka Bluetooth Low Energy:
http://imall.iteadstudio.com/development-platform/arduino/shields/im130704001.html

Go Up