using the hc06 bluetooth module - instructables...a notebook as a master to a robot with a slave...

68
20 Votes Using the HC06 Bluetooth Module Posted on June 19, 2013 by Erich Styger After my first post using a Bluetooth module , things have evolved a bit. The challenge with these Bluetooth modules is: they look the same, but having different firmware. I did not fully realize that until I have ordered another bluetooth module from dx.com: That module comes already on a carrier, so I assumed I can use the same driver as for my other module. I was wrong . HC05 or HC06 My earlier module which I received from another source (without an adapter, see this post) has a different firmware on it, known as HC05, while my DX.com module has a HC06 firmware. To be clear: the modules are the same, but the software/firmware on it is different, and the firmware uses the pins differently too DX.com Bluetooth Module (HC06)

Upload: others

Post on 03-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

20 Votes

Using the HCshy06 Bluetooth ModulePosted on June 19 2013 by Erich Styger

After my first post using a Bluetooth module things have evolved a bit The challengewith these Bluetooth modules is they look the same but having different firmware I didnot fully realize that until I have ordered another bluetooth module from dxcom

That module comes already on a carrier so I assumed I can use the same driver as formy other module I was wrong

HCshy05 or HCshy06

My earlier module which I received from another source (without an adapter see this post)has a different firmware on it known as HCshy05 while my DXcom module has a HCshy06firmware To be clear the modules are the same but the softwarefirmware on it isdifferent and the firmware uses the pins differently too

DXcom Bluetooth Module (HCshy06)mdash

Check out this post which explains how to reshyprogram the firmware of the devicewith firmware programming adapter httpbyron76blogspotch201109hc05shyfirmwarehtml

The HCshy05 has the lsquofullrsquo firmware on it many AT commands and can be both master andslave module The HCshy06 firmware on the other hand only can be a slave device withvery limited AT commands

Or in other words

The HCshy05 module can build a connection to other modules Eg a Robot being amaster and connecting to slave bluetooth module Or in slave mode to make awireless bridge to a notebookThe HCshy06 module only can be a slave This makes it only useful for say connectinga notebook as a master to a robot with a slave module eg for a wireless serialbridge

For most use cases the HCshy06 is enough as typically I want to have a wireless UARTconnection to my devices from my notebook

JYshyMCU V15 Module

Below is an image of the JYshyMCU HCshy06 (JYshyMCU V15) module The module came witha 4shypin header and I have added the pins for STATE and KEY and removed the plasticaround the module to get access to the pins

HCshy06 and HCshy05 (Source Wavesen Data Sheet)mdash

Pins

On the bottom side there are labels for the signal direction and voltage levels

KEY according to the data sheet I need to pullshyup this pin while powershyonshyreset ofthe module to enforce AT mode I have not been able to verify this yet I have beentold that some modules have this pin not connected at allVCC is indicated in the range of 36Vshy6V The module worked for me both with 33Vand 5VGND GroundTXD serial output of the module to be connected to RX of the microcontroller Notethat this signal is using 33V logic levelRXD serial input of the module to be connected to the TX of the microcontrollerNote that this signal is using 33V logic levelsSTATE connected to LED2 (Pin32) of the module but no meaning At least on mymodule the pin was always low regardless if paired or not

HCshy06 Top Sidemdash

JYshyMCU BT_BOARD V105 Bottom Sidemdash

Different AT commands

On the HCshy05 module I send ldquoATrnrdquo to the device and then it responds with ldquoOKrnrdquo

But on the HCshy06 the protocol is different I need to send ldquoATrdquo (without the newshylinecharacters) and I receive ldquoOKrdquo (without the newshyline characters)

The logic analyzer shows this behaviour too AT command sent to the device

OK response from the device with no ldquornrdquo at the end

The missing ldquornrdquo is present for all commands of the HCshy06 firmware As as this is notenough there are very few command possible The table below shows all the HCshy06firmware commands with the response

COMMAND RESPONSE COMMENT

AT OK Used to verify communication

AT+VERSION OKlinvorV18 The firmware version (version might depend on firmware)

AT Command sent to Devicemdash

OK Response from the Devicemdash

AT+NAMExyz OKsetname Sets the module name to ldquoxyzrdquo

AT+PIN1234 OKsetPIN Sets the module PIN to 1234

AT+BAUD1 OK1200 Sets the baud rate to 1200

AT+BAUD2 OK2400 Sets the baud rate to 2400

AT+BAUD3 OK4800 Sets the baud rate to 4800

AT+BAUD4 OK9600 Sets the baud rate to 9600

AT+BAUD5 OK19200 Sets the baud rate to 19200

AT+BAUD6 OK38400 Sets the baud rate to 38400

AT+BAUD7 OK57600 Sets the baud rate to 57600

AT+BAUD8 OK115200 Sets the baud rate to 115200

AT+BAUD9 OK230400 Sets the baud rate to 230400

AT+BAUDA OK460800 Sets the baud rate to 460800

AT+BAUDB OK921600 Sets the baud rate to 921600

AT+BAUDC OK1382400 Sets the baud rate to 1382400

Thatrsquos it

Firmware Timing

As this is not enough my driver did not work even with the new commands implementedThe HCshy05 firmware as sending a response back in less than 300 ms while the HCshy06firmware needs more than 500 ms until there is a response

So for this I had to introduce a user configurable delay in the component

Delay between Command and Responsemdash

Processor Expert Component

With this knowledge the Processor Expert Bluetooth component has been updated tosupport both the HCshy05 and HCshy06 firmware

Firmware to select between HCshy05 and HCshy06Configurable Response Time if the module needs longer for commandsOptional State and CMD pins

If the HCshy05 firmware is selected then the component automatically disables thefunctionality methods not presentsupported in the firmware (grayed out methods)

Bluetooth Component Supporting HCshy05 and HCshy06mdash

Command Line Interface

The Processor Expert component features an optional command line interface

With this I can change the pairing pin device name or baud beside of sending ATcommands or sending a string over the wireless bridge

Changing the pairingnamebaud will be effective after resetting the device Keep inmind if you change the baud this will change the baud as well between the module andthe microcontroller

The lsquostatusrsquo command issues an AT command to the device to see if it responds plusshows the firmware version

Bluetooth Module Methodsmdash

HCshy06 Shell Commandsmdash

Status and AT commands can only be used if the device is not paired yet (meanswhile the red LED is blinking)

Connecting to the Bluetooth Module

The Bluetooth module runs the SPP (Serial Protocol over Bluetooth) protocol So anydevice supporting SPP can connect to it On a PC this looks like a virtual COM port Ishow here the steps for Windows (running Windows 7)

It seems that Apple (iPhone iPAD etc) does not support SPP so connecting withan iPhone is not possible Android (which I did not try) should work or any PCmachine with Bluetooth

Before connecting make sure the module is powered and ready to pair The red LED onthe module indicates the status

blinking ready to pairsteady on paired

From the Device Manager select lsquoAdd a Devicersquo

Then the new device should show up

BT1 Status with Module Firmwaremdash

Device Manager with Add a Devicemdash

the name of the device shows here for me lsquoblue1rsquo as I have named it as such But itmight show up for you as lsquolinvorrsquo (default) or lsquootherrsquo

Select the device and press lsquoNextrsquo In the next dialog select lsquoEnter the devicersquos pairingcodersquo

Add a device Dialogmdash

The default pairing code is 1234

Enter the devicersquos paring codemdash

Enter the pairing code for the devicemdash

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 2: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Check out this post which explains how to reshyprogram the firmware of the devicewith firmware programming adapter httpbyron76blogspotch201109hc05shyfirmwarehtml

The HCshy05 has the lsquofullrsquo firmware on it many AT commands and can be both master andslave module The HCshy06 firmware on the other hand only can be a slave device withvery limited AT commands

Or in other words

The HCshy05 module can build a connection to other modules Eg a Robot being amaster and connecting to slave bluetooth module Or in slave mode to make awireless bridge to a notebookThe HCshy06 module only can be a slave This makes it only useful for say connectinga notebook as a master to a robot with a slave module eg for a wireless serialbridge

For most use cases the HCshy06 is enough as typically I want to have a wireless UARTconnection to my devices from my notebook

JYshyMCU V15 Module

Below is an image of the JYshyMCU HCshy06 (JYshyMCU V15) module The module came witha 4shypin header and I have added the pins for STATE and KEY and removed the plasticaround the module to get access to the pins

HCshy06 and HCshy05 (Source Wavesen Data Sheet)mdash

Pins

On the bottom side there are labels for the signal direction and voltage levels

KEY according to the data sheet I need to pullshyup this pin while powershyonshyreset ofthe module to enforce AT mode I have not been able to verify this yet I have beentold that some modules have this pin not connected at allVCC is indicated in the range of 36Vshy6V The module worked for me both with 33Vand 5VGND GroundTXD serial output of the module to be connected to RX of the microcontroller Notethat this signal is using 33V logic levelRXD serial input of the module to be connected to the TX of the microcontrollerNote that this signal is using 33V logic levelsSTATE connected to LED2 (Pin32) of the module but no meaning At least on mymodule the pin was always low regardless if paired or not

HCshy06 Top Sidemdash

JYshyMCU BT_BOARD V105 Bottom Sidemdash

Different AT commands

On the HCshy05 module I send ldquoATrnrdquo to the device and then it responds with ldquoOKrnrdquo

But on the HCshy06 the protocol is different I need to send ldquoATrdquo (without the newshylinecharacters) and I receive ldquoOKrdquo (without the newshyline characters)

The logic analyzer shows this behaviour too AT command sent to the device

OK response from the device with no ldquornrdquo at the end

The missing ldquornrdquo is present for all commands of the HCshy06 firmware As as this is notenough there are very few command possible The table below shows all the HCshy06firmware commands with the response

COMMAND RESPONSE COMMENT

AT OK Used to verify communication

AT+VERSION OKlinvorV18 The firmware version (version might depend on firmware)

AT Command sent to Devicemdash

OK Response from the Devicemdash

AT+NAMExyz OKsetname Sets the module name to ldquoxyzrdquo

AT+PIN1234 OKsetPIN Sets the module PIN to 1234

AT+BAUD1 OK1200 Sets the baud rate to 1200

AT+BAUD2 OK2400 Sets the baud rate to 2400

AT+BAUD3 OK4800 Sets the baud rate to 4800

AT+BAUD4 OK9600 Sets the baud rate to 9600

AT+BAUD5 OK19200 Sets the baud rate to 19200

AT+BAUD6 OK38400 Sets the baud rate to 38400

AT+BAUD7 OK57600 Sets the baud rate to 57600

