Giter Site home page Giter Site logo

emeryth / openwrt-zsun Goto Github PK

View Code? Open in Web Editor NEW
97.0 97.0 28.0 10.01 MB

OpenWrt 15.05 port for the ZSUN WiFi SD Card Reader

License: GNU General Public License v2.0

Makefile 15.01% Awk 0.02% Shell 4.83% C 69.76% Assembly 1.23% C++ 5.04% Objective-C 2.19% CMake 0.01% Perl 1.66% Lex 0.05% Yacc 0.11% Python 0.10% Groff 0.01%

openwrt-zsun's People

Contributors

emeryth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openwrt-zsun's Issues

Tutorial For Installing via Ubuntu

Hello,

I'm wondering what image I should download to use for zsun wifi card reader, and are there any instructions for doing it via Ubuntu computer?

Thanks

Official Kernel Modules in Repository

What is the reasoning behind the official kernel modules in the repository not working with zsun? I'm trying to get kmod-batman-adv to compile but come up with the error.
types.h:386:26: error: expected ')' before numeric constant DECLARE_EWMA(throughput, 1024, 8)

I did test with the official kernel module and had to recover via u-boot and a serial connection.

LEDE

What about new LEDE project. Any chances for port?

samba performance or issues?

The ZSUN seems underpowered for the Chaos Calmer samba package - 128 MB recommended, 64 MB available. Has anyone successful replicated the file server functionality of the original firmware? Any caveats or special configuration issues? Or is maybe ftp better suited for this?

ZSUN hardware compatibility with Wifi Pineapple Nano firmware

Hello Andrzej, guys,
The initial idea was to port hostapd-mana to openwrt and susbtitute the original hostapd within the ZSUN in order to use it also for pentesting 802.1x networks during engagements at work... sadly I got stopped due to diffing/merging issues while porting hostapd-mana to its OpenWRT version.

However, googling aroung I have figured out that one guy managed to modify the Wifi Pineapple Nano (same Atheros SoC of our ZSUN) to push it in another AP:

http://sapinski.com/2016/02/13/wifi-pineapple-firmware-for-gl-inet-gl-ar150/
https://github.com/kow/glinetpineapple

And this guy did the same:
https://github.com/smrx86/STPF2

I was wondering if you could give a look at the procedure to patch the Pineapple Nano original fw.

