Coding and Dismantling Stuff

Don't thank me, it's what I do.

About the author

Russell is a .Net developer based in Lancashire in the UK.  His day job is as a C# developer for the UK's largest online white-goods retailer, DRL Limited.

His weekend job entails alternately demolishing and constructing various bits of his home, much to the distress of his fiance Kelly, 3-year-old daughter Amelie, and menagerie of pets.

TextBox

  1. Fix dodgy keywords Google is scraping from my blog
  2. Complete migration of NHaml from Google Code to GitHub
  3. ReTelnet Mock Telnet Server à la Jetty
  4. Learn to use Git
  5. Complete beta release FHEMDotNet
  6. Publish FHEMDotNet on Google Code
  7. Learn NancyFX library
  8. Pull RussPAll/NHaml into NHaml/NHaml
  9. Open Source Blackberry Twitter app
  10. Other stuff

Flashing a CUL device for use with FHEM - Thrilling stuff!

Hi all,

Bad things happening tonight - I've just succeeded in (almost) killing my CUL USB device, for the second time, meaning my FHEM server has been temporarily unable to talk to any of my FHT hardware.  Fortunately the next day I managed to rescue the situation, so here's two posts in one - the horrible "I've broken it!" moment, and the jubilant "It's fixed!" moment.

Balls - I've broken it!

It all began when I logged onto my FHEM server yesterday and happened to spot that there hadn't been any comms going on with my devices.  Today I thought I'd do some more digging into this, and the first thing I spotted was that I no longer had a "CUL868" device in my system device manager, instead I now had a "AT98USB162" device.  Not good!

So I do a little Googling, and I'm reminded that this is the name of the Atmel chip that powers this thing - so I follow what I thought was the obvious process:

  1. Get a hold of the Flip software to flash the device again
  2. Get the CUL_V2.hex image file
  3. Open up the Flip software, select the device and open the USB connection
  4. Open up the hex file ready to flash

Now I think I make my mistake - there are at this point two buttons you can click, one says "Run", and another says "Start Applicationm".  I clicked the one that says "Start Application", perhaps the wrong thing to do.

So here's where I am now.  I have a device that when I plug it in, the device shows as "Unknown Device" in Device Manager, and I get "USB Device Not Recognized", "One of the USB devices attached to this computer has malfunctioned and Windows does

y6xnot recognize it."  I'm also getting a green steady flashing light.  I've tried pressing the little reset button, to no avail.  This is pretty much the same on all the Window boxes in my house.

I've now only got two real options - I send the thing back to Busware to get the chip reflashed (last time they wanted around 30 quid for this), or I buy a new device at 40 quid.  All in all, at the moment I would STOP recommending the Busware.de devices to other FHT users, I'd instead suggest to pay the extra for the official FHZ1300 device, which I would expect to be a lot more resilient!

Hooray!  I've fixed it!

Update 28th April - After posting the original post yesterday, I thought I'd try a few more experiments, and I've fixed the thing.  So I can now present the full end-to-end process that worked for me.

  1. Download a copy of the Flip 3.4.1 software to flash the device firmware
  2. Get hold of the appropriate CULxxxx.hex file for your device from http://cvs.berlios.de/cgi-bin/viewvc.cgi/culfw/culfw/Devices/CUL/
  3. Download the correct drivers for your device after you've flashed it - I believe (although I can't guarantee it) I used the CUL.inf file downloaded from http://www.busware.de/tiki-index.php?page=CUL-V2.  
  4. Plug the device into your PC while holding down the little button buried in the plastic case.
  5. Windows may reportsan error message, "USB Device Not Recognised" and/or your Device Manager might show an "Unknown Device" - this doesn't necessarily mean anything's gone wrong.
  6. Run the Atmel Flip tool, select the device type (in my case AT90USB162 for CUL v2 device) and select the USB connection type
  7. A window should pop up, you need to be able to click the Open button without getting an error message. If you get an error message at this point, remove the device and try reinserting again with the little button held down (it might be worth holding that little button down all the while you're doing this, but that's pure guesswork!)
  8. Once you've successfully opened the device in Atmel Flip, you can now flash the firmware you downloaded in step 2 above
  9. After flashing, remove and reinsert the device, this time Windows should detect a CUL868.
  10. You now need the appropriate driver files, Install the drivers through the Window Device Manager.
  11. After you've installed the drivers, have a look at the device properties window in the Windows Device Manager and note down the COM port number - you'll need this for your FHEM configuration.
  12. Fix your FHEM configuration to refer to the correct port number, fire up FHEM, if your log file indicates that the device has been opened then you're good to go.

Categories: FHEM
Permalink | Comments (0)

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading