I take the time to refine mine to make a bit more sexy !
I show you the ugly part too : (I'm a little proud)
So !!!! are you ready ?
We have to test it a bit before trying to upload some cool stuff in it.
First you can play a little with the PSTool. But I prefer command line.
Saving your own firmware :
You can find in the Bluelab/Tools/bin directory, a tool to make a extraction of the firmware.
You can download your firmware with the following command :
BlueFlashCmd -DUMP my_saved_firmware
The BlueFlashCmd should create in your current directory, two files called my_saved_firmware.xdv and my_saved_firmware.xpv.
Take care of these files, they can be useful if you missed something in the next steps.
If you don't manage to extract these files, DO NOT PROCEED FURTHER. I have to make a little disclaimer, i will not be responsible if you broke your bluetooth module, please be careful, don't do thing you don't understand. Ask me before if you have any doubt.
Saving your personal bluetooth module parameters :
One another cool program is pscli.exe. CSR firmware contains some special parameters that can be dump, upload, modify by pscli.exe and PSTool.exe.
I will not describe each PSKEY as you can have useful information via PSTool.
pscli.exe can extract a set of PSKEY by passing PSKEY queries in a config file.
The goal is to save your bluetooth UUID and some crystal calibration data to restore them after the firmware download.
You have to know that downloading my firmware to your module will make a perfect copy of my module. So if you planned to make several HC05 modules you have to make them unique if you want to pair them together.
The PSKEY query file (data.psq) is made like this :
Each line starting by a ? is a query to grab the corresponding PSKEY stored in your module.
You can invoke the following command to stored those PSKEY in your computer :
pscli query data.psr data.psq
Some explanations ? Be careful ! 3 parameters :
- 1st parameter : The command query
- 2nd parameter : The response file
- 3rd parameter : The query file
Do you see it ? you have to pass the the output file (data.psr) before the input file (data.psq). If you change this order, you will delete the psq file :-/
You can check the data.psr file to verify that you manage to get these PSKEY with your text editor.
Flashing another firmware :
Flashing the firmware, you can simply invoke that command :
please notice that you should have the following HC05.xpv and HC05.xdv files in your current directory.
Be patient and take care that everything is working well.
Restoring your personal data :
At this point you have a perfect copy of my own module.
You had to restore your Bluetooth address and crystal factory setting to your module.
This can be done with this command :
pscli merge data.psr
The data.psr file is the one that you created before.
Et voilà !!!
Please don't hesitate to comment this post if you have any question. You would be gentle to share this information if it helps you.
And don't forget to donate if you want to thank me !