Help with MC7455 in OpenWRT router

Hello. My goal is to build a better (and cheaper) 4G router than my current Netgear LG6100D (Sprint). I purchased the MC7455 and a wwan to usb adapter with sim card slot. My router is a brand new Linksys WRT1900ACS which I have loaded a fresh copy of the latest OpenWRT firmware. My problem is I can’t get any of the drivers to load for the MC7455. I have installed the following packages:

kmod-usb-net-sierra
kmod-mii
kmod-usb-net
kmod-usb-wdm
kmod-usb-net-qmi-wwan
uqmi

When I look at the devices (cat /sys/kernel/debug/usb/devices), the end of every driver line says (NONE). It recognizes the Sierra MC7455 correctly so I know it’s seeing it at least. It just refuses to load any drivers, hence when I run the command ls -l /dev/cdc-wdm0 it always says no such device. One thing is I tried with both the uqmi and sierra packages loaded and also with just the uqmi loaded, but not with just the sierra package. I will try that tonight. I have also taped up pins 23, 25, 27, 29, 31, & 33 on the MC7455.

I just don’t know much about Linux to even begin to troubleshoot this. I was hoping to issue a few commands and get it working. The more websites/forums I read the more confused I get. I even read somewhere that I would have to install it in my Windows computer and load Sprint specific firmware onto the MC7455 first. And another site says you can’t just switch the module back and forth between Windows and Linux because it’s mode would change or something.

Are there any step by step instructions on getting a module like the MC7455 working as a 4g USB modem in a router with OpenWRT software? This 4G Netgear Router from Sprint is a big pile of crap and I need something fast and reliable.

Thanks in advance for any help you might offer me and if I can provide any other specific information.

Keith

I am using the exact setup you are using. Don’t tape up any pins. The mc7455 has to be in mbim mode. Also only use generic firmware, not sprint firmware. Sprint doesn’t not provision this device so it must be in generic firmware.

Setting up Router with mc7455 instructions

Proven routers are linksys wrt1900acs/ netgear wndr3700 v4/ TP-LINK 4300 these i have personally done. The zbt can be done also but it’s a different setup. There are more routers that might work

You will need a usb wwan pci-e adapter with a sim slot. Search amazon and several will pop up. There are some with cases and some are just the board. If you get the one in the case make sure to note the antenna conections. Some are SMA and some are RP-SMA connections. If you buy the board only you will need to get the antenna whips seperate.

Leave the mc7455 in generic firmware, do not use the sprint firmware. It will not work. Sprint does not provision this device for us so it must remain in generic mode.

Download the mc7455 windows drivers from sierra wireless website.

source.sierrawireless.com/device … es/mc7455/

  1. Download huawei terminal 3ginfo.ru/downloads95.html
    Connect mc7455 to computer. Conect to the modem port and type. ati then hit enter. If it gives out modem info your good, if not repeat on a different port.

  2. Run on mc7455. (make sure your apn is r.ispsn, if not change it below)

AT!entercnd=“A710”
AT!USBCOMP=1,1,1009
AT+cgdcont=1,“IP”,“r.ispsn”

That will put it in mbim mode and add the apn to the mc7455

  1. See if your router is in any of the v8 or v9 folders. drive.google.com/drive/folders/ … VNveWx1bDQ If so flash the firmware and go to step 6. If not download the latest lede, preferably or openwrt if you have too (it must be at least a 4.4 kernal) for your router and flash it and proceed to step 4. (You will need an active internet conection to the router in order to install the packages manually)

  2. Install these packages.
    “opkg update” first

opkg install umbim kmod-usb-net-cdc-mbim kmod-usb-net-sierrawireless kmod-usb-serial-wwan kmod-usb-serial-sierrawireless kmod-usb-serial-qualcomm luci comgt screen luci-app-commands watchcat
  1. Download winscp. winscp.net/eng/docs/installation
    Connect to your router using SCP and replace the mbim.sh file with the one in the link.
    dropbox.com/s/p244h2iqg2y47dg/mbim.sh?dl=0

or just copy and paste from here

#!/bin/sh

mask="0"

[ -n "$INCLUDE_ONLY" ] || {
    . /lib/functions.sh
    . ../netifd-proto.sh
    init_proto "$@"
}
#DBG=-v

