Want to switch modem to modem mode but afraid of bricking my device with this manual

I wanted to switch modem mode 'cause it seems its current mode is ethernet (or router. Not sure). At least it’s displayed in connections as “Ethernet” and in its connection settings is setting for mac address. As I’m able understand there is set fake mac address and it is Qubes default setting but I still don’t like that it can in any way interact with my mac address and potentially leak it to the ISP (maybe it’s impossible this way but I’m not spec. and would like to play it safe). I found this manual in Youtube. It is using minicom. I tried reproduce the steps from that vid and faced the differences of my case in comparison with the manual. In manual he can see modem in USB devices using lsblk. In my case there is no modem (probably because it is in Ethernet mode). But what’s most important - in his example his USB stick is displayed as ttys0 (when he reaches port configuration phase on the vid). In my case it’s displayed as modem. He changes value to ttyUSB0 and then saves settings choosing “save settings as DFL”. Since I don’t know what is this “DFL” and if my stick is actually in the correct mode (since there is “modem” instead of “ttys0”) I’m afraid to brick my USB stick by reproducing these actions. Could you check if this is safe to reproduce? There is no easer way to switch modes in my stick. No such settings in its graphical interface.
My USB stick is: Huawei E3372
The setup: I plug stick in USB port then attach it to sys-net. Then use sys-net terminal for all these actions. All this based on Debian template.
List of available AT commands for Huawei sticks is here (sorry for Russian. Couldn’t find a more complete list anywhere else).

Hello again. Since nobody replied on my request I decided to do it (configuration) myself. Everything was going ok until I tried to start minicom. If by order, then first I changed that value from modem to ttyUSB0 and saved these settings as DFL (save confirming message was present). Then exited minicom. But when I start minicom with sudo minicom it returns an error saying that there is no such file or directory as dev/ttyUSB0. I repeated operation with modem connection turned on but this changed nothing. I have two guesses about this:

  1. Maybe it’s Qubes peculiarity causing this issue since there is no dev directory in its VM file system. But if these settings are set in modem itself, not in qube, then this is not the reason.

  2. It needs simcard to be inserted in modem when all operation is being performed and these settings are being saved in simcard (I did all this without simcard in modem). But it looks more like non-sense since it’s modem mode switching not the simcard, so why it should be somehow involved? Of course I could just check it out by repeating all with simcard inserted but now I would like use other simcard that never was there and never seen any mac address (I would like use set-up without mac address involved, so that’s why I’m trying to switch this USB stick to the modem mode). Escpecially because I’m 99% sure that simcard is not the reason of all of this in any way.

So, generally, if this is Qubes specific issue then I need help. He does all this with Huawei stick so in theory it should work with my stick too since the same manufacturer. :tipping_hand_man: If I’m just doing something wrong then - still need help. :grin:

Why.
Why do you want to change modem mode?

:tipping_hand_man:

I don’t know russian so this guide is useless.
I’ve done it 10 yearsnago because i needed to connect from OpenWRT in PPP mode.
And every tutorial is for debian/ubuntu.

https://askubuntu.com/questions/1336221/how-to-use-usb-modeswtich-to-turn-my-4g-dongle-from-mass-storage-mode-to-modem-m

Well, he used there regular minicom. It was translated but order of items should have remain the same so I thought it will be not the problem for not speakers. First he lists connected devices through lsblk and his modem is displayed there. Then he executes command sudo minicom -s to enter minicom’s configuration menu. Chooses item “Serial Port Setup” (at least Google translated this like this). Then presses “A” to choose item “Serial Port” and changes its value from ttyS0 (in my case there was just modem word) to ttyUSB0. Presses enter then chooses save configuration as DFL (or maybe it should be translated as “settings”. Not sure). Then he exites minicom configuration and enters sudo minicom. At this stage he enters special command that changes modem mode and gets OK respond then exites minicom. I did exactly the same but when enter sudo minicom it says that there is no such path or directory as dev/ttyUSB0 even though I had no error messages when saved settings after setting ttyUSB0.

Because modem in HiLink mode don’t have serial bus on usb so no tty*** at all.

This way it will never show up as a serial device in sys-net!
If you want it to show up as /dev/ttyUSB0 or equivalent in sys-net, you have to assign the USB controller (pci device) to sys-net.

1 Like

Now I see it was obviously. :grin:
But now I have concerns about Hilink mode. I read already a lot of manuals. They propose different solutions and most importantly - they are suitable for different versions of my modem’s model. But after reading all this, I have a suspicion that only Hilink mode provides web interface. Does it? There are no AT commands for sending/receiving SMS for this modem model, so without interface I can not manage my tariff.
If ask DuckDuckGo AI it confirms my suspicions. Quote:

The Huawei E3372 stick provides a web interface in HiLink mode, where it acts as a mini-gateway with its own DHCP and HTTP servers. In this mode, users can manage the modem through its web interface at the default IP address 192.168.8.1. community.watchguard.com zaage.it

Modes of Huawei E3372 Stick

The Huawei E3372 stick operates in two primary modes: HiLink mode and Stick mode. > Each mode has distinct functionalities.

HiLink Mode

  • Web Interface: Yes, it provides a web interface.
  • Functionality: Acts as a mini-gateway with built-in DHCP and HTTP servers.
  • IP Address: Assigns an IP address in the 192.168.8.0/24 range.
  • Management: Connection management is done through the web interface at 192.168.8.1.

Stick Mode

  • Web Interface: No, it does not provide a web interface.
  • Functionality: Appears as USB serial devices, allowing for PPP or NCM connections.
  • Management: Requires external software or devices to manage connections.

In summary, the HiLink mode of the Huawei E3372 stick is the one that provides a web interface for configuration and management.

Checked out this question one more time with another search engine AI. It says the same: only hilink mode has the web interface. So it turns out I can’t switch to stick mode because I need web interface. Now the question is different: can modem in some way re-translate my laptop’s mac-address to ISP and if so, will Qubes mac-address spoofing built-in mechanism enough to prevent this? Or there is no possibility of this since only modem will operate with mac? This is the reason why I started to search a method how to change modem mode from “ethernet” to “modem”, hoping that in that mode there will be no interaction with the mac-address.
I am even more interested not in how reliable is the MAC-address spoofing in Qubes, but how big is the possibility that modem will in some way leak mac to the ISP. Will it or in theory it should not?

One remark.
If you signed the deal witIh ISP under your name for SIM card, then ISP is tagging every trafic going thru that SIM IMEI with your data.
Then, question whatever your ISP records your NICs MAC is irrelevant.

1 Like

No, the SIM card is registered to a person who is not connected to me in any way, but how ISP can tag some traffic with someone when this traffic is encrypted? As I know ISP only sees that some subscriber connected to a certain Tor node (and then only if subscriber doesn’t use bridge. Then maybe can determine bridge usage after traffic research).

Simcards don’t have IMEI. Modems do. Cell phones do. Simcards have IMSI (International Mobile Subscriber Identity).

If we were talking about a modem that was provided by ISP (we, in the east, call such devices “locked”) then there would be no talk about if ISP has access and keeps records of mac and other info that it can reach. But the question becomes less clear when it comes to an “unlocked” device (not provided by ISP and not bound to it in any way, which is what I started talking about at the beginning).

E3372 mode switch AI search:

Key Points

  • It seems likely that you can switch the Huawei E3372 from Hi-Link mode to modem mode on Linux Fedora using the usb_modeswitch tool, but success may depend on correct configuration.
  • Research suggests that creating a specific configuration file and ensuring udev rules are set up correctly are key steps, though some users report challenges with mode switching.

Steps to Switch Modes

To switch your Huawei E3372 modem from Hi-Link mode to modem mode on Linux Fedora, follow these steps:

Install Required Tool

First, install usb_modeswitch, a tool that helps switch USB device modes:

  • Run: sudo dnf install usb_modeswitch

Create Configuration File

Create a configuration file for your modem to specify the target mode:

  • Edit or create the file: sudo nano /etc/usb_modeswitch.d/12d1:1f01
  • Add the following content:
    # Huawei E3372 in Mass Storage Mode
    TargetProduct=0x1442
    MessageContent="55534243000000000000000000000011060000000000000000000000000000"
    
    This sets the modem to Broadband modem mode.

Ensure Udev Rules

Make sure the system recognizes the modem for mode switching:

  • Check if /etc/udev/rules.d/40-usb_modeswitch.rules exists and includes: ATTRS{idVendor}=="12d1", RUN+="/usr/sbin/usb_modeswitch -v 0x12d1 -p 0x%P -c /etc/usb_modeswitch.d/12d1:%P"
  • If not, create or edit it with: sudo nano /etc/udev/rules.d/40-usb_modeswitch.rules and add the line above.

Apply Changes

Restart the udev service or unplug and replug the modem:

  • Run: sudo systemctl restart udev, or simply unplug and replug the modem.

Verify the Switch

Check if the mode switched successfully:

  • Use: lsusb to see if the modem now shows as 12d1:1442, indicating modem mode.

Configure for Use

Once in modem mode, set up the connection using Network Manager:

  • Go to network settings, add a “Broadband” connection, and follow the prompts.

Troubleshooting

If it doesn’t work, double-check the configuration file and udev rules, and ensure your Fedora version supports the modem.


Detailed Analysis of Switching Huawei E3372 from Hi-Link to Modem Mode on Linux Fedora

This section provides a comprehensive analysis of the process for switching the Huawei E3372 modem from Hi-Link mode to modem mode on Linux Fedora, based on available documentation and user reports as of 08:04 PM CEST on Saturday, July 19, 2025. The analysis aims to cover all relevant details, ensuring a thorough understanding for both technical and lay audiences, and includes all information from the evaluation process.

Introduction

The Huawei E3372 is a 4G/LTE USB modem that can operate in various modes, including Hi-Link mode (where it acts as a network interface with a web interface, often identified by USB ID 12d1:14dc) and modem mode (where it functions as a standard modem, typically identified by USB ID 12d1:1442). The user’s query seeks instructions for switching from Hi-Link mode to modem mode on Linux Fedora, which requires manipulating the device’s USB mode using system tools.

Background and Technical Context

Hi-Link mode is often the default for Huawei modems when connected via USB, presenting the device as a network interface (CDC-Ether) driven by the huawei_cdc_ncm kernel driver. Modem mode, on the other hand, allows the device to be used as a traditional modem, supporting AT commands and integration with tools like Network Manager or wvdial. Switching modes is typically achieved using usb_modeswitch, a Linux utility designed for such purposes, which sends specific commands to the device to change its USB configuration.

Given Fedora’s use of Network Manager and its compatibility with standard Linux tools, the process should be feasible, but may require specific configuration due to the device’s behavior and Fedora’s system setup.

Steps for Mode Switching

Based on the analysis, the following steps are recommended for switching the Huawei E3372 from Hi-Link to modem mode on Linux Fedora:

  1. Install usb_modeswitch:

    • Fedora provides usb_modeswitch in its repositories, which can be installed via:
      sudo dnf install usb_modeswitch
      
    • This tool is essential for switching the USB mode of devices like the E3372, which may initially appear as mass storage or network devices.
  2. Create Configuration File:

    • The Huawei E3372 in its initial state (mass storage mode) has a USB ID of 12d1:1f01. To switch to modem mode (TargetProduct=0x1442), create a configuration file:
      sudo nano /etc/usb_modeswitch.d/12d1:1f01
      
    • Add the following content:
      # Huawei E3372 in Mass Storage Mode
      TargetProduct=0x1442
      MessageContent="55534243000000000000000000000011060000000000000000000000000000"
      
    • The MessageContent is a hexadecimal string that instructs the modem to switch to Broadband modem mode, as sourced from a GitHub gist on using Huawei WWAN dongles on Linux.
  3. Ensure Udev Rules:

    • usb_modeswitch relies on udev rules to trigger mode switching automatically when the device is plugged in. Check or create the file:
      /etc/udev/rules.d/40-usb_modeswitch.rules
      
    • Ensure it contains a rule for Huawei devices:
      ATTRS{idVendor}=="12d1", RUN+="/usr/sbin/usb_modeswitch -v 0x12d1 -p 0x%P -c /etc/usb_modeswitch.d/12d1:%P"
      
    • If the file doesn’t exist, create it with the above line to ensure the modem is switched to the configured mode on connection.
  4. Apply Changes and Test:

    • After setting up, restart the udev service to apply changes:
      sudo systemctl restart udev
      
    • Alternatively, unplug the modem and plug it back in to trigger the mode switch.
    • Verify the switch by checking the USB device list:
      lsusb
      
    • Look for the device with ID 12d1:1442, which indicates it is now in modem mode. If it still shows as 12d1:1f01 or 12d1:14dc, the switch failed, and troubleshooting is needed.
  5. Configure for Use:

    • Once in modem mode, the device can be used with Network Manager, which is the default network management tool on Fedora. To set up:
      • Open network settings, select “Add Connection,” choose “Broadband,” and follow the prompts to configure the mobile broadband connection.
    • Alternatively, for command-line users, tools like mmcli (part of ModemManager) can be used to manage the modem:
      mmcli -L
      
    • For older setups, wvdial can be configured, though this is less common on modern Fedora systems.

Supporting Evidence and User Reports

