ChiPirate-BOX: A 9$ PirateBox using Next Thing co. Chip (The chipest and cheapest PirateBox ever ;-)

Posted by rd235 
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
I have tested the Pirate Box on Chip. Being Debian-derived, it worked almost out-of-the box (I'd rather say: out-of-the pirate-box).

ChiPirate-BOX

renzo
Ohh cool! thanks!

I haven't got mine yet, it was on my todo list.

Am I allowed to copy your doku to piratebox.cc ??


This is only my signature.
Interesting - lets see how this board adapts. I guess you got it from kickstarter, right now they are taking pre orders for shipping in June 2016...
Mattias: feel free to copy the doku. Consider it CC-BY-SA.



Edited 1 time(s). Last edit at 02/05/2016 08:19PM by rd235.
Ok, thanks. I see that the CC is similiar, close to piratebox.cc


This is only my signature.
Renzo, we currently have the board-autoconf.sh script smiling smiley
so you don't need to edit config.pl manually smiling smiley


This is only my signature.
[piratebox.cc]


This is only my signature.
Matthias,
There are two typos (I have fixed the posting on RaspiBO, can you please update the posting on piratebox.cc) thank you.

- sudo apt-get perl lighttpd dnsmasq hostapd
+ sudo apt-get install perl lighttpd dnsmasq hostapd

and

- tar xt piratebox-ws_current.tar.gz
+ tar xf piratebox-ws_current.tar.gz

renzo
Thanks, you should checkout the new 1.0.7 version, which we released yesterday.

[github.com] This script might also apply on ChiPirateBox


This is only my signature.
Trying to get it to run on bootup. But unable to get this last step. See my description here:




[bbs.nextthing.co]
Chris lebeck Wrote:
-------------------------------------------------------
> Trying to get it to run on bootup. But unable to
> get this last step. See my description here:
>
>
>
>
> [bbs.nextthing.co]
> st-and-cheapest-pirate-box-ever/2535/22

From that post, it looks like adding 'sleep 30' to /etc/init.d/piratebox resolves the issue.

Attempting to get this running on the headless version, which doesn't come packaged with python2.7, required for droopy. Is it worth adding that into the Wiki as a prerequisite?



Edited 1 time(s). Last edit at 09/25/2016 03:46AM by Torx.
What is the reason for the 30 seconds wait-time? For what should the piratebox script wait? Probably there is a better solution...

[piratebox.cc]? <- ok @ packages?
Hi Renzo and Matthias, I've attempted to install PirateBox on the Chip and Pocket Chip but have run into some issues. I'm able to see the Access Point on my phone but when I connect to it and try to browse to [192.168.77.1] or [piratebox.lan] the browser throws back a connection error (ie the PirateBox is not serving up the captive or logon portal)

If I add :8080 to the end of either URL the PirateBox serves up an upload page so in theory lighttpd is serving up something. I've documented it with screens here [bbs.nextthing.co]

Is there a step or setting I'm missing that's preventing the captive portal?
It seems lighttpd is not starting.

Can you try to find the following two files, which should contain information about lighttpd issues:

* /opt/piratebox/tmp/break.log
* /opt/piratebox/tmp/error.log

Please paste it here.

According to the other question in the forum:
Quote

Seemingly odd question - anyone know of a way to have a CHIP easily switch between running "OwnCloud" and Pirate-BOX?

I'd love to have my one CHIP be both my private internal Cloud server when it's on my home WiFi network and be a Pirate-BOX when I take it out and about.

In a perfect world, it'd even do both at the same time via the two virtual WiFi interfaces, with separate data stores on the USB flash drive.
PirateBox is designed to change the OperatingSystem as less as possible. As long as you do not activate PirateBox per default it should be easy to switch between nextcloud and piratebox.
Pro-Tip: If you run the nextcloud webserver on port 443 only, you can have both active at the same time winking smiley

edit:
btw: thanks for posting the output, it seems:
a) I need to adjust the howto a bit to avoid some errors
b) There is a need to make the firewall script better smiling smiley


This is only my signature.



Edited 1 time(s). Last edit at 10/17/2016 09:03PM by Matthias.
Hi Matthias thanks for the quick response. Here are my logs

Break.log -> Empty file

Error.log:
2016-10-16 10:52:39: (log.c.164) server started
2016-10-16 10:52:39: (mod_fastcgi.c.1112) the fastcgi-backend /usr/bin/php-cgi failed to start:
2016-10-16 10:52:39: (mod_fastcgi.c.1116) child exited with status 2 /usr/bin/php-cgi
2016-10-16 10:52:39: (mod_fastcgi.c.1119) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2016-10-16 10:52:39: (mod_fastcgi.c.1406) [ERROR]: spawning fcgi failed.
2016-10-16 10:52:39: (server.c.1022) Configuration of plugins failed. Going down.
Hi Matthias I think it's resolved by installing php5 and enabling fastcgi:


sudo apt-get install php5-cgi

Enable the fastcgi module included with lighttpd:

sudo lighttpd-enable-mod fastcgi fastcgi-php


Reload the configuration with:
sudo service lighttpd reload


Create the file "/var/www/info.php" and put in it:

Sudo nano /var/www/info.php