proto_mbim_init_config() {
    available=1
    no_device=1
    proto_config_add_string "device:device"
    proto_config_add_string apn
    proto_config_add_string pincode
    proto_config_add_string delay
    proto_config_add_string auth
    proto_config_add_string username
    proto_config_add_string password
}

# https://stackoverflow.com/questions/20762575
cdr2mask ()
{
   # Number of args to shift, 255..255, first non-255 byte, zeroes
   set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
   [ $1 -gt 1 ] && shift $1 || shift
   echo ${1-0}.${2-0}.${3-0}.${4-0}
   mask=${1-0}.${2-0}.${3-0}.${4-0}
}

_proto_mbim_setup() {
    local interface="$1"
    local tid=2
    local ret

    local device apn pincode delay
    json_get_vars device apn pincode delay auth username password

    [ -n "$ctl_device" ] && device=$ctl_device

    [ -n "$device" ] || {
        echo "mbim[$$]" "No control device specified"
        proto_notify_error "$interface" NO_DEVICE
        proto_set_available "$interface" 0
        return 1
    }
    [ -c "$device" ] || {
        echo "mbim[$$]" "The specified control device does not exist"
        proto_notify_error "$interface" NO_DEVICE
        proto_set_available "$interface" 0
        return 1
    }

    devname="$(basename "$device")"
    devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)"
    ifname="$( ls "$devpath"/net )"

    [ -n "$ifname" ] || {
        echo "mbim[$$]" "Failed to find matching interface"
        proto_notify_error "$interface" NO_IFNAME
        proto_set_available "$interface" 0
        return 1
    }

    [ -n "$apn" ] || {
        echo "mbim[$$]" "No APN specified"
        proto_notify_error "$interface" NO_APN
        return 1
    }

    [ -n "$delay" ] && sleep "$delay"

    echo "mbim[$$]" "Reading capabilities"
    umbim $DBG -n -d $device caps || {
        echo "mbim[$$]" "Failed to read modem caps"
        proto_notify_error "$interface" PIN_FAILED
        return 1
    }
    tid=$((tid + 1))

    echo "mbim[$$]" "Checking subscriber"
    umbim $DBG -n -t $tid -d $device subscriber || {
        echo "mbim[$$]" "Subscriber init failed"
        proto_notify_error "$interface" NO_SUBSCRIBER
        return 1
    }
    tid=$((tid + 1))

    echo "mbim[$$]" "Register with network"
      umbim $DBG -n -t $tid -d $device registration || {
        echo "mbim[$$]" "Subscriber registration failed"
        proto_notify_error "$interface" NO_REGISTRATION
        return 1
    }
    tid=$((tid + 1))

    echo "mbim[$$]" "Attach to network"
      umbim $DBG -n -t $tid -d $device attach || {
        echo "mbim[$$]" "Failed to attach to network"
        proto_notify_error "$interface" ATTACH_FAILED
        return 1
    }
    tid=$((tid + 1))

    echo "mbim[$$]" "Connect to network"
    while ! umbim $DBG -n -t $tid -d $device connect "$apn" "$auth" "$username" "$password"; do
        tid=$((tid + 1))
        sleep 1;
    done
    tid=$((tid + 1))

    echo "mbim[$$]" "Get IP config"
    CONFIG=$(umbim $DBG -n -t $tid -d $device config) || {
        echo "mbim[$$]" "config failed"
        return 1
    }
    tid=$((tid + 1))

    echo "$CONFIG" > /tmp/ip
    IP=$(cat /tmp/ip |grep ipv4address |grep -E -o "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)")
    NM=$(cat /tmp/ip |grep ipv4address |grep -o '.\{2\}$')
    GW=$(cat /tmp/ip |grep ipv4gateway |grep -E -o "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)")
    DNS=$(cat /tmp/ip |grep ipv4dnsserver |grep -E -o "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" |head -1)

    cdr2mask $NM

    echo "IP: $IP $mask"
    echo "GW: $GW"
    echo "DNS: $DNS"

    uci_set_state network $interface tid "$tid"
    echo "mbim[$$]" "Connected, setting IP"
    proto_init_update "$ifname" 1
    proto_send_update "$interface"

    json_init
    json_add_string name "${interface}_4"
    json_add_string ifname "@$interface"
    json_add_string proto "static"

    ifconfig wwan0 $IP netmask $mask
    route add default gw $GW dev wwan0
    ifup wwan0

    echo "nameserver $DNS" >> /tmp/resolv.conf.auto
    echo "nameserver $DNS" >> /etc/resolv.conf

    echo "$mask"

    return 0
}

