Compare commits

..

10 Commits

Author SHA1 Message Date
Joerg Lehmann 3723913631 modify doc 2018-06-19 17:23:54 +02:00
Joerg Lehmann 06ee52826a zusaetzliche Stromspar-Massnahme 2018-06-01 10:07:07 +02:00
Joerg Lehmann 2d3c1ceda1 sync time when connected to internet 2018-05-29 17:51:58 +02:00
Joerg Lehmann e1a7c66288 README: set lower usb speed 2018-05-28 18:39:16 +02:00
Joerg Lehmann 1f12921207 doc change 2018-05-22 17:46:02 +02:00
Joerg Lehmann 6078aae52c Change Doc 2018-04-25 17:46:08 +02:00
Joerg Lehmann 09548e3b15 Send Heartbeat SMS (halbjaehrlich) 2018-04-25 17:26:59 +02:00
Joerg Lehmann 75ecf14c1a doc change 2018-04-06 21:15:12 +02:00
Joerg Lehmann 608da8198d doc change 2018-04-06 20:55:19 +02:00
Joerg Lehmann e92a444178 doc correction 2018-04-06 18:47:15 +02:00
4 changed files with 48 additions and 8 deletions

Binary file not shown.

View File

@ -2,7 +2,7 @@
## Hardware ## Hardware
- Raspberry Pi Zero W - Raspberry Pi Zero W
- 3G Stick Huawei E3531 - 3G Stick Huawei E3533
## INSTALLATION ## INSTALLATION
@ -44,9 +44,6 @@ Software installieren:
# apt-get install python-bottle # apt-get install python-bottle
# apt-get install privoxy # apt-get install privoxy
Firmware-Update:
# rpi-update
reboot reboot
``` ```
@ -59,8 +56,18 @@ dtparam=audio=off
# Disable Bluetooth # Disable Bluetooth
dtoverlay=pi3-disable-bt dtoverlay=pi3-disable-bt
# Disable the ACT LED on the Pi Zero.
dtparam=act_led_trigger=none
dtparam=act_led_activelow=on
``` ```
In /boot/cmdline.txt folgendes anhaengen:
```
dwc_otg.speed=1
```
Bluetooth Dienste disablen: Bluetooth Dienste disablen:
``` ```
systemctl disable hciuart.service systemctl disable hciuart.service
@ -80,11 +87,11 @@ network={
} }
``` ```
### USB Stick E3531 ### USB Stick E3533
``` ```
Einrichten GSM: Einrichten GSM:
/etc/usb_modeswitch.d/12d1:157d: /etc/usb_modeswitch.d/12d1:157d:
#Huawei E3531 #Huawei E3533
TargetVendor=0x12d1 TargetVendor=0x12d1
TargetProduct=0x1436 TargetProduct=0x1436
MessageContent="55534243123456780000000000000011063000000000010000000000000000" MessageContent="55534243123456780000000000000011063000000000010000000000000000"
@ -100,7 +107,7 @@ gammu sendsms TEXT 0765006123 -text "Halooo von beielipi"
/etc/privoxy/config anpassen: /etc/privoxy/config anpassen:
``` ```
debug 1024 debug 512
listen-address 192.168.255.1:8118 listen-address 192.168.255.1:8118
``` ```
@ -113,7 +120,7 @@ in /etc/privoxy/user.action folgendes anfuegen (am Ende):
# Jetzt kommt die Whitelist # Jetzt kommt die Whitelist
{ -block } { -block }
www.sbb.ch www.nbit.ch/files/heartbeat.html
*.autodesk.com *.autodesk.com
js-agent.newrelic.com js-agent.newrelic.com
bam.nr-data.net bam.nr-data.net
@ -158,6 +165,14 @@ $ tar cvf /var/tmp/proxypi-git-files.tar .
# systemctl enable my_web_server # systemctl enable my_web_server
# systemctl disable dhcpcd # systemctl disable dhcpcd
# systemctl disable avahi-daemon
# systemctl disable triggerhappy
Cronjob einrichten:
/etc/cron.d/send_sms:
@reboot root sleep 30;/home/pi/root-bin/send_sms
Reboot: Reboot:
# init 6 # init 6

View File

@ -15,4 +15,5 @@ while ! ping -c 1 -W 1 8.8.8.8 &>/dev/null ; do
fi fi
x=$((x+1)) x=$((x+1))
done done
/usr/sbin/ntpdate 3.de.pool.ntp.org
echo "$(date): Connected to Internet...- IP: $(/home/pi/root-bin/get_internet_ip)" echo "$(date): Connected to Internet...- IP: $(/home/pi/root-bin/get_internet_ip)"

24
root-bin/send_sms Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
#
# Sendet mindestens einmal pro Halbjahr eine Test-SMS,
# damit der Prepaid Account nicht wegen Nicht-Benutzung gesperrt
# wird.
#
# 25.4.2018 - Joerg Lehmann
#
MONTH="$(date +%m)"
STATE_DIR=/var/tmp
case ${MONTH} in
0[1-6]) HY=1
;;
*) HY=2
;;
esac
if [ ! -f ${STATE_DIR}/sms-sent.${HY} ]; then
rm ${STATE_DIR}/sms-sent.* 2>/dev/null
touch ${STATE_DIR}/sms-sent.${HY}
echo "Sending Test SMS for Half-Year ${HY}..."
gammu sendsms TEXT 0765006123 -text "Heartbeat from ProxyPi..."
fi