Author Topic: Programming off the shelf CSR8635 module  (Read 171744 times)

0 Members and 1 Guest are viewing this topic.

Offline l0rd_hexTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ca
  • I'm a master of karate and friendship for everyone
Programming off the shelf CSR8635 module
« on: December 09, 2015, 09:40:04 pm »
Hi friends,

I recently bought a cheapie Bluetooth -> Stereo amplifier board. It works pretty well for what I need and I'm thinking about buying another. Unfortunately the device comes with "SANWU Audio" as the hard-coded BT device name. I'd like to change that to something nicer like "JamBox", especially if I'm going to have two of these sweetpeas.

Has anyone had experience with re/programming these modules?

My stereo amplifier had this soldered on to it: http://www.dx.com/p/csr8635-2-channel-bluetooth-v4-0-module-black-blue-368089

Possible pinout for module: http://g04.s.alicdn.com/kf/HTB1Med2FVXXXXaIXFXXq6xXFXXXJ/220226238/HTB1Med2FVXXXXaIXFXXq6xXFXXXJ.jpg

I'm starting to think the "Debug SPI" on the chip (PDF: http://www.csr.com/sites/default/files/csr8635_qfn_technical_overview.pdf) isn't exposed on the outside pins...

EDIT: s/SANDWU/SANWU/
« Last Edit: December 10, 2015, 06:38:58 am by l0rd_hex »
"I haven't paid taxes in six years, and I'm not getting busted by a damn sandwich." - Benjamin Franklin
 

Offline l0rd_hexTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ca
  • I'm a master of karate and friendship for everyone