And add the following:
<?php phpinfo(); ?>

Then reboot the CHIP computer.
Hi LMC,
thank you for the feedback. I added php-cgi to chip how-to.

Quote


sudo lighttpd-enable-mod fastcgi fastcgi-php


Reload the configuration with:
sudo service lighttpd reload


Create the file "/var/www/info.php" and put in it:

Sudo nano /var/www/info.php

And add the following:
<?php phpinfo(); ?>

Then reboot the CHIP computer.
This is wrong, because you are starting the default lighttpd server. PirateBox is running a lighttpd configuration, which is not placed inside the systems configuration.
So please do instead
sudo /etc/init.d/piratebox restart

best regards Matthias



Edited 1 time(s). Last edit at 10/18/2016 05:41AM by Matthias.
Hi Matthias should I do the following steps after installing php5:

sudo lighttpd-enable-mod fastcgi fastcgi-php

Reload the configuration with:
sudo /etc/init.d/piratebox restart

And reboot the CHIP computer.
I just looked up what the script in this command does
sudo lighttpd-enable-mod fastcgi fastcgi-php

This only enables fastcgi-php for the system' lighttpd configuration.
Hi,

I've installed piratebox on a chip. It's been fun playing with it between my laptop and my phone.

Now, I'm doing a little experiment. I'm leaving it open as a community project. I've customised the welcome message to put it in the context of my neighbourhood. I want to see what people will put on it and if people will use it to chat!

I have a couple of questions about how piratebox works. First, I see that the welcome message is in a number of files. For example, I found the the text "Now, first of all, there is nothing illegal..." in the following files:

/opt/piratebox/www_content/index.html
/opt/piratebox/www_content/locales/data.en.properties
/opt/piratebox/share/content/index.html
/opt/piratebox/share/content/locales/data.en.properties

I don't understand why it needs to be in two different directories. What are the roles of directories /opt/piratebox/www_content and /opt/piratebox/share/content?

The second question is to ask if you could add a feature. While playing with piratebox with my android device, my laptop, and my pocketchip, I tried flooding the chat with messages. On the version of the portal served to my laptop, a vertical scroll bar appeared allowing me to go back and read messages that had been pushed out of view.

On the version of the portal served to my android device and to my pocketchip, no such scroll bar appeared. Messages pushed down out of view are out of reach. Could you add a scroll bar to the mobile version of the portal as well?

Thanks,

gerocortex
Hi,

Quote

I don't understand why it needs to be in two different directories. What are the roles of directories /opt/piratebox/www_content and /opt/piratebox/share/content?
/opt/piratebox/www_content is the source folder, which is copied over to the share folder. On the most PirateBoxes the share folder is on a USB stick. For the most people, it becomes much easier to edit HTML files on the stick over via sftp. Probably I should move the piratebox/www_content to src to make that more clear in the directory structure.
Ah, and I do not move the files, the files are copied. If you mess up editing the HTML stuff, you can delete the content folder in share and after a reboot everything is back again.

Quote

The second question is to ask if you could add a feature. While playing with piratebox with my android device, my laptop, and my pocketchip, I tried flooding the chat with messages. On the version of the portal served to my laptop, a vertical scroll bar appeared allowing me to go back and read messages that had been pushed out of view.

On the version of the portal served to my android device and to my pocketchip, no such scroll bar appeared. Messages pushed down out of view are out of reach. Could you add a scroll bar to the mobile version of the portal as well?
I think that should be possible, but I do not know how to solve it... I am lacking the skills for good CSS and HTML. I added it as a github issue to keep track of that.
EDIT: This issue has resolved itself. This morning when I clicked on "Forum", I got the message below. This afternoon, however, I'm sent directly to the forum. I don't know what may have caused this to recover.

What do I have to do to configure kareha fully. Whenever I click on the "Forum" link at the top of the home page, I get the message

Quote
The kareha imageboard is not fully configured.

Visit the following Link to do the initial configuration.

Or go back to PirateBox start page.


When I click on the link for initial configuration, it just takes me to the BBS where I can start new threads. I've tried manually running kareha.pl, but that doesn't help.

Thanks,



Edited 2 time(s). Last edit at 10/25/2016 08:17PM by gerocortex.
I'm having problems with the access point on wlan0 again. Everything was working fine, but I wanted to reflash CHIP to take avantage of the newest firmware (8G RAM as opposed to 4).

After re-installing piratebox on the new system, I can't get the AP to come up. "ip a" show wlan0 as down. Running "ip link set dev wlan0 up" doesn't change it's state. wlan0 does have the IP 192.168.77.1 assigned, but hostapd is not running.

NetworkManager is disabled, and there is no local connection for wlan0 in /etc/NetworkManager/system-connections. See, this post on the CHIP forums.

Where do I go from here in trouble shooting this?
when i do
>echo "sleep 30" >> /opt/piratebox/bin/hooks/hook_piratebox_start.sh
i get "bash: /opt/piratebox/bin/hooks/hook_piratebox_start.sh: Permission Denied"
@ark

I never added that delay and had no problems. I'm not sure why some people were adding that.

That said, what is the output of
ls -lF /opt/piratebox/bin/hooks/hook_piratebox_start.sh