openwrt/target/linux
Davide Fioravanti 92780d80ab ramips: add support for Winstars WS-WN583A6
The Winstars WS-WN583A6 is a wireless repeater with 2 gigabit ethernet
ports. Even if mine is branded as "Gemeita AC2100", the sticker on the
back says WS-WN583A6. So I will refer to it as Winstars WS-WN583A6.
Probably the real product name is the Wavlink WL-WN583A6 because of
the many references to Wavlink in the OEM firmware and bootlog.

Hardware
--------
SoC:   Mediatek MT7621AT (880 MHz, 2 cores 4 threads)
RAM:   128MB
FLASH: 8MB NOR (GigaDevice GD25Q64B)
ETH:   2x 10/100/1000 Mbps Ethernet (MT7530)
WIFI:
  - 2.4GHz: 1x MT7603E (2x2:2)
  - 5GHz:   1x MT7615E (4x4:4)
  - 6 internal antennas
BTN:
  - 1x Reset button
  - 1x WPS button
  - 1x ON/OFF switch (working but unmodifiable)
  - 1x Auto/Schedule switch (working but unmodifiable. Read Note #3)
LEDS:
  - 1x White led
  - 1x Red led
  - 1x Amber led
  - 1x Blue led
  - 2x Blue leds (lan and wan port status: working but unmodifiable)
UART:
  - 57600-8-N-1

Everything works correctly.

Currently there is no firmware update available. Because of this, in
order to restore the OEM firmware, you must firstly dump the OEM
firmware from your router before you flash the OpenWrt image.

Backup the OEM Firmware
-----------------------
The following steps are to be intended for users having little to none
experience in linux. Obviously there are many ways to backup the OEM
firmware, but probably this is the easiest way for this router.
Procedure tested on M83A6.V5030.191210 firmware version.

1) Go to http://192.168.10.1/webcmd.shtml

2) Type the following line in the "Command" input box:
	mkdir /etc_ro/lighttpd/www/dev; for i in /dev/mtd*ro; do dd if=${i} of=/etc_ro/lighttpd/www${i}; done

3) Click "Apply"

4) After few seconds, in the textarea should appear this output:
		16384+0 records in
	16384+0 records out
	8388608 bytes (8.0MB) copied, 4.038820 seconds, 2.0MB/s
	384+0 records in
	384+0 records out
	196608 bytes (192.0KB) copied, 0.095180 seconds, 2.0MB/s
	128+0 records in
	128+0 records out
	65536 bytes (64.0KB) copied, 0.032020 seconds, 2.0MB/s
	128+0 records in
	128+0 records out
	65536 bytes (64.0KB) copied, 0.031760 seconds, 2.0MB/s
	15744+0 records in
	15744+0 records out
	8060928 bytes (7.7MB) copied, 3.885280 seconds, 2.0MB/s
	dd: can't open '/dev/mtd5ro': No such device
	dd: can't open '/dev/mtd6ro': No such device
	dd: can't open '/dev/mtd7ro': No such device

   Excluding the "X.XXXXXX seconds" part, you should get the same
   exact output. If your output doesn't match mine, stop reading
   and ask for help in the forum.

5) Open the following links to download the partitions of the OEM FW:
	http://192.168.10.1/dev/mtd0ro
	http://192.168.10.1/dev/mtd1ro
	http://192.168.10.1/dev/mtd2ro
	http://192.168.10.1/dev/mtd3ro
	http://192.168.10.1/dev/mtd4ro

   If one (or more) of these files weight 0 byte, stop reading and ask
   for help in the forum.

6) Store these downloaded files in a safe place.

7) Reboot your router to remove any temporary file from your router.

Installation
------------
Flash the initramfs image in the OEM firmware interface.
When openwrt boots, flash the sysupgrade image otherwise you won't be
able to keep configuration between reboots.

Restore OEM Firmware
--------------------
Flash the "mtd4ro" file you previously backed-up directly from LUCI.
Warning: Remember to not keep settings!
Warning2: Remember to force the flash.

Notes
-----
1) The "System Command" page allows to run every command as root.
   For example you can use "dd" and "nc" to backup the OEM firmware.
   PC (SERVER):
	nc -l 5555 > ./mtdXro
   ROUTER (CLIENT):
	dd if=/dev/mtdXro | nc PC_IP_ADDRESS 5555

2) The OEM web interface accepts only images containing the string
   "WN583A6" in the filename.
   Currently the OEM interface accepts only the initramfs image
   probably because it checks if the ih_size in the image header is
   equal to the whole image size (instead of the kernel size)
   Read more here:
   https://forum.openwrt.org/t/support-for-strong-1200/22768/19

