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

Can I safely remove PCI support from the kernel?

This is set in the config for ar71xx but AFAIK the AR9331 doesn't use PCI
CONFIG_HW_HAS_PCI=y

Can someone else confirm?

Removing bridge support was a bad idea :confounded:

I'm not sure what else to remove to give enough room. Has anyone else tried trimming down the kernel?

edit: kernel symbol table is under menuconfig, not kernel config. Removing that was enough

What if to re-solder something like W25Q256FV SPI flash in it?

@Magnets, are you saying the file from rabarbara9 does not fit on the device? Looking at the items below I do not see a file with the size you reference.

There are 2 versions:
jktpn854 - Original (with out USB)
9jnr82cf - with USB

What LEDE version are these?

Is this assuming that OpenWrt is already on the device following the original zsun install process.

Also asked but not answered is what package repository will work with this, if any? Again for OpenVPN specifically.

Can someone please explain what this USB issue is???? I thought that there was a SD card slot which is the same as a USB port for a thumb drive and that this did work out of the box. I have seen references to USB Gadget, but no clue what this means. Is this the USB device reference?

I will also suggest that, as there is no LEDE device pages, that the OpenWrt ZSun page here https://wiki.openwrt.org/toh/zsun/wifi-card-reader may be an appropriate place to consolidate this information.

I've not tried that image. I have compiled my own to enable FPU emulation, which increased the kernel size beyond the original partition size as Emeryth mentioned further up. Even the default kernel config from Lede is too large, before you enable FPU

USB gadget allows it to act as a USB device instead of just using USB for power/sd reader.

I guess you could rewire the USB switch by swapping the SD card and SoC points so that it switches the AR9331 between USB and the SD reader? That would probably be very difficult

I'm still less than clear on how or why I would want to use the ZSun as a USB gadget.

Can you please offer some practical examples of this?

The new GL.inet USB 150 uses the USB to power the device and to act as an Ethernet connection (thru the USB) to the PC.

Using it as a small and cheap travel router with always-on OpenVPN.

If you are replying to my post above, I do not see how this application differs with or without "USB Gadget" mode.

I would wish to run OpenVPN and use the internal card to host media files for connected devices. While I expect to power it from a laptop, I would also like to be able to just plug it into a battery

You could run it as a USB Ethernet device and bridge a PC to wifi just like the new GL.inet device

I've updated my wiki page with some more info about USB gadget.

Unfortunately, the mod is not that simple (if you want it to be elegant and use the original USB plug) with newer PCB revisions, that is every ZSUN bought after 2015.
But it all boils down to connecting a USB plug to the D+/D- pins that normally go to the card reader.

Hi Emeryth,
I'm trying to build my custom image based on your work.
Is it possible to add the sd-card reset script also to the lede branch by adding some files during the build process? I mean the same way used to enable the wifi iface by adding a custom /etc/config/wireless

Many thanks
Lorenzo

Any chances to get 17.01.3 for ZSUN?

Btw, can I put one of image files from ar71xx / generic targets ( and which one target if 'yes' ? ) and enable wifi via serial? Or patched version from this thread are not only enable wifi by default but do more heavy magic?

The hardware is pretty generic ar71xx if you don't care about the GPIO for controlling the card reader.

The problem is that the original bootloader looks for the kernel near the end of the flash, after the rootfs, unlike most other boards.
And I think the generic LEDE kernel is too big to fit there anyway, so you would be better off changing the bootloader if you are not afraid to do it.

what bootloader you recommend ?

I'd like to, again, suggest raising a bounty to have the Zsun-patches be merged into LEDE so we can have official support.

Has anyone tried attaching an external antenna to improve range?

Hi all. I'm also interested in using this device with LEDE.

I was able to download 8zt4bjxx, posted by @rj-45 in Supporting ZSUN Wifi Card Reader (16MB Flash, 64MB RAM, AR9331) . It is scheduled to expire from files.fm in a few days. So I have mirrored it to IPFS and to my own site (for now):

https://ipfs.io/ipfs/QmXsMAeE6kD3MHDhw6XXdmh5w1BByb6aDaLGay7h6UzQfN
https://celehner.com/lede-zsun-2017-05-28.zip

sha256sum: 4de0582129b2b1f8635aec7183cc0ead1ff77864671f49a1dfd6ea983a30baa3

If there was a bounty for merging the Zsun patches into LEDE I might be able to
contribute a little.

I'd also be interested in hearing about antenna mods as @Magnets mentioned.

Judging from mails on lede-dev, there were some half-baked attempts of getting the Zsun into the OpenWrt (not LEDE) codebase. They seem to get some attention in the process of merging the OpenWrt into the LEDE codebase.

yea... somebody did this.

Give a look over here: https://forum.freifunk.net/t/zsun-wifi-card-reader-kleinster-freifunk-router-der-welt/10923/34

1 Like

I realise some people dont want to share their own private images, and other do-but I am trying to compile my own LEDE image for the Zsun card reader from scratch-and I am getting there-but i get stuck when it comes to the part shown below (from https://lede-project.org/docs/guide-developer/quickstart-build-images)

   If you want to build images for the “TL-WR841N v11” Wifi-Router, select:

“Target System” ⇒ “Atheros AR7xxx/AR9xxx”
“Target Profile” ⇒ “TP-LINK TL-WR841N/ND v11”
Select exit and save your settings. Now build images. That may take some time:

As far as I know their is no "offical" Profile for the Zsun, so if some kind soul could point me in the right direction, it would be most appreciated.

Thanks

cabs