What do you mean with LINVOR?
LINVOR is the (usual) default name for an HC-06.
HC-05s announce themselves as "HC-05".
Nick:
No the original name was not LINVOR but i'm quite sure it contains 06 (for my memory it was HP-06 !)
J-M-L:
My code
void setup() {
// put your setup code here, to run once:
Serial.begin(115200); // Default communication rate of the Bluetooth module
Serial3.begin(9600);
Serial.println("pret");
pinMode(16,OUTPUT);
pinMode(17,OUTPUT);
digitalWrite(16, HIGH); //+ alim BT
digitalWrite(17, LOW); //- alim BT
}
void loop() {
// put your main code here, to run repeatedly:
if (Serial3.available()) {
Serial.write(Serial3.read());
}
if (Serial.available()) {
Serial3.write(Serial.read());
}
}
I dirctly connected
Arduino Rx to Module Tx
Arduino Tx to Module Rx
jmlat:
No the original name was not LINVOR but i'm quite sure it contains 06 (for my memory it was HP-06 !)
OK, I did say "usually", most would have said "always", but the way things are with this device of yours, I'll believe anything. I guess the "06" suggests it is an HC-06. If it said "HC-05" it would put the matter truly to rest.
In the code, I assume Bluetooth is on Mega's Serial3, and you simply have the comment on the wrong line. I don't think you are sure to do damage by directly connecting Arduino Tx to bluetooth, but it is good practice to use a 1k/2k voltage divider thereto. You will see diagrams to this effect on Martyn's website.
You might find the following background notes useful. They are really for the rawest of newbies but there is actually a basic one-shot configuration programme for HC-06 on a Mega.
http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino
If you can get this circus sorted out, I would like to add the experience to these notes - possibly with advice to avoid this particular module.
I would try powering the BT not from pins 16/17 just in case your module needs more current at painring time (usually 20 to 30mA, but I've seen more)
Nick:
In the code, I assume Bluetooth is on Mega's Serial3, and you simply have the comment on the wrong line
Yes you're right : bad comment !
I don't understand what for 1k/2k divider : standard communication mode works well !
I will have a look on your links
J-M-L:
I use pins 16/17 because 5v is already used...but i'll try to connect on 5V to AT mode
Your 5V pin can give lots more current than your digital pins - if you can't stick two wires in your 5V pin, there is a Vcc (male) on the ICSP 6 pins port
The 1k/2k divider is to adapt voltage from 5V to 3.3V - see (in French) pont diviseur de tension / (or in English) Voltage divider. This might be needed if your Rx on the BT side is not protected as your arduino Tx will send a HIGH as 5V