Modify

Opened 3 years ago

Last modified 19 months ago

#19996 reopened enhancement

Add support for ZBT WE-826

Reported by: oskari.rauta@… Owned by: developers
Priority: highest Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: zbt, we Cc:

Description

I purchased a router which wasn't officially supported by OpenWRT.

Unofficially it was, since it was already running a version of OpenWRT, but I wanted to create my own build, so I needed to add support for it. Some information about the device follows:

Manufacturer: ZBT
Model: WE-826

Runs on Ralink(Mediatek) MT7620A v2 evaluation board.
Flash: 16mb
RAM: 128mb
CPU: 580mhz

Connectivity:
10/100mb (no gigabit network)
b/g/n rated wireless

Ports:
1xWAN
4xLAN
1xUSB
1xMicroSD-slot

Buttons:
Reset-button

Inside:
1xE-PCI

Optional (by manufacturer, uses the pic-express slot inside, only 1 of these at time):

  • 11AC module
  • 3G module
  • 4G/LTE module (for europe, Huawei me909u-521, used either with pop or ncm)

Device is very small. Patch allows one to build a working image (actually, contains less error messages than firmware that it shipped with).

Work still to be done:

  • I was able to control only WIFI led. No control over power/system led, USB led or WPS led.

Attachments (4)

openwrt-zbt-we826-support.patch (5.3 KB) - added by oskari.rauta@… 3 years ago.
Support for router ZBT WE-826
openwrt-zbt-we826-support-v2.patch (5.4 KB) - added by oskari.rauta@… 3 years ago.
Improved support for ZBT-WE826. Replaces previous patch.
openwrt-zbt-we826-support-v3.patch (6.1 KB) - added by linvinus 2 years ago.
openwrt-zbt-we826-support-v4.patch (6.0 KB) - added by shmygov 2 years ago.
Improved support for ZBT-WE826. Updated for OpenWrt version r48640.

Download all attachments as: .zip

Change History (42)

Changed 3 years ago by oskari.rauta@…

Support for router ZBT WE-826

comment:1 Changed 3 years ago by oskari.rauta@…

And yes, I purchased it with 4g/lte module.

One might want to know where to purchase this wonderful device like ( or where to get more information) so I provide links here..
On these pages, are also some pictures that could be added to wiki's TOH.

For mass purchases: http://zbt.en.alibaba.com/product/60077445181-800783994/openWRT_3G_4G_WIRELESS_router_with_one_SD_card_slot_one_SIM_card_slot_One_USB_slot_MT7620A_Chipset_.html

and for single purchase: http://www.aliexpress.com/item/OpenWRT-4g-wireless-router-with-sim-card-slot/32267174504.html

comment:2 Changed 3 years ago by swalker

  • Resolution set to not_a_bug
  • Status changed from new to closed

comment:3 Changed 3 years ago by oskari.rauta@…

TOH entry added to OpenWRT wiki at here: http://wiki.openwrt.org/toh/zbt/we-826

comment:4 Changed 3 years ago by th@…

HI
I have this model with the Huawei me909u-521 Lte card
but I can't get it to run LTE 4G only 3G
is there anything in the openWRT i have to change

hope someone know somthing about this

comment:5 Changed 3 years ago by anonymous

Make sure the chip MT7620A nice ZBT-WE826 wifi car dual band loook here https://downloads.openwrt.org/chaos_calmer/15.05-rc2/ramips/mt7620/

comment:6 Changed 3 years ago by anonymous

what to use ?

comment:7 Changed 3 years ago by anonymous

have anybody tested the SDcard slot? i tried to compile with kmod-mmc but nothing is working.

comment:8 Changed 3 years ago by oskari.rauta@…

I have a new patch set that enables support of sdcard and more..
Hold on a while and I'll post it..

Changed 3 years ago by oskari.rauta@…

Improved support for ZBT-WE826. Replaces previous patch.

comment:9 Changed 3 years ago by oskari.rauta@…

Patch v2 changes are in .DTS file and this is the list of changes:

  • pciE supported.
  • sdcard supported.
  • more gpio, uart, and so on peripherals supported.

