EN CN
setting up Bluetooth HC-05 adapter (mac)
  • Hi Guys.
    I hope somebody in here can help me since I have been head-putting this issue for days now and can't connect via bluetooth. My mac can se the adapter, it shows up as HC-05 in my bluetooth preferences.
    First let me start by asking you if there are different versions of the hc-05 adapter out there? This is the one I bought from a local dealer and maybe somebody can tell me if this one is not going to work with the 32 bit board I have. http://arduinotech.dk/shop/bluetooth-rf-transceiver-module/
    I might add at this point that I am using a 32bit board (v.3) with 2 IMU´s, running on the latest firmware. I have read somewhere that the adapter needs to by in AT command mode. I do not know what that means or how to configure the adapter for that matter.. so I will gladly take any advice/guidance here!.. is this done via terminal?

    When I was using the 8bit board my bluetooth experience was mostly painless so I am frustrated this time that I can't get this to work. How did you guys get yours to work, was it "plug-n-play" or did you have to jump through hoops to get it to work???
  • I forgot to write how it is connected. The adapter has 6 pins: Key, 3.3v (status), TX, RX, 5v, GND.
    I have connected:
    5v to 5v
    GND to GND
    RX to TX
    TX to RX

    Should KEY and 3.3v (status) be connected as well? What does the KEY pin do?
  • The connection looks ok, do not connect anything else. Is it bind with the computer ok? I have never done any configuration on the BT modules, they work fine for changing GUI values, but not for FW update.

    Your BT unit could be broken, I had one, it did bind but did not communicate. I am not sure of the BT unit versions I have, but I have several different.
  • photopop, i spent days to set the hc-05 and now it's clear:
    since default alexmos baud rate 115200 and hc 05 is 9600 or 38400 (depends on how you enter at mode) you will need to change the baud rate of hc05 to 115200. to do that you'll need to enter the AT command mode and using ftdi change baud rate. google hc05 datasheet - it's desribed there

    so you steps:
    1) connect 3 pins: ground of ftdi to bt ground, rx->tx and tx->rx. DO NOT CONNECT power pin
    2) connect ftdi by usb to pc
    3) to 34 pin (it's key pin) connect 3.3v and HOLD it there (really important)
    4)connect power pin of ftdi to bt
    5) the led should start blinking slowly
    6) open program like Terminal
    7) connect to ftdi with speed 34800 8N1
    8) write : AT: the response should be OK
    9) to change baud rate write AT+UART=115200,0,0

    P.s on some breakboards hc 05 key pin doesnt equal 34 pin - so maybe you need manually check weather it is the same or not
    pps you may also use arduino instead of ftdi
  • Hey Tony.

    Brilliant! I think thats will do the trick, I have just had a heck of a time trying to find a "plain english" description of how the process is done. Don't really understand half of what is written in most of the guides out there. But this one is straight forward and I will try it asap. Will report back about how It went.

    Tanx!

    ps. You mention that its important to hold the power cable to PIN34. For how long, when to let go? I assume it is safe to release when LED starts to blink and you can attach the 5v power instead.
  • no, its important to hold the 34 pin till the last 9) step. If you remove it after it starts blinking - you won't be able to get AT response from the board - it was my main mistake:)
  • Now I have gotten so far as getting my HC-05 to go into AT mode, or so I think, it is blinking slowly.
    connected:
    Key to a 3.3v pin on ny Alexmos board
    RX to TX
    TX to RX
    GND to GND
    5v to 5v

    When I plug in the USB to my Alexmos it lights up and starts to blink slowly.
    So far so good, but I can by no means communicate with it via terminal (i might add that my knowledge in terminal is limited). When I type /dev/tty.* the only thing showing is bluetooth-incoming-connection. When I type /dev/tty.USBtoUART 9600 i get no such file or directory.

    bum.. im lost again :)
  • You will need some serial terminal SW and it needs to be configured to use the serial port the BT is connected to.

    I have not configured my BT modules to be used for FW update, because I have been too lazy to do that. next modules I get, I will try to find some that work directly, any suggestions?
  • photopop, you missed the main steps 4) and 6) -9) - you need to change the baud rate of bt using special software programms like Terminal through FTDI (you use alexmos instead of FTDI - i don't know for sure, but i guess you won't be able to do that with alexmos - so you need FTDI to connect it to bt)

    Garug, i googled bt for alexmos - and there are a lot of options. The only thing you want to look in these modules is 115200 default baud rate. if it so, it will work directly. (hc05 and hc06 are compatiable with board due to the guide)
  • Thanks Tony1483, The ones I have work fine without any configuration for changing parameters on GUI, but not for FW update, I think it had to do with the parity setting that should be changed. I am looking for one that just would work without any configurations.
  • Oops, just realised that for 32bit there is the serial port speed settings in advanced tab. So you can buy any bt, ie hc05 and just choose the right value in serial port speed.

    Garug, you can delete bt connection and then pair it again. I belive it could help, have the same prob for second desktop, haven't tried to solve it yet.

    photopop , since you have 32 bit board you don't need the described steps, just configure the proper setial port speed in advanced tab of GUI.