FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Topics related to ZBT Routers
Forum rules
Use the SEARCH function for related topics PRIOR to posting a new topic on the same subject.
Post Reply
nontheist
Posts: 8
Joined: Sun Apr 15, 2018 5:36 pm
Has thanked: 0
Been thanked: 3 times

FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by nontheist »

I just flashed a dev build from ofmodemsandmen and they mention doing some builds for The Wireless Haven. Not sure if this is the best place to post this but this is a link to the dev builds.

UPDATE 03-08-2019: Our latest WiFiX 2019 version of GoldenOrb contains an internal ping script that runs in the background that resets/reboots the modem upon loss of internet. As always when upgrading a router's firmware, be certain to UNCHECK the box to Save Settings.

All GoldenOrb 2019 stock firmware builds.

The OEM firmware for the WE826 and the WG3526 | WE1326 can be downloaded from HERE
curdean
Posts: 4
Joined: Thu Jul 19, 2018 2:43 pm
Has thanked: 0
Been thanked: 0

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by curdean »

If I tried this firmware, and I wanted to return back to the current golden orb, how would I do that? When I go to the firmware flashing option, it returns an error about not being a correct image format.
Thank you
Curdean
User avatar
JimHelms
Site Admin
Posts: 1362
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Has thanked: 79 times
Been thanked: 194 times
Contact:

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by JimHelms »

curdean wrote: Fri Jul 20, 2018 11:43 am If I tried this firmware, and I wanted to return back to the current golden orb, how would I do that?
If you are down grading from a newer kernel you can use the boot loader mode.
curdean
Posts: 4
Joined: Thu Jul 19, 2018 2:43 pm
Has thanked: 0
Been thanked: 0

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by curdean »

JimHelms wrote: Fri Jul 20, 2018 11:53 am If you are down grading from a newer kernel you can use the boot loader mode.
thank you.
RockinBandit
Posts: 8
Joined: Wed Jul 11, 2018 12:47 am
Has thanked: 0
Been thanked: 0

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by RockinBandit »

New GO Image for WE826 released today.
jameshilliard
Posts: 8
Joined: Wed Oct 03, 2018 1:33 pm
Has thanked: 0
Been thanked: 5 times

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by jameshilliard »

So I recently bought a WG3526-P with the MC7455 LTE modem and needed to update the firmware on the MC7455 but it seems these firmware builds don't have the correct firmware update tools compiled in for some reason, I was able to update it using these firmware files successfully after compiling my own custom OpenWRT firmware with the modemmanager packages.
These are the commands I used to update it:

Code: Select all

qmicli -d /dev/cdc-wdm0 --dms-set-firmware-preference="02.30.01.01,002.045_000,GENERIC"
qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode=offline
qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode=reset
qmi-firmware-update --update-qdl -t /dev/ttyUSB0 SWI9X30C_02.30.01.01.cwe SWI9X30C_02.30.01.01_GENERIC_002.045_000.nvu
FYI the SWI9X30C_02.30.01.01.cwe firmware update file is too large to fit on the onboard flash so I had to put it on a SD card(see this guide for mounting the SD card).

Is there any reason why these tools aren't built into the WiFiX firmware already? I couldn't find another way to update the MC7455 without taking the card out of the router and putting it in an adapter(which I don't have) and connecting to a normal computer to do the update.

By the way where can I find the source code for the WiFiX firmware, it's different from the GoldenOrb firmware source I assume?
User avatar
JimHelms
Site Admin
Posts: 1362
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Has thanked: 79 times
Been thanked: 194 times
Contact:

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by JimHelms »

jameshilliard wrote: Wed Oct 10, 2018 4:36 pm So I recently bought a WG3526-P with the MC7455 LTE modem and needed to update the firmware on the MC7455 but it seems these firmware builds don't have the correct firmware update tools compiled in for some reason
Yes, this would be a great tool to have compiled into the GoldenOrb firmware.
Is there any reason why these tools aren't built into the WiFiX firmware already? I couldn't find another way to update the MC7455 without taking the card out of the router and putting it in an adapter(which I don't have) and connecting to a normal computer to do the update.
There is no specific reason. I generally use a USB to Mini PCI-E adapter to update the firmware or the Sierra Wireless AirVantage platform.

GoldenOrb/ROOter has been around for a good while, but only in the past year has it implemented the drivers and support for the line of Sierra Wireless (and other Mini PCI-e and M.2) modems. The firmware update addition is well worth exploring.

By the way where can I find the source code for the WiFiX firmware, it's different from the GoldenOrb firmware source I assume?
The WiFiX uses a newer kernel that the stable release of GoldenOrb, but it uses the same ROOter packages with a small amount of customization.

You may try THIS which is fairly new. Or, you might want to visit the Whirlpool forum and ask about the latest source code.
jameshilliard
Posts: 8
Joined: Wed Oct 03, 2018 1:33 pm
Has thanked: 0
Been thanked: 5 times

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by jameshilliard »

JimHelms wrote: Wed Oct 10, 2018 5:41 pm Yes, this would be a great tool to have compiled into the GoldenOrb firmware.
I'll attach my build to this post in case anyone needs it, it's essentially stock OpenWRT master with the modemmanager package feed added. I also compiled in the necessary packages for mounting and formatting the SD card. I'm able to flash back and forth between it and the The Wireless Haven GoldenOrb/ROOter builds using the normal webif sysupgrade.
JimHelms wrote: Wed Oct 10, 2018 5:41 pm There is no specific reason. I generally use a USB to Mini PCI-E adapter to update the firmware or the Sierra Wireless AirVantage platform.

GoldenOrb/ROOter has been around for a good while, but only in the past year has it implemented the drivers and support for the line of Sierra Wireless (and other Mini PCI-e and M.2) modems. The firmware update addition is well worth exploring.
I wonder if modemmanager conflicts with the GoldenOrb/ROOter customizations, it seems to use the mmcli tool for configuration of the LTE modem instead of raw AT commands like GoldenOrb/ROOter. Using raw AT commands seems a bit sketchy to me and I suspect it may be the source of reliability issues.
JimHelms wrote: Wed Oct 10, 2018 5:41 pm The WiFiX uses a newer kernel that the stable release of GoldenOrb, but it uses the same ROOter packages with a small amount of customization.

You might want to visit the Whirlpool forum and ask about the source code.
I did a github search and think I found it here.
You do not have the required permissions to view the files attached to this post.
jameshilliard
Posts: 8
Joined: Wed Oct 03, 2018 1:33 pm
Has thanked: 0
Been thanked: 5 times

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by jameshilliard »

I managed to get my WG3526-P to connect to sprint using my custom OpenWRT build(I'm attaching an updated version where I removed a package that could potentially conflict with modemmanager), I had to manually configure a number of the settings.

I set these AT commands, I'm not entirely sure if these are all necessary or if there's a way to do this without using the AT command interface(modemmanager is designed to be used without having to use manual AT commands), the command syntax is a little different from normal, you must escape quotes otherwise you will get errors and you should not put "AT" at the start like normal as mmcli automatically adds it to the start of the command:

Code: Select all

mmcli -m 0 --command=!entercnd=\"A710\"
mmcli -m 0 --command=!usbcomp = 1,1,1009
mmcli -m 0 --command=!selrat=06
mmcli -m 0 --command=!custom=\"IPV6ENABLE\",1
mmcli -m 0 --command=!reset
The mmcli AT command interface only works when you run modemmanager in debug mode, to do this edit the file /etc/init.d/modemmanager and change

Code: Select all

procd_set_param command /usr/sbin/ModemManager
to

Code: Select all

procd_set_param command /usr/sbin/ModemManager --debug
and reboot or restart the modemmanager service.

You'll need to add an entry like this for modemmanager in /etc/config/network, make sure the "option device" line matches what you see in "mmcli -m 0" under System->device, note that the -m flag selects the modem(usually you only have one), you can get a list of your modems using "mmcli -L":

Code: Select all

config interface 'broadband'
	option device '/sys/devices/platform/1e1c0000.xhci/usb1/1-2'
	option proto 'modemmanager'
	option apn 'n.ispsn'
You'll also need to add the "broadband"(or whatever you name the interface in /etc/config/network) interface to the wan zone in /etc/config/firewall otherwise only the router itself will have internet access and not any LAN clients:

Code: Select all

config zone
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	option network 'wan wan6 broadband'
Once I got this working it appears to be more reliable at reconnecting and maintaining a connection compared to other firmware builds probably since modemmanager automatically handles a lot of things instead of a bunch of shell scripts doing AT commands like GoldenOrb/ROOter uses.
You do not have the required permissions to view the files attached to this post.
jameshilliard
Posts: 8
Joined: Wed Oct 03, 2018 1:33 pm
Has thanked: 0
Been thanked: 5 times

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by jameshilliard »

I found that the bearer can sometimes get stuck in a disconnected state, you can run this script as a cronjob every minute to fix it:

Code: Select all

#!/bin/sh

# save dog.sh in /root/dog.sh. 
# You can use winscp with scp protocol to do this.
# Using ssh set executation permission and replace the crontab:
# chmod +x /root/dog.sh
# echo "* * * * * /root/dog.sh" | crontab -

modemmanager_get_field() {
  local text=$1
  local inblock=$2
  local infield=$3
  local fieldindex=${4:-0}

  [ -z "${text}" ] || [ -z "${infield}" ] || [ -z "${inblock}" ] && return

  # Sample output:
  #
  # /org/freedesktop/ModemManager1/Modem/0 (device id '391a4fbdb14113ecdd101a23c927ab1e82c51a8e')
  # -------------------------
  # Hardware |   manufacturer: 'QUALCOMM INCORPORATED'
  #      |      model: '8'
  #      |     revision: '8200C-FACPASZQ-30350  1  [Dec 15 2011 15:00:00]'
  #      |    supported: 'gsm-umts'
  #      |      current: 'gsm-umts'
  #      |   equipment id: '863745010845895'
  # -------------------------
  # System   |       device: '/sys/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.3'
  #      |      drivers: 'option, qmi_wwan'
  #      |       plugin: 'Generic'
  #      |   primary port: 'cdc-wdm0'
  #      |      ports: 'ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi), wwan0 (net)'
  # -------------------------
  # Numbers  |       own : 'unknown'
  # -------------------------
  # Status   |       lock: 'sim-pin2'
  #      | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
  #      |      state: 'registered'
  #      |    power state: 'on'
  #      |    access tech: 'umts'
  #      | signal quality: '54' (recent)
  # -------------------------
  # Modes  |    supported: 'allowed: 2g; preferred: none
  #      |          allowed: 3g; preferred: none
  #      |          allowed: 2g, 3g; preferred: none
  #      |          allowed: 2g, 3g; preferred: 2g
  #      |          allowed: 2g, 3g; preferred: 3g'
  #      |      current: 'allowed: any; preferred: none'
  # -------------------------
  # Bands  |    supported: 'unknown'
  #      |      current: 'unknown'
  # -------------------------
  # IP     |    supported: 'ipv4, ipv6, ipv4v6'
  # -------------------------
  # 3GPP   |       imei: '863745010845895'
  #      |  enabled locks: 'none'
  #      |    operator id: '21401'
  #      |  operator name: 'vodafone ES'
  #      |   subscription: 'unknown'
  #      |   registration: 'home'
  # -------------------------
  # SIM    |       path: '/org/freedesktop/ModemManager1/SIM/0'
  #
  # -------------------------
  # Bearers  |      paths: 'none'

  # Iterate block by block
  echo ${text} | awk '{
      split($0,array,"-------------------------")
      for(i in array) {
        print array[i];
      }
    }' | while read -r line ; do
    # Look for a matching block title
    local block=$(echo ${line} | awk -F '\|' '{print $1}')
    block="$(echo -e "${block}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
    [ "${block}" = "${inblock}" ] && {
      # Iterate field by field
      echo ${line} | awk '{
          split($0,array,"|")
          for(i in array) {
            print array[i];
          }
        }' | while read -r subline ; do
        local field=$(echo ${subline} | awk -F ':' '{print $1}')
        field="$(echo -e "${field}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
        [ "${field}" = "${infield}" ] && {
          local realindex=$(expr 2 \* ${fieldindex} + 2)
          local value=$(echo ${subline} | awk -F "'" "{print \$${realindex}}")
          echo "$value"
          return 0
        }
      done
    }
  done

  # Not found
  return 2
}

modemmanager_list_bearers() {
  /usr/bin/mmcli --modem $1 --list-bearers | grep "/org/freedesktop/ModemManager1/Bearer/" 2>/dev/null
}

modemmanager_get_bearer() {
  local device="$1"

  local bearers n_bearers

  bearers=$(modemmanager_list_bearers "${device}")
  n_bearers=$(echo "${bearers}" | wc -l)
  [ ${n_bearers} -eq 1 ] || return
  echo $bearers
}

# Load connected bearer information
device="0"
bearerpath=$(modemmanager_get_bearer "${device}")
bearerstatus=$(/usr/bin/mmcli --bearer "${bearerpath}")

# Load network interface and method information
beareriface=$(modemmanager_get_field "${bearerstatus}" "Status" "interface")
bearermethod=$(modemmanager_get_field "${bearerstatus}" "IPv4 configuration" "method")
echo "connection setup required in interface ${beareriface}: ${bearermethod}"
if [ $bearermethod = "unknown" ]; then
  echo "connection reset required in interface ${beareriface}: ${bearermethod}"
  ifup broadband
fi
User avatar
latic
Posts: 17
Joined: Tue Mar 13, 2018 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by latic »

James

Just letting you know that your image and config files (network, firewall, modem manager) work with a reset MC7455 and do not require a mode adjust (QMI mode fully working).

Going to run this to see if i'm still getting disconnects etc. before trying a firmware upgrade.
User avatar
JimHelms
Site Admin
Posts: 1362
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Has thanked: 79 times
Been thanked: 194 times
Contact:

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by JimHelms »

JamesO'Hara wrote: Wed Oct 24, 2018 3:37 pm
Going to run this to see if i'm still getting disconnects etc. before trying a firmware upgrade.
Nice, I almost installed it myself on a unit to test...and have added it to list of things I would sure like to do.

Please keep us updated on how it works out.
Twoods196
Posts: 19
Joined: Sat Jan 19, 2019 12:11 pm
Has thanked: 0
Been thanked: 1 time

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by Twoods196 »

Any updates on this firmware? As it would be nice to have modemmanager but seems no responses since October.
User avatar
JimHelms
Site Admin
Posts: 1362
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Has thanked: 79 times
Been thanked: 194 times
Contact:

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by JimHelms »

Twoods196 wrote: Mon Feb 25, 2019 8:14 am Any updates on this firmware? As it would be nice to have modemmanager but seems no responses since October.
For which router?
jameshilliard
Posts: 8
Joined: Wed Oct 03, 2018 1:33 pm
Has thanked: 0
Been thanked: 5 times

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by jameshilliard »

Here's a new build for the WG3526 with updated OpenWRT and modemmanager, seems a little more reliable.
openwrt-ramips-mt7621-zbt-wg3526-16M-squashfs-sysupgrade.bin.zip
The previous cronjob doesn't work with this version, this new one should:

Code: Select all

#!/bin/sh

# save dog.sh in /root/dog.sh. 
# You can use winscp with scp protocol to do this.
# Using ssh set executation permission and replace the crontab:
# chmod +x /root/dog.sh
# echo "* * * * * /root/dog.sh" | crontab -

# This method expects as first argument a list of key-value pairs, as returned by mmcli --output-keyvalue
# The second argument must be exactly the name of the field to read
#
# Sample output:
#     $ mmcli -m 0 -K
#     modem.dbus-path                                 : /org/freedesktop/ModemManager1/Modem/0
#     modem.generic.device-identifier                 : ed6eff2e3e0f90463da1c2a755b2acacd1335752
#     modem.generic.manufacturer                      : Dell Inc.
#     modem.generic.model                             : DW5821e Snapdragon X20 LTE
#     modem.generic.revision                          : T77W968.F1.0.0.4.0.GC.009\n026
#     modem.generic.carrier-configuration             : GCF
#     modem.generic.carrier-configuration-revision    : 08E00009
#     modem.generic.hardware-revision                 : DW5821e Snapdragon X20 LTE
#     ....
modemmanager_get_field() {
  local list=$1
  local field=$2
  local value=""

  [ -z "${list}" ] || [ -z "${field}" ] && return

  # there is always at least a whitespace after each key, and we use that as part of the
  # key matching we do (e.g. to avoid getting 'modem.generic.state-failed-reason' as a result
  # when grepping for 'modem.generic.state'.
  value=$(echo "${list}" | grep "${field} " | awk -F ':' '{print $2}' | awk '{$1=$1};1')

  # not found?
  [ -n "${value}" ] || return 2

  # only print value if set
  [ "${value}" != "--" ] && echo "${value}"
  return 0
}

# Load connected bearer information
device="0"
modemstatus=$(/usr/bin/mmcli --modem="${device}" --output-keyvalue)
bearerpath=$(modemmanager_get_field "${modemstatus}" "modem.generic.bearers.value\[1\]")
bearerstatus=$(/usr/bin/mmcli --bearer "${bearerpath}" --output-keyvalue)

# Load network interface and method information
beareriface=$(modemmanager_get_field "${bearerstatus}" "bearer.status.interface")
[ -n "${beareriface}" ] || {
  echo "couldn't load bearer interface, resetting connection"
  ifup broadband
  exit 0
}

bearermethod=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.method")
[ -n "${bearermethod}" ] || {
  echo "couldn't load bearer method, resetting connection"
  ifup broadband
  exit 0
}
You do not have the required permissions to view the files attached to this post.
peejhaymakots
Posts: 1
Joined: Thu Oct 10, 2019 5:21 am
Has thanked: 0
Been thanked: 0

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by peejhaymakots »

jameshilliard wrote: Fri Sep 06, 2019 12:22 pm Here's a new build for the WG3526 with updated OpenWRT and modemmanager, seems a little more reliable.

openwrt-ramips-mt7621-zbt-wg3526-16M-squashfs-sysupgrade.bin.zip

The previous cronjob doesn't work with this version, this new one should:

Code: Select all

#!/bin/sh

# save dog.sh in /root/dog.sh. 
# You can use winscp with scp protocol to do this.
# Using ssh set executation permission and replace the crontab:
# chmod +x /root/dog.sh
# echo "* * * * * /root/dog.sh" | crontab -

# This method expects as first argument a list of key-value pairs, as returned by mmcli --output-keyvalue
# The second argument must be exactly the name of the field to read
#
# Sample output:
#     $ mmcli -m 0 -K
#     modem.dbus-path                                 : /org/freedesktop/ModemManager1/Modem/0
#     modem.generic.device-identifier                 : ed6eff2e3e0f90463da1c2a755b2acacd1335752
#     modem.generic.manufacturer                      : Dell Inc.
#     modem.generic.model                             : DW5821e Snapdragon X20 LTE
#     modem.generic.revision                          : T77W968.F1.0.0.4.0.GC.009\n026
#     modem.generic.carrier-configuration             : GCF
#     modem.generic.carrier-configuration-revision    : 08E00009
#     modem.generic.hardware-revision                 : DW5821e Snapdragon X20 LTE
#     ....
modemmanager_get_field() {
  local list=$1
  local field=$2
  local value=""

  [ -z "${list}" ] || [ -z "${field}" ] && return

  # there is always at least a whitespace after each key, and we use that as part of the
  # key matching we do (e.g. to avoid getting 'modem.generic.state-failed-reason' as a result
  # when grepping for 'modem.generic.state'.
  value=$(echo "${list}" | grep "${field} " | awk -F ':' '{print $2}' | awk '{$1=$1};1')

  # not found?
  [ -n "${value}" ] || return 2

  # only print value if set
  [ "${value}" != "--" ] && echo "${value}"
  return 0
}

# Load connected bearer information
device="0"
modemstatus=$(/usr/bin/mmcli --modem="${device}" --output-keyvalue)
bearerpath=$(modemmanager_get_field "${modemstatus}" "modem.generic.bearers.value\[1\]")
bearerstatus=$(/usr/bin/mmcli --bearer "${bearerpath}" --output-keyvalue)

# Load network interface and method information
beareriface=$(modemmanager_get_field "${bearerstatus}" "bearer.status.interface")
[ -n "${beareriface}" ] || {
  echo "couldn't load bearer interface, resetting connection"
  ifup broadband
  exit 0
}

bearermethod=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.method")
[ -n "${bearermethod}" ] || {
  echo "couldn't load bearer method, resetting connection"
  ifup broadband
  exit 0
}
Hi James,

I just acquired my wg3526 and barely new on this kind of router. (so please bear with my noob questions :D) I'm planning to buy DW5821e and insert it to my wg3526, I don't need any special configuration and I just need to make the carrier aggregation (and the internet ofcourse :D) works since all rules/etc is terminated on my pfsense multiWAN setup.
So all I have to do is to use the file that you have attached here and the modem should work right? or do I have to change anything. Thanks! (btw the active lte bands in my location are B1, B3, B5, B28, B40 and B42)
jameshilliard
Posts: 8
Joined: Wed Oct 03, 2018 1:33 pm
Has thanked: 0
Been thanked: 5 times

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by jameshilliard »

peejhaymakots wrote: Thu Oct 10, 2019 6:03 am Hi James,

I just acquired my wg3526 and barely new on this kind of router. (so please bear with my noob questions :D) I'm planning to buy DW5821e and insert it to my wg3526, I don't need any special configuration and I just need to make the carrier aggregation (and the internet ofcourse :D) works since all rules/etc is terminated on my pfsense multiWAN setup.
So all I have to do is to use the file that you have attached here and the modem should work right? or do I have to change anything. Thanks! (btw the active lte bands in my location are B1, B3, B5, B28, B40 and B42)
Well you need to configure the network interface(config at /etc/config/network) as well.

This is what I added for sprint:

Code: Select all

config interface 'broadband'
	option device '/sys/devices/platform/1e1c0000.xhci/usb1/1-2'
	option proto 'modemmanager'
	option apn 'r.ispsn'
Here's an updated cron script that seems to be more reliable as well:

Code: Select all

#!/bin/sh

# save dog.sh in /root/dog.sh. 
# You can use winscp with scp protocol to do this.
# Using ssh set executation permission and replace the crontab:
# chmod +x /root/dog.sh
# echo "* * * * * /root/dog.sh" | crontab -

# This method expects as first argument a list of key-value pairs, as returned by mmcli --output-keyvalue
# The second argument must be exactly the name of the field to read
#
# Sample output:
#     $ mmcli -m 0 -K
#     modem.dbus-path                                 : /org/freedesktop/ModemManager1/Modem/0
#     modem.generic.device-identifier                 : ed6eff2e3e0f90463da1c2a755b2acacd1335752
#     modem.generic.manufacturer                      : Dell Inc.
#     modem.generic.model                             : DW5821e Snapdragon X20 LTE
#     modem.generic.revision                          : T77W968.F1.0.0.4.0.GC.009\n026
#     modem.generic.carrier-configuration             : GCF
#     modem.generic.carrier-configuration-revision    : 08E00009
#     modem.generic.hardware-revision                 : DW5821e Snapdragon X20 LTE
#     ....
modemmanager_get_field() {
  local list=$1
  local field=$2
  local value=""

  [ -z "${list}" ] || [ -z "${field}" ] && return

  # there is always at least a whitespace after each key, and we use that as part of the
  # key matching we do (e.g. to avoid getting 'modem.generic.state-failed-reason' as a result
  # when grepping for 'modem.generic.state'.
  value=$(echo "${list}" | grep "${field} " | awk -F ':' '{print $2}' | awk '{$1=$1};1')

  # not found?
  [ -n "${value}" ] || return 2

  # only print value if set
  [ "${value}" != "--" ] && echo "${value}"
  return 0
}

# Load connected bearer information
devices=$(/usr/bin/mmcli -L --output-keyvalue)
device=$(modemmanager_get_field "${devices}" "modem-list.value\[1\]")
[ -n "${device}" ] || {
  echo "couldn't load device interface, resetting connection"
  ifup broadband
  exit 0
}
modemstatus=$(/usr/bin/mmcli --modem="${device}" --output-keyvalue)
enabledstatus=$(modemmanager_get_field "${modemstatus}" "modem.generic.state")
if [ "${enabledstatus}" = disabled ]; then
  echo "modem is disabled, enabling"
  /usr/bin/mmcli --modem="${device}" --enable
  exit 0
fi
bearerpath=$(modemmanager_get_field "${modemstatus}" "modem.generic.bearers.value\[1\]")
bearerstatus=$(/usr/bin/mmcli --bearer "${bearerpath}" --output-keyvalue)

# Load network interface and method information
beareriface=$(modemmanager_get_field "${bearerstatus}" "bearer.status.interface")
[ -n "${beareriface}" ] || {
  echo "couldn't load bearer interface, resetting modemmanager"
  /etc/init.d/modemmanager restart
  exit 0
}

bearermethod=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.method")
[ -n "${bearermethod}" ] || {
  echo "couldn't load bearer method, resetting connection"
  ifup broadband
  exit 0
}
teg50886
Posts: 1
Joined: Fri Aug 14, 2020 7:52 pm
Has thanked: 0
Been thanked: 0

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by teg50886 »

i have a wg3526 and i want to use a vpn to tunnel all my traffic. i get one l2tp vpn setup with the stock firmware but would like something with more speed. with no vpn i get about 80 mbps and with the l2tp i get about 25 mpbs. i would like to utilize the full speed of the connection. will another protocol be faster like going to openvpn? and if so how can i get another firmware to flash to the device. everything i tried does not flash.
jameshilliard
Posts: 8
Joined: Wed Oct 03, 2018 1:33 pm
Has thanked: 0
Been thanked: 5 times

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by jameshilliard »

teg50886 wrote: Fri Aug 14, 2020 7:55 pm will another protocol be faster like going to openvpn?
You might try using wireguard.
teg50886 wrote: Fri Aug 14, 2020 7:55 pm everything i tried does not flash.
Did you try my firmware above?
jameshilliard
Posts: 8
Joined: Wed Oct 03, 2018 1:33 pm
Has thanked: 0
Been thanked: 5 times

Re: FIRMWARE FOR WE826 | WG3526 | WE3926 | WE1326 | WE1026

Post by jameshilliard »

I updated the builds to the latest OpenWRT release candidate with some additional packages like modemmanager and USB/filesystem support needed for mounting external storage(required for modem firmware updates since modem firmware is too big to fit into ram/flash).

ModemManager's OpenWRT integration seems to be significantly improved, the reset script isn't needed anymore looks like.
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “ZBT Routers”