Zsun OpenWRT

Posted by TheExpertNoob 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Zsun OpenWRT
February 09, 2016 08:40AM
Got my Zsun in today.
Followed this guide to install OpenWRT
Connected and was able to get my AP running and get it connected to my router as a client.
So now its running as an AP and a client. However I cant seem to get the two to bridge properly with the web interface.
(I haven't tried SSH yet)

Have any of you guys received your Zsun yet? What have you done with it so far?


Also note,
    - The SD card detect pin is registered as a button and will trigger failsafe when inserted/removed during boot
    - The SD card reader is reset every time a card is inserted or removed



Edited 2 time(s). Last edit at 02/09/2016 08:44AM by TheExpertNoob.
Re: Zsun OpenWRT
February 09, 2016 02:10PM
Oh man, you are teasing me, still waiting for mine,...
Re: Zsun OpenWRT
February 10, 2016 04:17PM
Just ordered mine a few days ago. Are Class 10 Micro SDXC cards fast enough, or is there any benefit to using UHS-I?

So you're able to use a single zSUN to connect to your router, then create an access point? Nice.
Re: Zsun OpenWRT
February 10, 2016 07:41PM
Yes. I'm using a class 4, 4Gb card right now. Nothing on it. OpenWRT installs on the 15Mb space built into the Zsun. I also finally managed to turn it into a repeater following this guide. Next up, Im going to attempt to serve up some files from the Zsun.
Re: Zsun OpenWRT
February 10, 2016 11:54PM
Alright. As most of you know, my zsun's arrived today. Just got brideged mode working - basically the same procedure as with mr3020...

Also if you already flashed the custom FW, you can easily go back to factory mode in case you fuc*ed up your network config by simply putting in the SD card while the zsun is booting - just wait until the LED starts blinking, then push in the SD card, after this the OpenWrt network should come up.

So to get "bridged" mode working you need to adjust a couple of files.
The following configuration is for a Setup where the zsun connects to an unencrypted network called "Test". The zsun will spawn a network with the name "OpenWrt", also unencrypted.

Adjust the wan config zone in /etc/config/firewall like so:
config zone
	option name		wan
	option network		'wan wan6 wwan'
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
	option masq		1
	option mtu_fix		1

/etc/config/wireless should look like so (adjust essids and encryption as you need it):
config wifi-device 'radio0'
	option type 'mac80211'
	option channel 'auto'
	option hwmode '11g'
	option path 'platform/ar933x_wmac'
	option htmode 'HT20'
	option disabled '0'
	option txpower '30'
	option country 'US'

config wifi-iface
	option ssid 'Test'
	option device 'radio0'
	option mode 'sta'
	option network 'wwan'
	option encryption 'none'
	#option encryption 'psk2'
	#option key 'yourSuperSecurePass'

config wifi-iface
	option ssid 'OpenWrt'
	option device 'radio0'
	option mode 'ap'
	option network 'lan'
	option encryption 'none'
	#option encryption 'psk2'
	#option key 'yourSuperSecurePass'

Allow the wwan to get it's IP via DHCP by adding the following to /etc/config/network:
config interface 'wwan'
	option proto 'dhcp'

Reboot and you are done.

I am sure this may also be done via Webinterface somehow,...



Edited 1 time(s). Last edit at 02/11/2016 12:53AM by stylesuxx.
Re: Zsun OpenWRT
February 11, 2016 12:02AM
I went with your setup as it doesn't require extra packages.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 2 time(s). Last edit at 02/15/2016 01:04PM by TheExpertNoob.
Re: Zsun OpenWRT
February 11, 2016 12:29AM
Did you configure it via Webinterface? If so I guess it would be cool to post some info about that too.
Re: Zsun OpenWRT
February 11, 2016 02:49AM
stylesuxx Wrote:
-------------------------------------------------------
> Did you configure it via Webinterface? If so I
> guess it would be cool to post some info about
> that too.


Na, I gave up on that. I ended up doing it all over SSH. Also, I have noticed any packages and init.d scripts are remove upon sdcard reset.

Hey, just so you know stylesuxx, I tried your configuration and I don't have DNS. It seems your config doesn't forward it to the zSun from the router. Im looking into it.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 1 time(s). Last edit at 02/11/2016 03:31AM by TheExpertNoob.
Re: Zsun OpenWRT
February 11, 2016 04:40AM
I went with Stylesuxx configuration.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 5 time(s). Last edit at 02/15/2016 01:04PM by TheExpertNoob.
Re: Zsun OpenWRT
February 11, 2016 06:17AM
Linkdrop for creating & flashing own images for factory update:
Factory update
Toolkit

OpenWrt CC with custom code
Imagebuilder (can be found here) may not contain enough files to build piratebox. The question is, if there are all kernel modules included.
Needs to be verified.

Update: ImageBuilder contains all needed kernel modules, all other packages are pulled from openwrt , good!



Edited 1 time(s). Last edit at 02/11/2016 06:30AM by Matthias.
Re: Zsun OpenWRT
February 14, 2016 01:47PM
stylesuxx Wrote:
-------------------------------------------------------

> the following to /etc/config/network:
>
> config interface 'wwan'
> option proto 'dhcp'

Figured out my DNS issues, and it was so dumb. Be sure to change the lan ip to something other than your station's gateway. ex 192.168.10.1 instead of 192.168.1.1.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: Zsun OpenWRT
February 14, 2016 01:49PM
Woops, I did not note this,... must have happend in my dream then.
Thanks TheExpertNoob :-)
Re: Zsun OpenWRT
February 14, 2016 09:20PM
i´ve just created a image containing piratebox.. BUT i don´t have this device yet so i cannot confirm it´s working (because chinese new year there is a huge delay in processing orders)
and i think there is a little bit work to do such as creating symlinks and so on