The process is supported by multiple sources:

  • A GitHub gist ([Using a Huawei WWAN dongle on Linux · GitHub]) provides detailed instructions for using Huawei WWAN dongles on Linux, including the specific MessageContent for switching to modem mode.
  • Discussions on forums like Linux Mint Forums ([https://forums.linuxmint.com/viewtopic.php?t=215958]) mention similar configurations for the E3372, though focused on Ubuntu, the principles apply to Fedora.
  • Documentation from vutlan.atlassian.net ([invalid URL, do not cite]) suggests using AT commands like AT^U2DIAG=0 for mode switching, but this is likely for devices already in a mode where AT commands are accepted, reinforcing the need for usb_modeswitch for initial mode changes.

User reports indicate that while the process generally works, some users face challenges, such as the device not switching correctly or being detected as the wrong type. These issues often stem from incorrect MessageContent, missing udev rules, or compatibility with the Linux kernel version.

Potential Challenges and Troubleshooting

  • Device Not Switching: If lsusb still shows 12d1:14dc (Hi-Link) or 12d1:1f01 (mass storage), verify the configuration file and ensure usb_modeswitch is running. Check logs with:
    journalctl -u usb_modeswitch
    
  • Fedora-Specific Issues: Fedora’s default settings for udev and Network Manager should support this, but ensure the latest updates are installed:
    sudo dnf update
    
  • Driver Compatibility: The E3372 should work with standard Linux kernel drivers (cdc_mbim or cdc_wdm for modem mode), but ensure the kernel version (check with uname -r) is recent enough.

Table: Mode Switching Configuration for Huawei E3372

Step Action Command/Example
Install Tool Install usb_modeswitch on Fedora sudo dnf install usb_modeswitch
Create Config File Create file for USB ID 12d1:1f01 with modem mode settings sudo nano /etc/usb_modeswitch.d/12d1:1f01, add content as above
Ensure Udev Rule Add rule for Huawei devices in udev rules Edit /etc/udev/rules.d/40-usb_modeswitch.rules, add ATTRS{idVendor}=="12d1"
Apply Changes Restart udev or replug modem sudo systemctl restart udev or unplug/replug
Verify Mode Check USB device list for modem mode (12d1:1442) lsusb
Configure Connection Set up in Network Manager or use mmcli Network settings > Add Broadband, or mmcli -L

This table summarizes the key actions, providing a quick reference for users.

Conclusion and Recommendations

It seems likely that switching the Huawei E3372 from Hi-Link to modem mode on Linux Fedora is achievable using usb_modeswitch, with the configuration outlined above. However, success may depend on correct setup of configuration files and udev rules, and some users may encounter challenges. For troubleshooting, checking logs and ensuring system updates are recommended. Users seeking further assistance can refer to the GitHub gist and Linux forums for additional insights, ensuring a robust setup for their modem usage as of July 19, 2025.

1 Like

And @grok found that sms can be send and received in usb modem mode by Gammu for example, but sometime it makes trouble. It depends on exact modem model.

There are a lot of complex manuals intended for various versions of that modem model. So the same amount of possibilities to f*** everything up. Especially when there is no 100% that SMS handling will be successfully established. Let your comment be left for the future, for those who will have the same request.

usb_modeswitch metod is not permanent.
If you comment/delete udev rules for modem then when inserted again it will work in hilink mode.
Nothing is saved to firmware like your “manual” from first post which I presume is to switch from usb storage to usb modem - that’s why he had /dev/ttys0 device.

PS: I have some old Huawei usb modem which I used with OpenWRT router 10 years ago, but I will be in home not earlier than August 8 to test it

2 Likes

Is this manual intended only for Fedora or if I’ll make everything in Debian template nothing changes? My Qubes set-up Debian based.

If UDEV is used in debian templates then yes

For me, it looks like:

  • The usb_modeswitch (and udev) is necessary for making the device act as modem. It is present in my fedora41.
  • When this happens, the device disappears and the new device appears - it will appear in the qube where is the usb controller, normally sys-usb.
  • This may make it impossible to attach the single USB device to a different qube, except if the new configuration is kept until it is physically unplugged. This will be valuable information.
  • It will be possible to attach the usb controller PCI device to the target qube, which will then control all the usb devices on that controller. This is the case of “combined sys-net and sys-usb”, proposed by the qubes-os installer.
  • There seem to be several different productID for different models of E3372 -but maybe these are AI slopdreams. Some commands which may be useful -sudo is probably required for all of them.
    • lsusb (for seeing devices, in the qube where the controller is)
    • lspci
    • qvm-device (with options and arguments, for seeing the qubes view of the different devices)
    • journalctl -f (for watching logs during operations. Can be left running in a terminal window - it will continue to show new data until ctrl-c is used. If you try attaching the usb device to a different tube, then use it in both qubes.
    • ls /dev/tty* /dev/modem to see the list of devices. If the log shows creation of ttyUSB0, then it will appear as /dev/ttyUSB0
    • man lsusb, man lspci, and similar, for finding useful options to commands

It will require careful detective work, I think. Maybe it is simplest to make it work in a plain Fedora or Debian OS first, and then try to do it in qubes-os.

1 Like