I was following the guide in the URL above...
build firmware-mod-kit from https://code.google.com/archive/p/firmware-mod-kit/wikis/Documentation.wiki
extract wifipineapple firmware (https://www.wifipineapple.com/nano) with firmware-mod-kit
clone https://github.com/domino-team/openwrt-cc
cp firmware-mod-kit/fmk/rootfs/* openwrt-cc/files/*
and finally, build openwrt-cc.
But instead of using openwrt-cc repo... I have tried with yours https://github.com/Emeryth/openwrt-zsun but without much success.

U-Boot mod

It's seems https://github.com/pepe2k/u-boot_mod the bootloader could be replaced in theory. I remember the Nokia N900 Smartphone can boot from sdcard/ execute scripts from sdcard. Couldn't U-Boot on the Zsun Cardreader be modified to load a boot.scr (or whatever) from sdcard for ext root or flash a recovery from a bricked flash?

Building stops when trying to fetch te sources for `lua-sha2-0.2.0`

Building stops when trying to fetch te sources for lua-sha2-0.2.0:

make[3]: Entering directory '/wrk/openwrt-zsun/feeds/packages/lang/lua-sha2'
mkdir -p /wrk/openwrt-zsun/dl
echo "Checking out files from the git repository..."; mkdir -p /wrk/openwrt-zsun/tmp/dl && cd /wrk/openwrt-zsun/tmp/dl && rm -rf lua-sha2-0.2.0 && [ \! -d lua-sha2-0.2.0 ] && git clone https://code.google.com/p/sha2/ lua-sha2-0.2.0 --recursive && (cd lua-sha2-0.2.0 && git checkout 02bd4bfdc806 && git submodule update) && echo "Packing checkout..." && rm -rf lua-sha2-0.2.0/.git &&    tar czf /wrk/openwrt-zsun/tmp/dl/lua-sha2-0.2.0.tar.gz lua-sha2-0.2.0 && mv /wrk/openwrt-zsun/tmp/dl/lua-sha2-0.2.0.tar.gz /wrk/openwrt-zsun/dl/ && rm -rf lua-sha2-0.2.0; 
Checking out files from the git repository...
Cloning into 'lua-sha2-0.2.0'...
fatal: repository 'https://code.google.com/p/sha2/' not found
Makefile:52: recipe for target '/wrk/openwrt-zsun/dl/lua-sha2-0.2.0.tar.gz' failed
make[3]: *** [/wrk/openwrt-zsun/dl/lua-sha2-0.2.0.tar.gz] Error 128
make[3]: Leaving directory '/wrk/openwrt-zsun/feeds/packages/lang/lua-sha2'
package/Makefile:191: recipe for target 'package/feeds/packages/lua-sha2/compile' failed
make[2]: *** [package/feeds/packages/lua-sha2/compile] Error 2
make[2]: Leaving directory '/wrk/openwrt-zsun'
package/Makefile:188: recipe for target '/wrk/openwrt-zsun/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile' failed
make[1]: *** [/wrk/openwrt-zsun/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory '/wrk/openwrt-zsun'
/wrk/openwrt-zsun/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 2

After changing the location of the sources...

PKG_SOURCE_URL:=https://github.com/lgierth/lua-sha2.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=02bd4bfdc8062c7e1ae51c5a72906efc0a6375ee

...it compiles but the next failing package is tor.
Maybe I got outdated feeds?
I did run...

./scripts/feeds update -a
./scripts/feeds install -a

...before building...

USB Gadget mode, any success?

Hi guys,

The Hackspace.pl wiki mentions USB gadget mode. I'm interested in trying it out, and was wondering if anyone has managed the steps described, which are:

Port the code
Remove the bootstrap resistor setting USB to host mode
Remove the card reader PCB and rewire the the USB signal pins

Has anyone managed this so far? If so, care to share your findings/code?

FEATURE: add recovery option using file checking on SD card

Hi.

I want to suggest a simple idea I saw here:
https://www.davidgouveia.net/2016/03/avoid-being-locked-out-of-your-zsun-wifi-reader/

The idea is to reset the device settings if a "/restore" file exists in SD card.
It's implemented using a simple init.d script.

This idea is much simpler than current method: trying to insert/remove SD card during boot to simulate a button click.

I tried this idea myself and it works nice. However, after resetting the device settings, the script itself is also deleted... This means that if I forgot to create it again, the next time, I will be stuck with inaccessible device (and have to use the less-convenient current method of SD card insertion during boot).

Adding this init.d script into the openwrt-zsun firmware code will make it much easier to ALWAYS reset the device in case of misconfiguration, without worrying if the script exists or not. It will always be there.

a bunch of questions regarding original fw

Hey guys,

I'd like to use the device as a rather boring mass-storage on a tv and control it without app (only web, smb, telnet). I'm not sure if I really need openwrt in my case and have couple of questions:

I assume the following will put it in smb mode!?
http://10.168.168.1:8080/goform/Setcardworkmode?workmode=0

Subsequently does the following put it in mass-storage mode?
http://10.168.168.1:8080/goform/Setcardworkmode?workmode=1

Is wifi / web / telnet always available, regardless of the mode?

Can you also switch modes via telnet?

Unfortunately the tv requires the storage to be whole-disk ntfs formatted. Is the smb mode automounter able to mount such a partitionless ntfs disk? If not, can I mount it via telnet?

SD Card problems

Hi,
I'm having some interesting issues with Micro-SD support. Wondering if anyone else has had the same thing or knows what's going on.

When I use a Micro-SD card I can see it on boot and mount it fine, I can even list files and directories, and I can query the usb SD controller via lsusb. When I try to access the files after a small amount of access, the USB device appears to disconnect. Here's the output of logread from doing a cat of a file on the Micro-SD:

root@OpenWrt:/# logread -f
Sat Apr 23 15:37:18 2016 kern.info kernel: [ 106.430000] usb 1-1: USB disconnect, device number 2
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] scsi 0:0:0:0: rejecting I/O to offline device
Sat Apr 23 15:37:18 2016 kern.info kernel: [ 106.440000] scsi 0:0:0:0: [sda] killing request
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] scsi 0:0:0:0: rejecting I/O to offline device
Sat Apr 23 15:37:18 2016 kern.info kernel: [ 106.440000] scsi 0:0:0:0: [sda] killing request
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] scsi 0:0:0:0: rejecting I/O to dead device
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] ntfs: (device sda1): ntfs_end_buffer_async_read(): Buffer I/O error, logical block 0x41730.
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] ntfs: (device sda1): ntfs_end_buffer_async_read(): Buffer I/O error, logical block 0x41731.
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] ntfs: (device sda1): ntfs_end_buffer_async_read(): Buffer I/O error, logical block 0x41732.
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] ntfs: (device sda1): ntfs_end_buffer_async_read(): Buffer I/O error, logical block 0x41733.
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] ntfs: (device sda1): ntfs_end_buffer_async_read(): Buffer I/O error, logical block 0x41734.
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] ntfs: (device sda1): ntfs_end_buffer_async_read(): Buffer I/O error, logical block 0x41735.
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] ntfs: (device sda1): ntfs_end_buffer_async_read(): Buffer I/O error, logical block 0x41736.
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] ntfs: (device sda1): ntfs_end_buffer_async_read(): Buffer I/O error, logical block 0x41737.
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] ntfs: (device sda1): ntfs_end_buffer_async_read(): Buffer I/O error, logical block 0x41738.
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.440000] ntfs: (device sda1): ntfs_end_buffer_async_read(): Buffer I/O error, logical block 0x41739.
Sat Apr 23 15:37:18 2016 kern.info kernel: [ 106.560000] scsi 0:0:0:0: [sda]
Sat Apr 23 15:37:18 2016 kern.warn kernel: [ 106.560000] Result: hostbyte=0x01 driverbyte=0x00
Sat Apr 23 15:37:18 2016 kern.info kernel: [ 106.570000] scsi 0:0:0:0: [sda] CDB:
Sat Apr 23 15:37:18 2016 kern.warn kernel: [ 106.570000] cdb[0]=0x28: 28 00 00 04 16 32 00 00 80 00
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.570000] blk_update_request: I/O error, dev sda, sector 267826
Sat Apr 23 15:37:18 2016 kern.info kernel: [ 106.580000] scsi 0:0:0:0: [sda]
Sat Apr 23 15:37:18 2016 kern.warn kernel: [ 106.580000] Result: hostbyte=0x01 driverbyte=0x00
Sat Apr 23 15:37:18 2016 kern.info kernel: [ 106.590000] scsi 0:0:0:0: [sda] CDB:
Sat Apr 23 15:37:18 2016 kern.warn kernel: [ 106.590000] cdb[0]=0x28: 28 00 00 04 16 b2 00 00 80 00
Sat Apr 23 15:37:18 2016 kern.err kernel: [ 106.600000] blk_update_request: I/O error, dev sda, sector 267954

Does anyone know what's happening? The drive and USB SD card reader are no longer visible in lsusb after this happens, so it looks like the USB SD card reader is being disconnected.

Upstreaming changes

Hi Emeryth,

Thanks for your work, I got it running on my ZSun, and it's pretty cool. Do you have any intentions to upstream your patches back to OpenWRT, so later versions of OpenWRT will run on the ZSun as well? Thanks!

  • Jan

Zsun keeps rebooting when WiFi is enabled.

I've hacked two devices and they seem to present the same problem. I have updated the original firmware with the SD100-openwrt.tar.gz, and without any other intervention, when the wifi gets started (while booting) it resets the whole system. This goes over and over again, endlessly.

I have the uart being soldered and if I immediately delete the /etc/config/wireless after the console gets enabled (before allowing wifi driver to read and start the wifi) everything remains stable. If I restore the file and call "wifi", the system gets rebooted.

On one of the devices, I've replaced the flash memory with different chip from an working Carambola2 module. It presents the same problem, even with a completely new uboot and firmware. Getting mad, I've looked for HW differences, and the only relevant one that I've found was the quartz, which is 25MHz on zsun and 40MHz on Carambola2. So I've replaced the zsun quartz with an 40MHz and changed the according bootstrap pin. Tada! now it's working.

I haven't tested yet with current openwrt-zsun build, but I suspect it would work.

Does anyone encountered this issue? Does anyone know what is the relation between WiFi and the input quartz?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.