proto_mbim_setup() {
    local ret

    _proto_mbim_setup $@
    ret=$?

    [ "$ret" = 0 ] || {
        logger "mbim bringup failed, retry in 15s"
        sleep 15
    }

    return $rt
}

proto_mbim_teardown() {
    local interface="$1"

    local device
    json_get_vars device
    local tid=$(uci_get_state network $interface tid)

    [ -n "$ctl_device" ] && device=$ctl_device

    echo "mbim[$$]" "Stopping network"
    [ -n "$tid" ] && {
        umbim $DBG -t$tid -d "$device" disconnect
        uci_revert_state network $interface tid
    }

    proto_init_update "*" 0
    proto_send_update "$interface"
}

[ -n "$INCLUDE_ONLY" ] || add_protocol mbim

Right click and check the file after you swap it to make sure it’s executable. It should show an x next to x for executable. If not, click the boxes to put the x’s in there.

  1. Once done with the firmware and packages use putty terminal and connect to your router.
    chiark.greenend.org.uk/~sgta … nload.html

Root is the user name and password is what you chose as the password.
Run the following commands. (r.ispsn is the apn for unlimitedville sprint devices. You guys using 4gcommunity or something else will need to confirm its the same apn. If not just change it below.

uci del network.wan
uci set network.wan=interface
uci set network.wan.proto=mbim
uci set network.wan.device=/dev/cdc-wdm0
uci set network.wan.apn=r.ispsn
uci set network.wan.username=
uci set network.wan.password=
uci commit network
reboot

That will put you online.

Plug the modem into the 2.0 usb port. Not the 3.0 port.

If you want to lock bands do this.

This is to set up band 41 25 and 26 locking.

You need to ssh into your router, after you enter the user name and password enter this without quotes
“screen /dev/ttyUSB1”. If usb1 doesn’t work try USB2

OK, what you’re going to need to do is define band 41 25 and 26 in the band list.

To do that, run the following commands with the quotes and all:

at!entercnd=“A710”

at!band=0d,“Sprint (All)”,0,10003000000

at!band=0a,“B41”,0,10000000000

at!band=0b,“B25”,0,00001000000

at!band=0c,“B26”,0,00002000000

To lock to band 41, run:

at!band=0a

to lock 25 run:

at!band=0b

and so on

Custom commands can be used to switch bands and show status directly from the router. You will need the luci app commands package installed.

Place the attached files into /etc/gcom in winscp

dropbox.com/sh/y39e18ferj5a … iDlYa?dl=0

in luci under system /custom commands/ configure put in a description such as “Lock Band 41” then use this command
gcom -d /dev/ttyUSB1 -s /etc/gcom/Band41

“Lock Band 25” then
gcom -d /dev/ttyUSB1 -s /etc/gcom/Band25

and so on for each file using the correct capitalization.

again im not sure which usb your modem is on so you may need to change it.

I set up watchcat for disconects. I set it up for 45 sec. It pings google every 15 sec and reboots if there is no internet for 45 sec.
New method for reconnection**
This works faster and wifi stays up all the time. No need for the local network stop.

Turn off watchcat if you have it running.

Download the files and in winscp put them in the proper folders. Make a “home” folder. Your going to swap your mbim.sh again also.

dropbox.com/s/ce1qm8ep2fssx … 9.zip?dl=0

/etc/init.d/sessionhold.sh
/home/reconn.sh
/home/loopback.sh
/lib/netifd/proto/mbim.sh
Right click and put x’s to make it executable 775 or 777

In the loopback file you can add a static ip for a server. Just change it to what you need it to be.

In the reconn.sh file you can do a trace route in a command prompt and find the first pingable hop. Use that ip instead of 8.8.8.8 in the file.
Just type Tracert 8.8.8.8 in the command prompt
When your done, reboot

Awesome! Thank you so much!! I probably won’t have time to try this until tomorrow evening. If I run into any difficulties, can I ask you questions here?

My first question would be exactly how do I run AT commands? This was never clear to me. And the specific Sprint firmware for the MC7455…I don’t need to install that?

Thank you!
Keith

Yeah. Don’t use the sprint firmware, it won’t work.

Run the initial comands from your computer. Download huawei terminal. Its in Russian but it works good. Connect to the modem port. Type ati and see if it spits out some info. If it does your in. If not try another port.

Also if you have Facebook, join unlimitedville unlimited hotspot group. There’s like 4 guys setting up your exact setup including me and all the info is there.

MC7455 requires raw-ip mode. This feature was added to qmi_wwan in Linux v4.5. The current (trunk) versions of OpenWrt and LEDE are currently using v4.1 or v4.4 kernels for the mvebu target:

bjorn@canardo:/usr/local/src/openwrt$ git grep KERNEL_PATCHVER origin/master:target/linux/mvebu/Makefile
origin/master:target/linux/mvebu/Makefile:KERNEL_PATCHVER:=4.1
bjorn@canardo:/usr/local/src/lede$ git grep KERNEL_PATCHVER origin/master:target/linux/mvebu/Makefile 
origin/master:target/linux/mvebu/Makefile:KERNEL_PATCHVER:=4.4

So, no, this will not work out-of.the box with Openwrt at the moment. Your options are:
a) use the Sierra Wireless supported GobiNet driver, or
b) upgrade the kernel version to v4.5 or newer (v4.8 or v4.9-rcX is recommenced in that case)
c) change the modem to use MBIM, which is supposed to work with the older kernels.