if you wanna test the image AT YOUR OWN RISK! (There is a chance to brick it) and i don´t know if failsafe works as neither if the image works... Because i cannot test it as i dont have this hardware.

Here is the download link; but keep in mind, there is a chance you could brick it and bring it back to live is not so easy.

EARLY ALPHA TEST - USE AT OWN RISK AND ONLY IF YOU KNOW WHAT ARE U DOING
[drive.google.com]

edit:
i think it would be better,if you want to play safe to wait for michael creating a image and i´m seeing he is on the way :-)

Or if you could afford one to send (within the EU, i´m located in Germany) i will try it :-)



Edited 2 time(s). Last edit at 02/14/2016 10:12PM by Rene.
Re: Zsun OpenWRT
February 15, 2016 12:21AM
How did you build this exactly? Is this based on CC or AA?
Re: Zsun OpenWRT
February 15, 2016 07:30AM
i´ve used the zsun as base, added the pb feeds (https://github.com/PirateBox-Dev/openwrt-piratebox-feed) and build it alltogether so the image should contain all packages used by pb
Re: Zsun OpenWRT
February 15, 2016 09:43AM
So you did not backport to AA? In this case, people please do not flash this stuff...
Re: Zsun OpenWRT
February 15, 2016 01:07PM
Why AA vs CC? I'm sure its because all scripts, packages and automation are built around AA?


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: Zsun OpenWRT
February 15, 2016 04:53PM
Jep, and because init has been changed in CC in such a way that is not compatible with our PirateBox scripts, had a discussion about this with Matthias yesterday - if anyone is interested in the (german) log of this discussion I sure can post it.

But it seems I got the Backport working - at least it is producing an image. I will flash it today, or tomorrow and keep you posted.
Re: Zsun OpenWRT
February 15, 2016 05:59PM
No it is based of the zsun_build which is based of the CC 15.05 so my Image is based on CC
Re: Zsun OpenWRT
February 15, 2016 07:33PM
stylesuxx Wrote:
-------------------------------------------------------
> But it seems I got the Backport working - at least
> it is producing an image. I will flash it today,
> or tomorrow and keep you posted.

make sure the zsun kernel supports AA in qemu before flashing (if you can do that as im not a frequent qemu user) as I believe the (only known from hackerspace) compiled zsun openwrt's kernel is also CC based.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: Zsun OpenWRT
February 15, 2016 07:37PM
Yeah, I compiled kernel and rootfs,... settings and patches backported from their CC image builder. This should produce the exact same image for AA as it does for CC.

Not sure how good the qemu support is,... generally it is a pain in the ass, so I guess I'll simply flash it and recover from serial if something goes wrong,... which I expect anyways ;-)
Re: Zsun OpenWRT
February 15, 2016 08:01PM
Well i´ve made a image for myself using CC and Piratebox (for the gl-inet gl-ar150) and had no issues with it at all.
So i think using CC is not a big deal. But i´m happy if you could post the log
Re: Zsun OpenWRT
February 15, 2016 08:03PM
OK, that is interesting,...
Re: Zsun OpenWRT
February 17, 2016 10:36AM
anyone installed vsftpd? What are the upload speeds your getting?


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: Zsun OpenWRT
February 22, 2016 10:59PM
so how is it going?
Anything new?
Re: Zsun OpenWRT
February 24, 2016 03:45PM
Yes, I got my hardware and then got sick. Since Friday evening , I can't work anymore because of being ill. :-(
And I think it is the same with stylesuxx
Re: Zsun OpenWRT
March 17, 2016 09:50PM
Couldn't find my old reference but:

echo 1 > /sys/devices/virtual/gpio/gpio21/value

toggles the sdcard for use as a thumbdrive in a computer to transfer files
0=attached to zsun
1=attached as usb drive

Also got extroot working.
sda1 is 2.7G fat32
sda2 is the ext3 overlay partition.
Windows had trouble recognizing the fat32 partition on the second partition so I swapped them.


Language: HTML
opkg update opkg install kmod-usb-storage kmod-fs-ext4 block-mount kmod-usb2 reboot & exit

set up an sdcard with the first partition fat32 and the second partition ext3 on a linux machine
then insert the card into the zsun and boot up.

Language: HTML
mkdir /mnt/usb mkdir /mnt/sda2 mount /dev/sda2 /mnt/sda2 tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf - uci add fstab mount uci set fstab.@mount[-1].target=/overlay uci set fstab.@mount[-1].device=/dev/sda2 uci set fstab.@mount[-1].fstype=ext3 uci set fstab.@mount[-1].options=rw,sync uci set fstab.@mount[-1].enabled=1 uci set fstab.@mount[-1].enabled_fsck=0 uci commit reboot && exit

add to /etc/config/fstab

Language: HTML
config mount option target ';/mnt/usb'; option device ';/dev/sda1'; option fstype ';vfat'; option options ';rw,sync'; option enabled ';1'; option enabled_fsck ';0';

reboot && exit

when you're back up, check with mount or df -h

loosely based on this.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 5 time(s). Last edit at 03/27/2016 03:47AM by TheExpertNoob.
Re: Zsun OpenWRT
April 04, 2016 01:02PM
Can you please give me the password to log in to ssh?

Thanks
Re: Zsun OpenWRT
April 04, 2016 01:09PM
To Rene, I managed to flash your image but now there is no webinterface (luci)
The only way i can login is trough ssh but i don't know the password?

Regards
Re: Zsun OpenWRT
April 05, 2016 12:14PM
have you tried telnet?