inital dump

This commit is contained in:
2021-09-04 23:20:35 +02:00
parent 8d187d4413
commit 976d93836a
189 changed files with 26587 additions and 0 deletions

View File

@ -0,0 +1,2 @@
5MB

Binary file not shown.

View File

@ -0,0 +1,23 @@
wget http://raspberry-at-home.com/files/sakis3g.tar.gz
sudo mkdir /usr/bin/modem3g
sudo chmod 777 /usr/bin/modem3g
sudo cp sakis3g.tar.gz /usr/bin/modem3g
cd /usr/bin/modem3g
sudo tar -zxvf sakis3g.tar.gz
sudo chmod +x sakis3g
sudo ./sakis3g --interactive
----------------
1. 3G Verbinden
2. <20>ber USB
3. Huawei Mobile
4. Interface 0
-----------------

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,3 @@
Salmenkopf: Download: 4,52Mbit/s Upload: 3,10Mbit/s
Kirchkopf: Download: 2,40Mbit/s Upload: 3,00Mbit/s

View File

@ -0,0 +1,8 @@
sudo apt-get install ppp usb-modeswitch
sudo usb_modeswitch -I -v 12d1 -p 1446 -V 12d1 -P 1446 -M '55534243123456780000000000000011062000000100000000000000000000'
sudo usb_modeswitch -v 12d1 -p 14fe -M '55534243123456780000000000000011062000000100000000000000000000'

View File

@ -0,0 +1,4 @@
0 */6 * * * sudo /usr/bin/modem3g/sakis3g connect --console APN='web.vodafone.de' USBINTERFACE='0' USBMODEM='12d1:1436'

View File

@ -0,0 +1,25 @@
#!/bin/sh -e
# V0.1 17.03.2017
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
printf "%sStarting 3G Modem%s /n"
sudo /usr/bin/modem3g/sakis3g connect --console APN='web.vodafone.de' USBINTERFACE='0' USBMODEM='12d1:1436'
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
exit 0

View File

@ -0,0 +1,60 @@
try:
stdoutdata = subprocess.getoutput('/usr/bin/modem3g/sakis3g status')
print('[sakis3g]Network Status: ' + stdoutdata)
logging.info('[sakis3g]Network Status: ' + stdoutdata)
if enable_modem == 'true' and 'Nicht' in stdoutdata:
print('[sakis3g]not connected, trying to reconnect')
print('[sakis3g]not connected, trying to reconnect')
logging.info('[sakis3g]not connected, trying to reconnect')
stdoutdata = subprocess.getoutput("/usr/bin/modem3g/sakis3g --sudo connect --console APN='" + modem_apn + "' USBINTERFACE='0' USBMODEM='12d1:1436'")
print(stdoutdata)
logging.info(stdoutdata)
logging.info('[sakis3g] disconnected')
stdoutdata = subprocess.getoutput("/usr/bin/modem3g/sakis3g --sudo disconnect --console APN='" + modem_apn + "' USBINTERFACE='0' USBMODEM='12d1:1436'")
print(stdoutdata)
print('[sakis3g]reconnection successful')
logging.info(stdoutdata)
logging.info('[sakis3g]reconnection hopefully successful')
try:
ftp.connect(ftp_url)
ftp.login(ftp_user,ftp_pw)
print('re-connecting ftp successful!')
logging.info('re-connecting ftp successful!')
ftp.cwd(ftp_log_directory)
ftp.storbinary('STOR ' + log_name, open(log_directory+log_name,'rb'),1024)
ftp.sendcmd('SITE CHMOD 754 '+log_name)
print('uploaded log-file successful!')
logging.info('uploaded log-file successful!')
except Exception as e4:
print(str(e4))
logging.error(str(e4))
else:
print('[sakis3g]if this appears you are connected or there is a bug!')
logging.info('[sakis3g]if this appears you are connected or there is a bug!')
try:
stdoutdata = subprocess.getoutput('/usr/bin/modem3g/sakis3g status')
print('[sakis3g]Network Status: ' + stdoutdata)
logging.info('[sakis3g]Network Status: ' + stdoutdata)
if enable_modem == 'true' and 'Nicht' in stdoutdata:
print('[sakis3g]not connected, trying to reconnect')
logging.info('[sakis3g]not connected, trying to reconnect')
stdoutdata = subprocess.getoutput("/usr/bin/modem3g/sakis3g --sudo disconnect --console APN='" + modem_apn + "' USBINTERFACE='0' USBMODEM='12d1:1436'")
print(stdoutdata)
logging.info(stdoutdata)
logging.info('[sakis3g] disconnected')
stdoutdata = subprocess.getoutput("/usr/bin/modem3g/sakis3g --sudo connect --console APN='" + modem_apn + "' USBINTERFACE='0' USBMODEM='12d1:1436'")
print(stdoutdata)
print('[sakis3g]reconnection successful')
logging.info(stdoutdata)
logging.info('[sakis3g]reconnection hopefully successful')
else:
print('[sakis3g]if this appears you are connected or there is a bug!')
logging.info('[sakis3g]if this appears you are connected or there is a bug!')

View File

@ -0,0 +1,16 @@
/usr/bin/modem3g/sakis3g --interactive
/usr/bin/modem3g/sakis3g connect --console APN='internet.eplus.de' USBINTERFACE='0' USBMODEM='12d1:1436'
/usr/bin/modem3g/sakis3g info
/usr/bin/modem3g/sakis3g status
/usr/bin/modem3g/sakis3g disconnect
O2/WinSim/Drillisch/Handyvertag.de/AldiTalk APN: internet.eplus.de
vodafone APN: web.vodafone.de