Firmware Version 3.0 and 4.0 HC05 modules

295 views
Skip to first unread message

vorpalrobotics

unread,
Oct 8, 2020, 11:20:49 AM10/8/20
to Vorpal Robotics Forum
Hello everyone,

As I've noted on a couple of other threads, recent HC05 modules have newer firmware that is causing issues with the current robot radio protocol.

The older version 2.0 firmware (linvor) would transmit packets immediately. The new versions (firmware versions starting with 3.0 and 4.0) will buffer up 230 bytes before sending. Since the gamepad packets are typically under 20 bytes sent every 100 milliseconds, this causes a lag of about 2 full seconds when using hc05 modules with these later firmware versions.

(Please note: we're not talking about bluetooth versions here like BLE is V4 bluetooth, we're talking about bluetooth version 2 with firmware versions starting with either 2.0, 3.0, or 4.0).

After spending hours and hours looking, and asking multiple manufacturers, there is simply no documentation at all available on  version 3.0 and 4.0 firmware for HC05. Therefore, I have not been able to find any AT commands to adjust the buffering behavior of the newer HC05 modules.

This has come to a critical point now, because I can no longer find anyone who sells firmware version 2 HC05 modules, and my stocks are down to just a week or two supply of the v2.0 firmware modules.

For the last couple of weeks I have been working on a software fix, which is kind of a hack. This is to simply pad out every radio packet with enough nulls to reach the 230 byte buffer limit.  On the robot side, these extra null bytes will simply be ignored. 

In my own tests, this does work and there is no noticeable lag, the software performs identically to the old protocol.  If you do the math, there is plenty of room in the bandwith to "waste" these extra bytes (bluetooth transmits at 3 megabits speed even though the uart is going at only 38400 baud, so in 100 milliseconds there is no problem at all wasting this many bytes).

Well, I'm going to do another weekend worth of testing, then switch over to the new system. So basically all kits going out after mid-October will have the new robot and gamepad firmware that forces packets out. This is also backwards compatible with the old 2.0 firmware, so should cause no issues if you still have the old hc05 modules.

I hate this work-around on aesthetic grounds, however I have no choice at this point. If a spec sheet ever surfaces on the newer firmware versions, perhaps there is an AT command that can turn the buffering off.

I'll have a beta version of the new code posted probably tomorrow.

Take care,
Steve P.

elto...@gmail.com

unread,
Oct 9, 2020, 10:47:49 AM10/9/20
to Vorpal Robotics Forum
Great. I think it will solve my problem.
Thanks and I wait for the new code.

Rostislav Zboril

unread,
Oct 9, 2020, 3:44:20 PM10/9/20
to Vorpal Robotics Forum
Thank you. 

It is also interesting that the application in the smartphone does not cause any problems and the robot has no outages.  

Dne pátek 9. října 2020 v 16:47:49 UTC+2 uživatel elto...@gmail.com napsal:

Rostislav Zboril

unread,
Oct 9, 2020, 7:04:48 PM10/9/20
to Vorpal Robotics Forum
Working! Thank You! (Vorpal little slow and Bluetooth is too hot in controller). Working ! Working. Thank you !

Dne čtvrtek 8. října 2020 v 17:20:49 UTC+2 uživatel vorpalrobotics napsal:

vorpalrobotics

unread,
Oct 11, 2020, 4:34:12 PM10/11/20
to Vorpal Robotics Forum
Well, it shouldn't be slow ... in my tests i see no difference between the old and new hc05 modules with and without the new beta code. Most people find the robot quite responsive (even little kids who know a lot about lag from video games often comment how responsive it is).  Do you now what version of hc05 firmware you have? using AT+VERSION? would tell you the firmware version. If you can give me a full version number maybe I can try to get some modules of that kind and test the beta code. There might be a difference between what you have and what I've tested with.

Also, it is a little concerning that the module is getting hot. In my tests, they do not get hot at all. Very, very slightly warm, barely above room temperture.

It's possible that you have a version of the hc05 module that has a RCV pin that is not 5 volt tolerant. If that's true, it will burn out pretty soon. All the ones I buy, I make sure they have an internal circuit to make them tolerant of 5v inputs. You may need a voltage divider on the RCV pin of the hc05 on the gamepad if that's true. The robot doesn't transmit very often so it probably is not a problem there, but you might check the temp of that one too. The robot only sends data back to the gamepad if scratch programs ask for sensor data so the RCV pin on the robot hc05 would normally be held low.

Almost all modern hc05 modules are 5v tolerant so this is rarely a problem, but perhaps you have one of the few that is not.

vorpalrobotics

unread,
Oct 11, 2020, 5:23:37 PM10/11/20
to Vorpal Robotics Forum
The beta code is here:  http://tinyurl.com/VORPALFILES then look under SOFTWARE_HEXAPOD and SOFTWARE_HEXAPOD_XBETA_HC05

elto...@gmail.com

unread,
Dec 31, 2020, 4:10:57 PM12/31/20
to Vorpal Robotics Forum
Hello, feedback on the beta code.

The HC-05 module (version 3.0-20170601) is at 38400 and can pair with the app and gamepad.

The robot continues to function normally in STOP, ADJ, TEST, DEMO modes.

However, when I put it in the CR the behavior is strange. Here are some behaviors:

- Sometimes he doesn't answer.
- Other times it beeps continuously and does not respond.
- After it starts to emit the long beep, it does not return to the expected behavior in RC, even if it turns off and on, it emits the continuous beep.
- After the beep sounds, I leave a time off and it ends up working in parts in RC mode. Sometimes it works in RC, and it has some behaviors such as:

- if it takes too long to receive commands from the master (app or gamepad), it emits the continuous beep and stops working;
- When I put on RC and I can control it through the app or gamepad, if I press any W, D, F or R button it stops responding and I have to turn it off / on and when it returns, it accepts the command.

Anyway, I already exchanged 2 HC-05 modules (both version 3) and I can't get it to work. :(

Any suggestion? I am available to run tests.

Thanks in advance and happy new year

vorpalrobotics

unread,
Feb 25, 2021, 10:37:50 AM2/25/21
to Vorpal Robotics Forum
The latest version of code (see tinyurl.com/vorpalfiles in the software-hexapod folder and current release folder) allows you to turn on and off the packet-pad mode. To turn on, boot the gamepad while simultaneously holding D2. Count to ten, release D2, and reboot the gamepad again. To turn off, same procedure but hold D1 while booting.  In both cases, the setting is stored in EEPROM so you only have to do it once.

This will allow you to test the two different modes.

For me, the new D2 boot mode makes the defective HC05 modules work very well. There is a very, very small lag detectable if you really look for it, but it's no more than a few milliseconds.  You are better off turning off the new mode for non-defective HC05 modules.

Make sure you flash both the robot and the gamepad with the new software version or you'll get that continuous beeping you mentioned.

Also, as a note, I am seeing fewer and fewer of the defective modules on the market now. It looks like newer modules, even some with the new version number, no longer require padded packets.

-Steve P.
Reply all
Reply to author
Forward
0 new messages