Quantcast
Channel: PirateBox Forum - Raspberry Pi(rate)Box
Viewing all 1863 articles
Browse latest View live

Re: Pi Vessel on the Raspberry

$
0
0
American company, produced in Germany, debelopers from eastern Europe.

Re: WiFi AP with Edimax EW-7811Un

$
0
0
Thanks mrd0ll4r.

I do all the steps but whan I have to deconect the ethernet cable, I can't open the piratebox with putty.
Have i done something wrong?

thanks.

Re: WiFi AP with Edimax EW-7811Un

$
0
0
jbtorras,

do you have a "Pirate Box (Share freely)" Wifi now? Because that's the greater goal here:
Use the LAN/Ethernet connection with SSH/PuTTy to set up the box
-> RPi should now "create" a WiFi Access Point named "Pirate Box (something something)"

Because of that the RPi is not reachable via the same IP-Address as before. In fact you'd have to join the WiFi and then SSH/PuTTy to it.

Timesave with date v.8.23

$
0
0
Heyho!

I fiddled around with my RPi some more ad tested the forum, which reported every post as a flood. With a lot of digging I think the problem is the clock, which is reset to Wed Dec 31 17:00:00 MST 1969 at every reboot - at least that's the issue I want to have solved ;-)

We have the timesave feature, which I activated after setting the correct time. The timesave_file currently has "201410121620" in it.
crontab -l says:
blabla...
*/5 * * * * /opt/piratebox/bin/timesave.sh /opt/piratebox/conf/piratebox.conf save


Which is working. Time is saved every 5 minutes. Now the problem is: it's not restored. I already applied the latest commit to my timesave.sh (missing 'then'), so the script runs now, but date reports:
date: invalid date '201410121620'


Now I messed around with the date command, and the problem is:
date +%Y%m%d%H%M -s "201410121620" gives me "date: invalid date '2014.....'"
date +%C%g%m%d%H%M -s "201410121620" gives me "date: invalid date '2014.....'" (version used in the timesave.sh script)


Now I'm pretty much out of ideas. What worked for me was setting date and time in two commands:
date +%Y%m%d -s 20141012
date +%T -s 16:58:00

What I could do now is:
-seperate date and time in two files/seperate by line or something else
-possible introduce another variable in piratebox.conf
-do a lot of stuff with the timesave.sh script to work with the two files and set the time correctly

Another big question I'm having is: When is the timesave.sh script called to restore the clock?

mrd0ll4r

EDIT: I now understand why this issue comes up now:
In the months before today I had a spare ethernet cable and the RPi also had internet access. I guess it synced the time via NTP... but I don't have that cable anymore, and I just bought a USB power pack to go mobile with the whole thing.. so I still need the timesave :-/

[SSID] I don't see any

$
0
0
Hey !

So I tried to do all the thing with 2 differents wifi dongle. Everytime at the state when I need to connect to the ssid there isn't any.

So I checked the list of "known for working" wifi dongle and I bought TL-WN822N

So I formatted my usb drive and sd card and started everything from 0 with this new dongle.

But now that I removed the ethernet cable from my Pi and disconnected the power, and boot it again without ethernet cable I don't see any SSID !!!

It can be from my phone or my computer

Is there any way to, I don't know, download drivers for it ? or something so I can enjoy my new stuff :)

Thank you very much
Have a nice evening

Re: [SSID] I don't see any

$
0
0
Hi,
which image did you download?
Can you please post the output of the command on the RPi?
cat /opt/piratebox/version

Matthias

Re: Timesave with date v.8.23

$
0
0
Hi,
which image version do you run?
I added the following file to the new RPi-image-version, that is started on bootup:

/etc/systemd/system/timesave.service
[Unit]
Description=Restore fake RTC-time
[Service]
ExecStart=/bin/bash /opt/piratebox/bin/timesave.sh /opt/piratebox/conf/piratebox.conf recover
[Install]
WantedBy=multi-user.target

And I think I enabled it per default:
systemctl enable timesave.service

That was missing on the old image.

On testing with librarybox I encountered the "recover" problem two or three times, and AFTER I fixed it, it worked for me with the default - whatever it was 8-)

So, maybe you can simply run the following command to change the format for a working recovery:
sed 's|date `c|date -s `c|' -i /opt/piratebox/bin/timesave.sh
sed 's|date +%C%g%m%d%H%M|date|' -i /opt/piratebox/bin/timesave.sh
(I added those fixes to the package-prepare of a REAL archlinux package file, so the file is fixed for the archlinux version)

Can you check if that is fixing the issue for you?
Matthias

Re: Timesave with date v.8.23

$
0
0
Hey Matthias,

I run the very first ArchLinux Image we had...
Thanks for the timesave.service, I hope it does its job ;-)

I got the timesave script working for me now, changing the format to the "default" kina worked, but introduced a new problem: the timesave script compares the two dates and checks if we change the time backwards (which is clever) -> it can't do that correctly with a date that looks like "Sun Oct 12 22:20:34 MDT 2014" because... how the hell should it know how to do that.

In the end, I removed all these checks. Manually calling the timesave script works (save and restore), so I guess it works automatically as well. Here is the current version running:

#!/bin/sh

#  This script enables a sort of timerescue System
#  for Systems without a Realtime Clock
#  like TP-Link MR3020 , RaspberryPI
#
#  It does not reflect the real time, but 
#  gives a sort of stability to complete standalone 
#  systems.
#
#  Licenced under GPL-2  @ 2012
#    Matthias Strubel    matthias.strubel@aod-rgp.de