What is left for to do, before support for ZBT-WE826 is perfect?

Network configuration should support switch of ZBT WE826. Add this to /etc/config/network:

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 1 2 3 5 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '4 6t'

For ZBT-WE826 target, following should be automatically included in the build as default:

  • kmod-scsi-core, kmod-scsi-generic, kmod-mmc, kmod-sdhci and kmod-sdhci-mt7620 for MMC/sdcard support
  • possibly userland support for mmc (block-mount)
  • kmod-mt76 (wireless driver) atleast as a module, even though wireless works without it.

As I have provided other support, maybe someone else can modify ZBT-WE826 target to include these as a default..?
Since I am currently working with another project..?

comment:10 Changed 3 years ago by anonymous

anyone that got it to work with 4G LTE ?

comment:11 Changed 3 years ago by Oskari.rauta@…

I tryied only with 3G - success.
But you should be able to use 4g as well. Use with ncm and fix modes in ncm.json

comment:12 Changed 3 years ago by Oskari.rauta@…

I tryied only with 3G - success.
But you should be able to use 4g as well. Use with ncm and fix modes in ncm.json

comment:13 follow-up: Changed 2 years ago by markit

LTE is working fine for me (got ~100mbit out of it)

I have a WE826-T (It has a metal case but otherwise same board) and installed mini-pcie modem myself, but its also a me909u-521.
I directly used AT-Commands to configure it, and it works fine.

AT^NDISDUP=1,1,"$NDISAPN","$NDISUSER","$NDISPASS",2
OK

...

AT^HCSQ?
^HCSQ: "LTE" 61 52 217 14
OK

Last edited 2 years ago by markit (previous) (diff)

comment:14 Changed 2 years ago by linvinus

There is new patch for latest trunk, previous is broken because of new zbt-wr8305rt in trunk.

(openwrt-zbt-we826-support-v3.patch)

#comment:9

What is left for to do, before support for ZBT-WE826 is perfect?
Network configuration should support switch of ZBT WE826

done

For ZBT-WE826 target, following should be automatically included in the build as default:

done

 Target System (Ralink RT288x/RT3xxx)  --->
 Subtarget (MT7620 based boards)  --->     
 Target Profile (ZBT WE-826)  ---> 

how to upload openwrt firmware for first time:
follow instruction http://wiki.openwrt.org/toh/zbt/we-826#debricking
as firmware file use "openwrt-ramips-mt7620-zbt-we826-squashfs-sysupgrade.bin"

after reboot follow instructions from http://wiki.openwrt.org/ru/doc/howto/firstlogin

to install luci, login to router and uncomment repositories

#vi /etc/opkg/distfeeds.conf

src/gz chaos_calmer_base http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/base
src/gz chaos_calmer_packages http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/packages
src/gz chaos_calmer_luci http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/luci
src/gz chaos_calmer_routing http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/routing
src/gz chaos_calmer_telephony http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/telephony
src/gz chaos_calmer_management http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/management
src/gz chaos_calmer_targets http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/packages/targets

Last edited 2 years ago by linvinus (previous) (diff)

Changed 2 years ago by linvinus

comment:15 Changed 2 years ago by markit

Btw did anyone managed to change usb or system led?
As in current patch they are in the .dts, but for me it looks like system (red) is always on, and usb is likely hardwired to the minpcie slot.

So only wifi leds seems controllable.

I also did following (but not yet nicely cleaned up) to get working failsafe mode.

Questionable is whether there are currently any MT7620N or MT7620A based routers with working failsafe mode.
(I somewhat doubt this, but i only own 4 or 5 different MT6720* based routers)

diff --git a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
index cae6396..4adc8fe 100644
--- a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
+++ b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
@@ -6,12 +6,21 @@
 . /lib/ramips.sh
 
 ramips_set_preinit_iface() {
-       RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350|MT7628)"`
+       RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350|MT7628|MT7620)"`
        if [ -n "${RT3X5X}" ]; then
                swconfig dev rt305x set reset 1
        fi
 
-       if echo $RT3X5X | egrep -q "(RT5350|MT7628)"; then
+       if echo $RT3X5X | egrep -q "(MT7620)"; then
+               switch=mt7620
+               swconfig dev $switch set reset 1
+               swconfig dev $switch set enable_vlan 1
+               swconfig dev $switch vlan 1 set ports "0 1 2 3 4 5 6t"
+               swconfig dev $switch set apply 1
+               vconfig add eth0 1
+               ifconfig eth0 up
+               ifname=eth0.1
+       elif echo $RT3X5X | egrep -q "(RT5350|MT7628)"; then
                # This is a dirty hack to get by while the switch
                # problem is investigated. When VLAN is disabled, ICMP
                # pings work as expected, but TCP connections time

Last edited 2 years ago by markit (previous) (diff)

comment:16 Changed 2 years ago by anonymous

Could someone tell me how to apply this patch to the buildroot?

comment:17 Changed 2 years ago by anonymous

git clone git://git.openwrt.org/openwrt.git b

patch -p 0 < openwrt-zbt-we826-support-v3.patch

comment:18 Changed 2 years ago by anonymous

I tried to patch that using the v3.patch provided above and I get:

~/build/zbt_wb_826$ patch -p 0 < openwrt-zbt-we826-support-v3.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:


|diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
|index 71cf3ac..94d706b 100755

a/target/linux/ramips/base-files/etc/board.d/01_leds

|+++ b/target/linux/ramips/base-files/etc/board.d/01_leds


File to patch:

What am I missing?

This was from a fresh clone:

git clone git://git.openwrt.org/15.05/packages.git

???

comment:19 Changed 2 years ago by anonymous

  • Resolution not_a_bug deleted
  • Status changed from closed to reopened

Anyone find the problem that caused "can't find file to patch at input line" error? I'm stuck there really appreciate the help.

comment:20 Changed 2 years ago by nbd

  • Resolution set to not_a_bug
  • Status changed from reopened to closed

comment:21 Changed 2 years ago by Muneer

what is the version of openwrt that this patches can be applied?

I am trying on 15.05 chaos, and getting error..

`can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:


|diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
|index 545bd70..d6bcb96 100755

a/target/linux/ramips/base-files/etc/board.d/01_leds

|+++ b/target/linux/ramips/base-files/etc/board.d/01_leds`

any clues please..

comment:22 Changed 2 years ago by remco@…

v3 patch fails on 15.05 on 02_network and platform.sh patches

Manually adjusted source files according to patch file

Build went without errors but bricks the Router (not permanently though).

comment:23 Changed 2 years ago by augustus_meyer@…

  • Resolution not_a_bug deleted
  • Status changed from closed to reopened

Pls, fix the v3 patch.

comment:24 Changed 2 years ago by nbd

  • Resolution set to not_a_bug
  • Status changed from reopened to closed

Changed 2 years ago by shmygov

Improved support for ZBT-WE826. Updated for OpenWrt version r48640.

comment:25 Changed 2 years ago by shmygov

Patch v4 replaces previous patch v3, there are only some minor changes compared to v3:

  • device names follow alphabetic order
  • instead of separate target/linux/ramips/mt7620/profiles/zbt-we826.mk add device to target/linux/ramips/mt7620/profiles/zbt.mk

My ZBT-WE826 is working fine with this patch.
I think this patch should be submitted to OpenWrt team.
Here is how to use the patch:

  1. Get the OpenWrt source (the patch was tested with source version r48640):

git clone git://git.openwrt.org/openwrt.git

  1. Download attached patch openwrt-zbt-we826-support-v4.patch and copy it to the root directory of OpenWrt source.
  1. Apply the patch:

patch -p1 -i openwrt-zbt-we826-support-v4.patch

  1. Get the feed you want:

./scripts/feeds update -a
./scripts/feeds install luci
./scripts/feeds install luci-proto-ppp
./scripts/feeds install luci-proto-3g

  1. Clear the /tmp folder
  1. Configure:

make menuconfig

In the configuration menu, you need to select the following options:

Target System (Ralink RT288x/RT3xxx)
Subtarget (MT7620 based boards)
Target Profile (ZBT-WE826 Device)

  1. Finally, build the firmware:

make

comment:26 Changed 2 years ago by nbd

Please submit it according to SubmittingPatches

comment:27 follow-up: Changed 2 years ago by jamie@…

shmygov, I'd be more than happy to formally submit this patch. Are you OK with that?

comment:28 in reply to: ↑ 13 Changed 2 years ago by anonymous

sorry gents a bit stuck how do I get the 3g modem working? when I check in luci I cannot find the device (mu709s-6), do I need to get a driver for it?

Replying to markit:

LTE is working fine for me (got ~100mbit out of it)

I have a WE826-T (It has a metal case but otherwise same board) and installed mini-pcie modem myself, but its also a me909u-521.
I directly used AT-Commands to configure it, and it works fine.

AT^NDISDUP=1,1,"$NDISAPN","$NDISUSER","$NDISPASS",2
OK

...

AT^HCSQ?
^HCSQ: "LTE" 61 52 217 14
OK

comment:29 in reply to: ↑ 27 Changed 2 years ago by shmygov

Replying to jamie@…:

shmygov, I'd be more than happy to formally submit this patch. Are you OK with that?

Let's ask oskari.rauta, he wrote original versions v1 and v2

comment:30 follow-up: Changed 2 years ago by jamie@…

I'm using the WE826 with a FAT-formatted SD card (Toshiba, class 10). It works for a few minutes, then I get lots of read errors before it stops completely.

Mon Feb 15 18:11:25 2016 kern.err kernel: [  985.782488] mmcblk0: error -5 transferring data, sector 45, nr 1, cmd response 0x900, card status 0x0
Mon Feb 15 18:11:25 2016 kern.warn kernel: [  985.815127] mmc0: tried to reset card
Mon Feb 15 18:11:25 2016 kern.err kernel: [  985.819148] mmcblk0: error -5 transferring data, sector 45, nr 1, cmd response 0x900, card status 0x0
Mon Feb 15 18:11:25 2016 kern.err kernel: [  985.828608] blk_update_request: I/O error, dev mmcblk0, sector 45
Mon Feb 15 18:11:25 2016 kern.err kernel: [  985.835206] FAT-fs (mmcblk0p1): FAT read failed (blocknr 43)

Any ideas on what may be causing this? I've tried other SD cards but it's extremely temperamental. Anecdotally, it works better with slower (class 4) cards. Anyone get any suggestions? This also has a PCIE modem.

comment:31 in reply to: ↑ 30 ; follow-up: Changed 2 years ago by anonymous

Replying to jamie@…:

Any ideas on what may be causing this? I've tried other SD cards but it's extremely temperamental. Anecdotally, it works better with slower (class 4) cards. Anyone get any suggestions? This also has a PCIE modem

sorry not really an answer but did you manage to get the pcie modem working? which model is it?

comment:32 in reply to: ↑ 31 Changed 2 years ago by jamie@…

Replying to anonymous:

Replying to jamie@…:

Any ideas on what may be causing this? I've tried other SD cards but it's extremely temperamental. Anecdotally, it works better with slower (class 4) cards. Anyone get any suggestions? This also has a PCIE modem

sorry not really an answer but did you manage to get the pcie modem working? which model is it?

Huawei MU609. I followed one of the guides here:
http://trac.gateworks.com/wiki/wireless/modem
Requires the usb-serial-option package. You can then add it using luci

comment:33 Changed 2 years ago by jamie@…

Support for WE-826 added to trunk:
/changeset/48865.html

comment:34 Changed 22 months ago by herveld@…

Any idea on how to get SD card in RW mode ?

/dev/mmcblk0p1 always appears as read-only device.

comment:35 Changed 20 months ago by silverk

  • Resolution not_a_bug deleted
  • Status changed from closed to reopened

Not only p1 but whole card seems to be read only.

[    9.514149] MTK MSDC device init.
[    9.530724] mtk-sd: MediaTek MT6575 MSDC Driver
[    9.561221] sdhci: Secure Digital Host Controller Interface driver
[    9.567540] sdhci: Copyright(c) Pierre Ossman
[    9.576730] sdhci-pltfm: SDHCI platform and OF driver helper
[    9.891958] mmc0: new high speed SDHC card at address 1234
[    9.897938] mmcblk mmc0:1234: no of_node; not parsing pinctrl DT
[    9.899759] mmcblk0: mmc0:1234 SA04G 3.65 GiB (ro)
[    9.907567]  mmcblk0: p1 p2

comment:36 follow-up: Changed 20 months ago by augustus_meyer@…

Having also the problem of SD card to be RO, I got following info from ZBT, be applied against the build src:

  • edit ../drivers/mmc/host/mtk-mmc/board.h:

modify "#define MSDC_WP_PIN_EN (1<<1)"
to
"#define MSDC_WP_PIN_EN (0<<1)"

  • edit ../drivers/mmc/host/mtk-mmc/sd.c:

modify "#define MSDC_WP_PIN_EN (1<<1)"

to
"#define MSDC_WP_PIN_EN (0<<1)"

and recompile. This worked for me.
As I am not familar with the official patch procedure, one of the developers might take care of this, as it most likely also applies to other MT7620-based boards.
Kudos to ZBT customers service.

comment:37 in reply to: ↑ 36 Changed 19 months ago by silverk

Replying to augustus_meyer@…:

Having also the problem of SD card to be RO, I got following info from ZBT, be applied against the build src:

  • edit ../drivers/mmc/host/mtk-mmc/board.h:

modify "#define MSDC_WP_PIN_EN (1<<1)"
to
"#define MSDC_WP_PIN_EN (0<<1)"

  • edit ../drivers/mmc/host/mtk-mmc/sd.c:

modify "#define MSDC_WP_PIN_EN (1<<1)"

to
"#define MSDC_WP_PIN_EN (0<<1)"

and recompile. This worked for me.
As I am not familar with the official patch procedure, one of the developers might take care of this, as it most likely also applies to other MT7620-based boards.
Kudos to ZBT customers service.

Thank you!

there is allready patch

0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch

which shall be fixed. Does anybody know should I make new ticket or will this one do the job?

Needed fix diff:

diff --git a/target/linux/ramips/patches-4.4/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch b/target/linux/ramips/patches-4.4/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
index 7ac0aba..c0d0d3d 100644
--- a/target/linux/ramips/patches-4.4/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
+++ b/target/linux/ramips/patches-4.4/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
@@ -157,7 +157,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +typedef void (*pm_callback_t)(pm_message_t state, void *data);
 +
 +#define MSDC_CD_PIN_EN      (1 << 0)  /* card detection pin is wired   */
-+#define MSDC_WP_PIN_EN      (1 << 1)  /* write protection pin is wired */
++#define MSDC_WP_PIN_EN      (0 << 1)  /* write protection pin is not wired */
 +#define MSDC_RST_PIN_EN     (1 << 2)  /* emmc reset pin is wired       */
 +#define MSDC_SDIO_IRQ       (1 << 3)  /* use internal sdio irq (bus)   */
 +#define MSDC_EXT_SDIO_IRQ   (1 << 4)  /* use external sdio irq         */
@@ -1825,7 +1825,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +
 +#define MSDC_SMPL_FALLING   (1)
 +#define MSDC_CD_PIN_EN      (1 << 0)  /* card detection pin is wired   */
-+#define MSDC_WP_PIN_EN      (1 << 1)  /* write protection pin is wired */
++#define MSDC_WP_PIN_EN      (0 << 1)  /* write protection pin is not wired */
 +#define MSDC_REMOVABLE      (1 << 5)  /* removable slot                */
 +#define MSDC_SYS_SUSPEND    (1 << 6)  /* suspended by system           */
 +#define MSDC_HIGHSPEED      (1 << 7)

comment:38 Changed 19 months ago by gadtechsystems@…

please i have updated the firm ware of my halo funbox wireless router with the zbtlink we826 but the network bar has reduce to only 2. please why so? is there anything i can do

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.