{"id":196,"date":"2016-08-17T10:13:09","date_gmt":"2016-08-17T08:13:09","guid":{"rendered":"http:\/\/blog.le-vert.net\/?p=196"},"modified":"2017-01-23T07:47:51","modified_gmt":"2017-01-23T06:47:51","slug":"disable-hilink-mode-and-force-tty-modem-on-new-huwaei-e3272","status":"publish","type":"post","link":"https:\/\/blog.le-vert.net\/?p=196","title":{"rendered":"Disable HiLink mode and force tty modem on NEW Huawei E3272"},"content":{"rendered":"<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Disable+HiLink+mode+and+force+tty+modem+on+NEW+Huawei+E3272\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/blog.le-vert.net\/?p=196\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><\/div><p>There&#8217;s plenty of documentation on Internet related to this issue but none of them works with recents firmware. They all talk about using the embedded web interface and force serial mode through some call and then send an AT command to choose default mode.<br \/>\nIt&#8217;s not working ANYMORE on 22.470.07.00.00 firmware.<\/p>\n<p>And sorry, you&#8217;ll need a Windows computer for this&#8230; (probably a clean pre-Windows 8 one)<\/p>\n<p>First you need to confirm that your modem is actually working correctly in HiLink mode.<br \/>\nPlug it and wait for the browser to open automatically:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_HiLink_web_interface.png\" alt=\"00_HiLink_web_interface\" width=\"647\" height=\"443\" class=\"alignnone size-full wp-image-208\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_HiLink_web_interface.png 647w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_HiLink_web_interface-300x205.png 300w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_HiLink_web_interface-438x300.png 438w\" sizes=\"(max-width: 647px) 100vw, 647px\" \/><\/p>\n<p>You should confirm from device manager that there&#8217;s a new NDIS network interface<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/01_NDIS_network_interface.png\" alt=\"01_NDIS_network_interface\" width=\"321\" height=\"109\" class=\"alignnone size-full wp-image-207\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/01_NDIS_network_interface.png 321w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/01_NDIS_network_interface-300x102.png 300w\" sizes=\"(max-width: 321px) 100vw, 321px\" \/><\/p>\n<p>Run <a href=\"https:\/\/cloud.le-vert.net\/index.php\/s\/4e4662d7a8ee855f6fb6849824196302\" target=\"_blank\">E3272s_Update_21.420.07.00.00.exe<\/a> which is a firmware installer containing an older version that permits default mode change<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/02_Firmware_downgrade.png\" alt=\"02_Firmware_downgrade\" width=\"397\" height=\"241\" class=\"alignnone size-full wp-image-206\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/02_Firmware_downgrade.png 397w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/02_Firmware_downgrade-300x182.png 300w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/p>\n<p>After a while it will fail with the error below. The firmware updater turned the device into serial mode but there&#8217;s no driver available<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/04_Device_not_found.png\" alt=\"04_Device_not_found\" width=\"433\" height=\"330\" class=\"alignnone size-full wp-image-205\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/04_Device_not_found.png 433w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/04_Device_not_found-300x229.png 300w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/04_Device_not_found-394x300.png 394w\" sizes=\"(max-width: 433px) 100vw, 433px\" \/><\/p>\n<p>Confirm from device manager that there&#8217;re some unknown devices<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/05_Unrecognized_devices.png\" alt=\"05_Unrecognized_devices\" width=\"245\" height=\"142\" class=\"alignnone size-full wp-image-202\" \/><\/p>\n<p>Install <a href=\"https:\/\/cloud.le-vert.net\/index.php\/s\/2071c4cf3b8718489e2baedb6c0ffd32\" target=\"_blank\">Mobile Partner<\/a> from Huawei and fix the driver file because it doesn&#8217;t contain the IDs for this device<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/02_Install_Mobile_Partner.png\" alt=\"02_Install_Mobile_Partner\" width=\"512\" height=\"325\" class=\"alignnone size-full wp-image-204\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/02_Install_Mobile_Partner.png 512w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/02_Install_Mobile_Partner-300x190.png 300w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/02_Install_Mobile_Partner-473x300.png 473w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/p>\n<p>Go to C:\\Program Files (x86) \\Mobile Partner\\Driver\\Driver\\X64 (for 64 bits system)<br \/>\nand edit ewser2k.inf file.<\/p>\n<p>In the [QcomSerialPort.NTamd64], add the two following lines<br \/>\n<code><br \/>\n%QcomDevice00% = QportInstall01, USB\\VID_12d1&PID_1442&MI_00<br \/>\n%QcomDevice01% = QportInstall00, USB\\VID_12d1&PID_1442&MI_01<br \/>\n<\/code><\/p>\n<p>Now go back to device manager and update driver by choosing the path containing the inf file<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/06_Update_driver_locally.png\" alt=\"06_Update_driver_locally\" width=\"1017\" height=\"358\" class=\"alignnone size-full wp-image-203\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/06_Update_driver_locally.png 1017w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/06_Update_driver_locally-300x106.png 300w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/06_Update_driver_locally-768x270.png 768w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/06_Update_driver_locally-500x176.png 500w\" sizes=\"(max-width: 1017px) 100vw, 1017px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/07_Select_directory.png\" alt=\"07_Select_directory\" width=\"511\" height=\"136\" class=\"alignnone size-full wp-image-200\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/07_Select_directory.png 511w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/07_Select_directory-300x80.png 300w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/07_Select_directory-500x133.png 500w\" sizes=\"(max-width: 511px) 100vw, 511px\" \/><\/p>\n<p>If you get this error, you need to disable driver signature verification first (google for it).<br \/>\nBE SURE TO RESTART FIRMWARE UPDATER BEFORE TRYING TO FIX THE DRIVERS AGAIN OTHERWISE IT WONT BE TURNED INTO SERIAL MODE.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/09_Driver_installing.png\" alt=\"09_Driver_installing\" width=\"515\" height=\"309\" class=\"alignnone size-full wp-image-198\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/09_Driver_installing.png 515w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/09_Driver_installing-300x180.png 300w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/09_Driver_installing-500x300.png 500w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/p>\n<p>After a successful installation you should now see two additional COM ports<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/10_Driver_installed_succesfully.png\" alt=\"10_Driver_installed_succesfully\" width=\"384\" height=\"94\" class=\"alignnone size-full wp-image-199\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/10_Driver_installed_succesfully.png 384w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/10_Driver_installed_succesfully-300x73.png 300w\" sizes=\"(max-width: 384px) 100vw, 384px\" \/><\/p>\n<p>Start the firmware updater and wait a bit<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/11_Upgrade_step_2.png\" alt=\"11_Upgrade_step_2\" width=\"492\" height=\"172\" class=\"alignnone size-full wp-image-197\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/11_Upgrade_step_2.png 492w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/11_Upgrade_step_2-300x105.png 300w\" sizes=\"(max-width: 492px) 100vw, 492px\" \/><\/p>\n<p>On my Windows 8.1 computer it gets stuck here and fails with an error but it worked correctly on Windows 7&#8230;<\/p>\n<p>Here is what you should see if it&#8217;s working correctly<br \/>\n<a href=\"http:\/\/blog.le-vert.net\/?attachment_id=215\" rel=\"attachment wp-att-215\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Upgrade_in_progress.png\" alt=\"00_Upgrade_in_progress\" width=\"565\" height=\"299\" class=\"alignnone size-full wp-image-215\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Upgrade_in_progress.png 565w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Upgrade_in_progress-300x159.png 300w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Upgrade_in_progress-500x265.png 500w\" sizes=\"(max-width: 565px) 100vw, 565px\" \/><\/a><\/p>\n<p>Finally, the success message saying you firmware has been downgraded to 21.xx<br \/>\n<a href=\"http:\/\/blog.le-vert.net\/?attachment_id=216\" rel=\"attachment wp-att-216\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Upgrade_succeeded.png\" alt=\"00_Upgrade_succeeded\" width=\"564\" height=\"383\" class=\"alignnone size-full wp-image-216\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Upgrade_succeeded.png 564w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Upgrade_succeeded-300x204.png 300w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Upgrade_succeeded-442x300.png 442w\" sizes=\"(max-width: 564px) 100vw, 564px\" \/><\/a><\/p>\n<p>Now we have access to the serial port and we&#8217;ll have to issue a few AT command to set a new default mode. Find the COM port used by your modem now<br \/>\n<a href=\"http:\/\/blog.le-vert.net\/?attachment_id=211\" rel=\"attachment wp-att-211\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_COM_device.png\" alt=\"00_COM_device\" width=\"329\" height=\"102\" class=\"alignnone size-full wp-image-211\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_COM_device.png 329w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_COM_device-300x93.png 300w\" sizes=\"(max-width: 329px) 100vw, 329px\" \/><\/a><\/p>\n<p>And start Putty on it<br \/>\n<a href=\"http:\/\/blog.le-vert.net\/?attachment_id=213\" rel=\"attachment wp-att-213\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Putty_connection.png\" alt=\"00_Putty_connection\" width=\"450\" height=\"159\" class=\"alignnone size-full wp-image-213\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Putty_connection.png 450w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Putty_connection-300x106.png 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>Now we can send a few command (press Enter key at the end)<br \/>\n<code><br \/>\nAT: Will reply \"OK\", it means your actually talking to someone understanding AT commands<br \/>\nAT^FHVER: Confirm you are running firmware 21.xx<br \/>\nAT^SETPORT?: Show current modem default config<br \/>\nAT^SETPORT=?: Display available modes<br \/>\nAT^SETPORT=\"FF;10,12\": Enable diag interface and classic serial based modem emulation (this is what we need to use with wvdial)<br \/>\nAT^RESET: Restart the modem<br \/>\n<\/code><\/p>\n<p><strong>Screenshot below are a bit wrong: I used AT^SETPORT=&#8221;FF;12,10&#8243; instead of AT^SETPORT=&#8221;FF;10,12&#8243; so the modem is on ttyUSB1 instead of ttyUSB0 !<\/strong><\/p>\n<p>Here you can see my AT session (please note that AT^SETPORT? won&#8217;t refresh until the modem is restarted)<br \/>\n<a href=\"http:\/\/blog.le-vert.net\/?attachment_id=214\" rel=\"attachment wp-att-214\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Putty_session.png\" alt=\"00_Putty_session\" width=\"444\" height=\"616\" class=\"alignnone size-full wp-image-214\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Putty_session.png 444w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Putty_session-216x300.png 216w\" sizes=\"(max-width: 444px) 100vw, 444px\" \/><\/a><\/p>\n<p>After issuing AT^RESET the COM id will change (probably increased by 1), you can restart Putty and check default mode is now the one expected.<br \/>\n<a href=\"http:\/\/blog.le-vert.net\/?attachment_id=212\" rel=\"attachment wp-att-212\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Putty_after_reset.png\" alt=\"00_Putty_after_reset\" width=\"151\" height=\"140\" class=\"alignnone size-full wp-image-212\" srcset=\"https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Putty_after_reset.png 151w, https:\/\/blog.le-vert.net\/wp-content\/uploads\/2016\/08\/00_Putty_after_reset-150x140.png 150w\" sizes=\"(max-width: 151px) 100vw, 151px\" \/><\/a><\/p>\n<p>You can now restart Linux and enjoy the stick being detected correctly now:<br \/>\n<code><br \/>\nAug 18 22:58:23 thrall kernel: [  283.080966] usb 5-1.2: new high-speed USB device number 5 using xhci_hcd<br \/>\nAug 18 22:58:23 thrall kernel: [  283.173491] usb 5-1.2: New USB device found, idVendor=12d1, idProduct=1506<br \/>\nAug 18 22:58:23 thrall kernel: [  283.173496] usb 5-1.2: New USB device strings: Mfr=2, Product=1, SerialNumber=0<br \/>\nAug 18 22:58:23 thrall kernel: [  283.173497] usb 5-1.2: Product: HUAWEI Mobile<br \/>\nAug 18 22:58:23 thrall kernel: [  283.173499] usb 5-1.2: Manufacturer: HUAWEI Technology<br \/>\nAug 18 22:58:23 thrall kernel: [  283.184269] usbcore: registered new interface driver usbserial<br \/>\nAug 18 22:58:23 thrall kernel: [  283.184280] usbcore: registered new interface driver usbserial_generic<br \/>\nAug 18 22:58:23 thrall kernel: [  283.184287] usbserial: USB Serial support registered for generic<br \/>\nAug 18 22:58:23 thrall kernel: [  283.186411] usbcore: registered new interface driver option<br \/>\nAug 18 22:58:23 thrall kernel: [  283.186422] usbserial: USB Serial support registered for GSM modem (1-port)<br \/>\nAug 18 22:58:23 thrall kernel: [  283.186513] option 5-1.2:1.0: GSM modem (1-port) converter detected<br \/>\nAug 18 22:58:23 thrall kernel: [  283.186597] usb 5-1.2: GSM modem (1-port) converter now attached to ttyUSB0<br \/>\nAug 18 22:58:23 thrall kernel: [  283.186613] option 5-1.2:1.1: GSM modem (1-port) converter detected<br \/>\nAug 18 22:58:23 thrall kernel: [  283.186656] usb 5-1.2: GSM modem (1-port) converter now attached to ttyUSB1<br \/>\n<\/code><\/p>\n<p>Modem is on \/dev\/ttyUSB0.<\/p>\n<p>Bonus stuff:<\/p>\n<p>Udev rules that will create \/dev\/gsm0 (in case you have other \/dev\/ttyUSBx):<br \/>\n<code><br \/>\nSUBSYSTEM==\"tty\", ATTRS{idVendor}==\"12d1\", ATTRS{idProduct}==\"1506\", SYMLINK+=\"gsm%n\"<br \/>\n<\/code><\/p>\n<p>And a working wvdial configuration (PIN code disabled, POST.lu APN so you probably want to change this, no user, no password):<br \/>\n<code><br \/>\n[Dialer Defaults]<br \/>\nInit1 = ATZ<br \/>\nInit2 = AT+CGDCONT=1,\"IP\",\"web.pt.lu\"<br \/>\nStupid Mode = 1<br \/>\nMessageEndPoint = \"0x01\"<br \/>\nModem Type = Analog Modem<br \/>\nISDN = 0<br \/>\nPhone = *99#<br \/>\nModem = \/dev\/gsm0<br \/>\nUsername = { }<br \/>\nPassword = { }<br \/>\nBaud = 460800<br \/>\nAuto Reconnect = on<br \/>\n<\/code><\/p>\n<p>Finally, a systemd service file with autorestart<br \/>\n<code><br \/>\n[Unit]<br \/>\nDescription=wvdial<\/p>\n<p>[Service]<br \/>\nType=simple<br \/>\nExecStart=\/usr\/bin\/wvdial<br \/>\nRestartSec=2<br \/>\nRestart=always<\/p>\n<p>[Install]<br \/>\nWantedBy=multi-user.target<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;s plenty of documentation on Internet related to this issue but none of them works with recents firmware. They all talk about using the embedded web interface and force serial mode through some call and then send an AT command &hellip; <a href=\"https:\/\/blog.le-vert.net\/?p=196\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.le-vert.net\/index.php?rest_route=\/wp\/v2\/posts\/196"}],"collection":[{"href":"https:\/\/blog.le-vert.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.le-vert.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.le-vert.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.le-vert.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=196"}],"version-history":[{"count":9,"href":"https:\/\/blog.le-vert.net\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions"}],"predecessor-version":[{"id":246,"href":"https:\/\/blog.le-vert.net\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions\/246"}],"wp:attachment":[{"href":"https:\/\/blog.le-vert.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.le-vert.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.le-vert.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}