Tested both 05 and 06 but not sure how to select which one you have connected, I don't believe you can.
I would have thought there is a way as AT commands work completely different.
For example from new both work at a baud rate of 9600
However for setting pair key to 2468 for example.
HC06:
if not paired in AT mode
Baud = 9600
AT+PIN2468
Note CR + LF not required.
HC05:
Get into AT mode by holding button Then apply power.
Or pulling EN high before applying power.
Baud = 38400
AT+PSWD=2468\r\n
Then so you can send and retrieve chars the power must be removed and reconnected so baud rate must be changed back to 9600.
I did notice when testing HC06 the name function worked but setting pair code did not.
Nothing works on HC05
HC05/06 component
Moderator: Benj
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
HC05/06 component
- Attachments
-
- HC06 Name + Pairkey Changer 1d.fcfx
- (14.96 KiB) Downloaded 232 times
Last edited by medelec35 on Fri Jul 27, 2018 10:47 am, edited 1 time in total.
Reason: Missed out: pulling EN high before applying power.
Reason: Missed out: pulling EN high before applying power.
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: HC05/06 component
Hi Martin,
Please can you confirm this works. I have seen this command before knocking about on the internet but thought it was maybe from older firmware as the AT+PIN has always worked for me. Maybe I've only ever bought the HC06 devices?
Please can you confirm this works. I have seen this command before knocking about on the internet but thought it was maybe from older firmware as the AT+PIN has always worked for me. Maybe I've only ever bought the HC06 devices?
Baud = 38400
AT+PSWD=2468\r\n
Then so you can send and retrieve chars the power must be removed and reconnected so baud rate must be changed back to 9600.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: HC05/06 component
Hi Ben,
I confirmed it worked on my HC05 before posting about the component.
If you want me to test the component with HC05 and HC06 before adding to the database, then I'm happy to do so.
I did use Tera Term for confirmation.
What I will do this afternoon is change flowchart and use buttons to direct to either HC05 or HC06 commands.
I will test both HC05/6 with both sets of commands and make a note of which work and which don't.
I confirmed it worked on my HC05 before posting about the component.
If you want me to test the component with HC05 and HC06 before adding to the database, then I'm happy to do so.
I did use Tera Term for confirmation.
What I will do this afternoon is change flowchart and use buttons to direct to either HC05 or HC06 commands.
I will test both HC05/6 with both sets of commands and make a note of which work and which don't.
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: HC05/06 component
Hi Ben,
Learned one thing and Some surprising results.
I learned that if RX interrupt is enabled, then if the baud rate is changed via SetBaud then RX interrupt is automatically disabled.
Surprising results is HC05 name change command works with HC06 but HC05 pair code command does not work with HC06.
That aside, HC06 name change command or pair code change command does not work with HC05.
Learned one thing and Some surprising results.
I learned that if RX interrupt is enabled, then if the baud rate is changed via SetBaud then RX interrupt is automatically disabled.
Surprising results is HC05 name change command works with HC06 but HC05 pair code command does not work with HC06.
That aside, HC06 name change command or pair code change command does not work with HC05.
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: HC05/06 component
Is this a bug, or known and accepted?medelec35 wrote:I learned that if RX interrupt is enabled, then if the baud rate is changed via SetBaud then RX interrupt is automatically disabled.
It took me a little while to work out what was going on.
Martin
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: HC05/06 component
Hi Martin,
The CAL code looks OK, it re-establishes the interrupt if the correct flags are set, this is probably one for Ben when he re-visits this component.
The CAL code looks OK, it re-establishes the interrupt if the correct flags are set, this is probably one for Ben when he re-visits this component.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: HC05/06 component
Its nothing to do with HC05/06 component its only to do with UART component.
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: HC05/06 component
Thanks Martin,
This should now be fixed anyway.
You're right the interrupt was being deactivated on a baud change if the user activated it using an interrupt icon. The auto RX interrupt as used in the GPS/GSM components etc would have continued to work.Its nothing to do with HC05/06 component its only to do with UART component.
This should now be fixed anyway.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel