CAJ Innovations Forums
https://www.cajinnovations.com.au/forum/YaBB.pl
MyECU >> MyECU Advanced usage >> Proper Configuration of an HC-O5 BT Dongle?
https://www.cajinnovations.com.au/forum/YaBB.pl?num=1750800453

Message started by Luhbo on 06/25/25 at 07:27:33

Title: Proper Configuration of an HC-O5 BT Dongle?
Post by Luhbo on 06/25/25 at 07:27:33
Eleven years later! I'm glad this forum still is up and alive.
I'm writing this because I recently noticed that my years old A7 based BT dongle does not connect to my Android phone.
I now have a HC-05 wired in, correctly I guess, the actual Optimiser app connects to it, but obviously they don't talk to each other. In another thread I could I found hat the HC-05 needs to be correctly configured before it works with MyEcu. Could anyone share the How To for that, please?
Thx, Hubert

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by YaBB Administrator on 06/25/25 at 08:06:19
The only important parameter is the baud rate. The dongle's default is usually 9600.
The MyECU expects 38K, 57K or 110K depending on the variant.
I've attached the python script I use to set them up but I haven't used it in a long time.
The dongles I use now are BLE devices based on the HM10
https://www.cajinnovations.com.au/forum/YaBB.pl?action=downloadfile;file=HC05setup.zip (0 KB | 8 )

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by Luhbo on 06/27/25 at 09:43:03
Hello Cliff,
thanks for the quick response/attachement. UART=57600,0,0 (and maybe NAME=MyECU) did the trick.
I used Hyperterminal under XP and the early MyEcu days' RS232 to TTL/RJ45 converter (switching Rx/Tx for that).

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by sign216 on 06/28/25 at 22:33:10
I am trying to configure my dongle as well.  I ran the script (HC05setup.py) with these results.

joe@joe-Studio-XPS-435MT:~$ python3 HC05setup.py
Set up HC05 bluetooth module3
send AT+VERSION?
nothing received
send AT+NAME?
nothing received
send AT+NAME=MyECU
nothing received
send AT+NAME?
nothing received
send AT+UART?
nothing received
send AT+UART=57600,0,0
nothing received
send AT+UART?
nothing received 

I tried to change the name and the baud rate, but it wouldn't recognize my commands.  What am I doing wrong?

Joe

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by Luhbo on 06/29/25 at 02:06:14
The Dongle is in AT mode? That's important. How fast does the LED blink? In AT mode it's a slow and steady blink every one or two seconds. A double blink every second is not the AT or programming mode.
You have the HC-06 without switch button, so I guess(!) you have to shorten Vcc and the pin outside next to it (EN) when you power up the dongle. It's better described in the manual.

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by sign216 on 06/29/25 at 21:41:14
Luhbo,
I have the HM-10, not the HC-06.  And... I bought if off Evilbay, so the likelihood is that it's a pirated copy.  Let me get a module from a reliable vendor, so there's one less issue to battle with.

Which Bluetooth module is recommended?  Esp. one that is simple and easy to use.

Joe

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by Luhbo on 06/30/25 at 04:28:26
I don't think anyone, even in China, would make a fake copy of a cheapo like this. It's not a Rolex.
Regardless whether you have a 05, 06 or 10 version: before you can modify it you have to put it into AT mode. The log you attached shows that the unit doesn't answer. Start there. Read the manual about AT and also get the Baud rate right (38400 for AT).
I can recommend this type of BT dongle (HC-05 in my case)

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by sign216 on 06/30/25 at 06:59:42
I looked up different version of the HM-10 manual for Linux, but they are only marginally helpful.   If I search for "changing carb jets"  I get documents the honestly show how to change carburetor jets.  Not finding that here. 

I believe I installed minicom as a serial port commo program, and changed the baud rate to 38400.  See:

joe@joe-Studio-XPS-435MT:~$ dmesg | grep tty
[    0.174951] printk: legacy console [tty0] enabled
[ 3269.823691] usb 8-2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 3293.608584] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[57127.036601] usb 5-2: FTDI USB Serial Device converter now attached to ttyUSB0
[60173.534308] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[94561.546703] usb 8-2: FTDI USB Serial Device converter now attached to ttyUSB0
joe@joe-Studio-XPS-435MT:~$ sudo minicom -s
[sudo] password for joe:   




    +-----------------------------------------------------------------------+
    | A -    Serial Device      : e                                         |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 38400 8N1                                 |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    | H -     RS485 Enable      : No                                        |
    | I -   RS485 Rts On Send   : No                                        |
    | J -  RS485 Rts After Send : No                                        |
    | K -  RS485 Rx During Tx   : No                                        |
    | L -  RS485 Terminate Bus  : No                                        |
    | M - RS485 Delay Rts Before: 0      

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by sign216 on 06/30/25 at 07:02:18
Mssg continued, since I exceed the max capacity.

But when I run :  python3 HC05setup.py
I get the same message as before. 

The light on the HM-10 unit is blinking once every 1.5 second, if that helps. 

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by YaBB Administrator on 06/30/25 at 07:46:34
The HM10 is very different to the HC05. There's probably little in common. You cannot use the HC05 script on the HM10.
You already have the HM10 script I use.

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by sign216 on 06/30/25 at 09:51:42
I changed to the latest of the 2 other setup programs you gave me (blesetup.py ).  I also made sure the baud rate was changed, checked the port and based on ChatGPT data, I changed some other parameters.  Still not getting communication.  How do these parameters look:

    +-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyUSB0                              |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 57600 8N1                                 |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    | H -     RS485 Enable      : Yes                                       |
    | I -   RS485 Rts On Send   : No                                        |
    | J -  RS485 Rts After Send : No                                        |
    | K -  RS485 Rx During Tx   : No                                        |
    | L -  RS485 Terminate Bus  : Yes                                       |
    | M - RS485 Delay Rts Before: 0                                         |
    | N - RS485 Delay Rts After : 0                                         |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+


Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by YaBB Administrator on 06/30/25 at 09:58:17
These look like they're from a terminal program. This is not going to help you at this stage. If I recall the dongle has timing constraints so you can't feed the setup commands manually, only with the script, it tries a number of possible baud rates looking for a response.
It will be easiest if you just send the dongle with your ECU when you send it for upgrading.

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by sign216 on 06/30/25 at 20:55:36
So the ECU's software must be updated, as well as the dongle's? 

Let me do that this fall, after riding season.  The bike rides fine, I just can't communicate with the ECU.


Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by YaBB Administrator on 07/01/25 at 08:32:21
No, the new dongle will work with the current ECU.
The new dongle is required for the latest Android Optimiser that is required for the updated ECU firmware.

Title: Re: Proper Configuration of an HC-O5 BT Dongle?
Post by sign216 on 07/02/25 at 10:56:27

YaBB Administrator wrote on 07/01/25 at 08:32:21:
No, the new dongle will work with the current ECU.
The new dongle is required for the latest Android Optimiser that is required for the updated ECU firmware.


Ok, so the new dongle will work with the old ECU.  Good.

CAJ Innovations Forums » Powered by YaBB 2.4!
YaBB © 2000-2009. All Rights Reserved.