HC-05 bluetooth programming issues

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

Post Reply
T3Bunny
Super MS/Extra'er
Posts: 1391
Joined: Sun Nov 28, 2004 8:44 pm
Location: Miami, Florida

HC-05 bluetooth programming issues

Post by T3Bunny »

I grabbed an HC-05 from a reputable (I believe, and I recognize his name from on here too) eBay seller to connect up to my coworkers MS1. This MS1 is wired inside a "stock" OBD1 Honda ecu case. In the interest of keeping it looking stock, Bluetooth connection.

RS232 chip removed. MsnSe pre-loaded on processor from a WORKING setup (the last code released whatever it is). Get it all hooked up according to seller's VERY NICELY documented info. Fire up can see name and the programmed pin works fine. Establish connection.

Open TS. New Project. Discover. Finds the board at 115200 baud, tosses back weird code sig. Contact seller, sends new module. Original one possibly programmed original wrong since I had ordered accidently for MS2, then sent note asking to correct it.

New one arrives. Preprogrammed with name, pin, and baud. Again TS finds it, and again it is at the 115200 baud. This time I "think" I had an okay connection for a moment. Then garbage. (Been stuck on wrong baud rate issue trying to figure out how to reprogram these, need to check again if I have any comms now at the wrong rate...)

After much head scratching (unfamiliar territory) I grabbed a Chinese USB To RS232/TTL PL2303HX cable. After much MORE headscratching, giving up, then finally stumbling across a random tutorial on this as I am building a quadcopter, I "THINK" I have the software, and adapter reprogramming sorted out.

Using Arduino,s software and utilizing their "Serial Monitor," I should be able to get an OK back when I type AT (while on correct baud rate, I tried them all, nada).

Board type is whatever, according to the tutorial it doesn't matter. Do I need to set programmer type?

I have the two "programmed" adapters the seller sent me, and two more unprogrammed I bought from same guy as the TTL cable. For giggles, I also picked up a USBasp programmer for another project.

The unprogrammed ones have buttons and are easy to get into the slow blink AT mode. I have let off the button once in said mode (saw this "could" be a problem in the $7 Bluetooth thread).

Not sure why the "incorrect" baud rate adapter worked at all.

Have trouble believing the seller would make the same mistake again, so suspect it is some issue on my side.

Is there a good way to test these to check for the baud rate?

And even better, what should I use to program them? Anything already on hand would be nicest. Could I use a serial comm and another MS ecu lying about to get into these somehow?

Heck, the very likely issues is my cheap TTL cable... It seems I have done everything right, and been trying for more than a couple attempts... Kinda suspect the cable.

If something I have done is wrong, or unclear above, PLEASE let me know! I really need to get this sorted out!!! I think I am going to resort to tuning with a direct RS232 interface, but will require opening the case. So would like further interface after to be with BT.

If the issue is most likely my cable, then should I grab an Arduino Uno to get these programmed??? Or is there anything I have on hand, in the MS software, that could do this?

(ps: My apologies if this isn't the best sub-forum for this. All my searches lead back to a couple threads in here, so seemed the best fit.)
Forget the porn, my bathroom is full of car manuals...
1977 Rabbit (retired)
1991 Cabriolet (retired)
grom_e30
Super MS/Extra'er
Posts: 4461
Joined: Thu Mar 08, 2012 12:44 pm
Location: UK

Re: HC-05 bluetooth programming issues

Post by grom_e30 »

http://forum.hobbycomponents.com/viewto ... =74&t=1567 has a list of commands and how to get in to programming mode.
1990 bmw 320i daily driver with m20b25 ms3 sequential fuel, 380cc injectors, d585 coil near plug, home made cam sync, launch control, fan control, vss, homebrew egt logging what's next????
ashford
Super MS/Extra'er
Posts: 1605
Joined: Sun Apr 27, 2008 4:29 pm

Re: HC-05 bluetooth programming issues

Post by ashford »

also under windows(device manager) set baud to 9600. i had to do this to get a stable connection at distance on a ms2.
T3Bunny
Super MS/Extra'er
Posts: 1391
Joined: Sun Nov 28, 2004 8:44 pm
Location: Miami, Florida

Re: HC-05 bluetooth programming issues

Post by T3Bunny »

Thanks for the tips! And sorry for my first long winded post above... I found piles of info on the AT commands themselves. And it is easy to get the modules with switches into the AT mode. But my issue is the connection to program them.

1) Do I need to hold down the AT switch on module the whole time, or just until it goes into slow blink mode?

