Supporting ZSUN Wifi Card Reader (16MB Flash, 64MB RAM, AR9331)

So I am guessing you did not reboot after flashing the u-boot and clearing the env?

I thought the lede-unlocked was supposed to be able to boot with the new uboot.

Could you please just write down the exact steps you did including reboots. I still have a device I want to try this on...

Thanks.
/J

Sure, I did it exactly like he described:

Blockquote
Follow the setps to flash it:

  1. Download this unlocked LEDE and flash it in luci.
  2. Download new u-boot to /tmp as uboot.bin, cd to /tmp in ssh.
  3. Flash the uboot by command mtd write uboot.bin u-boot
  4. Erase u-boot env by command mtd erase u-boot-env
  5. Download this Recovery Mode init firmware and flash it in luci.

As you pointed out. I did not reboot after flashing uboot. I used openwrt-18.06-rec_init.bin to flash immediately after uboot erase command, just like instructed above. You seem to have used lede-unlocked.bin which might have caused your issues, too. Idk but I advice using openwrt-18.06-rec_init.bin.

Hopefully you get it sorted out and we can have 18.06.5 fully working together.

3 Likes

I have two devices. The Zsun (bought a few years ago) and the Eaget (bought a few weeks ago from eBay).
My Zsun has 64MB RAM, while my Eaget has 32MB RAM.
I tried the Zsun and it worked with the SMB method. The trick is to install old SMB1 version in Windows 10 through the features (activate or deactivate Windows features). Couldn't get it to work in Linux (Debian 10).
After that I did it the same way byomi described.
Now I have 18.06.1 on the Zsun running. I'll try the Eaget later.

Does anyone have an educated guess on how difficult it will be to get it working with OpenWrt 19.07? And how much work it would be to port it from the ar71xx to the ath79 target?

Edit:
Now I found the reason, why the SMB method doesn't work for the Eaget. It is a producttype mismatch.
When you have a socat-session running, do:

sed -i 's/A50/SD100/g' /etc/producttype

But I have another problem. I now have OpenWrt 15.05 but I can't flash lede-unlocked.bin
The flashing through Luci doesn't work. When I upload the file, it stops at around 70%. (69, 74)
I guess it is because of the RAM. Is there any way to flash it through another way? Maybe saving and flashing with microSD card. But how? Did anyone else have that problem and/or an idea?

Edit2: I set up a small http-server on a pc and then got the image via sysupgrade -v http://192.168.1.195:8080/lede-unlocked.bin
That worked. After a reboot, I couldn't access LuCi. Logged into ssh again and did the u-boot flash and cleaned the environment and after that I flashed the recovery mode init firmware.
Now I have 18.06.1 on the Eaget as well, but still no LuCi accessible

Got 3 zsun's and 2 Eaget A50's. Didn't touch the zsun's for now.
The Eaget's I previously flashed with Openwrt 15.05 from this thread ~1 year ago. One of the Eaget is still on 15.05 but the other one is 18.06.01 now and that one had no issue at all flashing within LUCI by following above posted instructions. Note: I just checked my Eaget and it has 64MB.

My goal for this tiny device:

  • having a stable release with at least openvpn preinstalled, better have all packages ready compiled hosted somewhere for downloading based on that final release
  • being able to overclock the device like in pepe2k uboot images (setclk). Didn't check for now if that can already be done in recovery mode !? Alternative: use hex editor method
  • ...
1 Like

I found a very similar looking device. The case seems to be the same. It claims to support up to 2TB, exFAT and NTFS
http://www.callstel.info/WiFi-USB-Cardreader-NX-4211-919.shtml

You can check the source code here:
ftp://ftp.pearl.de/treiber/NX4211_Source_Code.tar.gz
I don't really know much about it, but from checking the files it looks to be some kind of MediaTek/Ralink chip.
The source code for uboot has some files named MT7621, which would be an 880MHz dual core.
The config file in source code for the kernel says MT7628, which would be 575MHz single core like in the GL-inet MT300N-V2 Mango. WiFi seems to be RT2880.
I'm not sure what CONFIG_RT2880_DRAM_64M=y means. 64Mbit or 64MB?
Also: CONFIG_RALINK_RAM_SIZE=64
And: CONFIG_BLK_DEV_RAM_SIZE=16384
And: CONFIG_BLK_DEV_RAM_COUNT=16
Do the MT7628 and the RT2880 each have their own RAM?

I know this seems to be a different device inside, but given that the formfactor is exacely the same and that someone who has a Zsun or an Eaget maybe also found or even tried this think, I'll post it here anyway. It could be a faster alternative while keeping the formfactor. Also available on the german amazon website: https://www.amazon.de/Callstel-WLAN-Kartenleser-Connected-microSD-Kartenleser/dp/B019OWFVXA/

I'm tempted to give it a try. What do you think how much RAM and Flash it probably has just from what you can see in the config file.
For reference the full config file:
https://pastebin.com/dESZ9gxb

1 Like

Let the forum demigods split the above out of this thread to become an own one?
I think mixing this into the Zsun thread will end in confusion.

I googled a bit and found a post in a forum from someone who says it is the same device and he says he entered an ssid of telnetd -p 2000 (surrounded with " ` ") he could access it with telnet and the password was zsun11888 (probably a typo, since it usually is zsun1188). I'm not sure if I can post the link here and actually there isn't much more information there anyway.

So I guess it probably is the same device. That just leaves the question about what is the source code in the archive and if it actually would work or if they just uploaded some kind of archive to let it seem like they are GPL compliant and just hope that noone ever actually tries it.

Until this is clear, it is probably better to leave it in this thread. Maybe someone has the device and can confirm it is the same. Maybe I'll try it and report back.

Ok.
It'd be nice if it turns out to be the same hardware.
That would result in more Zsun users... \o/

Dang, it worked.

I also added this:
here what i added to 17.01.01 build to get led working

/etc/config/system

config led 'led_wifi_led'
      option name 'wifi'
      option sysfs 'zsun-sdreader:green:system'
      option trigger 'netdev'
      option mode 'link rx tx'
      option dev 'wlan0'

To get som LED action. (Shouldnt this be built into the firmware already)

Yay! Havent tried accessing the sdcard though, but it reportedly works, so Ill take that for now.

1 Like

There's a new pull request to have the Zsun on the latest OpenWrt version:

Instructions to flash pre-built 19.07.0-rc1 can be found here:

5 Likes

Thank you very much for the hint.
Just tried it on my Eaget (mine just has 32MB of RAM)
Downloading to tmp fails as I expected (81%)
The description on his github page is very good. I'm tempted to try it from the recovery now, hoping that there is enough RAM. But I'm not sure if
mount -o remount,ro /
mount -o remount,ro /overlay
would have the same effect. Any idea what I can try? Flashing with sysupgrade from a network-source won't work, since it is no sysupgrade

Then I tried it on my Zsun with 64MB RAM. Flashed 19.07.0-rc1 and it works

I found that also: https://gbatemp.net/threads/build-your-own-dongle-research-and-development-thread.504633/page-14#post-8041254

The app looks exactly like the Zsun app too, same icons and layout.

Glad to know it worked fine with you Zsun.
Regarding your Eaget, and if you're feeling adventurous, I can try to give you an alternative method to flash your device.
Let me know if you're using Windows or Linux and which firmware version you have on your device.

1 Like

Searching for that product turns out ... this: https://www.pearl.de/a-NX4211-1059.shtml (also on Amazon, for slightly more coin).

