Netgate SG-1000 microFirewall

Author Topic: usb_modeswitch  (Read 172 times)

0 Members and 1 Guest are viewing this topic.

Offline Balanga

  • Full Member
  • ***
  • Posts: 196
  • Karma: +0/-0
    • View Profile
usb_modeswitch
« on: December 13, 2017, 03:59:59 am »
I'm trying to use usb_modeswitch to get my Huawei E3372 4G USB Modem to connect with the Internet and am following some Linux guide

I realise that the guide is for Linux and Raspberry Pi, but assume the principles should be similar and if I can get it working in that environment, a similar procedure should work on a laptop running FreeBSD...

One query I have is about the usb_modeswitch database /usr/local/share/usb_modeswitch... Is this a universal database where entries for vendor/product would be the same irrespective of OS? And if an entry is missing could I copy it from one system to another?


One strange thing I found was that on Linux lsusb showed the vendor/product as

    12d1:1506

but on FreeBSD it was

    12d1:14fe

not sure how it could be different.... Aren't these values embedded in the device somewhere?

FreeBSD does contain the file
/usr/local/share/usb_modeswitch/12d1:14fe


The contents of which are
Code: [Select]

# Huawei E352 (T-Mobile NL), E173s (Variant)
TargetVendor=0x12d1
TargetProductList="1506,150f,151d,1c1e"
HuaweiNewMode=1



I notice that I do have a
/usr/local/etc/usb_modeswitch.conf

the contents of which are
Code: [Select]

# Configuration for the usb_modeswitch package, a mode switching tool for
# USB devices providing multiple states or modes
#
# Evaluated by the wrapper script /usr/sbin/usb_modeswitch_dispatcher
#
# To enable an option, set it to "1", "yes" or "true" (case doesn't matter)
# Everything else counts as "disable"


# Disable automatic mode switching globally (e.g. to access the original
# install storage)

DisableSwitching=0

# Disable check for MBIM module presence and configuration globally (to aid
# special embedded environments). Available as per-device parameter
# 'NoMBIMCheck'

DisableMBIMGlobal=0

# Enable logging (results in a extensive report file in /var/log, named
# "usb_modeswitch_<interface-name>" and probably others

EnableLogging=0

# Optional increase of "delay_use" for the usb-storage driver; there are hints
# that a recent kernel default change to 1 sec. may lead to problems, particu-
# larly with USB 3.0 ports. Set this to at least 3 (seconds) in that case.
# Does nothing if the current system value is same or higher

#SetStorageDelay=4

# If the configuration for your Huawei modem uses the standard switching method,
# you can globally set an alternative method here which provides a different mode:
# either plain serial PPP (for older modems) or NCM which integrates nicely
# with recent Linux distributions, possibly avoiding configuration through a
# modem built-in web page. All other modems are not affected.
# Available as per-device parameter 'AltHuaweiMode'

HuaweiAltModeGlobal=0


I have no idea what the source of this file is and whether I should append something to it based on my USB vendor/product.

Can anyone advise?