None of these are straight forward. though. I have no idea how to do a), but since it is supported by Sierra you can always get help here. b) is possible, but requires solid knowledge of Linux and the OpenWrt build system. Even if the WRT1900ACS is an “open source” router, the mwlwifi driver is still not mainlined. Not a big problem, but it can cause issues when trying to build a new kernel version. And there are also a few other platform specific kernel patches which needs refresshing. Doable, but not something I’d recommend unless you already have the knowledge. or at least the will to invest a few gray hairs aquiring it :slight_smile: To me, option c) is currently looking like the easiest alternative. But I haven’t tried it on OpenWrt, so I cannot say for sure that it will work out-of-the-box either. The real advantage is that it is easy to test without modifying your OpenWrt system (except maybe installing the necessary mbim driver and userspace packages).

Mbim mode works just fine on openwrt with modified mbim.sh file and using my instructions. I’ve done it multiple times.

Good to know. Thanks.

Why is a modified mbim.sh necessary? Could these changes be submitted to the OpenWrt/LEDE maintainers?

Am looking into getting one of these for OpenWRT, so thanks for all the info here.

One question, when MC7455 is in MBIM mode, how many COM ports are made available for running AT commands, monitoring GPS, etc…?

Also, where are people sourcing the “real” MC7455, not the Dell or Lenovo versions?

Thank you!

I just purchased mine from Future Electronics. They are an approved vendor listed on Sierra’s website. I’m pretty sure it came from stateside as it only took 2 days to get to me!

http://www.futureelectronics.com/en/Technologies/Product.aspx?ProductID=MC74551102476SIERRAWIRELESS9065078&IM=0

I’m not sure why but its been tweaked to work better with the raw ip I suppose.

I believe it only supports one AT command function. MBIM mode does not affect this. You can mix and match functions as you like with the MC7455, although I’m not sure you can combine QMI and MBIM. But that combination doesn’t make sense anyway.

See the list on the Sierra website and find a reseller local to you.

Note that the MC7455 doesn’t come in any “Dell or Lenovo versions”. Only the EM7455 does. As far as I know, at least.

Huh? MBIM is always using raw IP. That’s part of the spec. The Linux cdc_mbim driver hides this by adding a fake ethernet header. But there isn’t anything special with the MC7455 in this regard. And certainly nothing userspace has to worry about. I guess the modified mbim.sh could implement the “FCC auth” thing, if using a recent enough uqmi, but that should not be relevant for the MC7455. We’ve only seen it enabled on Lenovo EM7455s.

In any case, Iæm still interested in seeing the diff and getting it upstream - if it makes any sense

What I really want to know is how I am able to use the mc7455 In generic mode with any sprint sim card in want but I cant use sprint firmware. It gets noticed by sprint and shuts it off for not being provisioned.

What is generic firmware hiding from sprint that the sprint firmware doesn’t? I’m trying to replicate this on a Sprint phone so I can use a data only card in it also.

All the modified lede and openwrt firmwares and the mbim.sh are from a German forum if that answers any questions.

Edited in original post. Disregard

How do I access the MC7455 to run AT commands if the modem won’t “attach” and no drivers are loaded? I installed all the packages mentioned above.

Sorry I’m such a noob. This is all on the router right? How do I connect to the modem port? I’ve connected to the router via ssh (I’m using MobaXterm on my Windows 10 computer).

You do the mc7455 setup from your computer using the heuwii terminal. You do the router setup using putty from your computer. Once your all done plug the mc7455 into the 2.0 port on the router and reboots it.

The changes to mbim.sh are for configuration of DHCP information on the OpenWRT router as these cards do not support dhcp.

The link to the German forum previously mentioned about this change: lteforum.at/mobilfunk/cat-6- … eien.4969/

These instructions/changes are on page 14 of the thread.

I believe this is what was added/changed:

Echo "mbim [$$]" "Get IP config"
     CONFIG = $ (umbim $ DBG -n -t $ tid -d $ device config) ||  {
         Echo "mbim [$$]" "config failed"
         return 1
     }
     Tid = $ ((tid + 1))

     Echo "$ CONFIG"> / tmp / ip
     IP = $ (cat / tmp / ip | grep ipv4address | grep -E -o "(25 [0-5] | 2 [0-4] [0-9] | [01]? [0-9] [0 (25 [0-5] | 2 [0-4] [0-9] | [01]? [0-9] [0-9]?) \. (25 [0- 5] | 2 [0-4] [0-9] | [01]? [0-9] [0-9]?) \. (25 [0-5] | 2 [0-4] [0- 9] | [01]? [0-9] [0-9]?) ")
     NM = $ (cat / tmp / ip | grep ipv4address | grep -o '. \ {2 \} $')
     GW = $ (cat / tmp / ip | grep ipv4gateway | grep -E -o "(25 [0-5] | 2 [0-4] [0-9] | [01]? [0-9] [0 (25 [0-5] | 2 [0-4] [0-9] | [01]? [0-9] [0-9]?) \. (25 [0- 5] | 2 [0-4] [0-9] | [01]? [0-9] [0-9]?) \. (25 [0-5] | 2 [0-4] [0- 9] | [01]? [0-9] [0-9]?) ")
     DNS = $ (cat / tmp / ip | grep ipv4dnsserver | grep -E -o "(25 [0-5] | 2 [0-4] [0-9] | [01]? [0-9] [0 (25 [0-5] | 2 [0-4] [0-9] | [01]? [0-9] [0-9]?) \. (25 [0- 5] | 2 [0-4] [0-9] | [01]? [0-9] [0-9]?) \. (25 [0-5] | 2 [0-4] [0- 9] | [01]? [0-9] [0-9]?) "| Head -1)

     Cdr2mask $ nm

     Echo "IP: $ IP $ mask"
     Echo "GW: $ GW"
     Echo "DNS: $ DNS"

     Uci_set_state network $ interface tid "$ tid"
     Echo "mbim [$$]" "Connected, setting IP"
     Proto_init_update "$ ifname" 1
     Proto_send_update "$ interface"

     json_init
     Json_add_string name "$ {interface} _4"
     Json_add_string ifname "@ $ interface"
     Json_add_string proto "static"

     Ifconfig wwan0 $ IP netmask $ mask
     Route add default gw $ GW dev wwan0
     ifup wwan0

     Echo "nameserver $ DNS" >> /tmp/resolv.conf.auto
     Echo "nameserver $ DNS" >> /etc/resolv.conf

     Echo "$ mask"

OK, I got all the way to where I type in the following:

screen /dev/ttyUSB1

Unfortunately, there are no ttyUSB# at all in the /dev folder. I did every step and everything looked like it completed successfully. There is /dev/cdc-wdm0 so that’s progress.

Under Interfaces/WAN it says “Unsupported protocol type”

What now? :cry: