What's new

[FAQ] - set Huawei 3G/4G modems to Comms mode - permanently

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

sfx2000

Part of the Furniture
We get asked this all the time...

Huawei makes some great little 3G/4G/LTE USB dongles - but they're basically a bit odd to work with on Linux...

When first turned on, they present a USB Mass Storage Endpoint - this is a "virtual" CDROM device that has connection software, device drivers for Mac, Windows, and maybe an installer and/or user guides

If someone can test below to confirm (include the Huawei device model number/carrier if success or not), it would be helpful, and we can update the post accordingly.

This is all for Linux, but Windows is similar - you can use HyperTerm or Procom, or whatever...
  1. Make sure you execute these steps from a computer that can see the serial line interfaces of the device. This should be possible on any Linux computer that has usb_modeswitch installed and configured, like done by default on at least Ubuntu 12.10 (and newer).
  2. Find out the first USB interface of the device by doing ls /dev/ttyUSB* before and after plugging the 3G stick in and taking the first result.
  3. Open one terminal for receiving messages from the device, by executing cat /dev/ttyUSB1 (using your device number of course).
  4. In another terminal, send a command to the stick to test communication with it. Execute echo "ATi^M" > /dev/ttyUSB1. But note: You can not simply copy this over, as the ^M is just the visual representation of a single control character. Enter this character in the terminal directly by pressing Ctrl+V and afterwards Ctrl+M.
  5. Now, your terminal with cat should display information that the stick sent about itself.
  6. If this worked, now send the command to disable the virtual CD-ROM mode: echo "AT^U2DIAG=0^M" > /dev/ttyUSB1. Note that ^M is again a control character that you have to enter specially (see above), but ^U is just normal text, so you can copy & paste it.
  7. Now your cat terminal should answer with OK. If so, the command was successful.

And then the device should be permanently put into Serial mode, and it'll be fine from there.

@RMerlin - is usb_modeswitch part of AsusWRT or your builds?
 
Cool - good to know - part of the challenge is those Huawei modems are all a little bit different, but the process above should work if a person first telnets into the router perhaps...
 
Do you know if this procedure might work on a Pantech UML295?


We get asked this all the time...

Huawei makes some great little 3G/4G/LTE USB dongles - but they're basically a bit odd to work with on Linux...

When first turned on, they present a USB Mass Storage Endpoint - this is a "virtual" CDROM device that has connection software, device drivers for Mac, Windows, and maybe an installer and/or user guides

If someone can test below to confirm (include the Huawei device model number/carrier if success or not), it would be helpful, and we can update the post accordingly.

This is all for Linux, but Windows is similar - you can use HyperTerm or Procom, or whatever...
  1. Make sure you execute these steps from a computer that can see the serial line interfaces of the device. This should be possible on any Linux computer that has usb_modeswitch installed and configured, like done by default on at least Ubuntu 12.10 (and newer).
  2. Find out the first USB interface of the device by doing ls /dev/ttyUSB* before and after plugging the 3G stick in and taking the first result.
  3. Open one terminal for receiving messages from the device, by executing cat /dev/ttyUSB1 (using your device number of course).
  4. In another terminal, send a command to the stick to test communication with it. Execute echo "ATi^M" > /dev/ttyUSB1. But note: You can not simply copy this over, as the ^M is just the visual representation of a single control character. Enter this character in the terminal directly by pressing Ctrl+V and afterwards Ctrl+M.
  5. Now, your terminal with cat should display information that the stick sent about itself.
  6. If this worked, now send the command to disable the virtual CD-ROM mode: echo "AT^U2DIAG=0^M" > /dev/ttyUSB1. Note that ^M is again a control character that you have to enter specially (see above), but ^U is just normal text, so you can copy & paste it.
  7. Now your cat terminal should answer with OK. If so, the command was successful.

And then the device should be permanently put into Serial mode, and it'll be fine from there.

@RMerlin - is usb_modeswitch part of AsusWRT or your builds?
 
Do you know if this procedure might work on a Pantech UML295?

Not sure - each vendor is a bit different with some of the extended AT commands.

Huawei is consistent for the most part of the device it's hooked up to knows about the USB id string - so hotplug when it grabs the device knows to kick the usb_modeswitch from USB mass storage to Comms mode - but if doesn't, then the device stays in mass storage mode, which is a pain for folks trying to use one for WAN connectivity.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top