AT+BAUD8 OK115200 Sets the baud rate to 115200

AT+BAUD9 OK230400 Sets the baud rate to 230400

AT+BAUDA OK460800 Sets the baud rate to 460800

AT+BAUDB OK921600 Sets the baud rate to 921600

AT+BAUDC OK1382400 Sets the baud rate to 1382400

Thatrsquos it

Firmware Timing

As this is not enough my driver did not work even with the new commands implementedThe HCshy05 firmware as sending a response back in less than 300 ms while the HCshy06firmware needs more than 500 ms until there is a response

So for this I had to introduce a user configurable delay in the component

Delay between Command and Responsemdash

Processor Expert Component

With this knowledge the Processor Expert Bluetooth component has been updated tosupport both the HCshy05 and HCshy06 firmware

Firmware to select between HCshy05 and HCshy06Configurable Response Time if the module needs longer for commandsOptional State and CMD pins

If the HCshy05 firmware is selected then the component automatically disables thefunctionality methods not presentsupported in the firmware (grayed out methods)

Bluetooth Component Supporting HCshy05 and HCshy06mdash

Command Line Interface

The Processor Expert component features an optional command line interface

With this I can change the pairing pin device name or baud beside of sending ATcommands or sending a string over the wireless bridge

Changing the pairingnamebaud will be effective after resetting the device Keep inmind if you change the baud this will change the baud as well between the module andthe microcontroller

The lsquostatusrsquo command issues an AT command to the device to see if it responds plusshows the firmware version

Bluetooth Module Methodsmdash

HCshy06 Shell Commandsmdash

Status and AT commands can only be used if the device is not paired yet (meanswhile the red LED is blinking)

Connecting to the Bluetooth Module

The Bluetooth module runs the SPP (Serial Protocol over Bluetooth) protocol So anydevice supporting SPP can connect to it On a PC this looks like a virtual COM port Ishow here the steps for Windows (running Windows 7)

It seems that Apple (iPhone iPAD etc) does not support SPP so connecting withan iPhone is not possible Android (which I did not try) should work or any PCmachine with Bluetooth

Before connecting make sure the module is powered and ready to pair The red LED onthe module indicates the status

blinking ready to pairsteady on paired

From the Device Manager select lsquoAdd a Devicersquo

Then the new device should show up

BT1 Status with Module Firmwaremdash

Device Manager with Add a Devicemdash

the name of the device shows here for me lsquoblue1rsquo as I have named it as such But itmight show up for you as lsquolinvorrsquo (default) or lsquootherrsquo

Select the device and press lsquoNextrsquo In the next dialog select lsquoEnter the devicersquos pairingcodersquo

Add a device Dialogmdash

The default pairing code is 1234

Enter the devicersquos paring codemdash

Enter the pairing code for the devicemdash

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 3: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Pins

On the bottom side there are labels for the signal direction and voltage levels

KEY according to the data sheet I need to pullshyup this pin while powershyonshyreset ofthe module to enforce AT mode I have not been able to verify this yet I have beentold that some modules have this pin not connected at allVCC is indicated in the range of 36Vshy6V The module worked for me both with 33Vand 5VGND GroundTXD serial output of the module to be connected to RX of the microcontroller Notethat this signal is using 33V logic levelRXD serial input of the module to be connected to the TX of the microcontrollerNote that this signal is using 33V logic levelsSTATE connected to LED2 (Pin32) of the module but no meaning At least on mymodule the pin was always low regardless if paired or not

HCshy06 Top Sidemdash

JYshyMCU BT_BOARD V105 Bottom Sidemdash

Different AT commands

On the HCshy05 module I send ldquoATrnrdquo to the device and then it responds with ldquoOKrnrdquo

But on the HCshy06 the protocol is different I need to send ldquoATrdquo (without the newshylinecharacters) and I receive ldquoOKrdquo (without the newshyline characters)

The logic analyzer shows this behaviour too AT command sent to the device

OK response from the device with no ldquornrdquo at the end

The missing ldquornrdquo is present for all commands of the HCshy06 firmware As as this is notenough there are very few command possible The table below shows all the HCshy06firmware commands with the response

COMMAND RESPONSE COMMENT

AT OK Used to verify communication

AT+VERSION OKlinvorV18 The firmware version (version might depend on firmware)

AT Command sent to Devicemdash

OK Response from the Devicemdash

AT+NAMExyz OKsetname Sets the module name to ldquoxyzrdquo

AT+PIN1234 OKsetPIN Sets the module PIN to 1234

AT+BAUD1 OK1200 Sets the baud rate to 1200

AT+BAUD2 OK2400 Sets the baud rate to 2400

AT+BAUD3 OK4800 Sets the baud rate to 4800

AT+BAUD4 OK9600 Sets the baud rate to 9600

AT+BAUD5 OK19200 Sets the baud rate to 19200

AT+BAUD6 OK38400 Sets the baud rate to 38400

AT+BAUD7 OK57600 Sets the baud rate to 57600

AT+BAUD8 OK115200 Sets the baud rate to 115200

AT+BAUD9 OK230400 Sets the baud rate to 230400

AT+BAUDA OK460800 Sets the baud rate to 460800

AT+BAUDB OK921600 Sets the baud rate to 921600

AT+BAUDC OK1382400 Sets the baud rate to 1382400

Thatrsquos it

Firmware Timing

As this is not enough my driver did not work even with the new commands implementedThe HCshy05 firmware as sending a response back in less than 300 ms while the HCshy06firmware needs more than 500 ms until there is a response

So for this I had to introduce a user configurable delay in the component

Delay between Command and Responsemdash

Processor Expert Component

With this knowledge the Processor Expert Bluetooth component has been updated tosupport both the HCshy05 and HCshy06 firmware

Firmware to select between HCshy05 and HCshy06Configurable Response Time if the module needs longer for commandsOptional State and CMD pins

If the HCshy05 firmware is selected then the component automatically disables thefunctionality methods not presentsupported in the firmware (grayed out methods)

Bluetooth Component Supporting HCshy05 and HCshy06mdash

Command Line Interface

The Processor Expert component features an optional command line interface

With this I can change the pairing pin device name or baud beside of sending ATcommands or sending a string over the wireless bridge

Changing the pairingnamebaud will be effective after resetting the device Keep inmind if you change the baud this will change the baud as well between the module andthe microcontroller

The lsquostatusrsquo command issues an AT command to the device to see if it responds plusshows the firmware version

Bluetooth Module Methodsmdash

HCshy06 Shell Commandsmdash

Status and AT commands can only be used if the device is not paired yet (meanswhile the red LED is blinking)

Connecting to the Bluetooth Module

The Bluetooth module runs the SPP (Serial Protocol over Bluetooth) protocol So anydevice supporting SPP can connect to it On a PC this looks like a virtual COM port Ishow here the steps for Windows (running Windows 7)

It seems that Apple (iPhone iPAD etc) does not support SPP so connecting withan iPhone is not possible Android (which I did not try) should work or any PCmachine with Bluetooth

Before connecting make sure the module is powered and ready to pair The red LED onthe module indicates the status

blinking ready to pairsteady on paired

From the Device Manager select lsquoAdd a Devicersquo

Then the new device should show up

BT1 Status with Module Firmwaremdash

Device Manager with Add a Devicemdash

the name of the device shows here for me lsquoblue1rsquo as I have named it as such But itmight show up for you as lsquolinvorrsquo (default) or lsquootherrsquo

Select the device and press lsquoNextrsquo In the next dialog select lsquoEnter the devicersquos pairingcodersquo

Add a device Dialogmdash

The default pairing code is 1234

Enter the devicersquos paring codemdash

Enter the pairing code for the devicemdash

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 4: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Different AT commands

On the HCshy05 module I send ldquoATrnrdquo to the device and then it responds with ldquoOKrnrdquo

But on the HCshy06 the protocol is different I need to send ldquoATrdquo (without the newshylinecharacters) and I receive ldquoOKrdquo (without the newshyline characters)

The logic analyzer shows this behaviour too AT command sent to the device

OK response from the device with no ldquornrdquo at the end

The missing ldquornrdquo is present for all commands of the HCshy06 firmware As as this is notenough there are very few command possible The table below shows all the HCshy06firmware commands with the response

COMMAND RESPONSE COMMENT

AT OK Used to verify communication

AT+VERSION OKlinvorV18 The firmware version (version might depend on firmware)

AT Command sent to Devicemdash

OK Response from the Devicemdash

AT+NAMExyz OKsetname Sets the module name to ldquoxyzrdquo

AT+PIN1234 OKsetPIN Sets the module PIN to 1234

AT+BAUD1 OK1200 Sets the baud rate to 1200

AT+BAUD2 OK2400 Sets the baud rate to 2400

AT+BAUD3 OK4800 Sets the baud rate to 4800

AT+BAUD4 OK9600 Sets the baud rate to 9600

AT+BAUD5 OK19200 Sets the baud rate to 19200

AT+BAUD6 OK38400 Sets the baud rate to 38400

AT+BAUD7 OK57600 Sets the baud rate to 57600

AT+BAUD8 OK115200 Sets the baud rate to 115200

AT+BAUD9 OK230400 Sets the baud rate to 230400

AT+BAUDA OK460800 Sets the baud rate to 460800

AT+BAUDB OK921600 Sets the baud rate to 921600

AT+BAUDC OK1382400 Sets the baud rate to 1382400

Thatrsquos it

Firmware Timing

As this is not enough my driver did not work even with the new commands implementedThe HCshy05 firmware as sending a response back in less than 300 ms while the HCshy06firmware needs more than 500 ms until there is a response

So for this I had to introduce a user configurable delay in the component

Delay between Command and Responsemdash

Processor Expert Component

With this knowledge the Processor Expert Bluetooth component has been updated tosupport both the HCshy05 and HCshy06 firmware

Firmware to select between HCshy05 and HCshy06Configurable Response Time if the module needs longer for commandsOptional State and CMD pins

If the HCshy05 firmware is selected then the component automatically disables thefunctionality methods not presentsupported in the firmware (grayed out methods)

Bluetooth Component Supporting HCshy05 and HCshy06mdash

Command Line Interface

The Processor Expert component features an optional command line interface

With this I can change the pairing pin device name or baud beside of sending ATcommands or sending a string over the wireless bridge

Changing the pairingnamebaud will be effective after resetting the device Keep inmind if you change the baud this will change the baud as well between the module andthe microcontroller

The lsquostatusrsquo command issues an AT command to the device to see if it responds plusshows the firmware version

Bluetooth Module Methodsmdash

HCshy06 Shell Commandsmdash

Status and AT commands can only be used if the device is not paired yet (meanswhile the red LED is blinking)

Connecting to the Bluetooth Module

The Bluetooth module runs the SPP (Serial Protocol over Bluetooth) protocol So anydevice supporting SPP can connect to it On a PC this looks like a virtual COM port Ishow here the steps for Windows (running Windows 7)

It seems that Apple (iPhone iPAD etc) does not support SPP so connecting withan iPhone is not possible Android (which I did not try) should work or any PCmachine with Bluetooth

Before connecting make sure the module is powered and ready to pair The red LED onthe module indicates the status

blinking ready to pairsteady on paired

From the Device Manager select lsquoAdd a Devicersquo

Then the new device should show up

BT1 Status with Module Firmwaremdash

Device Manager with Add a Devicemdash

the name of the device shows here for me lsquoblue1rsquo as I have named it as such But itmight show up for you as lsquolinvorrsquo (default) or lsquootherrsquo

Select the device and press lsquoNextrsquo In the next dialog select lsquoEnter the devicersquos pairingcodersquo

Add a device Dialogmdash

The default pairing code is 1234

Enter the devicersquos paring codemdash

Enter the pairing code for the devicemdash

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 5: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

AT+NAMExyz OKsetname Sets the module name to ldquoxyzrdquo

AT+PIN1234 OKsetPIN Sets the module PIN to 1234

AT+BAUD1 OK1200 Sets the baud rate to 1200

AT+BAUD2 OK2400 Sets the baud rate to 2400

AT+BAUD3 OK4800 Sets the baud rate to 4800

AT+BAUD4 OK9600 Sets the baud rate to 9600

AT+BAUD5 OK19200 Sets the baud rate to 19200

AT+BAUD6 OK38400 Sets the baud rate to 38400

AT+BAUD7 OK57600 Sets the baud rate to 57600

AT+BAUD8 OK115200 Sets the baud rate to 115200

AT+BAUD9 OK230400 Sets the baud rate to 230400

AT+BAUDA OK460800 Sets the baud rate to 460800

AT+BAUDB OK921600 Sets the baud rate to 921600

AT+BAUDC OK1382400 Sets the baud rate to 1382400

Thatrsquos it

Firmware Timing

As this is not enough my driver did not work even with the new commands implementedThe HCshy05 firmware as sending a response back in less than 300 ms while the HCshy06firmware needs more than 500 ms until there is a response

So for this I had to introduce a user configurable delay in the component

Delay between Command and Responsemdash

Processor Expert Component

With this knowledge the Processor Expert Bluetooth component has been updated tosupport both the HCshy05 and HCshy06 firmware

Firmware to select between HCshy05 and HCshy06Configurable Response Time if the module needs longer for commandsOptional State and CMD pins

If the HCshy05 firmware is selected then the component automatically disables thefunctionality methods not presentsupported in the firmware (grayed out methods)

Bluetooth Component Supporting HCshy05 and HCshy06mdash

Command Line Interface

The Processor Expert component features an optional command line interface

With this I can change the pairing pin device name or baud beside of sending ATcommands or sending a string over the wireless bridge

Changing the pairingnamebaud will be effective after resetting the device Keep inmind if you change the baud this will change the baud as well between the module andthe microcontroller

The lsquostatusrsquo command issues an AT command to the device to see if it responds plusshows the firmware version

Bluetooth Module Methodsmdash

HCshy06 Shell Commandsmdash

Status and AT commands can only be used if the device is not paired yet (meanswhile the red LED is blinking)

Connecting to the Bluetooth Module

The Bluetooth module runs the SPP (Serial Protocol over Bluetooth) protocol So anydevice supporting SPP can connect to it On a PC this looks like a virtual COM port Ishow here the steps for Windows (running Windows 7)

It seems that Apple (iPhone iPAD etc) does not support SPP so connecting withan iPhone is not possible Android (which I did not try) should work or any PCmachine with Bluetooth

Before connecting make sure the module is powered and ready to pair The red LED onthe module indicates the status

blinking ready to pairsteady on paired

From the Device Manager select lsquoAdd a Devicersquo

Then the new device should show up

BT1 Status with Module Firmwaremdash

Device Manager with Add a Devicemdash

the name of the device shows here for me lsquoblue1rsquo as I have named it as such But itmight show up for you as lsquolinvorrsquo (default) or lsquootherrsquo

Select the device and press lsquoNextrsquo In the next dialog select lsquoEnter the devicersquos pairingcodersquo

Add a device Dialogmdash

The default pairing code is 1234

Enter the devicersquos paring codemdash

Enter the pairing code for the devicemdash

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 6: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Processor Expert Component

With this knowledge the Processor Expert Bluetooth component has been updated tosupport both the HCshy05 and HCshy06 firmware

Firmware to select between HCshy05 and HCshy06Configurable Response Time if the module needs longer for commandsOptional State and CMD pins

If the HCshy05 firmware is selected then the component automatically disables thefunctionality methods not presentsupported in the firmware (grayed out methods)

Bluetooth Component Supporting HCshy05 and HCshy06mdash

Command Line Interface

The Processor Expert component features an optional command line interface

With this I can change the pairing pin device name or baud beside of sending ATcommands or sending a string over the wireless bridge

Changing the pairingnamebaud will be effective after resetting the device Keep inmind if you change the baud this will change the baud as well between the module andthe microcontroller

The lsquostatusrsquo command issues an AT command to the device to see if it responds plusshows the firmware version

Bluetooth Module Methodsmdash

HCshy06 Shell Commandsmdash

Status and AT commands can only be used if the device is not paired yet (meanswhile the red LED is blinking)

Connecting to the Bluetooth Module

The Bluetooth module runs the SPP (Serial Protocol over Bluetooth) protocol So anydevice supporting SPP can connect to it On a PC this looks like a virtual COM port Ishow here the steps for Windows (running Windows 7)

It seems that Apple (iPhone iPAD etc) does not support SPP so connecting withan iPhone is not possible Android (which I did not try) should work or any PCmachine with Bluetooth

Before connecting make sure the module is powered and ready to pair The red LED onthe module indicates the status

blinking ready to pairsteady on paired

From the Device Manager select lsquoAdd a Devicersquo

Then the new device should show up

BT1 Status with Module Firmwaremdash

Device Manager with Add a Devicemdash

the name of the device shows here for me lsquoblue1rsquo as I have named it as such But itmight show up for you as lsquolinvorrsquo (default) or lsquootherrsquo

Select the device and press lsquoNextrsquo In the next dialog select lsquoEnter the devicersquos pairingcodersquo

Add a device Dialogmdash

The default pairing code is 1234

Enter the devicersquos paring codemdash

Enter the pairing code for the devicemdash

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 7: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Command Line Interface

The Processor Expert component features an optional command line interface

With this I can change the pairing pin device name or baud beside of sending ATcommands or sending a string over the wireless bridge

Changing the pairingnamebaud will be effective after resetting the device Keep inmind if you change the baud this will change the baud as well between the module andthe microcontroller

The lsquostatusrsquo command issues an AT command to the device to see if it responds plusshows the firmware version

Bluetooth Module Methodsmdash

HCshy06 Shell Commandsmdash

Status and AT commands can only be used if the device is not paired yet (meanswhile the red LED is blinking)

Connecting to the Bluetooth Module

The Bluetooth module runs the SPP (Serial Protocol over Bluetooth) protocol So anydevice supporting SPP can connect to it On a PC this looks like a virtual COM port Ishow here the steps for Windows (running Windows 7)

It seems that Apple (iPhone iPAD etc) does not support SPP so connecting withan iPhone is not possible Android (which I did not try) should work or any PCmachine with Bluetooth

Before connecting make sure the module is powered and ready to pair The red LED onthe module indicates the status

blinking ready to pairsteady on paired

From the Device Manager select lsquoAdd a Devicersquo

Then the new device should show up

BT1 Status with Module Firmwaremdash

Device Manager with Add a Devicemdash

the name of the device shows here for me lsquoblue1rsquo as I have named it as such But itmight show up for you as lsquolinvorrsquo (default) or lsquootherrsquo

Select the device and press lsquoNextrsquo In the next dialog select lsquoEnter the devicersquos pairingcodersquo

Add a device Dialogmdash

The default pairing code is 1234

Enter the devicersquos paring codemdash

Enter the pairing code for the devicemdash

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 8: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Status and AT commands can only be used if the device is not paired yet (meanswhile the red LED is blinking)

Connecting to the Bluetooth Module

The Bluetooth module runs the SPP (Serial Protocol over Bluetooth) protocol So anydevice supporting SPP can connect to it On a PC this looks like a virtual COM port Ishow here the steps for Windows (running Windows 7)

It seems that Apple (iPhone iPAD etc) does not support SPP so connecting withan iPhone is not possible Android (which I did not try) should work or any PCmachine with Bluetooth

Before connecting make sure the module is powered and ready to pair The red LED onthe module indicates the status

blinking ready to pairsteady on paired

From the Device Manager select lsquoAdd a Devicersquo

Then the new device should show up

BT1 Status with Module Firmwaremdash

Device Manager with Add a Devicemdash

the name of the device shows here for me lsquoblue1rsquo as I have named it as such But itmight show up for you as lsquolinvorrsquo (default) or lsquootherrsquo

Select the device and press lsquoNextrsquo In the next dialog select lsquoEnter the devicersquos pairingcodersquo

Add a device Dialogmdash

The default pairing code is 1234

Enter the devicersquos paring codemdash

Enter the pairing code for the devicemdash

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 9: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

the name of the device shows here for me lsquoblue1rsquo as I have named it as such But itmight show up for you as lsquolinvorrsquo (default) or lsquootherrsquo

Select the device and press lsquoNextrsquo In the next dialog select lsquoEnter the devicersquos pairingcodersquo

Add a device Dialogmdash

The default pairing code is 1234

Enter the devicersquos paring codemdash

Enter the pairing code for the devicemdash

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 10: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

The default pairing code is 1234

Enter the devicersquos paring codemdash

Enter the pairing code for the devicemdash

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 11: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Pressing next and device drivers will be installed

Then the device is ready to use

And the confirmation dialog shows up

COM Port used by Device

Installing device driversmdash

Your Device is ready to usemdash

This device has been successfully added to this computermdash

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 12: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Checking the properties on the newly added device shows that it supports SPP And itshows the virtual COM port used

Note that if I check the COM ports in the device manager then I see that actually twoCOM ports have been added Only the one shown above with the SPP protocol will workIt is unclear to me why there is a second port

Connecting to the Wireless Bluetooth Bridge

Using that COM port shown for the SPP service I can connect with a terminal programon the host PC to my board Basically this gives me a wireless bridge over Bluetooth tomy board So from my PC I can open a terminal window and type in some commandswhich are parsed by the Shell on the FRDM board and it responds back to the terminal onthe PC

Device Servicesmdash

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 13: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Make sure you use the COM port used for the SPP service and that it matches thebaud settings of the communication between the microcontroller and the Bluetoothmodule Irsquom using above the default of 9600 baud It is possible to changeincrease thebaud as explained above as 9600 is not very fast Only be sure that you not exceed thebaud to a value which cannot be handled by your PC It should work ok up to a baud of115200

Once connected the red LED on the Bluetooth module is always on

Wireless Bluetooth Bridge Connectionmdash

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 14: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

While connected the module is in lsquotransparentrsquo mode and does not accept ATcommands Below is an example where I try to send an AT command from themicrocontroller while the Bluetooth module is connected to the host PC

Instead what I send to the UART ends up transparently on the host PC

Pairing LEDmdash

Trying to send AT commands from the microcontroller while connected to PCmdash

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 15: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Wireless Bridge

Everything I send to the virtual COM port ends up on the Bluetooth module which thensends the commands to the microcontroller using the RX and TX connection between themicrocontroller and the module With this it is very easy to sendreceive commands usingthe Processor Expert Shell component and the implementation are just a few lines

Bluetooth Module in Transparent Modemdash

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

file brief This is the implementation module for the shell author Erich Styger This interface file is used for a console and terminal That way we can interact with the target and change settings using a shell implementation include Shellhinclude CLS1hinclude LEDRhinclude LEDGhinclude LEDBhinclude BT1h static const CLS1_ParseCommandCallback CmdParserTable[] = CLS1_ParseCommandif LEDR_PARSE_COMMAND_ENABLED LEDR_ParseCommandendifif LEDG_PARSE_COMMAND_ENABLED LEDG_ParseCommandendifif LEDB_PARSE_COMMAND_ENABLED LEDB_ParseCommandendifif BT1_PARSE_COMMAND_ENABLED BT1_ParseCommandendif NULL sentinel Bluetooth stdio static CLS1_ConstStdIOType BT_stdio = (CLS1_StdIO_In_FctType)BT1_StdIOReadChar stdin (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stdout (CLS1_StdIO_OutErr_FctType)BT1_StdIOSendChar stderr BT1_StdIOKeyPressed if input is not empty void SHELL_Run(void) unsigned char buf[32] unsigned char bTbuf[32] buf[0]=0 bTbuf[0]=0 CLS1_ParseWithCommandTable((unsigned char)CLS1_CMD_HELP CLS1_GetStdio() CmdParserTable) for() (void)CLS1_ReadAndParseWithCommandTable(buf sizeof(buf) CLS1_GetStdio() CmdParserTable) (void)CLS1_ReadAndParseWithCommandTable(bTbuf sizeof(bTbuf) ampBT_stdio CmdParserTable)

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 16: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Unbinding and Trouble Shooting

In case there are issues with connecting to the module it is necessary to unbind and reshybind (connect) to the module It happened to me sometimes Irsquom able to connect once butthen not any more In that case the following steps help

1 Close any terminal program potentially connected to the Bluetooth virtual COM port2 Unpower the Bluetooth module so it is not visible any more to the PC3 Right click on the device in the Windows Device manager (or Devices and Printergroup) and select lsquoRemove Devicersquo

4 Reshypower the module the red LED shall be blinking as not connected5 Search for the device in the device manager (as above) and connect again to thedevice with a pairing pin

6 Connect to the module using the COM port specified for the SPP service

That way I was always able to recover connection to my module See as well this postwhich helped me to solve my problem

Sources

All the component sources discussed are available on GitHub Additionally the FRDMshyKL25Z Bluetooth example project has been updated to support both the HCshy05 and HCshy06

Unbinding Bluetooth Devicemdash

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 17: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

139 THOUGHTS ON ldquoUSING THE HCshy06 BLUETOOTH MODULErdquo

About Erich Styger

Embedded is my passionView all posts by Erich Styger rarr

modules

Happy Bluetoothing

SHARE THIS

Print Email Reddit Twitter Facebook 63 LinkedIn 1

Tumblr Pinterest 2 Google Pocket

This entry was posted in Boards Debugging Eclipse Embedded EmbeddedComponents KL25Z Freedom Board Processor Expert Tips amp Tricks and taggedCodeWarrior codewarrior project Eclipse Embedded Component freedom boardKL25Z Freedom Board open source projects Processor Expert software softwareproject TipsampTricks by Erich Styger Bookmark the permalink[httpmcuoneclipsecom20130619usingshytheshyhcshy06shybluetoothshymodule]

Like

6 bloggers like this

RELATED

Getting BluetoothWorking with JYshyMCUBT_BOARD V106

Bluetooth with theFreedom Board

Yet another BluetoothFirmware BC04

In BoardsIn Boards In Embedded

Alex Vecchioon June 19 2013 at 2139 said

Hi Erich

Maybe you can talk about 24L01+ and Ethernetcommunications Do you have this Beans

Thanks

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 18: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Alex Vecchio Brasil

Like

Erich Stygeron June 19 2013 at 2148 said

Hi Alexdo you mean the 24L01 from Nordic Semiconductor NoI do not have beans for this one I do have an EthernetShield but had not much time to work on it It will be oneof the next things for sure

Like

Alex Vecchioon June 19 2013 at 2158 said

Ouchhellip Fastest answer i`ve ever seen

Yes I am talking about the Nordic Semiconductor24L01 Maybe this can be a really cheap solutionto control a freedom board from another freedomboard wirelessly

Other thing is to control a freedom board throughthe intranet

I am waiting for your new posts Thanks for thisexcellent job you are doing

Like

Erich Stygeron June 19 2013 at 2238 said

Sometimes I never sleep yes that Nordic module is really interestingaltough I do not have one (yet) The HCshy06Bluetooth one (or the HC05) are really cheap lessthen $10 and at least the HCshy05 one can be used

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 19: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

to control another FRDM board

Like

Alex Vecchioon June 20 2013 at 0632 said

Hi ErichI think we can control a lot of Freedom boardssimultaneously with the 24L01+ but we cannot dothis with bluetooth devices Right

Like

Erich Stygeron June 20 2013 at 0803 said

Yes doing this with the HCshy05 probably is noteasily possible For the use case you describeIrsquom using an IEEE802154 module which canbuild up star or mesh networks

Like

Tomon June 20 2013 at 2257 said

Hi Erich

These modules are really cheap at(httpyourduinocomsunshop2indexphpl=product_detailampp=188)

I have bought from them and the parts were veryreasonable and shipping was good too

Cheers

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 20: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Tom

Like

Erich Stygeron June 21 2013 at 0737 said

Hi Tom they are increcibly cheap thanks for the link Iguess will order a few to try it out Once concern Ihave the derivers I have seen are all GPL2 whichis a concern Have you seen (or using) LGPL orBSD style drivers or stacks Otherwise it looks Ineed to develop everything from ground up whichis not ideal

Like

Tomon June 21 2013 at 1437 said

ErichErich

No I havenrsquot seen LGPL or BSD stacks but Ihavenrsquot been looking that hard There is a libraryat (httparduinoshyinfowikispacescomnRF24L01shyRF24shyExamples) which may be something youcan leverage

Like

Erich Stygeron June 21 2013 at 1442 said

Hi Tom yes I already found that library but it is GPL2 aswell so not very usable for anything than true

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 21: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

hobby projectsAnyway I have ordered a handful of modules andwhenever I find time Irsquoll start writing a BSD styledriver Contributions are always welcome Erich

Like

Alex Vecchioon June 22 2013 at 0423 said

Maybe you can use this for anythinghttpscodegooglecompnrf24l01

I start to dig any reference for 24L01 and BSD

Like

Erich Stygeron June 22 2013 at 0851 said

Hi Alexthanks for the link Good information

Like

Alex Vecchioon June 23 2013 at 0251 said

I think this can be useful toohttpnrqmcanrf24l01

Like

Erich Styger

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 22: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

on June 23 2013 at 0610 said

Hi Alexyes this one is about what I was looking forthanks

Like

Dustyon June 20 2013 at 0153 said

Hi ErichI got some experience with one of these modules on a project Ithink they are all more or less the same but for the firmware (asyou point out) The circuit is a CSR reference design The CSRchip is based around a core architecture developed at Cambridgeuniversity You can get the development tools from their web site(easy to find) and develop your own firmware for the module Inever got so far as to download all that not sure about what thecost is etc I would guess there is a reference design for thefirmware as well which is what all of these different firmwareversions would be based upon

Like

Erich Stygeron June 20 2013 at 0552 said

Hi Dustyyes I have found the article from Byron(httpbyron76blogspotch201109hc05shyfirmwarehtml)which points to the CSR site I have registered anddownloaded the tools but not done much with it I did notknow that this has been developed at Cambridge whichis interesting

Like

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 23: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Surdeanu Mihaion July 3 2013 at 1026 said

Hi ErichYou have done a very good job by creating a component like this Two weeks ago I have bought a BC04 bluetooth module fromElectroDragon (which is a little bit different from HC05 or HC06as firmware) and this thing involved for me some changes intoyour component source codeAfter implementing all changes I would like to add a new BC04firmware toldquoBluetooth_EBGTrdquo component project The problem with that iscaused by the fact that I cannot import very well your projectbecause when I try to edit the source code of a method I get thefollowing error ldquoSource Code missing in default driver It couldbe present in a prgrdquoAny help would be greatly appreciatedThank you

Like

Erich Stygeron July 3 2013 at 1040 said

Hi SurdeanuI donrsquot think I have seen that error myself so not surewhat is causing this Maybe you could email me yourchangessource code and Irsquom happy to have itincorporated into the Processor Expert component Sendit to the email I have listed at the end of the lsquoAboutrsquo pageof this blogThanks for contributing to that project

Like

Surdeanu Mihaion July 3 2013 at 1049 said

Ok Then I think that I will send it tomorrowbecause today I want to do some other tests

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 24: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Pingback Yet another Bluetooth Firmware BC04 | MCU onEclipse

Pingback Tutorial Ultra Low Cost 24 GHz Wireless Transceiverwith the FRDM Board | MCU on Eclipse

Pingback Mini Sumo Robot Competition running with FRDMshyKL25Z | MCU on Eclipse

Pingback Zumo Robot Chassis PCB arrived | MCU on Eclipse

Have a nice day

Like

jame jonon September 9 2013 at 0012 said

hi can u please give me a help on a Eclipse code to controlBluetooth module

Like

Erich Stygeron September 9 2013 at 0607 said

have a look at the example herehttpsgithubcomErichStygermcuoneclipsetreemasterExamplesFRDMshyKL25ZFreedom_Blue

Like

tom

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 25: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

on October 2 2013 at 1032 said

Hi Erichthx a lot for showing the differences between HCshy05 and HCshy06module I happened to get my HCshy06 work with a Trust USBshyBT dongleand WinXP32Just shortcut the TxRx on the module and used Comport Toolkitas a terminal to see the looped back charsIf longer blocks of data are sent the delay decreases tosomewhat 90msecs But thatrsquos all for the good news

The HCshy06 does not establish working mode (steady LED) whenI use my lenovo T500 with win7shy64 I can connect the devicesend pairing pin and two successive COMxy ports are shown indevice manager But the first where the SPP is assigned to cannot be accessed by my terminal programs and the LED on theHCshy06 keeps flashing indicating AT mode Same situation with my GalaxyshyS2 GTshyi9100 it finds it pairingpin input but HCshy06 stays in AT mode

Has anyone an idea or solution about that

All the best Tom

Like

Erich Stygeron October 2 2013 at 1036 said

Hi Tom I had some problems with another notebook where I wasnot able to establish connection here it helped to reshyinstall the drivers on the notebook as explained in thearticleOn another notebook I used a cheap bluetooth dongle(under Windows7 64bit) I never got it working to connectto the bluetooth module while it worked on anothermachine with XP So I just make the guess that there might be a similarproblem in your case but with the internal bluetoothmodule It might be worthwile to try an external bluetoothmodule

Like

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 26: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Tomon October 7 2013 at 1031 said

Hi ErichThanks for your commentsWith Android Irsquove got it work After inputting thepairing sequence on the phone the HC06 stays inAT mode but if my app runs it connects andswitches to SPP mode Irsquoll try to reinstall the win7 BT drivers and seewhat will happenhellipGood luck Tom

Like

Erich Stygeron October 7 2013 at 2017 said

Hmm yes this is true on Windows too only if Iconnect to the COM port with my terminal itchanges from AT to transparent mode I thought Ihad mentioned this but probably not boldenoughhellipSo here again the connection only happens ifactually connected on the host to the virtual COMPort

Like

tomon October 8 2013 at 1242 said

yepp

But with my win7shy64 I see both virtual COM portscreated by the BT in the device manager but cannot access the lower numbered one with anyterminal programhellipThis works with XPshy32

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 27: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Pingback Zumo Robot assembled | MCU on Eclipse

Like

Erich Stygeron October 8 2013 at 1251 said

Yes I have the same one of the ports is lsquodeadrsquonot sure why But works on the other one

Like

tharindu lakshanthaon October 31 2013 at 1622 said

hey can you tell me can we pair 2 hcshy06 module at the same timehellip

Like

Erich Stygeron October 31 2013 at 1701 said

you mean to have a connection from the host PC to twomodules the same time yesTo pair two HCshy06 modules to each other no

Like

DIEGO EDUARDO LOPEZ RUBIOon December 4 2013 at 2258 said

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 28: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

I have a problem when I compile the file bth1h gives me an erroron line 331 byte BT1_ParseCommand (const unsigned char cmd bool handled CLS1_StdIOType const io)

Like

Erich Stygeron December 5 2013 at 1834 said

Hi Diegowhat kind of error message do you get I tried again myexample on GitHub and it works fine for me Have youloaded the latest Processor Expert components fromGitHub too It looks like it is an issue with the shell andmaybe you are using an older version of thecodecomponents

Erich

Like

DIEGO EDUARDO LOPEZ RUBIOon December 8 2013 at 0621 said

fix the error I wanted to ask you for help with thecommand line interface as you do to get thesettings because it recognizes the port but whenwriting AT commands nothing happens If youcould help me or pass me your mail Thanks inadvance

Like

Erich Stygeron December 8 2013 at 1612 said

If nothing happens if you write AT commandsthis typically means that the Bluetooth modulealready has been connected to the PC host If themodule is connected then the LED is on(compared to be in blinking mode if not pairedwhere it accepts AT commands) Another reason

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 29: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

for the AT commands not working is a wrongUART baud configuration By default the modulesoperate with 9600 baud Please verify with a logicanalyzer if that baud is used I hope this helps

Like

nikhil guptaon December 12 2013 at 0921 said

HIi am presently working on a project that requires microcontrollerto microcontroller wireless communication i was wondering if wecould do this using 2 BLUETOOTH hc06 or hc05 by simplyinterfacing 1 of the modules with the transmitting microcontrollerand interfacing the second with the receiving microcontroller i have been able to pair my HC06 module with laptop and mobilewhen i use a laptop on 1 end i simply have an option to enter thepairing code into my laptop but while working with 2 bluetoothmodules the problem i am facing is how do i enter the pairingcode

Like

Erich Stygeron December 12 2013 at 1813 said

Hithe HCshy06 only can be slave so you cannot connect twoHCshy06 with each other It should be possible to connect aHCshy06 with a HCshy05 in master mode but I have not triedthis yet

Like

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 30: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Pauliuson December 12 2013 at 1111 said

HelloI have HCshy06 and I need to change data bits 8 to 7 (required formy application) I cant find any info about setting data bitsMaybe you know something about that is it possible

Like

Erich Stygeron December 12 2013 at 1815 said

Yes some microcontrollers can configure the UART todifferent than 8bits (eg to 7 bits) To my knowledge this is not possible with Kinetis But Ihave not checked deeply on this

Like

DIEGO EDUARDO LOPEZ RUBIOon December 15 2013 at 0316 said

hello hey when I run the program the terminal gives me this

mdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashMy Project Namemdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashmdashndash mdashmdashmdashmdashCLS1 Group of CLS1 commands help | status Print status information or helpCMDgt

AT write the codes and nothing happens

Like

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 31: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Erich Stygeron December 15 2013 at 0954 said

Hi Diegoare you using my example from GitHub From the shelloutput it looks like you have not added the command lineinterface to the Bluetooth module as it does not show upwith help Be aware that if the HCshy06 LED is not blinkingthe module already connected to a host and it does notaccept any AT commands (the AT commands are sent tothe host)

Like

logicchildon January 13 2014 at 1116 said

HiThat was great but I have a question Can my PC connect tomore than one moduleI want to create an app in the PC that monitor many bluetoothmodules at the same time

Is that possible

Thanks

Like

Erich Stygeron January 13 2014 at 1122 said

Hiyes you can connect to many modules with your PCThey will show up with different COM ports

Like

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 32: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Waste king garbage disposal warrantyon January 18 2014 at 0403 said

Irsquoll immediately snatch your rss feed as I can not to find your eshymailsubscription hyperlink or eshynewsletter service Do yoursquoveany Kindly let me recognize in order that I could subscribeThanks

Like

Erich Stygeron January 18 2014 at 0754 said

It is the lsquoFollowrsquo button below the RSS feed link on theright side of the page

Like

Jamion February 2 2014 at 1614 said

Hi Erich

Thanks for sharing the result with such great detailIrsquom planning to use this bluetooth module with Arduino Pro Mini33V model ndash in this case the logic level would be needlessright

Best reagardsJami

Like

Erich Styger

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 33: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

on February 2 2014 at 1846 said

Hi Jamiyes the module operates with 33V logic levels You justneed to be careful about the supply voltage My modulessay 36Vshy6V but I was able to use them with 33Vwithout problems That might depend on the module

Erich

Like

Jamion February 3 2014 at 0020 said

Hi Erich

Thanks for the replyI still havenrsquot got HCshy06 but quickly tested an HCshy05 (also marked with 36Vshy6V) with the ArduinoThey both are well integrated

Jami

Like

Alanon February 7 2014 at 2305 said

Excellent site thanks lots of good infoI wonder if you can assist with my little challengeMy project is to provide a wireless connection between a racingyachtrsquos Nav computer (a BampG Hercules Performance Unit) andmy Android phone using my HTshy06 (Ver 106) To build up some expertise Irsquom practicing at home by trying toget the connection going by connecting the HTshy06 to my GarminGPS72 handheld GPS receiver Irsquom bluetoothing to the HTshy06with my laptop and a cheap USB dongle using a good terminalemulator (Reflection)

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 34: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

When connecting the GPS72 to the laptop with a cable it comesin on USB at COM04 and my terminal emulator happily talks to itat 4800 8None

However when trying to get the laptop to talk to the GPS72 withthe HTshy05 I get the connectionup and running (solid led) and Irsquomreceiving data from the GPS72 but on the terminal see thepulses of data but instead of getting interpretable data there arestrings of like ldquo~f~~rdquo

I know itrsquos because I have an incompatibility in comms protocolsand have tweaked the terminal through speeds and parity with nojoyI suspect I have to configure the HTshy06 to use 4800 8N but nothaving the connectors to connect the laptop to the HTshy05 Irsquom notable to tweak the coms speeds from the laptop so Irsquom wonderingif it is at all possible to send AT commands from the laptop to theHTshy06 over BT

Like

Erich Stygeron February 8 2014 at 1012 said

Hi Alanthanks for your kind words As for your question you cannot send AT commandsover the air to the Bluetooth module if it is connected itis in transparent mode and will send the incoming data tothe other side (so you cannot reach the Bluetoothcontroller with AT commands)As for the protocol errors can you hook up a logicanalyzer on the serial signals to see what is going onThat would give a clue if the baud is somewhat wrong oroutside the spec if parityetc is used

Like

Alanon February 9 2014 at 0133 said

And thanks for your prompt reply Itrsquos as I fearedOdd eh that they design a slave module ndashpresumably to connect to a dumb device thatcanrsquot be configured by the master

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 35: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

One more question if I may When I do get to setthe comms protocol with an AT command sayAT+BAUD3 does that setting persist over apower reset ie can I set it in the lab and thenrely on it in the field

Like

Erich Stygeron February 9 2014 at 0742 said

Yes the settings persist in the device

Like

Alanon February 14 2014 at 0430 said

Hi ErichBack again sorryI suspect I have a faulty device (HCshy06 Ver 106) and being asoftware guy a class worldshyrenowned for unfairly blaming thehardware I have tried to be thorough in my testingThe final clincher for me is that when I send AT commands overthe serial port I get no response at allI have a breakout board on the serial line and can see the RX lineflash its ledThe HCshy06 is flashingI am using 232Analyzer to send data 9600 8 N 1 and am sendingAT I have read the HC Serial Bluetooth Products User InstructionalManual httpwwwexpshytechdeservicedatasheetHCshySerialshyBluetoothshyProductspdf which seems quite straightforward if alittle confusingAnd Irsquom still receiving corrupt data over the bluetooth connectionwhen sending ASCII at 9600 8 N 1

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 36: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Before I send off for a replacement is there anything else thatyou know that I can try to talk to my babyCheers and thanks for your patience

Like

Erich Stygeron February 14 2014 at 0546 said

If the HC06 is flashing then it is not connected to thePC You really would need a logic analyzer like the Salaeone so you can inspect the bits and bytes on the lineMaybe something is wrongly configured on your side(baud) and only with flashing LEDs you will not see itIrsquom a software guy too but developing software forhardware means a scope and a logic analyzer is keyWithout it it is like programming without a PC monitor

Like

Lyman Alan Connoron February 19 2014 at 0038 said

Irsquom a novice with these boards as well but itappears that yoursquore trying to send AT commandsand the chip is not in that mode My board had apin labeled ldquoKEYrdquoTie that pin to the VCC sourceNow disrupt and reshyestablish the power to theHCshy06 leaving the ldquoKeyrdquo tied to power The unitwill reboot in AT mode To reset to Normal moderemove KEY from Vcc and disrupt and reshyestablish power I was also able to easily pairwith this device using ldquo1234rdquo as the code Oncethat was done I opened up TeraTerm Pro andselected the comm port configured for my BT Iwas talking to a Mini Pro quite quicklyhellipHope thishelpshellip

Like

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 37: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Remi Wielandtson March 12 2014 at 0832 said

Hello Erich

I am using an HCshy05 board (found on eBayhttpwwwebaycomitm150843209961ssPageName=STRKMEWNXITamp_trksid=p3984m1497l2649)

I am trying to configure it using the AT commands This can onlybe done using the physical serial connection to the PC is thatcorrect I believe I managed to get the board into configurationmode using the KEY pin since the LED now blinks differentlyHowever when I use Termite to send AT commands (simply withATrn) the board responses with things such as x then xAringrnthen Apucircpyuml etc every time I resend the AT command I guess itcould be some problem with the coding of the commands suchas wrong fonthellip But still I donrsquot understand why it respondsdifferently to a unique command

Can you help Thank you in advance

Remi

Like

Erich Stygeron March 12 2014 at 1050 said

Hi Remithis does not sound like a font problem Can you hook upa logic analyzer to see what the module really respondsIt very well could be that this module is not a HCshy05 onebut a different one with different firmware

Erich

Like

Alanon March 12 2014 at 1134 said

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 38: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

I have concluded that the HCshy06 device does notconform to RS232 standardsI have spent 6 weeks messing with it ( well 2separately purchased boards) connected to myPC (XP and W7) using some pretty cleverterminal emulators (realTerm Commfront232Analyser Reflection ) and I have concludedthat it doesnrsquot generate the 10 bit per character(start 8 bit data stop) syntax defined by RS232I was unable to get it to respond to an ATcommand nor could I get it to transmit text at itsdefault speed of 9600 N 81 or any othercombinationAll the folks successfully using it are usingArduino I havenrsquot found anyone using itsuccessfully in conventional RS232 PC modeI have thrown them away and spent $125 on anolder but functional RS232 to Bluetoth adapterItrsquos pretty clunky requiring a PC Utility toconfigure it but it works

Like

Remi Wielandtson March 17 2014 at 1548 said

Hi Erich

Thanks for the reply I donrsquot have a logic analyzerI have tested somewhat further and I havenoticed that using Termite when I change thebaud rate to a lower value I get a responseidentical to what I send to the device If I put ahigher baud rate I start getting all thisnonsensehellip Also I should mention that I donrsquothave a serial connection on my computer so Imake use of a RS232 to USB converter fromLogilink So the baud rate which I change isprobably the baud between the PC and theconverter

Like

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 39: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Erich Stygeron March 18 2014 at 1451 said

Hi Remiyes the baud is only applied to the physical serialline not for the USB communication for a USBshyCDC connection the baud is pretty much useless

Like

Remi Wielandtson March 17 2014 at 1616 said

Just read Allan and Tomrsquos comments If Iunderstand it I should have a RS232 to TTLconverter between my USB to RS232 converterand the HCshy05 module because the HCshy05 ldquotalksrdquoin TTL and not RS232

Like

Erich Stygeron March 18 2014 at 1454 said

Hi RemiThe HCshy05 module does not use TTL (0shy5V)levels but 0shy33V RSshy232 uses completelydifferent voltage levels (3 to 15V and shy3 to shy15Vsee httpenwikipediaorgwikiRSshy232) so theyare not compatible Your PC or RSshy232shyUSBconverter expects that different voltage so if youwant to connect the bluetooth module to your PCthen you need to use a level shifter like a Maxim3232 or similar The logic levels of 0shy33V of themodule are only to be used with something whichhas the same voltage levels eg amicrocontroller

Like

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 40: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Remi Wielandtson March 18 2014 at 1518 said

Hi Erich thanks for the answers The daughterboard which I bought with the HCshy05 modulemounted on it has such a MAX3232 level shifter(see ebay link above)

I know that I was able to switch the board into ATmode at least from the different blinking of theLED I tried using different baud rates for theserial communication to the bluetooth module nosuccess I made sure the TX and RX are correctused different voltage levels (50 and 33 volts) forboth the Vcc and the Key I tried to reset thedevice using AT+RESET in case thetransmission to the device was functioningcorrectly but not the reception from it I havebought 3 of these devices and tested all theygive the same results

I am running out of ideashellip

Btw what is the tiny push button on the daughterboards for

Like

Erich Stygeron March 18 2014 at 1810 said

I have not used these modules But it sounds youhave nothing than the modules No user manualschematics or something you absolutely need tounderstand this module I checked that ebaypage but there was no more information than thepictures You even cannot be sure what kind offirmware is on the module without thisinformation And without the right tools (aka logicanalyzer) it is like fishing in the dark

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 41: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Like

Erich Stygeron March 18 2014 at 1814 said

Oh I see there is indeed a data sheet Whatthe lsquoKeyrsquo does depends on the firmware on themodule Many firmware are using it to get backinto the lsquocommandrsquo mode But not clear to mewhich firmware really is on this module

Like

Erich Stygeron March 18 2014 at 1815 said

And I have found in the description what lsquokeyrsquo issupposed to do Key connects 33V to PIO113 PIO11 control the module working modeHigh=AT commands receiving mode(Commandsresponse mode) Lowor NC= Bluetooth module normally working

Like

Alanon March 27 2014 at 0048 said

Hi RemiI can confirm that a Maxim 3232 works like acharm with the HCshy06 to provide an interfacebetween a PC serial COM port and the HCshy06notwithstanding the discrepancy between the TTLand MCU voltages as it handles the voltagerange of 33 to 5V I have just taken delivery of my Maxim board andam happily bluetoothing between my PC and myAndroid phone

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 42: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

I have also connected my Garmin GPS72configured to report using NMEA at 4800 to myAndroid phone with this configurationYou donrsquot need a logic analyser You do have to cross the TXD and RXD linesbetween the HCshy06 and the MaximItrsquos taken me almost eight weeks to work this outbut success comes to the diligent

Like

tomon March 12 2014 at 1446 said

Alan

Sorry but you are missing basic electrical skills and you did notrtfm

The HCshy056 as well as all the other BTshymodules from othersuppliers provide a 33V digital logic interface The guys using anarduino wire the 33V TxDRxD signals of the arduino UART tothe corresponding pins on the HCshy05 module the arduinoprovides a virtual COMport via USB to the connected PCLaptopso there is no RS232 within that signal way to be used

Your PC (COM1) has a standard RS232 interface what iselectrically on a total different planet (use wikipedia and READplease) as the 33V or 5V digital logic interface Or you use anUSBshygtRS232 converter cable but thatrsquos the samehellip Thatrsquos why you could not make a working connectionhellip It is anelectrical problem

httpwwwebaydeitmRS232shySerialshyPortshytoshyTTLshyDigitalshyConvertershyModuleshySP3232EENshy5Vshy3shy3VshyJumpshyKablesshy400676853830pt=Wissenschaftliche_GerC3A4teamphash=item5d4a339846

Use something like that and everything should be fine o)

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 43: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Good luck tom

Like

Alanon March 12 2014 at 2314 said

AHA at last some light in the wildernessSilly mehellipWhen I did R TFM (extensively) the dococonsistently (if slightly incoherently) referred to the HCshy05as a serial BT adapter and from my softwarebackground serial MEANS RS232Nowhere did they say that the headers on the card talkTTL not RS232 I have discusses my problemextensively on forums and emails I knew I was making asimple mistake but noshyone was smart enough to spot myconfusionThe traps for young players trying to reach acrosstechnologies Thanks Tom so much for your clarification

Like

didaon March 29 2014 at 1330 said

himy project is to send the data using bluetooth moduleis thatpossible if i want to connect hcshy05 from PIC1 as a transmitterand hcshy06 as a receiver at PIC2

Like

Erich Stygeron March 29 2014 at 2100 said

The HCshy06 Bluetooth module only can be a slave but theHCshy05 is able to be a master too So with the HCshy05 asmaster you should be able to connect from teh HCshy06module What microcontroller (PIC TI Freescale STM)does not matter

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 44: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Like

Harvey Hutamaon March 30 2014 at 1620 said

Hi erichI have a module (DAQ Module) to get data from strain gage inrotating sensor The module use USB cable communication tomy computer (It has Ft232 serial to Usb IC in its daughterboard)Now I want to get the data via Bluetooth and I already boughtHC 05 Unfortunately Because of the module architecture Icanrsquot get its rx tx to my HC 05

In the HC 05 datasheet I see the USB Dp and Dm port andthey said it can transfer data via usb protocol (v 11) After that Iconnect my modulersquos USB port (USB type B) to the Dp and theDm port and I connect the Vcc and Gnd to my power bank TheHC 05 is connected to my comp but it is connected to my SerialCom over the Bluetooth not as the module it self And i cantconnect the module to my Labview (because the module is usedto connect via USB cable)

I want to ask several questionsndash Can I connect HC 05 via USB Protocol instead of UARTSerial Communicationndash What should I do if I want to connect via USB protocol Installanother driver (in windows device manager)for my HC 05 orelse

Irsquom sorry for my long post and my english Hope to get yourresponse soonThank you

Like

Erich Stygeron March 30 2014 at 1721 said

Hi HarveyTo my knowledge only the SPI port

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 45: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Pingback Getting Bluetooth Working with JYshyMCU BT_BOARDV106 | MCU on Eclipse

(httpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) is active for the HCshy05 module Idonrsquot think it is able to talk the USB protocol unless youhave a different firmware on it And if your module wouldindeed have the firmware for USB on it which deviceclass would it implement Moreover to connect it toUSB it would need the proper protectionetc which I donot see implemented on the module So my thinking isthat you cannot connect the module directly to USB toconnect it to USB you need to have a SCIshytoshyUSBconverter Like that FT232 or simply use the FRDMshyKL25Z board with an USB firmware to implement a USBshyCDC bridge (httpmcuoneclipsecom20121007tutorialshyusbshycdcshywithshytheshykl25zshyfreedomshyboard)I hope this helps

Like

akselsmandelon March 30 2014 at 1822 said

Hi ErichThank you for your kindness to answer meIrsquom sorry maybe my explanation about my module is not goodenough yetMy module is Emant 300 It is used to be connected to computerphysically with usb cable but actually communicate with thecomputer using UART So thatrsquos why there is converter of USBshyTTL (FT232) in my moduleYou can see it in this link httpwwwemantcom251004page

I have tried to connect my module via usb cable and it wasdetected (until now it is as long as i connect it via usb cable) InWindows Device Manager its name is USB serial port (to proofit physically connect via usb cable but talking with serialcommunication) It connected to my Labview detected as emant300 DAQ module

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 46: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

But now I want to change usb cable with bluetooth HC 05 So icut the usb cable pin Dp and Dm to HC 05 and power it withpower bank But why the bluetooth canrsquot connect as USBProtocol

About SCI to USB converter I will try to learn that Maybe it willprovide me another alternatives Thank you Erich

Like

Erich Stygeron March 30 2014 at 1903 said

Are you saying that you connected Dp and Dm to theHC05 RxTx pins This for sure does not work USB isusing a completely different protocol than RSshy232SCINot only this it is using different voltage levels too

Like

akselsmandelon March 30 2014 at 1931 said

No I am not I connected Dp and dm to the HC05 Dp and Dm pins since it have those pins Iwant to communicate usb protocol via bluetoothbut it doesnrsquot work Maybe the manufacturer must delete its specabout lsquocan use usb protocol v 11rsquo They doesnot have the explanation about that (and make meconfused) HC 05 Users in internet donrsquot talkabout this too so itrsquos hard to find any clue aboutusb protocol over bluetooth on itMaybe irsquoll try to convert the usb protocol to serialprotocol as you say and after that connect thatserial to the RxTx pin at HC 05Thank you very much Erich

Like

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 47: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Pingback Processing and Arduino through Bluetooth

Pingback Android Based Wireless ECG

Pingback Say your Arduino how much you love it |HELENTRONICA

radhakrishnaon April 21 2014 at 0828 said

what happens suppose bimistake gnd connection is removed ormissed

Like

Erich Stygeron April 21 2014 at 0841 said

Then the module will not work I suppose

Like

Danrleion July 16 2014 at 0325 said

qual eacute o Ci utilizado no Modulo bluetooth v105

Like

Erich Stygeron July 16 2014 at 0612 said

Could you ask that question in English

Like

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 48: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Danrleion July 22 2014 at 0101 said

What is the Ci Used in Module v105 Bluetooth

Like

Erich Stygeron July 22 2014 at 0700 said

Not sure what you mean with that lsquoCirsquo

Like

johnon July 24 2014 at 1659 said

HiSo I got the Hcshy06 moduleput it on a breadboardpowered ituppaired it with my pcThen I used Teraterm to open aconnection to itwhich it did(the red light stayed continuouslyon)entered in the command ldquoATrdquo but I got no response backAm I doing something wrong

Like

Erich Stygeron July 24 2014 at 1913 said

Hi Johnyou only can send AT commands from the microcontrollerconnected to the HCshy06 module not lsquoover the airrsquo Once the LED of the module is on it is in transparentmode means it is sending the text over the air lsquoas isrsquoand the module does not accept any commands

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 49: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Like

johnon July 24 2014 at 2138 said

Ah okso the only way I would be able to see dataon teratermhyperterminal would be to connect theHCshy06 to a microthen have the micro send dataout to the HCshy06 which would transmit that to thepaired pc which could be viewed onTeratermwould that be correct

Like

Erich Stygeron July 25 2014 at 0546 said

Yes correct

Like

johnon July 25 2014 at 1526 said

CoolthanksI think I have a 8051 micro aroundsomewhereanyone know where I get someexample code that I could load onto the micro thatI could send to the HCshy06

Like

Ameya Tipnison July 30 2014 at 1652 said

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 50: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Hi Erich

A great and interesting article on the bluetooth modules And Imust say your comments section is full of lost of additionalinfo I would like to ask help for my small problem with the HCshy06 module which seems similar to Tom

Irsquom on Vista with the default bluetooth stackdrivers I have acheap bluetooth dongle adapter as my laptop doesnrsquot have nativeBT hardware I have followed the numerous procedures forparingshypowerupshypower cycleshyunplug replug deviceshy etc etc butnone seem to get the hcshy06 to connect with my PC

The computer sees the BT device fine it seemingly pairsAtleast the windows dialog box shows that and device driversare installed I can also see the com ports in device propertiesand in device manager But the status LED on the module keepsblinking indicating AT mode and never goes solid on

The serial port shows up in the services tab of the BT deviceproperties but when I try to connect to the serial port in anyterminal emulator (I tried a few of them to be sure) it either stopsresponding or tells port not found or closed etc Checking theservices tab again afterwards confirms this (the serial port hasdisappeared from the list momentarily) If I unpair repair powercycle the module same thing happens over again

There doesnrsquot seem to be anything wrong with the module itselfas I can pair it with 2 separate smartshyphones Everything workscorrectly as I can see serial data coming in from themicrocontroller and also issue commands to the microcontrollerover BT

Thanks in advance for your helpKind regardsAmeya

Like

Erich Stygeron July 30 2014 at 1911 said

Hi Ameyathanks for your kind words About your problem just installing the drivers on the host

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 51: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

will not change the blinking LED The blinking LED onlygets permanently on once you have a connection to themodule with a terminal program The fact that yourterminal emulator stops responding indicates to me thatyou might be using the wrong COM port At least I havethe same on my machine (which has a native BTmodule) Pay attention that there are multiple USB COMports installed by the driver but only one works (the onewhich is listed in the properties of the device driverhttpmcuoneclipsefileswordpresscom201306deviceshyservicespngw=584) So can you make sure youconnect to the proper COM port with your terminalprogramI hope this helps

Like

Ameya Tipnison August 4 2014 at 1135 said

Hello Erich

Thanks for your prompt help I am sure I amusing the correct port in the terminal emulatorThe HCshy06 enumerates with 2 ports only one isavailable in SPP mode and thats the one I use toconnect Here is some more surprising behavior Icame across

1 Firstly ldquosometimesrdquo I am able to successfullyconnect and sendshyreceive data2 But then majority of the times it refuses toconnect after paring When that happens LED isblinking terminal emulator reports port closed orstops responding and SPP device disappearsfrom the Bluetooth device properties3 I then have to remove device powershycycle HCshy06 module reshypair and try to reshyconnect again But90 of the times it never works I just get plainlucky the remaining 10 times and proceed withmy actual work4 I may get going again after a restart of the PCbut that also is not consistent Yesterday I triedinstalling other BT drivers PC side but of no use5 Also all these times I keep checking the

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 52: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

module functionality periodically by successfullypairing and connecting with an android smartphone which works as expected

I strongly feel its the PC side BT stack which ismessing things up Can you suggest somethinghere

Kind regardsAmeya

Like

Erich Stygeron August 4 2014 at 2027 said

Hi Ameyayes this could be a PC BT stack issue too Youmight try to uninstall the device driver for it in thedevice manager maybe this helps But not sure

Erich

Like

Ben Kuperon February 12 2015 at 1401 said

Hithank you for this article I have the same problem as Ameya i can pair the HCshy06to my computer (Windows 81 x64 Qualcomm AtherosAR3012 Bluetooth module) i can see the SPP profile atfirst but it doesnrsquot get to connect with any software andwhen i tried once to connect the SPP profile disappearfrom the list of serviceshellipDid you find a solution

Thanks

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 53: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Ben

Like

Erich Stygeron February 12 2015 at 1403 said

Hi BenIrsquom using Windows 7 64bit so Irsquom not sure if thisis a Windows 8x issue I can tell that on mymachine it shows two different COM ports butonly one is working Using the other COM portfails Maybe you have two COM ports listed tooand you are using the wrong one Just a guess

Like

Ben Kuperon February 12 2015 at 1422 said

Hiit may be a Win8x issue yesIrsquom used to deal with BT Virtual serial ports onwindows (with other chips not Low Energy) iknow about the 2 COM ports creation and thatonly one is okThis is really strange because the service is thereat first and then poof nothing listed anymorehellipOn a smartphone this works just fine

Like

Remi Wielandtson August 5 2014 at 0934 said

Hello Erich

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 54: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

I have bought an HCshy05 mounted on a daughter board that allowsme to communicate in RS232 with the module instead of TTL (ithas the MAX3232 chip)

I use the module to communicate between a PC and a motioncontroller (Elmo) in RS232 I was able to change thecommunication parameters to suit me (baud rate flow controland parity) I was able to establish a connection with thecontroller through the software that was delivered with it

Only I noticed that the connection is very unstable I am eitherunable to establish a connection at the first attempt or theconnection drops after between 5 and 60 seconds I decided toanalyze the communication between the PC and the controller byusing Termite I look at what is transmitted by the PC when aconnection is attempted and what the controller responds

I noticed that the connection fails or drops when the controllerrsquosresponse contains errors These are sorts of typos in theanswers from the controller Do you think this could come fromthe module Or does it look more like noise or a bad connectionto earth level Any ideas

Thanks

Like

Erich Stygeron August 5 2014 at 1012 said

Hi RemiI would first verify the power connection to the module Isit within specs 5V Then maybe the UART connectionfrom the microcontrolle is the problem if your clock isdrifting or not stable enough you will get garbage on theserial line you would need to check this with a scope orlogic analyzer And you might need to use a lower baudrate (I use all my modules with the default baud rate of9600 or 38400 (depends on module))

Like

Remi Wielandtson August 5 2014 at 1102 said

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 55: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Pingback Interfacing Android With Microcontroller | Adhitya Reza

Pingback 1000 Days of Blogging Numbers and Tips for You |

Hi ErichI use a USB port for the 5V supply just forconvenience Maybe this is not the best thing todo I will have a try with my DC controlled powersupply insteadI do not have a logic analyzer available but willlook for one in case this does not fix the problemAlso I had the module set to a baud rate of115200 since this is the default baud of thecontroller I have now lowered it back to 9600 andat first sight the connection looks more stablethan before It will need some more testing but itlooks better already

Thanks a lot

Like

Ramiroon September 27 2014 at 0316 said

can i have 2 live bluetooth devices connected with the HC 0506at the same time

Like

Erich Stygeron September 27 2014 at 0817 said

No you only can have one connection at a time

Like

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 56: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

MCU on Eclipse

useron November 9 2014 at 1833 said

Hi I have huge problem with HC 06 I changed name pin andbaud rate with AT commandshellip but then the module is notworkinghellip It doesnt respond to any AT commands and when Iam connected to module with for example android device and Itry to send some AT commandshellip It doesnt read anycharactershelliphelliphellip Please help me thanks

Like

Erich Stygeron November 9 2014 at 1838 said

You need to use a microcontroller board (like the FRDMshyKL25Z I used) to regain access to the moduleUse the same baud as you have specified If that doesnot work it could be that the baud settings are incorrecttry with the microcontroller all defined baud rates of themodule and use a logic analyzer to inspect the resultThen you should be able to recover the modulegood luck

Like

useron November 10 2014 at 1532 said

Thanks for reply Pleasehellip can you make sometutorial I have just Arduino Megahellip I donrsquot havelogic analyzerhellip I am beginner in programmingPleasehellip

Like

Erich Styger

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 57: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

on November 10 2014 at 1748 said

Irsquom affraid that without a logic analyzer you willnot be able to go far in your development andprogrammingA logic analyzer is as important as your screenfor programming without it you cannot see whatis going onI wrote a tutorial how you could build your ownlogic analyzerhttpmcuoneclipsecom20130203turningshytheshyfreedomshyboardshyintoshyashylogicshyanalyzer

Like

useron November 12 2014 at 1329 said

Ok thanks I ordered a logic analyzerhellip Butwhat are the steps in repairing my BT

Like

Erich Stygeron November 12 2014 at 2219 said

You need so inspect the signals you send on theTx line and what you receive on the Rx line Ihope you logic analyzer has an serialRSshy232protocol interpreter

Like

Amal Syriac

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 58: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

on December 4 2014 at 1149 said

hi Erichcan you provide coding for senting signal via bluetooth modulefrom adriuno to antroid phone input can be signal from apushbutton like notification in phone wenever the button ispushed

Like

Erich Stygeron December 4 2014 at 1731 said

Hi there is really no magic behind doing something likethisa) check that button is pressed (several ways to do this)b) send a messagestringcommand to the UART to theBluetooth modulec) that messagestringcommand will end up on theAndroid phone connected to the bluetooth moduled) it is up to you what you do with this message on theAndroid sideI hope this helpsErich

Like

Cătăon January 18 2015 at 2300 said

Have you tried working with it at a baud rate of 1382400

Like

Erich Stygeron January 19 2015 at 0805 said

No I have not Actually this might be very dangerous asif you set it to that mode you might not be able to reshy

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 59: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

configure it from a PC host machine

Like

Abdallah Barhoomon March 27 2015 at 2335 said

Hi Erich

I want to connect two Bluetooth modules HCshy05 one with amicroprocessor (I will use raspberry Pi B+) and the other with asuitable microcontroller that will control a relay for 220v deviceshellip

1 What is the microcontroller that you recommend it for thisjob2 Is this process possible and easy for 100 (or more) slaves andone master3 On what version is the HCshy05 Bluetooth Module work

Best wishes and thanks alot

Abdallah BarhoomPalestine

Like

Erich Stygeron March 28 2015 at 0825 said

Hi Abdallah1 You can use pretty much any microcontroller whichhas a SCIUART Irsquom using the Freescale Kinetis KLfamily for most of my projects like the one in this post(FRDMshyKL25Z)2 I have not used such a configuration but for sure themaster will be limited in the number of connections it canmaintain I think 100 is far too much Probably you canhave only up to 8 connections This might be specified inthe Bluetooth standard

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 60: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

3 Not sure about this question I have not used theHC05 in master modeI hope this helpsErich

Like

Abdallah Barhoomon March 28 2015 at 2254 said

Thank you very much Erich my last question isabout the Bluetooth versions (like in mobilephone) from version 10 to 42 currently and youknow them certainly hellip Is any Bluetooth modulelimit me in a specific version

Like

Erich Stygeron March 29 2015 at 0858 said

Irsquom sorry I cannot answer that You would haveto read the Bluetooth consortium specificationabout such things

Like

NK2020on April 5 2015 at 0854 said

Hi Erich

Thanks for the very useful write up I am currently stuck at aproblem ndash I have an HCshy05 and configure it to be a slave in serialprofile However the module that is feeding the data to HCshy05 (tobe transmitted) does NOT send a newline character (ldquonrdquo) at the

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 61: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

end of its payload As a result the HCshy05 does not transmit thedata Do you think there might be a way around this ndash if I neededto could I update the firmware on HCshy05 to support this Ormaybe the HCshy06 does not wait for a newline character beforetransmitting and I could shift to an HCshy06

ThanksNK2020

Like

Erich Stygeron April 5 2015 at 1123 said

Hi NK2020you need that lsquonrsquo otherwise it will not work And youcannot configure this There is a way to update thefirmware (seehttpbyron76blogspotch201109upgradeshyyourshybluetoothshymodulehtml) but in your case you would needto change the firmware which itself is not openavailableSo better if you change the things on your end and makesure that lsquonrsquo is used HCshy05 and HCshy06 both need lsquonrsquo

Like

narsimhon April 5 2015 at 1139 said

Thank you very much for your response Erich Iam interfacing an EMshy18 RFID card reader to HCshy05 and the tragedy is that the EMshy18 does notsend n after every card ID that it transmits (overUART to the HCshy05) The only option I see (if Iwant to stick to these two modules) is to have asmall uC in between AArrghh

Thanks again for your help

shyNK2020

Like

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 62: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Erich Stygeron April 5 2015 at 1259 said

Yes I would use a small microcontroller to makethat conversion too

Like

narsimhon April 5 2015 at 1313 said

Thanks

Like

Manishon May 18 2015 at 0048 said

HiiI am trying to make communication between two Uno boards viaHCshy05 I have established the connection between them n hc05 arepaired properlyBut when I send the data from any of the device it display thegarbage valueI didnrsquot get itPlz help me out so that I can make proper transfer of data

Like

Erich Stygeron May 18 2015 at 0518 said

Have you checked the communciation between theHC05 and the micrcontroller with a logic analyzer Are

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 63: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

the signals and bytes transmitted looking good

Like

mehmet karakayaon May 25 2015 at 1310 said

hello Erichyou helped many people ndash please help me too

I have connected HCshy06 to my existing STM32 microcontrolerboardI have bought bluetooth dongle and installed it to my computer ndashit showed HCshy06 as bluetooth devices and entered pin andconnected to it so on

I didnot give any AT command from my STM32 and used mysame old comunication software between my PC ( XP) andSTM32 ( 9600 8N1 )

the control center of the PC shows 3 serial ports COM8 COM9and COM10 addedI choosed COM10 and when my software started the red LED onthe HCshy08 stop blinking and always ON ndash so I succesfullyconnected to HCshy06

now I send 10 byte packet to my STM32 with checksum to ldquorunrdquothe STM32 ndash it runs its green LED is blinking when I send ldquostoprdquopacket it ldquostopsrdquo its green LED alwasy ON

this far everything good

however my PC software is expecting a reply from STM32 andthis doesnot come ndash the PC software says no comunication

I am sure my 10 byte packet received by the STM32 becouse itldquorunsrdquo or ldquostopsrdquo according to the command packet

and my STM32 is preparing a reply packet to PC in 20 ndash 30microseconds after the PC command received

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 64: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Pingback JYshyMCU Bluetooth Module | Challenger Swan

I could not find any answer to this problem ndash is there a delay ofHCshy06 from receiving to sending or vice versa

I didnot changed any AT command regarding baud rate ndash is notHCshy06 9600 8N1 by default

how can you help

thank you

Like

Erich Stygeron May 25 2015 at 1619 said

Hi Mehmeta few tipsndash make sure you have RXTX lines correctly connectedmaybe you have mixed them upndash the default firmware on my HCshy06 module is using 9600baud BUT it could be that you have one with a differentfirmwarendash use a logic analyzer to see what the module responseis (if any) You might try with different baud rates too ndash have you debugged the code on the STM32 I fear youare using lsquoLED debuggingrsquo only which will not help youmuch Use a debugger to see if you really receive dataproperlyndash you say you have COM8 COM9 and COM10 makesure you use that port listed in the Bluetooth driverproperties on your PC as outlined in this blog postndash You can change the baud rate of the module but only ifyou have a working connection to the bluetooth module

I hope this helpsErich

Like

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 65: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

Pingback Vixen Super Polaris GoTo |

Ardenon November 13 2015 at 1042 said

HCshy06 board provides TorquePro OBDII guages for projects Iuse EV Display on Android phone easily When I try in windows81 to pair I succeed I can also access one of the two com portsand issue AT Commands like

AT+SETUPAT+AHAnd can set variables accordinglyAT+AH=384AT+ENDWhat I was hoping I could use the terminal for was to view thedata that must be getting sent over bluetooth the torquepro apk

I am running an adroid emulator and of course I learn after I ranthe trial for a few days and decided it was cool and purchasedthat in the end they donrsquot have bluetooth and probably wonrsquot everSad day to spend $3000 on apps and none provide thefunctionality Would rather have kicked in to a kickstarter for theemulator problem than have it buy cigs and beer for someoneetchellip

I have every terminal program available and would like to see thedata if it is possilbe otherwise please advise and will have to findanother solution for marine state of charge guages for windowscomputersArden

Like

REIMINGTONon March 5 2016 at 0730 said

hi guys how can one configure the hc06 to connect to twodevices at the same timehellipwhy because i want is to get data

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 66: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as

from someone on his cellphone while irsquom also connected with mycellphoneirsquom trying to build a smart fan that can be controlled viaBluetooth

Like

Erich Stygeron March 5 2016 at 1626 said

To my knowledge this is not possible

Like

REIMMYon March 26 2016 at 0909 said

Hi ErichCan the hcshy05 connect to two devices at thesame timehellip

Like

Erich Stygeron March 26 2016 at 1014 said

Hi Reimmyno thatrsquos not possible with the default firmwareon the HCshy05Erich

Like

Reimingtonon March 26 2016 at 0913 said

Can the hcshy05 connect to two devices at thesame timehelliphellipif possible then Irsquom going for it too

Like

Page 67: Using the HC06 Bluetooth Module - Instructables...a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge. For most use cases the HC 06 is enough, as