##function for similar saving & getting time
get_datetime() {
	date  
}


# Load configfile

if [ -z  $1 ] || [ -z $2 ] ; then
  echo "Set up a crontab entry for regulary saving the time"
  echo "Usage $0 <path to piratebox.conf> <step>"
  echo "    Valid steps are:"
  echo "       install    - installs the needed parts into crontab"
  echo "       save       - saves time into file"
  echo "       recover    - recovers the time from a file"

  exit 1
fi

. $1


if [ "$2" = "install" ] ; then
    crontab -l   >  $PIRATEBOX_FOLDER/tmp/crontab 2> /dev/null
    echo "#--- Crontab for PirateBox-Timesave" >>  $PIRATEBOX_FOLDER/tmp/crontab
    echo " */5 * * * *   $PIRATEBOX_FOLDER/bin/timesave.sh $PIRATEBOX_FOLDER/conf/piratebox.conf save "  >> $PIRATEBOX_FOLDER/tmp/crontab
    crontab $PIRATEBOX_FOLDER/tmp/crontab

    echo  "initialize timesave file"
    touch $TIMESAVE
    chmod a+rw $TIMESAVE
    get_datetime  > $TIMESAVE


    echo "Remember MAY have to cron active..."
    echo "  on OpenWrt run:  /etc/init.d/piratebox enable"
 
    exit 0
fi

if [ "$2" = "save" ] ; then
#    if [ -e $TIMESAVE ] ; then
#	if [ `get_datetime` -lt  `cat $TIMESAVE` ] ; then
#		 logger -s "$0 : sorry, current date-time is lower then saved one, don't save it this time"
#		 exit 1
#	fi
#    fi

    #Save Datetime in a recoverable format...
    get_datetime  > $TIMESAVE
    exit 0
fi

if [ "$2" = "recover" ] ; then
#    if [ `get_datetime` -lt  `cat $TIMESAVE` ] ;
#then
	    date -s "`cat $TIMESAVE `"
	    [ "$?" != "0" ] &&  echo "error in recovering time" && exit 255
	    echo "Time recovered"
	    exit 0
#    else
#	   echo "Sorry, changing timebackward via timesave is not possible"
#	   exit 1
#    fi
fi

Thanks for your help! I think it's working now :P

Re: Timesave with date v.8.23

$
0
0
Hey,
ok I'm glad it is working and thank you for sharing the code!

Do you have spare SD-Card where you can try to verify the timesave stuff on a new image?

best regards Matthias

Re: Timesave with date v.8.23

$
0
0
Hey Matthias,

just verified it: Working :-)

Sadly no, sorry... but I checked my version: piratebox-ws_1.0.0

I'll keep my eyes and ears open for a SD card though ;-)

Btw, is there a straightforward way on how to update the piratebox? I don't mean the ArchLinuxARM packet updates, that's easy - how to update the piratebox scripts?

mrd0ll4r

Re: Timesave with date v.8.23

$
0
0
exchange the scripts in /opt/piratebox with the one of downloads.piratebox.de (piratebox_ws-current.tar.gz)

BUT, I'm working on a ArchLinux package for LibraryBox right now, that can be later used for PirateBox as well (https://github.com/LibraryBox-Dev/package-arch-librarybox)

Matthias

Re: [SSID] I don't see any

$
0
0
piratebox-ws_1.0.0

this is the result of your command

And I downloaded ArchLinuxARM-2014.05-rpi.img

Thank you for your quick answer

Re: [SSID] I don't see any

$
0
0
The new version of this adapter (v3) uses a different chipset from Realtek instead of one from Atheros. Because of that the installed hostapd probably doesn't work as intended. [wikidevi.com]

Re: [SSID] I don't see any

$
0
0
Ok !

So what am I supposed to do now ?

Re: [SSID] I don't see any


Re: USB FAT-Storage

$
0
0
Hi Mattias

Thanks for the post

I got it sorted. It works!

Thanks.
Cretten

Re: [SSID] I don't see any

$
0
0
Tobias Wrote:
-------------------------------------------------------
> You can try the steps described here
> [forum.piratebox.cc], but I
> am not sure if it is the right version for your
> chipset.

Thank you

But it doesn't work :/

Re: [SSID] I don't see any

Few questions about the Pi and compatibility

$
0
0
Hello,
Sorry if this has been answered before, I've tried looking around quite a bit but have only got more confused. I'm trying to set up a piratebox using my raspberry pi, I accidently bought a open-wrt compatible device (the TP-link tl-mr3040 v 2.3) instead of the right wifi dongle though. Is it possible to run the piratebox through a hardwired connection? Forgive me if the answer is really obvious, this is all very new to me.

I've been wanting to make a LAN wireless hotspot (I got an old router that I changed to get power from usb so i could make it portable with a battery pack) so people could connect and share files etc but most solutions with that require a few different applications on the pi and the devices trying to connect. The piratebox seems to do everything I want, pretty effortlessly it looks like once it's set up so If anything I'll just end up changing the TP-LINK into the pirate box and or forking over some extra cash for the right raspberry pi dongle. I was just wanting to make sure there wasn't any workarounds first to save myself some time and money.

Thank you very much for your time, I appreciate it.

Password

$
0
0
Hello i have the pi b+. The boot is ok but the password root is wrong it say access denied. What i can do ??

Thanks for your time
Viewing all 1863 articles
Browse latest View live