@ 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 : RS-232 - Wikipedia
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.
And do try to read what post links to before you post them.
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.
Upload this sketch
void setup() {
Serial.begin(230400);
delay(1000);
Serial.write("AT+BAUD4"); // 9600 BPS
}
void loop() { }
Connect BT card RX to Pin #1
Reset Arduino
http://www.reprap.org/wiki/Jy-mcu
this is a sketch that auto detects baud rate and simplifies setup at least for arduino mega
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.
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.
Hmm I never could get it to link to BlueTerm. I know it's unlikely, but maybe a defective unit?
Pawel19:
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.......
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.
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.
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
So is there an Arduino Bluetooth module/shield that does work with both iOS and Android ?
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.
TheBearF8:
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
Late post but I have a very basic question. Why does one need to change the BAUD Rate of a JY-MCU module if its already set at a default factory baud rate of 9600?
As you might infer from the question,I am very new to Arduino usage and the concept of baud rates.
What goal am I achieving by typing all these AT commands?
marellasunny:
Late post but I have a very basic question. Why does one need to change the BAUD Rate of a JY-MCU module if its already set at a default factory baud rate of 9600?
You don't.
I have never changed the baud rate of a JY-MCU as the need to do so has never been manifest, but I am simply logging data from a few sensors at one second intervals. If you have huge amounts of data to transfer, the need might become manifest, and that may be the time to change it.
What goal am I achieving by typing all these AT commands?
Since you ask, probably none. The only time you will achieve anything useful is when you know what you want before you send the AT command, and that depends entirely what you want to do with them. My point is that the JY-MCU is really useful as it comes out of the box. I use them more or less continuously but I have never sent an AT command to any of them.
You might find these notes helpful
http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino
I have bought the JY-MCU. I connected it to arduino uno, then I've loaded the following programme to test it:
char val;
int ledpin = 13;
void setup() {
pinMode(ledpin, OUTPUT);
Serial.begin(9600);
}
void loop() {
if( Serial.available() )
{
val = Serial.read();
}
if( val == ‘H’ )
{
digitalWrite(ledpin, HIGH);
} else {
digitalWrite(ledpin, LOW);
}
delay(100);
}
After I've done this the PC doesn't detect it. So I tried to detect it using my cellular phone but anything happens. The BT module blinks continually but still is not detected. How can make it detected? How can I solve the problem? Thank's so much for helping me in solving the problem.
Greetings from Italy.
Lorenzo
Grazie in anticipo!
The code looks OK but it is not needed to establish the connection. You don't say what sort of phone you have. I don't think a dumb phone will work and an iPhone certainly won't work. You need an Android, and that should work fine.
I am able to receive data from my Bluetooth module on COM18 in my serial monitor. COM18 is the port of the bluetooth module as specified in the 'Devices and Printers' folder of Windows. My question is kinda stupid but I want to be sure before I connect the battery to my Arduino: How do I know for sure that data is coming into my Laptop wirelessly and not through the usual USB cable?
The usual USB cable is labelled as COM6 and when I switch to COM6 on the Serial monitor, I get nothing. Is this proof enough that data is coming-in wirelessly?