3) The white led (namely "Smart Night Light") can be controller by the
   user only if the side switch is set to "Schedule" otherwise it will
   be activated by the light condition (there is a photodiode on the
   top side of the router)

4) Router mac addresses:

   LAN		XX:XX:XX:XX:XX:8F
   WAN		XX:XX:XX:XX:XX:90
   WIFI 2G	XX:XX:XX:XX:XX:91
   WIFI 5G	XX:XX:XX:XX:XX:92

   LABEL	XX:XX:XX:XX:XX:91

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
[remove chosen node, fix whitespace]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-25 21:04:11 +02:00
..
apm821xx apm821xx: derive DEVICE_DTS from device name 2020-07-21 11:56:35 +02:00
ar71xx ar71xx: Fix mikrotik NAND compile problem 2020-07-07 23:38:10 +02:00
arc770 arc770: use generic 02_sysinfo 2020-07-22 18:28:09 +02:00
archs38 archs38: use generic 02_sysinfo 2020-07-22 18:28:09 +02:00
armvirt armvirt,x86: fix build breakage of crypto ccp module 2020-06-23 09:29:00 +02:00
at91 treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
ath25 treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
ath79 ath79: re-enable image generation for GL-AR750S 2020-07-22 17:18:55 +02:00
bcm27xx kernel: bump 5.4 to 5.4.52 2020-07-17 11:00:33 +02:00
bcm47xx bcm47xx: fix switch setup for Linksys WRT610N v2 2020-07-21 11:55:31 +02:00
bcm53xx kernel: Update kernel 4.19 to version 4.19.131 2020-07-04 21:12:42 +02:00
bcm63xx bcm63xx: R5010UNv2: fix flash partitions for 16MB flash 2020-07-11 15:47:46 +02:00
cns3xxx kernel: Update kernel 4.19 to version 4.19.131 2020-07-04 21:12:42 +02:00
gemini treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
generic kernel: bump 5.4 to 5.4.52 2020-07-17 11:00:33 +02:00
imx6 treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
ipq40xx ipq40xx: support reset button for WPJ419 2020-07-23 12:56:58 +02:00
ipq806x ipq806x: really fix aliases node for Qualcomm IPQ8064/DB149 2020-07-14 17:02:40 +02:00
ipq807x treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
kirkwood kernel: bump 5.4 to 5.4.52 2020-07-17 11:00:33 +02:00
lantiq lantiq: Fix warning in SPI driver 2020-07-23 23:39:56 +02:00
layerscape layerscape: fix indent 2020-07-21 11:51:51 +02:00
malta malta: add missing symbols for kernel 5.4 2020-06-03 10:50:01 +01:00
mediatek kernel: bump 5.4 to 5.4.52 2020-07-17 11:00:33 +02:00
mpc85xx kernel: Update kernel 5.4 to version 5.4.50 2020-07-04 21:12:42 +02:00
mvebu kernel: bump 5.4 to 5.4.52 2020-07-17 11:00:33 +02:00
mxs kernel: bump 5.4 to 5.4.28 2020-03-28 13:03:02 +01:00
octeon treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
octeontx treewide: kernel: drop redundant USB_EHCI_HCD=n config symbol 2020-07-09 10:28:40 +02:00
omap omap: derive DEVICE_DTS from device name 2020-07-21 11:57:22 +02:00
oxnas oxnas: use vendor_model scheme for ox810se 2020-07-25 21:04:11 +02:00
pistachio kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 21:12:42 +02:00
ramips ramips: add support for Winstars WS-WN583A6 2020-07-25 21:04:11 +02:00
rb532 treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
rockchip rockchip: don't disable timer LED trigger 2020-07-13 17:50:53 +02:00
samsung kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 21:12:42 +02:00
sunxi sunxi: add text referencing Allwinner H3 and H5 CPUs 2020-06-27 00:19:13 +02:00
tegra tegra: correct cpu subtype 2020-03-28 22:58:36 +01:00
uml treewide: Remove self from MAINTAINER entries 2019-12-23 13:18:04 -08:00
x86 kernel/pcengines-apu2: detect apuv4 board 2020-07-06 17:57:33 +02:00
zynq zynq: switch to kernel 5.4 2020-03-17 00:51:48 +01:00
Makefile build: add 'make kernel_xconfig' command 2020-07-08 16:07:05 +02:00