Hi!
My friend gave me an Bluetooth Module that he used to use it in his Arduino project's, he said although he forgot the PIN password, I could configure it by AT commands. But I wasn't able to...
I've already tried a few things, and did a lot of research (here in the forum, google, ...), I can find the device by bluetooth but I'm not able to get the response from the modules (OK's) neither any change on his name/pass .
My Module: Bluetooth TTL Transceiver Module w/ Breakout - MDFLY
Arduino UNO
Things that I already tried:
1-
Hardware:
*5V Arduino on 5v BT
*GND Arduino on GND BT
*Pin 0 (RX) Arduino on TX BT
*Pin 1 (TX) Arduino on RX BT
Software:
*Simple code to write by Serial an AT command and read the response (expected OK but got nothing)
2-
Hardware:
*5V Arduino on 5v BT
*GND Arduino on GND BT
*Pin 10 Arduino on TX BT
*Pin 11 Arduino on RX BT
Software
*Used the library SoftwareSerial.h to write an AT command and read the response (expected OK but got nothing)
3-
Hardware:
*5V Arduino on 5v BT
*GND Arduino on GND BT
*Pin 0 (RX) Arduino on TX BT
*Pin 1 (TX) Arduino on RX BT
*Wire from ground to reset (trying to use Arduino as a USB-TTL adapter)
Software:
*Used Putty to try a Serial communication, but got no answare.
Other tries:
-Vary the Baud rate
-Vary the '\r\n' after each command
I'm desperate, someone has any out? 
The device is a plain vanilla HC-06. In ready mode, there should be a blinking LED. If your PC or phone can see it, the default identification is LINVOR, in which case try the password 1234 or 0000, which are the usual defaults.
If you have a proper connection, the LED will go steady.
If the LED is steady, bluetooth is fine and all your problems are with Arduino
If you are using proper hardware serial Pins 0,1, and using Putty on the PC, make sure the USB cable is disconnected and Putty is operating through the COM port advised by the Windows Bluetooth sniffer, which will probably be something like COM40.
Hey Nick, thanks for the reply!
The thing is that, as I've said, this was my friend's module, and he already changed the name (is not the default LINVOR), and the password (is not the defaults 0000 and 1234).
When I plug the module I get the blink LED and I can see the device with my phone, but without the PIN I can't connect.
And I guess he can't remember how he did it either - or why.
This might help.
Stuck in bluetooth module HC-06 - Electrical Engineering Stack Exchange. It conatins a link to the AT commands
I understand you can get into AT by not pairing. This might mean that it is in AT mode by default and ready go if the LED is flashing. The command are sent by cable not wireless - no password needed. I believe you will need to put HC-06 onto software serial so that you can use the monitor to send/receive via hardware serial.
Default:
Slave, 9600 baud rate, N, 8, 1. Pincode 1234
AT command:
-
Communications Test :
Sent : AT
receive : OK
-
Change baud rate :
Sent : AT+BAUD1
receive : OK1200
Sent : AT+BAUD2
receive : OK2400
1---------1200
2---------2400
3---------4800
4---------9600
5---------19200
6---------38400
7---------57600
8---------115200
Baud rate setting can be save even power down.
-
Change Bluetooth device name:
Sent : AT+NAMEdevicename
receive : OKname
(devicename is the name you want the device to be , and it will be searched with this name)
Name setting can be save even power down.
-
Change Pincode:
Sent : AT+PINxxxx
receive : OKsetpin
(xxxx is the pin code you set)
Pin code can be save even power down.
Here is some code I have never used
#include <SoftwareSerial.h> //IDE >= 1.0
const int rxPin = 2;
const int txPin = 3;
const int atPin = 4;
SoftwareSerial bluetooth(rxPin, txPin); //IDE >= 1.0
void setup() {
Serial.begin(9600);
bluetooth.begin(9600);
pinMode(atPin, OUTPUT);
Serial.println("Seriali attive...");
digitalWrite(atPin, HIGH);
}
void loop() {
if (bluetooth.available()) {
Serial.write(bluetooth.read());
}
if (Serial.available()) {
bluetooth.write(Serial.read());
}
}
You should be able to find more stuff on this forum