View Single Post
Old 02-08-2013, 17:04   #154 (permalink)
Major Poster
Join Date: Jan 2013
Location: Belgium
Posts: 41
Member: 1875869
Status: Offline
Thanks Meter: 2
EM820W MBIM flash downgrade


@ vve ,
the trick is shown in red below in patch # 3.

Huawei 3G modem drivers hack to use and flash an MBIM modem with an OS < Win8

This hack will allow a flash downgrade of your MBIM modem to the former standard mode.

Modem : EM820W flashed with the MBIM Win8 update 11.810.10.02.00
Problem: The modem can no longer be used with any OS < Win8, Andro´d, or even Linux with kernel < 3.85 (as of Feb 2013)
Target : downgrade the modem to 11.810.09.24.00 standard mode.

This hack will likely also work to downgrade the MU733 modem in Samsung computers.(change your vid/pid accordingly)
The Samsung software update All-in-One package updates the firmware w/o asking the user to confirm that option !

It allows also to use the MBIM modem with Mobile Partner in a Win7 machine.(Huawei MP23 was happy with the hacked drivers)

Driver set : 3G_Huawei(EM770W-EM820W) version
Tools : Revskills (credit B. Kerler)
Flasher : Huawei Flasher 1.6 or > (credit fr3nsis)
(I've used XP as I got some debugger errors under Win7 (.Net Framework), but it should work with Win7.)

Requirements :
Remove any other Huawei driver prior to start with the new drivers set.(Use DriverUninstall.exe)
Remove Mobile Partner (installs it's own drivers set).
Remove QPST that install a few drivers in confilt with the normal drivers.

Optionnaly use USBDeview to check that the drivers have been removed and remove any remaining Huawei driver.

You should know the vid-pid of your modem when in standard mode. EM820W: VID:12d1 PID:1404
You should know the vid-pid of your modem when in Download mode. EM820W: VID:12d1 PID:1003

You should know the vid-pid of your modem when in standard mode. EM820W: VID:12d1 PID:1571
You should know the vid-pid of your modem when in Download mode. EM820W: VID:12d1 PID:1568

Double click on the peripheral in Device Manager, select Details, Hardware ID to find the vid, pid and MI#.

There are five files to hack in the drivers package.
- ew_busfilter.inf (will allow the enumeration of a single instance MBIM device.)
- ewmdm2k.inf (modem device)
- ewser2k.inf (virtual com ports)
- ewusbwwan.inf (HUAWEI Mobile Connect - 3G Network Card instance available in MBIM modem)
- ewnet.inf (virtual ethernet available in MBIM modem)
Warning : I've only hacked the X86 driver set.
If you have an X64 you should hack the X64 set AND take care of patching
the correct X64 groups in the .inf files. That's easy.

As my target was to flash-downgrade, I've not modified the ewdsc.inf for the Smartcard.

The above listed inf files are including declarations for the standard mode with pid 1404/1003, EXCEPT ONE: ew_usbfilter.inf.

Connect your modem via a USB port.
The Windows Devices Manager will show only two devices:
In Windows Device Manager, Double click on each instance, select the Details tab
There is of course a Yellow Warning in front of each device as there are no drivers available.
The trick is to force the MBIM modem to enumerate all peripherals:
That's the reason why we have to hack ew_busfilter.inf as follows:

.INF files Patches:
1- Add this in ew_busfilter.inf in the [Standard] section
%BusFilter.DeviceDesc%=Bus_Device, USB\VID_12D1&PID_1568
%BusFilter.DeviceDesc%=Bus_Device, USB\VID_12D1&PID_1571
2- Add this in ewmdm2k.inf in the [Models] section
%HUAWEI00% = Modem0, USB\VID_12d1&PID_1568&MI_01

%HUAWEI00% = Modem0, USB\VID_12d1&PID_1571&MI_00
3- Add this in ewser2k.inf in the [[QcomSerialPort]] section
%QcomDevice00% = QportInstall00, USB\VID_12d1&PID_1571&MI_01
%QcomDevice01% = QportInstall01, USB\VID_12d1&PID_1571&MI_02
%QcomDevice02% = QportInstall02, USB\VID_12d1&PID_1571&MI_03
%QcomDevice08% = QportInstall08, USB\VID_12d1&PID_1571&MI_04

%QcomDevice01% = QportInstall01, USB\VID_12d1&PID_1568&MI_00
NOTE on PID_1568&MI_00:
This is the trick!
The same modem (Standard) in download mode with pid 1003 uses interface MI_01 as PC UI Interface
while the MBIM modem in download mode with pid 1568 uses the interface MI_00 for the PC UI Interface !

4- Add this in ewusbwwan.inf in the [QCOM], [QCOM.NTia64], [QCOM.NTamd64] sections
%qcwwan.DeviceDesc00% = qcwwan.ndi, USB\VID_12d1&PID_1571&MI_05
5- Add this in ewnet.inf in the [QCOM], [QCOM.NTia64], [QCOM.NTamd64] sections
%qcwwan.DeviceDesc00% = qcwwan.ndi, USB\VID_12d1&PID_1571&MI_05
Once you've patched the .inf files, open the Devices Manager and run DriverSetup.exe

This will install the drivers and you will see the process in the Devices Manager window.
Click Continue when Windows complains about Unsigned Drivers.

Once finished, run Revskills to verify that your Modem will switch between Normal and Download Mode.
(thanks to vve and fr3nsis for that tip)

Click Menu, Hardware Forensics, Port Utils, QC + AT-Cmd
Check that Serial ComPort shows your modem PC UI Interface
Click on Switch -> You should receive a "Done" answer.
Got the BL tab
In the second Drop box, Select DWNMODE:SwitchDwnMode
Click on Send Command and look at your Device Manager Window

The modem will switch to Download mode, loading new drivers
In Devices Manager, check that you have a COM port assigned to PC UI Interface

Go Back to the SETUP tab
Select the new PC UI Interface with the new assigned COM Port number.
Click on Switch -> You should receive a "Done" answer.
Got the BL tab
In the second Drop box, Select DWNMODE:ResetPhone
Click on Send Command and look at your Devices Manager window.

The modem will switch back to Normal mode, loading the normal drivers.
As long as you cannot go back to Normal Mode with RevSkills, you cannot flash your modem.

If it's OK, that means that you can use Huawei Flasher to successfully flash-downgrade your modem.
Take care of leaving enough time for the drivers change before clicking OK to flash.

Hope it will help many MBIM flashed modem owners
  Reply With Quote
The Following 2 Users Say Thank You to YLG80 For This Useful Post:
Page generated in 0.25445 seconds with 6 queries