You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Markus Bergholz f3c922034a copy .config to buildroot directory 3 years ago
dyad @ e3b7e08e15 add dyad submodule 3 years ago
.config change toolchain config to kernel 3.18 3 years ago
.gitmodules add dyad submodule 3 years ago
README.md Update README.md 3 years ago
mips_cross.sh copy .config to buildroot directory 3 years ago
webs_replacement.c remove two useless lines 3 years ago

README.md

zsun_fun

This all is only about reverse engineering the existing stock firmware of the Zsun Wi-Fi USB 2.0 Card Reader

git clone --recursive https://github.com/markuman/zsun_fun or do git submodule update --init --recursive when the repository isn’t cloned recursively.

instruction - cross compiling

This will crosscompile Lua for (no openwrt required, but maybe recommanded).

clone this repository and run the mips_cross.sh script. It will build the toolchain and crosscompile Lua. Finally copy the new lua and luac binary to your ZSUN device.

$ file lua
lua: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, not stripped
  • mips32r2
  • binutils 2.23
  • gcc 4.7
  • ulibc 0.9.33
  • kernel headers 3.2.73

webs_replacement

to build, just do in your toolchain environment:

mips-buildroot-linux-uclibc-gcc -Idyad/src/ dyad/src/dyad.c webs_replacement.c -o webs_replacement

webs_replacement is not a replacement of /var/webs/webs, but it will reply the url paths which the Android App is calling on different actions.

known urls

  • 10.168.168.1:8080/goform/Getcardmode
  • 10.168.168.1:8080/goform/Getcardstatus
  • 10.168.168.1:8080/goform/getWdsStatus
  • 10.168.168.1:8080/goform/GetDeviceWifiMacAddress
  • 10.168.168.1:8080/goform/Getproductinfo
  • 10.168.168.1:8080/goform/Getssid
  • 10.168.168.1:8080/goform/Setcardworkmode?workmode=0
  • 10.168.168.1:8080/goform/upFirmWare
  • 10.168.168.1:8080/goform/getFlashSize
  • 10.168.168.1:8080/goform/Getmac

ZSUN Specs

  • AR9331 SoC
  • 64MB RAM
  • 16MB SPI Flash
  • GL827L USB SD Card Reader

    ~ # cat /proc/cpuinfo
    cat /proc/cpuinfo
    system type             : Atheros AR9330 (Hornet)
    processor               : 0
    cpu model               : MIPS 24Kc V7.4
    BogoMIPS                : 266.24
    wait instruction        : yes
    microsecond timers      : yes
    tlb_entries             : 16
    extra interrupt vector  : yes
    hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0008, 0x0020, 0x0800]
    ASEs implemented        : mips16
    shadow register sets    : 1
    core                    : 0
    VCED exceptions         : not available
    VCEI exceptions         : not available
    

Stock Software

BusyBox v1.01 (2014.12.27-02:50+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # uname -a
uname -a
Linux (none) 2.6.31--LSDK-9.2.0_U11.14 #1 Wed Dec 17 15:53:04 CST 2014 mips unknown
~ # php-cgi -v
php-cgi -v
PHP 5.2.9 (cgi-fcgi) (built: Dec 19 2014 14:08:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
~ # lighttpd -v
lighttpd -v
lighttpd-1.4.15 - a light and fast webserver
Build-Date: Dec 19 2014 14:05:57

go for more