Huawei E3372 modem on Mac OS
So I have this 4G+/LTE modem - Huawei E3372, also known as Megafon M150-2 - which is exactly the variation I got.
Eventually I got sick of its connection management software for Mac OS (the one that comes from Megafon), so I started looking for a way to be able to connect to the internet on Mac OS without it.
About the modem
The modem itself is rather a great piece of hardware.
Coming in a form-factor of a USB-stick, it is capable of maintaining quite a high-speed internet connection, and apparently it supports all the international LTE standards because I was using it in several countries without problems.
On top of that it has slots for external antennas and even a slot for microSD card (don’t know what to do with it):
Note that it requires full-sized SIM-cards.
I bought it several years ago in Moscow at some Megafon selling point. Back then it cost me just ~700 RUB (10-20 USD?). The reason for such a low price is usually that modems are locked to a particular operator, but in my case surprisingly that wasn’t the case.
If memory serves me well, I did not perform any unlocking operations, and it just works fine with SIM-cards from other operators than Megafon. I must say, however, I never tried it with any other russian operators - the only SIM-cards I was using it with were the ones from norwegian operators (Telia and Phonero).
And it is available for purchase even today:
- from the very same Megafon, although it is likely to be a locked version (which can be unlocked);
- an unlocked version on Amazon.
What’s wrong with the Megafon software
But what is wrong with the Megafon software? Well, while it does its job, after some time it started to irritate me for the following reasons:
- It installs god knows what to your system, while the only thing you really need is just a modem driver;
- In addition to the main application it requires its service to run in the background, otherwise it won’t even start discovering the modem;
- It sends some data to different Megafon hosts. I would understand if it was for checking the updates, but why different hosts then? I don’t feel like having yet another spyware in my system;
- File Activity tool from Instruments shows some enormous files access by the application and/or service. What could be the purpose of such an activity, I wonder?
So I started looking for a way to avoid using the Megafon software.
How to use the modem natively
The first clue was the fact that the modem works just fine with routers:
There is no need to install any Megafon software on the router for it to be able to connect to the internet via the modem, is there? So why the need in such a software on Mac OS?
After some research I got the following steps (mostly from this great topic at 4PDA and also this SuperUser answer):
- Install the driver for Mac OS for the initial modem discovery;
- Put the modem into a mode in which it will be discovered by Mac OS as a dial-up modem;
- Add a new network service using the modem.
Driver for Mac OS
Maybe it’s just me, but I’ve spent quite a some time looking for a driver. Surely, I could use the one installed together with the Megafon software, but there is no way to install only the driver, and I wanted to have a “clean” set-up procedure.
Most of links I found on the internet were dead. Of course I tried looking at the official Huawei’s website, but didn’t succeed there either.
But then in a comment section at some blog I did find a link to the working driver. And it was hosted on the official Huawei’s website! I don’t know how does one find it on his own, but here’s the link.
You don’t have to install everything, the only thing you need from this package is the driver (MobileConnectDriver.pkg
):
vasya@mbp:~/Downloads/TOOL-ConnLaucher_11.001.06.00.00$ tree
.
├── About\ Copyright\ Notice.pdf
├── MobileWiFi.app
│ └── ...
└── MobileWiFi_Driver.app
└── Contents
├── Resources
└── MobilePartner.mpkg
└── Contents
├── Packages
└── MobileConnectDriver.pkg
I will be hosting a copy just in case the official link dies like the rest at some point. Note that this is a driver for Mac OS Mojave, scroll to bottom for the Catalina version.
After the installation you should get the following thing installed:
/Library/Extensions/HuaweiDataCardDriver_10_9.kext
Check if the modem is discovered in the system:
$ ls -l /dev/tty.HUA*
crw-rw-rw- 1 root wheel 20, 18 Apr 17 20:56 /dev/tty.HUAWEIMobile-Pcui
Switching to dial-up mode
I’m sure that it’s called something else and not the “dial-up mode”, but I haven’t found the correct name for it.
So, you’ve got your modem discovered by the system. Connect to it via screen
:
screen /dev/tty.HUAWEIMobile-Pcui
And try to communicate with it using AT
-commands. First I tried to collect some information about the device (first line in each group is the command, the following lines are the response):
AT
OK
ATI
Manufacturer: huawei
Model: MegaFon M150-2
Revision: 21.200.07.00.209
IMEI: SOME-IMEI-VALUE
+GCAP: +CGSM,+DS,+ES
AT^VERSION?
^VERSION:BDT:Jun 10 2015, 19:51:41
^VERSION:EXTS:21.200.07.00.209
^VERSION:INTS:
^VERSION:EXTD:MGF_Dashboard_Win2.3.4_Mac2.3.4
^VERSION:INTD:
^VERSION:EXTH:CL2E3372HM Ver.A
^VERSION:INTH:
^VERSION:EXTU:MegaFon M150-2
^VERSION:INTU:
^VERSION:CFG:1004
^VERSION:PRL:
^VERSION:OEM:
^VERSION:INI:
From the Revision
value we can see that is starts with 21
, which means that the modem has the STICK firmware. The HILINK revision numbers start with 22
. More details about firmware types are here (in russian).
Okay, and here’s the command to switch the modem into dial-up mode:
AT^SETPORT="A1;10,12,16"
OK
Connecting to the internet on Mac OS
The only thing left is to create a new network service in Mac OS.
Create a new service using HUAWEIMobile-
interface:
Set the good old mobile dial number *99#
:
And you’re connected to the internet without any additional software, using only the native Mac OS tools:
Updates
28.05.2020 | Driver for Mac OS Catalina
As it was pointed out in comments, the driver stopped working on Mac OS Catalina. Most likely this is because it was x32, and Catalina requires x64, so an x64 version of driver is required. That actually was one of the reasons why I haven’t upgraded to Catalina.
Fortunatelly, such version exists, and apparently has been available since at least 30.10.2019. An awesome chap shared a link on 4PDA forum. I’ll host a copy here too.
I’ve tested it on Catalina, and it works fine.
13.11.2020 | Driver for Mac OS Big Sur
Mac OS Big Sur was released today. I installed it in the same virtual machine like the last time to test the modem, and no, it doesn’t work there.
The modem driver should have been still in the system after update, but even so, I’ve installed it again just in case (the one that worked on Catalina). Installation process went fine, didn’t even ask to allow it in Gatekeeper, but when I try to connect, it gives me this error:
And ls -l /dev/tty.HUA*
shows that it’s not there.
So yeah, fuck you, Apple, I ain’t updating to Big Sur any time soon.
I’ve sent an e-mail to support@huawei.us, but I don’t know if they will even bother to answer, because last time they didn’t. I will be also watching this page just in case.
28.10.2021 | Finally, it works on Mac OS Big Sur
All of a sudden, I got it working, and on Big Sur too (I updated to it half a year ago). It’s nothing new, actually, I simply should have read the comments more carefully.
There was an accident with the cables on the neighborhood the other day - there was no internet for several hours, and I had nothing to do but to try making the modem work once again.
So, last time I stopped on installing the driver, which didn’t do anything: there was no blocked extension dialog window and none blocked software in Security & Privacy
.
Having read the old comments once again, plus the Huawei’s instructions, I’ve decided to finally try disabling SIP. I rebooted to Recovery mode (⌘ + R
), launched Terminal and disabled it:
$ csrutil disable
Rebooted to normal mode and installed this driver. Now it did show a dialog window about blocked extension, and there was a whole bunch of them in Security & Privacy
(most likely just some other stuff I had installed in past), for some reason already pre-selected and grayed out:
I clicked OK
, it asked me to reboot. I rebooted and then executed the following command in the terminal (also according to comments and Huawei’s manual):
$ sudo kextload /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/*.kext
Executing: /usr/bin/kmutil load -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardACMControl.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardACMData.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardDMM.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardECMControl.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardECMData.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiLogLevel.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/MBBACMData.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/MBBActivateDriver.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/MBBEthernetData.kext
I checked if modem is discovered by the system, and it was:
$ ls -L1 /dev/tty.HUA*
/dev/tty.HUAWEIMobile-Modem
/dev/tty.HUAWEIMobile-Pcui
And it was working too! I was able to connect to the internet.
Alright then, I rebooted back to Recovery mode, enabled SIP back and rebooted to normal mode. But after loading into normal mode I got a dialog window about blocked/updated system extension, and modem was no longer discoverable:
$ ls -L1 /dev/tty.HUA*
ls: /dev/tty.HUA*: No such file or directory
So apparently it can only work with disabled SIP. That is not good news at all, but like it was mentioned in comments, one can disable only the kext
part of the SIP, which should be less risky.
Okay, I rebooted to Recovery again and tried to enable SIP without kext
:
$ csrutil enable --without kext
But it said something about wrong options and printed all available options, which didn’t have anything about kext
. Then I figured that perhaps you can’t enable SIP when it’s already enabled, so I disabled it, rebooted to Recovery again, and then ran csrutil enable --without kext
. Now it did execute successfully, although it gave a warning about unsupported configuration.
I rebooted to normal mode and checked the SIP status:
$ csrutil status
System Integrity Protection status: unknown (Custom Configuration).
Configuration:
Apple Internal: disabled
Kext Signing: disabled
Filesystem Protections: enabled
Debugging Restrictions: enabled
DTrace Restrictions: enabled
NVRAM Protections: enabled
BaseSystem Verification: enabled
This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.
Not sure why Apple Internal
is disabled and whether it’s bad or not, but okay. However, even though kext
is disabled now, there was still no modem in the system. I tried to reload the kext
again and got an error:
$ sudo kextload /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/*.kext
Executing: /usr/bin/kmutil load -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardACMControl.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardACMData.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardDMM.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardECMControl.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardECMData.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiLogLevel.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/MBBACMData.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/MBBActivateDriver.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/MBBEthernetData.kext
Error Domain=KMErrorDomain Code=27 "Extension with identifiers com.MBB.driver.MBBEthernetData,com.huawei.driver.HuaweiDataCardECMData,com.huawei.driver.HuaweiDataCardACMData,com.MBB.driver.MBBACMData,com.huawei.driver.HuaweiDataCardDMM not approved to load. Please approve using System Preferences." UserInfo={NSLocalizedDescription=Extension with identifiers com.MBB.driver.MBBEthernetData,com.huawei.driver.HuaweiDataCardECMData,com.huawei.driver.HuaweiDataCardACMData,com.MBB.driver.MBBACMData,com.huawei.driver.HuaweiDataCardDMM not approved to load. Please approve using System Preferences.}
And also it showed a dialog window about updated/blocked system extension again:
I went to Security & Privacy
, and Huawei extension was yet again already pre-selected and grayed out:
I clicked OK
, it told me to reboot, I did, but after reboot there was still no modem. So I reloaded the kext
yet again, and now it went fine:
$ sudo kextload /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/*.kext
Executing: /usr/bin/kmutil load -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardACMControl.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardACMData.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardDMM.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardECMControl.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiDataCardECMData.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/HuaweiLogLevel.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/MBBACMData.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/MBBActivateDriver.kext -p /Library/Extensions/HuaweiDataCardDriver_10_9.kext/Contents/PlugIns/MBBEthernetData.kext
So it could be that this command needs to be executed after every reboot.
Either way, the modem finally became available in the system, and I could finally connect to the internet:
It also created one more HUAWEIMobile-
interface in addition to the one I had from before.
16.11.2022 | It still works on Mac OS Monterey
Forgot to say that the same driver that I installed for Big Sur still works on Monterey.
Well, actually, at some point after updating to Monterey I needed to use the modem and discovered that it’s no longer present in the system:
$ ls -l /dev/tty.HUA*
ls: /dev/tty.HUA*: No such file or directory
The connection was still present on the Network Preferences pane, but the modem was not available. Then I just tried installing the Big Sur driver again, and it didn’t show me any dialogs, the installation just succeeded, and then the modem was discovered:
$ ls -l /dev/tty.HUA*
crw-rw-rw- 1 root wheel 0x9000004 Nov 16 11:21 /dev/tty.HUAWEIMobile-Modem
crw-rw-rw- 1 root wheel 0x9000006 Nov 16 11:21 /dev/tty.HUAWEIMobile-Pcui
So perhaps it needs to “refresh” some system files after updating to a new Mac OS version.
I haven’t tested the modem on Ventura yet.
Social networks
Zuck: Just ask
Zuck: I have over 4,000 emails, pictures, addresses, SNS
smb: What? How'd you manage that one?
Zuck: People just submitted it.
Zuck: I don't know why.
Zuck: They "trust me"
Zuck: Dumb fucks