Software issues I think I have sorted out for programming the module, I think it is a hardware, or maybe a settings issue. I am not getting ANY "OK" command configuration return connected via a cable USB TTL adapter to the HC-05. So again either a settings issue (using the Arduino software, and verified every setting that was mentioned and or visible in video).

2) Any way to use a MS itself as the "dongle" to send the commands? I do have a couple more TTL adapters coming, since I am mostly convinced that is where the issue lies.

3) But, back to Basics, is there any need to have the MS MAXrs232 chip installed? I know I am bypassing it and thinking this shouldn't matter. Unless that chip needs to be in for other bits of the circuit to function? I can verify this myself easily enough, if I can find a spare rs232 chip in my piles of bits...

4) Again is there another simple tool I can use to verify the baud rate on the HC-05 adapter itself? Since I can't get any AT responses back, I can't query the module that way. Since I am unsure of the rate, hard to connect (I did sit and go through every rate option, multiple times).

There is a lot more info and specifics in my first post that could help, if this simplified post doesn't have enough to go on.
Forget the porn, my bathroom is full of car manuals...
1977 Rabbit (retired)
1991 Cabriolet (retired)
ashford
Super MS/Extra'er
Posts: 1605
Joined: Sun Apr 27, 2008 4:29 pm

Re: HC-05 bluetooth programming issues

Post by ashford »

its been 2 years since i did mine so things are a bit fuzzy.
the hc uses 3.3v signals(ttl) and serial uses 5v, they are not compatable voltage wise, the hc will read serial but the hc voltage out is not high enough to trigger serial. this is where the max232 cam in it converts between the 2.
programming is done over the serial connection (not bluetooth)
the max 232 chip has an unused channel in the ms.
i fed it into the unused(cts and rts) to max232 then looped it back into itself via db plug with tx1 and rx2 and tx2 and rx1jumpered for normal connection.
Image
T3Bunny
Super MS/Extra'er
Posts: 1391
Joined: Sun Nov 28, 2004 8:44 pm
Location: Miami, Florida

Re: HC-05 bluetooth programming issues

Post by T3Bunny »

ashford wrote:the hc uses 3.3v signals(ttl) and serial uses 5v, they are not compatable voltage wise, the hc will read serial but the hc voltage out is not high enough to trigger serial. this is where the max232 cam in it converts between the 2.
Okay my question is likely foolish, but also misunderstood! My HC-05 is plugged into the v2.2 ecu BETWEEN the max232 and the MSprocessor. I was wondering if my issues were caused by not having the max232 chip plugged in at all... Perhaps missing some part of a loop between the max232 and MS1. But again the HC-05 rx goes to TX on the MS processor, and vice versa. I could go get paper with exact specifics, but somebody much smarter then me with these things figured it out and was/is selling them on eBay. Basically, I understand I am directly accessing the MS processor via its TTL.
ashford wrote:programming is done over the serial connection (not bluetooth)
Unsure what specific programming your referring to? Okay at the moment this MS ECU does not have a serial port. No plug, no max232 chip. Everything else in the circuit is populated, if that matters. I was wondering (foolishly I realize now wit more study) if I could use the hardware of the v2.2, to gain access to the HC-05. I can't, so lets ignore this moment.

As for programming I need to do, I need to check, verify, modify the HC-05 via its AT commands.

I now have three different adapters to attempt programming the HC-05 module via TTL. One is a PL2303HX cable, the other is a simpler dongle. And a third USB to TTL adapter of a different kind (currently untried). PS: I can go get specifics of the last adapter, if anybody thinks it will help.

Okay with dongle plugged into the computer, in Device Manager it is set for 9600 baud. DM sees it as a FTDI usb TTL or whatever it is. Then I am using Arduino software. When adapter is plugged in, it even boots up. I am then using the Arduino Serial Monitor. I found a good tutorial for this part. Looking under Device Manager I took note of the comm port in use by the programming adapter. Then I have to go set the baud rate in the arduino software. At this point I understand that I need the Arduino software settings, baud rate specifically, and the baud in the HC-05 to match. So I have to scroll through each one, one at a time.

But nothing I do is getting my "AT" type and return to send me back an "OK."

PLEASE if there is anymore information or specifics you guys need to know, hit me up! I think there is more I meant to post and explain, but I am fading. Time for bed lol.
Forget the porn, my bathroom is full of car manuals...
1977 Rabbit (retired)
1991 Cabriolet (retired)
ashford
Super MS/Extra'er
Posts: 1605
Joined: Sun Apr 27, 2008 4:29 pm

Re: HC-05 bluetooth programming issues

Post by ashford »

it was quite a long time ago i did this but i remember having a hard time getting at commands to work. i think i had to use a program called terratermor putty to get a working terminal enviornment. it works in win 7
https://en.osdn.jp/projects/ttssh2/
http://www.putty.org/

then i also discovered there were many types of firmware on these things almost all of which had different at commands and took some time to find them. look specifically for what ver you have 1.3, 1.4, master, slave etc
old guy
Experienced MS/Extra'er
Posts: 362
Joined: Thu Jan 24, 2008 9:20 am
Location: North Carolina

Re: HC-05 bluetooth programming issues

Post by old guy »

You need to use a terminal program like Putty or H-Term .The reason is because you need a program where you can write your command and then hit send, the whole command has to be entered in a second or less and unless you are a super fast typer you can't use a regular terminal.
I don't understand why you have an Arduino involved in your programming setup?
All you need is a serial connection from your PC,either with a serial cable if you have a com port, or a usb to serial adaptor. Then a RS232-C to ttl converter connected to the tx and rc pins on you module.
Be aware that some of the modules are not 5v tolerant on these pins,so you might need a voltage divider to drop the voltage to 3.3v.
I also have a PDF that has a complete guide to the EGBT-045MS which is the chip used on these modules.
slow_hemi6
Super MS/Extra'er
Posts: 4122
Joined: Fri May 07, 2004 3:33 am
Location: Australia

Re: HC-05 bluetooth programming issues

Post by slow_hemi6 »

+1 for good old hyperterminal. That is what I used for my module to change the baud rate.
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
T3Bunny
Super MS/Extra'er
Posts: 1391
Joined: Sun Nov 28, 2004 8:44 pm
Location: Miami, Florida

Re: HC-05 bluetooth programming issues

Post by T3Bunny »

old guy wrote:You need to use a terminal program like Putty or H-Term .The reason is because you need a program where you can write your command and then hit send, the whole command has to be entered in a second or less and unless you are a super fast typer you can't use a regular terminal.
Understood, but unsure how to go about it exactly...
old guy wrote:I don't understand why you have an Arduino involved in your programming setup?
I don't exactly. I am using a USB to TTL adapter, have three in fact. Different types, but I digress. I tried a couple terminal programs and couldn't find enough information to get any of them configured and working. I didn't actually try hyper terminal though... Anyways the one tutorial I found that was relevant was using the Arduino software package, and its serial terminal inside the programming software. I was able to visually see and follow everything to a letter. Still no luck.

My guess would be, somewhere there is a setting that would be super obvious to somebody who has done this a few times before. It is completely foreign territory to me, and I suspect I am missing it. I need to find a good/free screen video capture and make a video of this. Need that for another project anyways.... I wonder if this Toughbook has a microphone?
Forget the porn, my bathroom is full of car manuals...
1977 Rabbit (retired)
1991 Cabriolet (retired)
ashford
Super MS/Extra'er
Posts: 1605
Joined: Sun Apr 27, 2008 4:29 pm

Re: HC-05 bluetooth programming issues

Post by ashford »

if memory servs me i just typed out the commands on notepad or the like in whole then copy/pasted the whole command into the terminal
Boshnakov
Helpful MS/Extra'er
Posts: 38
Joined: Mon May 11, 2015 2:20 am
Location: Bulgaria

HC-05 bluetooth programming issues

Post by Boshnakov »

My experience with this kind of hardware is this - if you haven't succeeded after the 1000 try, you just need to do it a couple more times and it will work. My guess is that you have a problem with the ttl adapter here. You had to buy a BT with a rs232 chip onboard, it would be a lot easier then.
When I did mine I had to find a win XP machine and use the good old hyperterminal, no need for a copy/paste trouble though.

I think that you need to set the proper com speed in device manager also.

There is not a problem if you keep the 232 chip on the MS board as long as there is nothing connected on the other side. After all it is just a level shifter IC.
T3Bunny
Super MS/Extra'er
Posts: 1391
Joined: Sun Nov 28, 2004 8:44 pm
Location: Miami, Florida

Re: HC-05 bluetooth programming issues

Post by T3Bunny »

Okay I went with another TTL adapter, and success!!! Well sorta anyways. I can now get AT to return an okay, but not much else. Seems I need to find the correct set of commands... But progress anyways!

The problem might actually have been settings related in the software. Still using the Arduino interface. But a cople settigns I had fiddled with, actually required a restart of software, and a reboot on the module.
Forget the porn, my bathroom is full of car manuals...
1977 Rabbit (retired)
1991 Cabriolet (retired)
Post Reply