Re: Programming off the shelf CSR8635 module
« Reply #1 on: December 09, 2015, 10:13:38 pm »
So after looking through more info I noticed there are USB_P and USB_N pin outs on the bottom (from this lovely webpage http://td-tech.en.alibaba.com/product/1799195826-219822392/CSR8635_Bluetooth_speaker_module_with_serial_interface.html)

I'm thinking of hooking up a USB cable to it and seeing what happens, do I need anything else besides +/- and GND?
"I haven't paid taxes in six years, and I'm not getting busted by a damn sandwich." - Benjamin Franklin
 

Offline l0rd_hexTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ca
  • I'm a master of karate and friendship for everyone
Re: Programming off the shelf CSR8635 module
« Reply #2 on: December 09, 2015, 10:17:23 pm »
Ahhh sorry for radio noise, I found a USB connection diagram on this page: http://www.aliexpress.com/store/product/CSR8635-4-0-low-power-Bluetooth-audio-module-lossless-compression-high-quality-speaker-amplifier/1813412_32331572729.html

Going to give that a shot later in the month.
"I haven't paid taxes in six years, and I'm not getting busted by a damn sandwich." - Benjamin Franklin
 

Offline stmdude

  • Frequent Contributor
  • **
  • Posts: 479
  • Country: se
Re: Programming off the shelf CSR8635 module
« Reply #3 on: December 09, 2015, 10:33:45 pm »
Last time I worked with CSRs BT/Audio chips professionally, I had to use a proprietary piece of SW from them to do settings like device name, audio parameters, etc, etc.

Unfortunately, I can't remember the way it was hooked up, or if it even was (many chips to configuration over the BT link). Anyhow, I doubt you'll find an easy-to-understand protocol anywhere. Best bet is probably to scour the chinese internet for a leaked copy of the CSR software.
 

Offline l0rd_hexTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ca
  • I'm a master of karate and friendship for everyone
Re: Programming off the shelf CSR8635 module
« Reply #4 on: December 09, 2015, 10:41:55 pm »
Ah, thanks! I was just reading about the UART protocol as well, not sure if it's possible to configure it via RS-232 as well.
"I haven't paid taxes in six years, and I'm not getting busted by a damn sandwich." - Benjamin Franklin
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8269
Re: Programming off the shelf CSR8635 module
« Reply #5 on: December 10, 2015, 03:53:14 am »
CSR8600 ROM ConfigTool is what you're looking for. A quick search will find it on a very appropriately-named Chinese site.
 

Offline l0rd_hexTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ca
  • I'm a master of karate and friendship for everyone
Re: Programming off the shelf CSR8635 module
« Reply #6 on: December 10, 2015, 05:47:37 am »
Found it, thanks! I mean... my sales representative was able to grab me a copy... and fly it here on his supersonic jet!

As he was handing me the copy a moose licked his hand and he INSTANTLY turned to vapor so I didn't get a chance to ask him what kind of hardware I'd need to connect to the BT board with. The moose mentioned a "CSR USB-SPI converter" such as this gem:

 

I don't know if the software would work with a run-of-the-mill USB-SPI board or not.

It seems like some other people have been working on Linux based solutions for similar boards: http://members.efn.org/~rick/work/rpi.csr.html

I might give it a poke with the RaspPi and see what happens...

EDIT: I might check this out too: https://github.com/lorf/csr-spi-ftdi#csr-chips-supported-by-programmer
« Last Edit: December 10, 2015, 06:09:47 am by l0rd_hex »
"I haven't paid taxes in six years, and I'm not getting busted by a damn sandwich." - Benjamin Franklin
 

Offline palletmouth

  • Newbie
  • Posts: 1
  • Country: gb
Re: Programming off the shelf CSR8635 module
« Reply #7 on: January 28, 2016, 06:09:45 pm »
hey l0rd_hex

did you get anywhere with doing the name change? 

I've purchased 5 of these for all around the house and I could really do with some name changes.

If you've managed could you let me know how you did it please

Cheers

Pallet
 

Offline l0rd_hexTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ca
  • I'm a master of karate and friendship for everyone
Re: Programming off the shelf CSR8635 module
« Reply #8 on: February 02, 2016, 04:50:08 pm »
Howdy Pallet!

I haven't gone any farther with this, although it's still on my todo list. I gave my only board to my parents for the time being.

As far as I discovered, it is possible with that software amyk mentioned. The tricky part is going to be hooking it up as it looks like the software and maybe hardware require a specific SPI controller.

If I find out more I'mm be sure to post it here and I encourage you to do the same.

"I haven't paid taxes in six years, and I'm not getting busted by a damn sandwich." - Benjamin Franklin
 

Offline taken31

  • Newbie
  • Posts: 1
  • Country: us
Re: Programming off the shelf CSR8635 module
« Reply #9 on: February 15, 2016, 08:02:17 pm »
Hello fellas, I too am interested in this topic, I read through your posts, and in addition to the info I have, still haven't been able to piece it together. (Doesn't help that translation from Chines to English isn't always flawless either). I'm fallowing this post, so any info you have, I would be happy to have! I will do likewise aswell.
So far, this is the most helpful site I have found. Even though it doesn't apply to the exact chip I have (CSR8635) it gives a good rundown of how the setup might work: http://www.tinyosshop.com/index.php?route=information/news&news_id=42
Thanks guys!
 
The following users thanked this post: vindoline

Offline l0rd_hexTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ca
  • I'm a master of karate and friendship for everyone
Re: Programming off the shelf CSR8635 module
« Reply #10 on: February 15, 2016, 08:04:35 pm »
That's awesome, thanks for the link.

I believe you can get pretty far with this: https://github.com/lorf/csr-spi-ftdi#csr-chips-supported-by-programmer

But I haven't tried it yet, I need to get my paws on another module :)

« Last Edit: February 15, 2016, 08:23:33 pm by l0rd_hex »
"I haven't paid taxes in six years, and I'm not getting busted by a damn sandwich." - Benjamin Franklin
 

Offline zackinthebox

  • Newbie
  • Posts: 1
  • Country: us
Re: Programming off the shelf CSR8635 module
« Reply #11 on: April 11, 2016, 04:12:36 pm »
Hey Guys,
This thread was pretty helpful. I have a few amplifier boards with the CSR8635 module on them See here: http://www.aliexpress.com/item/Free-shipping-TDA7492P-25W-25W-Bluetooth-CSR4-0-stereo-audio-power-amplifier-board-NE5532-Pre-amplifier/32620953190.html

I didn't want to wait for that programmer from china so I bought this one made by CSR: https://www.digikey.com/product-detail/en/csr-plc/DK-USB-SPI-10225-1A/DK-USB-SPI-10225-1A-ND/5269739

If you want to jump through some hoops you can download the latest software versions by registering at csrsupport.com Once you have access to the support page, use the category tree to navigate to the latest software.  Home ? Bluetooth Tools & Firmware ? PC Software/Tools
I used the tynoshop guide Taken31 linked to in the earlier post for a step by step guide to change the name.

For the audio settings I didn't see the romconfig tool on the CSR support site, so i just downloaded it from  http://www.tinyosshop.com/download/CSRXX_ROM_ConfigTool_3.0.64.rar

At first I had some problems getting it to work. All my fault. First I had a bad USB cable. Second I crossed the CLK and the CSB wires. Once those were connected properly it was a breeze.
Note: If the bluetooth module is not connected properly the you will get an error that says something like "unable to identify device"   
 
The following users thanked this post: l0rd_hex

Offline l0rd_hexTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ca
  • I'm a master of karate and friendship for everyone
Re: Programming off the shelf CSR8635 module
« Reply #12 on: April 12, 2016, 02:20:16 am »
You are a gentleman and a scholar, thanks!
"I haven't paid taxes in six years, and I'm not getting busted by a damn sandwich." - Benjamin Franklin
 

Offline lakistrike

  • Newbie
  • Posts: 2
  • Country: cs
Re: Programming off the shelf CSR8635 module
« Reply #13 on: April 30, 2016, 09:47:20 am »
Can anyone explain what pins exactly I should connect, this is all new to me, but I want it to work so bad!
 

Online Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Programming off the shelf CSR8635 module
« Reply #14 on: April 30, 2016, 10:05:04 pm »
Just got one of these modules in the post today, and hooked it up to power regulators, and an FT232R - just to see the settings and to turn on apt-x.

The module I have has a different pinout, but all mine needed was 3.3V on Vbatt and it worked (designed for lipo's so ~3.2 - 4.2V).  In order to use the ft232 programmer I also of course had to hooked up the SPI lines, as well as a pull up resistor (10k) to the SPI_EN pin.  IO voltage was 1.8V.  Aside from buttons switching the various inputs (vol up, vol down, mute, play etc..) to 1.8V, and speaker connections, I don't think you'll need much more.

Be advised that the audio out ports are differential, you don't have a common connection between left and right.  I'll post more if I find anything else the module needs to get up and running.
 

Offline lakistrike

  • Newbie
  • Posts: 2
  • Country: cs
Re: Programming off the shelf CSR8635 module
« Reply #15 on: May 01, 2016, 11:50:23 am »
I'm not sure this module supports APTx... Anyway, I have this little amp with 8635 module on it and I want to change the device name etc. Will it be complicated to do that cause the module is soldered to the board, is it harder to access the pins?
 

Offline vindoline

  • Supporter
  • ****
  • Posts: 324
  • Country: us
Re: Programming off the shelf CSR8635 module
« Reply #16 on: May 01, 2016, 01:06:07 pm »
Thanks everyone for this info! I can't believe it's such a pain to do something so obviously useful.
 

Online Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Programming off the shelf CSR8635 module
« Reply #17 on: May 02, 2016, 02:50:34 pm »
Thanks everyone for this info! I can't believe it's such a pain to do something so obviously useful.

Whether or not its a pain depends on what parts you have around and what kind of electronics you're used to doing.  I was in a position where I had various FT232 boards around, and googled for links to the CSR software suite, and the wonderful open source programmer based on the aforementioned chip.  All in all about an hour.   For using a module thats solder on board, you would probably have to solder thin wires to the pins for SPI, and then of course, you'll need an FT232 as well as a 1.8V power supply for its IO (if its on a carrier board, that board might already have a 1.8V line to use).

I can see it being a real hassle for someone that just likes plugging things together, or those who purchased a self-contained module (on a carrier, with regulators, amps, just needs power) then yes, its a pity there isn't an all-software solution.  The advantage of having to delve into its config just to change its name is that you also have access to many many settings, from RF power, to LED flash patterns for certain situations, to EQ of the audio out which can be very handy in tweaking for a flat response (they tend to boost the bass because, well, consumers apparently like more bass).

I went down the cheapo route of just buying the bare module and tinkering because at least then I'll know if a product contains the chip I've poked around on, I'll know its limitations/capabilities.  That is always the trouble buying consumer products blind, whilst they are so much cheaper than building your own you don't know what you're getting unless you get to try it out.
 

Online Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Programming off the shelf CSR8635 module
« Reply #18 on: May 03, 2016, 01:26:50 am »
Sorry to keep hijacking this thread!

Seems I have managed to brick my module.  At first I thought I had made a booboo with the power supply, or IO voltages but... using the FT232 I can get 'bluecore persistant core' to read the devices config, albeit, very very slowly.

It still comes up with the settings, although there are so many, and that particular bit of software allows one to program the settings in hex - unlike the config utility which is a (relatively) nice GUI.

I believe the trouble started when I changed the name of the device and clicked 'write to device'.  The program hanged whilst doing so, so I suspect its flashed some settings, but left others.  Bummer.  It now no longer flashes its LED's in the 'search for pairing' pattern.  The LED's don't light at all.  Gonna fight with this till the sun comes up then order a new one >.<
 

Online Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Programming off the shelf CSR8635 module
« Reply #19 on: May 03, 2016, 07:32:42 pm »
Probably should stop posting, but I have a favour to ask anyone who is working with CSR8645 bluetooth modules.

Would it be possible for someone to get a firmware dump of their modules?  I believe the blueflash utility can do this and whilst I'm not overly hopeful of de-bricking my module, the fact I can read some settings using the PS-tool gives me hope.  It seems the EEPROM settings are there, and it passes all the tests in 'bluetest' (reading IO pins, tone tests on the output etc..) but the actual firmware for USB, UART, or pairing/radio is dead.

I have ordered a second, and the first think I will do is get a backup copy of that firmware and settings and post somewhere.

Cheers!
 

Online Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Programming off the shelf CSR8635 module
« Reply #20 on: May 06, 2016, 01:48:38 pm »
Well, managed to unbrick it with the help from a member of another forum.   I'll be delving into it, so any questions people have about this module, post here and I'll see what I can do
 

Offline vindoline

  • Supporter
  • ****
  • Posts: 324
  • Country: us
Re: Programming off the shelf CSR8635 module
« Reply #21 on: May 10, 2016, 02:59:46 pm »
Hello fellas, I too am interested in this topic, I read through your posts, and in addition to the info I have, still haven't been able to piece it together. (Doesn't help that translation from Chines to English isn't always flawless either). I'm fallowing this post, so any info you have, I would be happy to have! I will do likewise aswell.
So far, this is the most helpful site I have found. Even though it doesn't apply to the exact chip I have (CSR8635) it gives a good rundown of how the setup might work: http://www.tinyosshop.com/index.php?route=information/news&news_id=42
Thanks guys!

I can confirm that using the tools and instructions at  http://www.tinyosshop.com/index.php?route=information/news&news_id=42 works perfectly. The only downside is that the tools are a bit pricy (~$65 US). I just bought their USB-SPI adapter and programming cable rather than try to bodge my own together. I've already spent more time that I wanted trying to find a solution. The shipping from China was very quick and the software and programming worked as advertised!
 

Online Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Programming off the shelf CSR8635 module
« Reply #22 on: May 26, 2016, 04:21:43 pm »
Might as well just post what I used to change the config because I mentioned it in another thread.

With an FT232, the csr-spi-ftdi driver, the 'Headset configuration utility' and 'PS-Tool' you can change many functions, but the only way I have found taht works (ie: doesn't brick the module) is the following.

-Connect your CSR8645 module to the FT232 as per the instructions on this page: https://github.com/lorf/csr-spi-ftdi
-Replace the driver for the FT232, also in the instructions (you can change it back later if you want to use the FT232 for standard serial stuff).-
-Open PS-tool, and hopefully it'll pick up the FT232.  Get a dump of the config as backup, File -> dump.
-Close PS-tool, open up the headset configuration utility (a quick google of 'CSR8600 ROM series configuration' and you should find it).
-'Open from device', and it should also pick up the FT232.
-Now you should see all the settings your module has - leave most of it alone but can change its name, disable charging, notifications etc..
-Click 'Write PSR' which will save to a *.psr file.
-Close headset config utility.
-Use notepad++ 'compare' plugin to compare the headset PSkey file (the one you just made) and the 'dump' - whats actually on the eeprom.-
-Manually copy differences, anything that is different on the headset PSkey - copy it to the 'dump' file.  The headset file will have a LOT missing, and the keys it does have will most likely be the same.
-Save the dump as 'newdump'.
Open up PS-tool again, and wait for it to read the chip.
File-merge, grab the *.psr file you just made - 'newdump', wait for it to finish configuring.
Done.

Not a pretty method, but does mean you can have a customised system, with or without the bells and whistles you need, and excellent audio quality (if Apt-X is enabled).  Whilst its still probably cheaper to buy earphones/headphones/speakers ready made, they tend to leave one wanting because often the speakers are just terrible.

A friend on the diyaudio forum is working on a way to get I2S out of this for an external DAC.  I don't really see the point in that since it transfers 16-bit @ 48kHz max, and even then it only ever uses a lossy codec like the awful SBC or Apt-X... an external DAC won't improve the quality much  Pleasantly surprised by the on-board DAC and headphone amp, couldn't hear any hiss, noise or artifacts and seems to be able to drive 32-ohm headphones quite well - but I haven't actually performed any measurements.
« Last Edit: May 26, 2016, 04:26:45 pm by Buriedcode »
 
The following users thanked this post: kile

Offline pcl

  • Newbie
  • Posts: 1
  • Country: hu
Re: Programming off the shelf CSR8635 module
« Reply #23 on: May 27, 2016, 11:33:54 am »
Hello,

I downloaded the csr software but since I do not have any hardware yet, it's not possible to explore its functionality without anything actually connected. Could somebody please check what kind of button functions can be set?

I'm looking to build a PTT mike for Zello but I did not manage to find an off the shelf solution for a reasonable price (they're asking in excess of $100 for a $20 device). I bought a few bluetooth headsets but I was unable to assign any of the buttons in a PTT fashion (toggle works, but that's not really suitable).

Before diving into this project, I would like to know if it's possible to do what I'm looking for. Basically I'd need a bluetooth device that has mike input + headphone/speaker output and a button that sends some sort of keypress continously while it's held down (the devices I tried either had a second function when held down or a continous key repeat, making PTT completely useless).

Commercial examples include
http://www.pryme.com/index.php?l=product_detail&p=2450
http://www.ebay.com/itm/272040820127
http://small-order.hktdc.com/small-order-suppliers-products/Bluetooth-PTT-Speaker-Microphone-H2/en/1X09CZNG/2955921/

Thanks for checking!
 

Offline smolny

  • Newbie
  • Posts: 1
  • Country: pl
Re: Programming off the shelf CSR8635 module
« Reply #24 on: June 02, 2016, 05:48:19 pm »
Hi,
I've got an audio amplifier with a BT PCB soldered on (pinout looks like in the lakistrike's Reply #13). The audio side works OK, but the BT range is up to 3m only. From the CSR8635's docs I understand that fiddling with the "PS keys" could extend the range (setting the gain of the RF power amplifier). As I'm new to programming (except for "hacking" old mobos to program BIOS chips :) perhaps somebody would care to explain to me, how to supply power to CSR8635 chip, when I connect it to an FT232RL programmer? Have read
https://github.com/lorf/csr-spi-ftdi
and understand how to connect four pins (SPI_CS#, SPI_CLK, SPI_MOSI, SPI_MISO) to the programmer, and how to get 1.8V out of 5V. And some more detailed questions:
-can I power (for programming) the CSR8635 as it's originally powered in this device - with 3.6V to VBAT, and get the 1,8V from the internal CSR8635's regulator?
-where shall I apply the 1.8V - to the 4th pin of FT232RL (VCCIO)?
Or perhaps an easier way th extend the BT range, at least to 5m?
Any poke in the right direction appreciated :)
« Last Edit: June 02, 2016, 05:55:47 pm by smolny »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf