HC-06 Bluetooth Serial Module (HCARDU0004 & HCARDU0064)
Re: JY-MCU SLAVE Bluetooth Serial Port Module (HCARDU0004)
Hello, I connected with an adaptor, if I write AT.. answer is OK but nothing happened, no answer with AT+BAUD8 command..
Maybe putty is not well configured... could you help?
Thanks
Maybe putty is not well configured... could you help?
Thanks
Re: JY-MCU SLAVE Bluetooth Serial Port Module (HCARDU0004)
I ve it.. I had to copy paste in terminal screen..
-
- Posts: 3
- Joined: Fri Jul 12, 2013 7:59 am
Re: JY-MCU SLAVE Bluetooth Serial Port Module (HCARDU0004)
Hi,
Is there any method i could used for my arduino to know if the device is connected or not.
Would the state or key line help with this?
Thanks
Is there any method i could used for my arduino to know if the device is connected or not.
Would the state or key line help with this?
Thanks
Re: JY-MCU SLAVE Bluetooth Serial Port Module (HCARDU0004)
As the module has to be disconnected to send AT commands you could try sending an 'AT' and if you get an 'OK' back then the module is disconnected, else if you get no response then you are connected.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
-
- Posts: 3
- Joined: Fri Jul 12, 2013 7:59 am
Re: JY-MCU SLAVE Bluetooth Serial Port Module (HCARDU0004)
Thank for the quick reply.
Your suggestion regarding the AT command for querying if the device is connected (paired) should do the trick, I will give it a go later when I have more time as it will probably be the best solution. Just wanted to share an idea I had after a quick read of the datasheet:
Noticed on my device I could piece the plastic rap and gain access to pin 24 on the actual module which happens to be the LED line, this shows on the Digital input as 1 and 0 depending on if it is high and Analogue as a reading around 720 if it is high.... so knowing that the LED flashes until it is paired I realised that I could write a little code to add the values from this pin in the analogue input of the Arduino to gain an average read over multiple checks and run an If Function based on the total value (which if flashing/not paired would be less then steady on/paired):
Again, the AT function would be better but just for fun and a bit of experimenting:
void setup() {
pinMode(12, OUTPUT);
Serial.begin(9600);
}
void loop() {
int BTVal01;
int BTVal02;
int BTVal03;
int BTVal04;
int BTVal05;
int BTValTotal;
BTVal01 = analogRead(A0);
delay(40);
BTVal02 = analogRead(A0);
delay(40);
BTVal03 = analogRead(A0);
delay(40);
BTVal04 = analogRead(A0);
delay(40);
BTVal05 = analogRead(A0);
delay(40);
BTValTotal = BTVal01 + BTVal02 + BTVal03 + BTVal04 + BTVal05;
if (BTValTotal > 2800){
digitalWrite(12, HIGH);}
else{
digitalWrite(12, LOW);}
}
Your suggestion regarding the AT command for querying if the device is connected (paired) should do the trick, I will give it a go later when I have more time as it will probably be the best solution. Just wanted to share an idea I had after a quick read of the datasheet:
Noticed on my device I could piece the plastic rap and gain access to pin 24 on the actual module which happens to be the LED line, this shows on the Digital input as 1 and 0 depending on if it is high and Analogue as a reading around 720 if it is high.... so knowing that the LED flashes until it is paired I realised that I could write a little code to add the values from this pin in the analogue input of the Arduino to gain an average read over multiple checks and run an If Function based on the total value (which if flashing/not paired would be less then steady on/paired):
Again, the AT function would be better but just for fun and a bit of experimenting:
void setup() {
pinMode(12, OUTPUT);
Serial.begin(9600);
}
void loop() {
int BTVal01;
int BTVal02;
int BTVal03;
int BTVal04;
int BTVal05;
int BTValTotal;
BTVal01 = analogRead(A0);
delay(40);
BTVal02 = analogRead(A0);
delay(40);
BTVal03 = analogRead(A0);
delay(40);
BTVal04 = analogRead(A0);
delay(40);
BTVal05 = analogRead(A0);
delay(40);
BTValTotal = BTVal01 + BTVal02 + BTVal03 + BTVal04 + BTVal05;
if (BTValTotal > 2800){
digitalWrite(12, HIGH);}
else{
digitalWrite(12, LOW);}
}
-
- Posts: 2
- Joined: Fri Aug 23, 2013 12:29 pm
Re: JY-MCU SLAVE Bluetooth Serial Port Module (HCARDU0004)
Can anybody please confirm the commands that will work with both the master and slave modules. Currently I get the following responses from a slave module (at least I think its the slave)
AT OK
AT+VERSION OKlinvorV1.8
AT+VERSION? NO_RESPONCE
AT+RESET NO_RESPONCE
AT+ORGL NO_RESPONCE
AT+ADDR NO_RESPONCE
AT+ADDR? NO_RESPONCE
AT+NAMESLAVE OKsetname
AT+BAUD4 OK9600
AT+PSWD1234 NO_RESPONCE
AT+PIN0000 OKsetPIN
AT+PIN1234 OKsetPIN
AT+CMODE=1 NO_RESPONCE
AT+CMODE1 NO_RESPONCE
Unfortunately my master unit only responds to three commands
AT
AT+BAUD4 OK9600
AT+PIN0000 OKsetPIN
Thanks in advance for any help
Ian
AT OK
AT+VERSION OKlinvorV1.8
AT+VERSION? NO_RESPONCE
AT+RESET NO_RESPONCE
AT+ORGL NO_RESPONCE
AT+ADDR NO_RESPONCE
AT+ADDR? NO_RESPONCE
AT+NAMESLAVE OKsetname
AT+BAUD4 OK9600
AT+PSWD1234 NO_RESPONCE
AT+PIN0000 OKsetPIN
AT+PIN1234 OKsetPIN
AT+CMODE=1 NO_RESPONCE
AT+CMODE1 NO_RESPONCE
Unfortunately my master unit only responds to three commands
AT
AT+BAUD4 OK9600
AT+PIN0000 OKsetPIN
Thanks in advance for any help
Ian
Re: JY-MCU SLAVE Bluetooth Serial Port Module (HCARDU0004)
You can find a brief description of the commands in the first post of this thread. The master module will just respond to a subset of these commands because it's only purpose is to link directly to a slave module - which out of the box it should do automatically.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
-
- Posts: 2
- Joined: Fri Aug 23, 2013 12:29 pm
Re: JY-MCU SLAVE Bluetooth Serial Port Module (HCARDU0004)
yes I have found these commands from the first post work and also that AT+VERSION works, but these bear no resemblance to the commands that are in the manual, and by what you are saying the master has even less commands available to it than the slave. I based my purchase on reading the manual and I require the feature that the manual gives. can you please supply the correct manual for these devices so I can work out if they have the required options/commands that I need for my project.
cheers
Ian
cheers
Ian
Re: JY-MCU SLAVE Bluetooth Serial Port Module (HCARDU0004)
The manual covers several types of modules which have different levels functionality. The commands relevant to the modules you have purchased are listed in the first post of this thread. Where did you obtain the list of commands in your first post from? What is the command(s) that you require for your project?
Edit: I should also point out that you are welcome to return them to us should you find that they are not suitable for your application. Just send an email to sales @ hobbycomponents.com and we can arrange for a return.
Edit: I should also point out that you are welcome to return them to us should you find that they are not suitable for your application. Just send an email to sales @ hobbycomponents.com and we can arrange for a return.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: JY-MCU SLAVE Bluetooth Serial Port Module (HCARDU0004)
hi,
i have a JY-MCU MASTER Bluetooth Serial Port Module and i connected it corectly to my arduino, but when i scan for Bluetooth devices with my pc or my smartphone, i can't find the module.
the module is corectely powered and there is a red flasing light.http://hobbycomponents.com/index.php/jy ... odule.html
i have a JY-MCU MASTER Bluetooth Serial Port Module and i connected it corectly to my arduino, but when i scan for Bluetooth devices with my pc or my smartphone, i can't find the module.
the module is corectely powered and there is a red flasing light.http://hobbycomponents.com/index.php/jy ... odule.html