E90Post
 


TNT Racewerks
 
BMW 3-Series (E90 E92) Forum > E90 / E92 / E93 3-series Technical Forums > BMW Coding > How to make your Crappy Chinese XProg Clone work again



Reply
 
Thread Tools Search this Thread
      06-30-2021, 09:46 AM   #1
Jagaer
Private First Class
Canada
430
Rep
170
Posts

Drives: 2011 E91 328xi 6MT
Join Date: Aug 2017
Location: Kingston, Ont

iTrader: (0)

How to make your Crappy Chinese XProg Clone work again

How to make your Crappy Chinese XProg Clone work again

I purchased a Crappy Chinese XProg clone a few years ago to fix my FRM. As in my original post here, I don't recommend it, but I still can't swing 1000 Euro for something I only use once (or once every 4 years)

I woke up one morning to the dreaded "Lighting System! Stop Vehicle" error, which means the FRM is unreachable. Having experienced this same issue a number of years ago, I went through the parts cabinet to find the XProg in order to recover my FRM.



However, having since upgraded my computer, I needed to reinstall the XProg software...and this is where the issue of the Crappy Chinese XProg comes in. The software is China Locked. Previously I was able to send a ".req" file to China, and they would send back a ".dat" file that allowed it to work. Because it has been a number of years since it was purchased, the level of support provided was...none.

Being a bit of a cheapskate, I decided that I didn't want to throw out a perfectly good $100 piece of hardware, and was determined to make it work again. This means you need to reflash the XProg to a version of the firmware which is not locked, and has a compatible software version.

I decided to update (downgrade) to 5.5.1, because 5.5.5 was not stable for me (Verification failed more often than succeeded) and 5.7.4 did not have valid certificates. (I didn't spend much time troubleshooting 5.7.4, since I only needed 5.5.1 for the FRM)

==============================
All software discussed below, is located here.
==============================

1. In order to flash the XProg, you need at Atmel programmer. The cheapest Atmel programmer I could find was the USBASP. You will want to pick up the two-pack (reasons below): https://www.amazon.ca/KeeYees-Downlo.../dp/B0885RKVMC

==============================
UPDATE USBASP FIRMWARE
==============================


2. Most of the cheap Atmel programmers come with outdated firmware, this one came with firmware from 2008 - Even though the most recent firmware available, was last updated in 2011! To update the firmware, you will need to:
  1. Solder a pin header onto JP2
  2. Download the latest firmware from: https://www.fischl.de/usbasp/
  3. Install AVRDUDE (Command Line) or AVRDUDESS (GUI)
  4. Put a jumper on the JP2 pin header of the TARGET (the USBASP) that you will be programming
  5. Connect the two USBASPs with the 10-wire cable
  6. Copy the "usbasp.atmega8.2011-05-28.hex" firmware to the AVRDUDE folder. I used the command line AVRDUDE to upgrade the USBASP, since it was a short command.
  7. Code:
    avrdude.exe -c usbasp -p m8 -U flash:w:usbasp.atmega8.2011-05-28.hex:i
  8. You will receive an error "sck cannot be set", this is the reason we are performing the firmware update, and it will be corrected following the firmware update.





==============================
CONNECT USBASP AND XPROG HARDWARE
==============================


3. Now that the USBASP has been updated, we can work on connecting the USBASP and XProg hardware.
  1. Open the XProg (If you have a metal case, there are 8 screws, four on each side. Then the XProg just slides out.
  2. Solder the pin header onto the 11 pins on the XProg. I taped the pin header in place in order to solder it, as the top components are taller than the pin header.
  3. Create a 10-pin female-to-female cable in order to connect the USBASP to the XProg. I used a colour coded cable to keep track of the pins.
  4. Connect the XProg to the USBASP. You will be using Power (+5V), 2xGround, MISO, MOSI, RESET, and SCK. Start with the USBASP, then the XProg. Check your connections. Check them again.












==============================
FLASH THE XPROG
==============================


4. The USBASP and XProg are linked together, now to program the XProg.
  1. Open AVRDUDESS.
  2. Click "Detect" The console output should show "Detected ... = ATmega64"
  3. Under "Flash" open "atmega flash.bin". You will need to change the dropdown to "all files" as it autofilters .hex
  4. Under "Flash" open "eep.bin"
  5. Under Options, select "Erase Flash and EEPROM (-e)"
  6. Under "Fuses & Lock Bits", check "Set fuses" and "Set lock". Set the following values:
    L = 0x2F
    H = 0xCA
    E = 0xFF
    LB = 0xFC
  7. The command line should now show:
    Code:
    -c usbasp -p m64 -B 0.5 -e -U flash:w:"C:...\XProg5.51\atmega\atmega flash.bin":a -U eeprom:w:"C:...\XProg5.51\atmega\eep.bin":a -U lfuse:w:0x2F:m -U hfuse:w:0xCA:m -U efuse:w:0xFF:m -U lock:w:0xFC:m
  8. Click "Program!". The console output will show that the Lock Fuse and Final Verification failed. This is expected, if the MCU is not locked, XProg will not work.





==============================
INSTALL XPROG SOFTWARE IN A VM
==============================


5. I decided to install XProg into a VM, to avoid having to do this all again in some time. XProg has rudimentary VM detection, but is easily circumvented.
  1. Create a Windows 7 (x64) VM in VMWare Workstation.
  2. Do not install the VM Drivers. This means you will be limited to USB 2.0. (This is OK, XProg uses an FTDI USB <-> Serial adapter, so its not like USB 2.0 will be a limiting factor)
  3. Copy the XProg 5.5.1 Program, Drivers and weird Chinese Acrobat Reader to the VM. (I don't know if it has to be this one, but it won't work without Acrobat >10 installed)
  4. Install Adobe Acrobat
  5. Plug in the XProg, and attach the USB to the VM. Open "Device Manager" and under "Other Devices", "USB <-> Serial" should be listed with an exclamation mark. Right click and choose "Update Driver Software". Choose "Manually" and navigate to the "XProg Driver" directory. Choose "Install this driver software anyway". Disconnect XProg
  6. Shut down the VM, and add the following lines to the VMX file to stop the VM detection.
    Code:
    monitor_control.virtual_rdtsc = "false"
    monitor_control.restrict_backdoor = "true"
    isolation.tools.getPtrLocation.disable = "true"
    isolation.tools.setPtrLocation.disable = "true"
    isolation.tools.setVersion.disable = "true"
    isolation.tools.getVersion.disable = "true"
    monitor_control.disable_directexec = "true"
  7. Start up, plug in XProg and verify that "USB Serial Port" appears in Device Manager. Note the COM Port.
  8. Copy the XProg 5.5.1 folder to "Program Files (x86). Open C:\Program Files (x86)\XProg 551\ and add "xprognew.reg" to the registry.
  9. In VMWare Workstation, change Network settings, and uncheck "Connected" and "Connected at power on
  10. Plug in XProg. Open XProgDesktop.exe. Click "Help" and "Hardware Info". The XProg will tell you that your firmware needs to be updated. Update the firmware.
  11. Connect the FRM and daughterboard. Click "Help" -> "Hardware Info" and it will show the HC(S)12 BDM.







==============================
CONNECT THE FRM
==============================


6. Physically connect your FRM.
  1. Prep the solder points. They are large test points that take rosin-core solder quite readily - Nice and easy to solder.
  2. Solder the wires to the test points. Your colours may vary, if you received a different wiring harness with your XProg.
  3. You don't need to use the daughterboard, but I figured it wouldn't hurt. Here are the labels from the HC(S)12 adapter board:
  4. Wire colours, if you have a matching harness are pictured below.







==============================
PROGRAM THE FRM
==============================


7. Now you can finally program your FRM:
  1. Open XProg and select: "MCU/MPU" -> "Freescale 9S12XE" -> "MC9S12XEQ384_D-FLASH"


  2. Open a new hex file to download the D-FLASH. Click "New". Click "Read"
    At this point XProg will connect, check certificates, then set up BDM. It will probably tell you the flash is corrupted, you need to select 0k of EEPROM and 32k of FLASH (This is the default).




  3. Once the download is complete, save the D-FLASH. Open the D-FLASH using tomvleeuwen's app or webpage - http://tlvps.tomvanleeuwen.nl/frm/ . If you use the app it will ask you to open the D-FLASH you just saved, then ask you where you want to store the new EEPROM (I used the app, as my computer needed to be offline to use XProg)
  4. Open the newly created EEPROM file in XProg


  5. Change the device to: "MCU/MPU" -> "Freescale 9S12XE" -> "MC9S12XEQ384_EEE"


  6. Erase the FRM. Change "Sectors" to "16".



  7. Click "Write"
  8. Click "Verify". You may need to run the "Erase"/"Write"/"Verify" sequence multiple times before it verifies correctly. If you get a "device silent" error, try again. This is typically caused by a lower quality USB cable, or the XProg/FRM cables are slightly too long.
  9. Click "New". Click "Read" Your newly read FRM EEE should match. If you read the D-Flash again, it should come back empty (0x0). This is good.


Reinstall in the car, and you should be good to go!

Last edited by Jagaer; 06-30-2021 at 09:52 AM..
Appreciate 0
      09-08-2022, 03:04 PM   #2
Kalium
New Member
0
Rep
12
Posts

Drives: 330d xDrive E91 -09
Join Date: Apr 2017
Location: Sweden

iTrader: (0)

Thanks, this helped me a lot!

I also bought a clone xprog from ebay and it didn't seem to work properly. First tried in Windows 10 but first it said Device is silent and then it said something about certificate being invalid or expired. I just couldn't get it to work. Then I tried on a virtual machine with windows 7 following the guide here but that didn't work either. It just said device is silent or unable to setup communication port. Went back to the windows 10 computer and tried again and got device is silent again. Tried several more times and suddenly it worked! I followed the rest of your guide and I got Device is silent one or two more times but I just tried again and then it worked.

I was a little unsure if it was successful though since I didn't see any clear feedback from the xprog software that it was successful. Tried the frm in the car and the indicators worked and windows rolled down so apparently it worked. No fault codes in ISTA either.

Once again, thanks a lot!

By the way, are you the guy who did that FSC generator? If so you deserve a massive thanks for that too. I used it a while ago on my own car to update the navigation maps.
Appreciate 0
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -5. The time now is 09:58 AM.




e90post
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
1Addicts.com, BIMMERPOST.com, E90Post.com, F30Post.com, M3Post.com, ZPost.com, 5Post.com, 6Post.com, 7Post.com, XBimmers.com logo and trademark are properties of BIMMERPOST