(For those who don't know, Pearl is a German mailorder shop mostly selling cheap Chinese whitelabel hardware, sometimes branded under their own ficticious brands -- like "Callstel" -- and usually a bit more expensive than if you bought directly from China.)

First of all thank you very much for the work on this and the pull requests. Glad to see some movement for the official support again and also support for the new ath79 target at the same time.

On my Zsun however I don't have Luci. Going through the known problems of the RC1, I guess that is more related to OpenWrt itself than this device.

I tried it again on my Eaget. This time I got the files with SCP. I checked the md5 to make sure they were both downloaded completely and they are. However I can't copy /sbin/mtd to /tmp ("No space left on device")

I guess I feel adventerous enough to try. Thank you for the offer. For me it doesn't matter if I need to you Windows or Linux. I have both running here and feel comfortable with both. Whatever is easier to use is fine.

On the Eaget with 32MB RAM after boot I have already 21MB of RAM used. And Luci was never reachable.
On the Zsun with 64MB RAM and your 19.07 rc1 after boot, it just uses 12-13MB of RAM but again Luci isn't available.

Edit: if I copy the mtd program first, I get an md5 mismatch for "part2.bin". Since at least the big file contains lots of 00 or FF (>18%), I guess some simple form of compression within /tmp probably would be enough to get it working, but I don't know how. Maybe another thing I could think of is copying the first file via scp, flash it and then delete it and copy the second file and flash it, but I don't know if scp is available after the first flash

Edit2: I forgot to mention my firmware version. It is "puteulanus 18.06.1_rec Firmware"

The copy of the mtd utility to /tmp is mostly a precaution since it should still be available after the first flash (which only overwrites the kernel).

However, you can also try to flash over the network (needless to say this is a risky approach!):

  1. [Eaget] Mount main filesystems as readonly:
mount -o remount,ro /
mount -o remount,ro /overlay
  1. [Eaget] Copy the required utilities to /tmp:
cp /bin/busybox /tmp
cp /sbin/mtd /tmp
cd /tmp
  1. [Computer] open two terminals and type the following into each one of them:

Terminal 1:

nc -l 1234 < zsun-sd100.update.variant?.part1.bin

Terminal 2:

nc -l 9876 < zsun-sd100.update.variant?.part2.bin
  1. [Eaget] Now to flash your Eaget use the following commands (be sure to replace YOUR_COMPUTER_IP below):
./busybox nc YOUR_COMPUTER_IP 9876 | ./mtd write - /dev/mtd4
./busybox nc YOUR_COMPUTER_IP 1234 | ./mtd write - /dev/mtd2
  1. [Eaget] Confirm the md5sum before attempting to reboot:
./busybox md5sum /dev/mtd2
./busybox md5sum /dev/mtd4
  1. [Eaget] If everything is OK then go for the reboot:
reboot -f
2 Likes

I tried it. Something to note is, that after both mtd writes the terminal just gets stuck at some point [w]
I opened another terminal and checked the md5 and compared it to the bin. Since both times I got a match, I rebooted.
So in case anyone tries this method, don't get nervous on a stuck terminal and just open another one to check the md5 to confirm the flash is done and continue with the other mtd partition and then open another terminal and check again.
Now I have version 19.07 rc 1 on both devices. Thank you for the help.

Is Luci expected to work on your image for the Zsun? is it not starting intentional or is it a bug?

This is just a "stock" compilation of OpenWrt 19.07.0-rc1 without any further customization of packages (with the exception of the usb modules).
You may use the official packages for mips_24kc (available here) or follow the Build guide to get a working build environment and then compile all the packages you need for your devices.

2 Likes

Has the official stance on routers without physical buttons changed recently, because in an earlier life, I am quite sure that they were not going to let through anything with a default open wifi... At least that is what I remember, lets hope that is not valid anymore.

/J

1 Like

There is some discussion going on the pull request about this exact same topic.
But with the new recovery partition this wouldn't be an issue anymore - you can flash the new firmware, mount it to enable WiFi, and only then reboot to have OpenWrt start for the first time.

3 Likes