Byron's Blog

Saturday, April 12, 2014

I would like to give you some news.
It's been a long time since I don't post anything over there.
As some of you already know, my private life is a bit complicated and I have to fight against financial difficulties.
So... If you need some C, java, embedded development for a short period of time, i can be your man !
Please consider this proposal as freetime job.
Just let me know.

Thursday, January 26, 2012

Hello,
This post will talk about the conception of my programmer. Thank's to my colleague Alexis, we think about a cool way to flash 20 Linvor module with HC05 firmware.
The goal was to not have to solder all these modules to program them.
So first, here comes the LPT programmer. Since I'm a kind of sniper with my glue gun, I decided to solder it without PCB neither protoboard.

As Steve Jobs can no longer say : "It's AMAZING, uh ?" (RIP)

Concerning the case, I wanted to ensure an excellent pin contact with the module. I opted for some test pins (with spring). The hard part was to make pretty sexy and reliable.

As you can see I just add a knob soldered on a pogo pin.
This can facilitate the module insertion and provide a funny way to reset the bluetooth chip !

Friday, September 30, 2011

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 :

// PSKEY_BDADDR?0001=// PSKEY_ANA_FTRIM?01f6=// PSKEY_ANA_FREQ?01fe=

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 :BlueFlashCmd HC05please 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.

The first time I bought some UART bluetooth devices, I ordered them on suntekstore.com website. Since these devices seems promising, i ordered a few more on DealExtreme for my job.

I discovered that even these boards seem identical, they had different firmwares.

The suntekstore ones has HC05 firmware, the DealExtreme ones has linvor 1.5 firmware.

The differences between them is mainly the AT command set.

Linvor 1.5also known as HC06
This firmware offers a very limited set of AT command.
By default the baudrate is 9600 8N1.

For this firmware you have to not send LF or CR character at the end of your AT command.AT programming mode is up when your board is not paired by bluetooth devices. For this firmware, you have to copy/paste AT command since timings is important. You can send about one command per second.

Command

Response

Note

AT

OK

Usefull
to check connection and baudrate

AT+VERSION

Linvor1.5

Get
the version of the module

AT+BAUDx

OKyyyy

Set
the baudrate :

xcan
take the following values :

1for 1200bps

22400bps

34800bps

49600bps

519200bps

638400bps

757600bps

8115200bps

9230400bps

A460800bps

B921600bps

C1382400bps

AT+NAMEString

OKsetname

Change
bluetooth device name :

String
can be any string you want ! be creative !! (20 characters
limited)

AT+PINxxxx

OKsetpin

Set
the bluetooth pincode :

1234by
default

And that's it !!! No other AT command.

In the next, post I will provide some links to the HC05 firmware. This one is a bit better than HC06.

I realized that we can do a lot of cool stuff we that device... but it's a bit hard to find some resource and it's hard to get any help to start developing Bluecore4 chip ! Hope this blog we help some of you...

Feel free to encourage me buying me a beer, some electronic gadgets or other stuff by cliking this button. It's not mandatory, don't blame me.