Thursday, January 26, 2012

[DRAFT] Byron's programmer details





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 !



60 comments:

  1. Thanks! How did you firmly arrange pins with 1.5mm distance between them? The material to which they're attached looks suprisingly like foam plastic used for packing, but that won't work for the purpose, I already tried ;-)

    ReplyDelete
  2. I took two bluetooth module.I've put test pins on the surface, hold them with the both modules perpendicular to the pins. and put some glue over the pins !

    ReplyDelete
    Replies
    1. Neat! Last (another?) question is what pogo ping diameter did you use? Should I go for the smallest one (tip ~0.3mm, barrel ~0.5), or would they be too tiny to deal with? They seem to be sold in packs and not are really cheap, so I would like to select some "one size fits all" for future uses too, but I never dealt with them before, so any expert opinion is appreciated.

      Delete
    2. As far as i remember I think that barrel diameter equals the connection pad of the module.
      You should choose rounded pins for the optimal contact.

      Thanks to my job, i didn't have to buy them...

      Delete
    3. I have a PC but its parallel port is blocked. I can't enable it in the bios as well because there is no option for that as well. While installing the bluesuite tool kit by CSR I noticed there is an alternate that says "set debug transport to USB". Do you know if it is possible to use the bluesuite tools over usb? Please share any details you think can help. Anyways nice blog I must say...

      Delete
  3. Hi Byron, sorry for offtopic, don't know where to bring this up...

    Did you measure power consumption of the module? 2.4mA is the smallest I could get with Deep Sleep on, witch is far above BlueCore tens of uA per spec. I blogged about it here: http://pfalcon-oe.blogspot.com/2012/01/hc-04-bluetooth-module-and-bluecore4.html and then described my test env and thoughts here: https://sourceforge.net/apps/trac/linux-h4000/wiki/BlueCore . I'm not in hw industry, so surely I miss something or get something wrong, so ideas and suggestions welcome!

    ReplyDelete
    Replies
    1. I've encountered similar behaviour, and I don't quite understand the reason. I used own VM application which uses very long latency sniff policy, and I was able to reach 3-2.5mA in page scan and connected rfcomm states (without SPI connection). Since this is obviously too much for any sensor network applications, I'm already quite desperate. :S

      I've played with deep sleep PSKEY's, and they don't seem to have an effect at all.

      There's probably some simple explanation, but I'd like to hear others as well.

      Delete
    2. I'll elaborate on my observation:

      Slow multimeter shows 2.9mA minimum when connected via RFCOMM and when reached the lowest sniff mode (should be roughly 2.56s).

      Single 2.2 Ohm resistor on supply line and oscilloscope shows roughly 7.6mV minimum average. There is constant ~7mV baseline which disappears when chip is unpowered (corresponding to a constant ~3mA drain). On top of that baseline, there are ~110mV (48mA) peaks, which correspond to the datasheet maximum drain when transmitting or receiving.

      My numbers are quite approximate, but they indeed show that I'm having a sleep mode current draw of around 2-3mA. This makes any long-term battery powered applications impossible.

      Gah, I hate it when numbers on the datasheet and real world don't match! :D I'm missing something here... And I'm most interested in hearing any ideas and suggestions.

      Delete
    3. Thanks for confirming this behavior. I guess, one of the next reasonable steps may be comparing HC-04 with another type of BlueCore-based modules - there're plenty around, but they are much more expensive. So, anyone around who has one?

      And I'd probably go as far as destructively modifying an HC-04 to figure out the problem, but don't have good plan which would allow to get an answer with sacrificing just 1 module. For example, before cutting any wires on the board, it requires to understand how many layers it has.

      Delete
  4. I've soldered your schematics (with a PCB :)) and BlueFlashCMD does not see LPT port. It's there OK in Device Manager - it's set to ECP in Bios. Tried Win7/WinXP two machines and still clueless :( How strict are those resistor values? I used somewhat similars (ratio was similar only 100-200k higher ones).

    ReplyDelete
    Replies
    1. Strictly use the given resistor values, and be sure to connect the GND line (signal ground) from the printer port also (if you use the power from a USB port to power the board then it's NOT enough to have the GND connected from the USB only!).

      By the way Byron: where the heck is the GND pin on your programmer's socket?! I can see the 4 SPI lines and one VCC pin at the side but no GND pin.

      Delete
    2. no heck !! i update the post with a view of all the 5 pins !

      The GND pin is hidden by the support on the others views !

      Delete
    3. I knew the GND should be somewhere, but I was looking for it right at the VCC's neighborhood... :)

      Delete
    4. Be carefull, as far has I remember, i've noticed that one of the 4 GND pads of the module isn't connect to the others.

      Delete
    5. Hmm, there're 3 GND pads, one for each side of the board. There's also one explicitly not connected pin (it apparently goes to a resistor which is not soldered, would be nice to figure out what it would do if it was).

      Delete
  5. Looking at the various datasheets, pin 14 (the one that you probably thought was ground) is in fact 1.8v from the 417's onboard regulator I believe.

    ReplyDelete
    Replies
    1. Just confirmed that with a dmm, pin14 goes to the unpopulated resistor pads, testing the chip side of the resistor pad to gnd gives +1.795v out :)

      Delete
    2. Thank you for the additionnal information !

      Delete
    3. You're welcome :) Thanks for making the cable and blogging the method :)

      I have a question, does your HC-05 firmware enable rts/cts pins? Or can it be done via a pskey, I think I saw a hardware flow control pskey but not sure if that's what I need.

      Delete
    4. maybe unpopulated pads are for filter capacitor

      Delete
    5. Hi Sebastian, it's not actual flow control that I want, just simple access to rts and dtr pins to trigger some transistors, is that possible in that state? It's bespoke software that just uses those 2 pins, it doesn't use tx/rx pins for anything.

      Delete
  6. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. I just got one of these bluetooth modules attached to a breakout board. How would I go about wiring this up to my USB to serial adapter? I have the Sabrent SBT-USC1K. Thanks

      Delete
  7. Hi guys!
    I have nearly the same modules, only with the 4 pinheads.
    But what i don't have is this LPT-interface on my comp!
    How can i upgrade my modules without this (otherwise these things are useless if i cannot pair them...without pc) :(

    THANX A LOT
    Martin from Austria

    ReplyDelete
  8. I want to make a BlueTooth PAN (personal area network) using the CSR bluetooth chip as a PANU (PAN user).

    any one can tell me :
    1. is the CSR firmware OK? many doc say 'yes'.
    2. any programming guide? or example codes?

    thanks.
    marcus

    ReplyDelete
  9. hello
    may someone to give me original hc-06 linvor v1.5 firmware?
    i am using that modules in my devices...
    but i can not to set high baud rates...
    i want to check fw to replace standard high speed bauds to
    500k
    1000k
    1500k

    please send here - alodin@tiecar.net
    Thank you very much
    and good job...
    i have not time to do that by my hands...

    Regards, Alexander

    ReplyDelete
  10. Hi Byron,

    Nice work, I like your little programming jig...

    I bought two BC417143 modules off eBay intending to pair them as master/slave as per the description but I got a pair of Linvor 1.5s that wont respond to the AT commands I've been sending them.

    I did some research attempting to learn how to communicate with them and found about 3 different AT command sets, none of them worked. Then I find your blog and discover they are reprogrammable just after I bought 2 more modules from China that do have HC05 in them.

    The HC05 modules are unmounted like yours, but the Linvor ones are fabbed onto a piece of phenol with a 4SIL header and some components. I've done a bit of poking with my meter and established that they are only connected to R/W and power, and the power has a diode in it (I think from your blog, I've established this to drop the 5v to 3.3v)...

    What I'm thinking, is that I could copy the HC05 firmware off one of those, and flash it to the Linvor. Do you think that its possible to do, bearing in mind the Linvor ones are mounted already? I dont mind soldering a connector onto the SPI pads and I can get to them if I remove the clear heatshrink from the module.

    You really should republish this into the Arduino forum, those guys could use the help with BC417s, they are all using them to communicate with Androids and iPhones and really dont have a clue - any more than I did. I've been digging through there, but your blog opened my eyes.

    Would you mind if I linked you at least?

    Regards

    Jez

    ReplyDelete
    Replies
    1. Hi !
      Thank you for your interest. Feel free to spread the word on arduino forum.

      Could you share me some pics of your module. I heard some kind of problem for flashing some pseudo same module with hte HC05 firmware I shared.

      I think that the diode you mention is used to convert 5V to 3,3V... BC417 chip ISN'T 5V tolerant !!

      Delete
    2. Hi, thanks for the heads-up.

      I had trouble getting a better pic of them than yours - however they are identical apart from the chip markings. All the visible tracks, pads and other components, everything...

      The CSR chip reads

      BC417
      143BGQ
      K148AR

      and there is also a M29W800DB 8MBit EEPROM. I cant read the text on yours, but it looks to be a different manufacturer. Is that of any use? I cant get at the back of the module either, its competently soldered to the carrier.

      Interestingly, I accidentally powered one from my Uno's 3.3v out, meaning the BC417 was only getting around 1.4v and it worked, although the range wasnt good. These things could run off a single cell at a push!

      Jez

      Delete
  11. Recently i got 2 modules, i thought they were master/slave (something i read that made me think so)

    I haven't check the firmware version i have (just a problem with interfaces), but the seller says they only work in slave mode. I need one master. So i think the firmware is different from HC05 (i understood after reading all your blog this firmware allows the master mode).

    I tried to download the firmware HC05 but the site doesn't work correctly (and other friends tried too without success).

    Could it be possible to upload the firmware in other hosting service?

    Anyway my congratulations for your blog and how you resumed the spreaded information about these modules.

    ReplyDelete
    Replies
    1. Hello

      I'm the writter of the previous post. I could test the modules with a Bus Pirate (really annoying because the AT commands weren't accepted dunno if due to the BP itself or the terminal software). The firmware is Linvor 1.5 as suspected...

      I have tried to find the HC05 but it was unsuccessful. Could anyone help with this?

      Thanks.

      Delete
    2. I don't have the original zip file so I zipped up the files I had and re-uploaded it. I think I included everything that was in the original file. http://www.2shared.com/file/AgmsxPNv/HC05.html

      Delete
  12. Hello Byron, You mentioned that you might work on a custom firmware for these modules at some point. I was wondering if you have had any experience so far using the xIde software.
    After succesfully creating a breakout board and spi programmer and making sure I was able to flash firmwares ok, I thought I would see what was involved in programming a custom firmware.

    I followed the xide documentation to compile and run the minimal vm project. It compiles but fails to completely upload. It eventually gives this error: "Device 0: Failed to erase sector 255."

    So I was just wondering if you have used the xide yet and if you have had to overcome any such problems.

    ReplyDelete
    Replies
    1. I just wanted to report back that I must have had a bad chip. I ordered another one and tested again. xIde compiled, uploaded, and ran the code as expected with the new module.

      Delete
    2. If u'r working for an alternative firmware, we would love to hear too :) thanks

      CSR's docs are AMAZINGLY obscure...

      Delete
  13. Hello
    I have flashed my linvors with the HC05 fw, everything ok, but I have troubbles with datarate above 115k. I have turned on the hardware data control on both modules. I send data to the master and monitoring the output uart on the slave module. The data are packeted and there is activity on the CTS/RTS line that slow down the transmission. For a file of 65kbytes it needs almost 3sec to get all data with baud rate of 1M on the master and 921k on the slave. With datarates of 115k and below there is a continuous flow of data and no activity on CTS/RTS. There is anybody experimenting on high datarates?

    ReplyDelete
  14. I found lot of informations her:

    http://www.rasmicro.com/Bluetooth.htm

    Thanks for your tutorial.

    jC_Omega

    ReplyDelete
  15. Hi Byron,

    I've been reading back and forward all of your blog posts to see if I can get a solution to my problem. Here's the thing:

    1- I don't have a LPT port on any of my PCs;
    2- I have a USB2SERIAL LIGHT (from Arduino) converter which has ICSP pins;
    3- I have HC06 (linvor) modules;

    -Is it possible to build a level converter (5V to 3.3V) on the ICSP signals, in the same way you did for the LPT port and connect the SPI signal to the BT module?
    -How or where can I get the .dfu file for the HC-05 (I've looked EVERYWHERE for it)?

    Thank you so much for your posts!!

    ReplyDelete
  16. I know I'm a little late, but I succeded to make a clone of official USB SPI programmer. If you want to make it, read my blog at http://jernej87.blogspot.com

    ReplyDelete
  17. Would anyone have any pointers on how to make a custom firmware for this?

    ReplyDelete
  18. Hi All...

    I am wondering if it is possible to command this module via its SPI interface as opposed to the TTL/serial interface?

    Thanks...

    ReplyDelete
  19. AFAIK, SPI interface can be used only for programming/debugging. Even if it can be used for other purposes, firmware must support that feature, which is even less likely.

    Short answer, no.

    ReplyDelete
  20. Thank you for the quick reply. That's a shame though :-(

    ReplyDelete
  21. Hi Byron..hi all
    i buy this module http://www.sureelectronics.net/goods.php?id=1747

    from sure...i think it's have a blucore 5 and i want to change a firmware for connect in hfp mode this module.

    you know were is possible to download the blueflsh program?

    thank you all!!

    ReplyDelete
  22. Hi Byron, I have tried to flash a similar BT module but inserted in a RS232 device, being able to be connected to a PC COM port. The device is SKU: 104301 in DX.com. Besides I made the flasher device you describe in your blog, and make sure to have good contact with SPI pins, there is no response from module using CSR tools. No flash able, no LPT or COM activity from tools. But if I use terminal program, I am able to try AT commands of HC06 firmware, so the module Works. I´m confused.

    ReplyDelete
  23. hi Byron, got new boards from dx.com sku 80711 with linvor V1.8 firmware. AT commands work (no cr,lf), bt discover ok, bt pairing ok.
    no service / profile support found on xp32 with bluesoleil or ms-bt-stack, same problem on win 7 with bluesoleil connected to csr based usb-bt dongle or ms-bt-stack on win 7 with built in bt radio.
    also no profile information found from bt-module on samsung android tablet (pairing ok)

    would you or anyone else have any clue what's wrong with the setup or me ???

    cheers, Klaus

    p.s. the 1st time with bluesoleil on xp32 i was able to connect, but after reassigning v-com-port numbers never again. tried 2 modules. in 20 tries maybe i get once a "serial module discovered" and it shows a com port, but 1 minutes later it's gone and no service found

    ReplyDelete
    Replies
    1. addendum to previous post ... it's really linvor V1.8
      V1.8 is not a typo ... seems a new rev ...

      anyhow can't connect to or with service / profile ... whatever the terminology is after pairing on several PCs and an android samsung tablet ...

      cheers, Klaus

      Delete
    2. we resolved the issue ...

      the bt module got somehow into a state where it did not seem to respond correctly to the os for a service information request or similar.

      we wrote 3 posts about how to fix it and with step by step instructions on our blog efiHacks.com --> news

      here are the urls to it

      using bluetooth serial port experiences part 1

      http://www.efihacks.com/144/

      using bluetooth serial port experiences part 2

      http://www.efihacks.com/223/

      using bluetooth serial port experiences part 3

      http://www.efihacks.com/using-bluetooth-experiences-part-3/

      cheers, Klaus

      Delete
  24. Hello, I will soon receive 2x HC-07 modules already soldered on breakout board to use with Arduino etc. I bought them because they were cheaper than HC-05 and I did read that even numbers (HC-04, HC-06) are slave only, and that odd numbers can be set as master, which is what I need (one master and one slave).

    Now I've searched more about HC-07 (hardly find any infos about this version number...) and I am not sure but I think they are slave only because it is an update of the HC-06 (so the even/odd thing is wrong).

    So maybe I did a bad choice buying these...I would like to enable master mode on one of them. Is it possible?

    ReplyDelete
  25. Hi Byron,
    nice work you've done.
    I bought some modules on ebay: BMX-04A and all I'd like to perform is changing pairing name. Now it's "Bluetooth_Nano_SPK".
    The module has the CSR BlueCore5 IC (57F687A) but I have no clue what is the firmware. My problem is that I can't get UART work. Do you have any information about how to get it? Or should I build your LPT-SPI interface to communicate to the module? Nothing usefull I found with googe, so any of your kind help is highly appreciated.
    Thanks a lot for your answer in advance.
    cheers, dezso

    ReplyDelete
    Replies
    1. Hi,

      Your programmer solved the issue :-)

      BR,
      dk

      Delete
  26. Hi, Byron.

    Great work you've done here.

    I recently bought some LINVOR type modules, probably HC-06-types.

    I wonder where to find the HC-05 upload-files to Flash them?

    Regards ( and respect for your work)

    Gerd

    ReplyDelete
  27. Hello

    Great innovation and there are many people will learn about to this article and the Bluetooth module information that you have shared will help to many people whose need this device.

    ReplyDelete
  28. Developing a wireless Audio or Data accessory can become a tedious, expensive and risky project. By offering a fully integrated solution with certifiedBluetooth Module the associated development kits and Smart Phone Apps

    ReplyDelete
  29. Great innovation and there are many people will learn about to this article and the Bluetooth module information

    ReplyDelete
  30. I actually managed to build this programmer, and can conform in works, I had to set the LTP port of a Dell docking station to IBM/ps2 compatibility mode and turned on legacy support in the windows 7 device manager. I'm running 32bit by the way.

    Another great thing is I've managed to find the bluelab xIDE 4.1. The manual that is included, and an introduction to, for instance, audio over PCM (I2S) is also included. A2DP is supported by the internal DSP.
    Firs I'm going to try if I get the analog input working.

    ReplyDelete
  31. Hiya,
    I built the LPT programmer (for an old dusty laptop w/parallel port) and it worked (thanks!), but a more modern option...

    I tweaked Frans-Willem's Stellaris-based programmer code to run on the new Tiva C Launchpad (EK-TM4C123GXL) - USD$12 at time of writing - which is the replacement for the Stellaris Launchpad. TI delivered mine in under a week and they're cheap+work well.

    This clone USB programmer works great for me (on BlueCore 4-EXT modules) with the CSR BlueFlash, PSTool and BlueTest (etc) tools.

    It should also work fine on BC5, CSR8670 etc, but not tried it yet.

    I also added a "Turbo mode" option which roughly doubles the programming/dumping speed, YMMV.

    I included the binary in github so you can just buy a launchpad, get the TI "LM Flash Programmer" tool and get a working clone CSR USB-SPI programmer in about 5 mins; no extra tools required.

    Many thanks to you Robin for your info, and to Frans-Willem for his reverse-engineering and implementation.

    https://github.com/raplin/CsrUsbSpiDeviceRE

    ReplyDelete
    Replies
    1. Thanks a lot for your work... I'm sorry to have hard time from the last months and i can't keep contribute to these hard works.
      I'll take a look to your code, just for knowledge and passion

      Delete
  32. Thanks for the great post!

    I'm planning to build one of these.

    Looking at your programmer, you have four pins on the bottom, plus the Vcc slider knob.

    I would have thought you'd need to use the four SPI pins (CLK, MOSI, MISO, CSB) as well as the GND pin on the bottom, plus Vcc on the side. That's 6 pins total, while it looks like you're only using five. I don't see a connection to a GND pin in your setup.

    What are the pins that you are using?

    ReplyDelete
    Replies
    1. Aah, just noticed your earlier comment saying that the GND pin was obscured in the photo.

      Also, for anyone else interested in building a programmer, I will be using the method from https://mitxela.com/projects/bluetooth_hid_gamepad for flashing using a FTDI serial adapter instead, since I don't have a parallel port on my PC.

      I'm going to use your idea of pogo pins though, BTW pogo pins can be bought very cheaply from China on ebay. I paid about $3 for 50!

      Delete

Note: Only a member of this blog may post a comment.