Die eierlegende Wollmilchsau die auch Routen kann ;)
Geizhals » Forum » Netzwerk » Die eierlegende Wollmilchsau die auch Routen kann ;) (42 Beiträge, 1236 Mal gelesen) Top-100 | Fresh-100
Du bist nicht angemeldet. [ Login/Registrieren ]
...........
Re(11): Die eierlegende Wollmilchsau die auch Routen kann ;)
thE
12.04.2009, 15:33:09
Welchen Betreiber hast du den?
Das hier ist für 3.

Du musst den dial Mode auf user defined setzen.

/usr/local/dial/dial:

#!/bin/sh
rmmod ftdi_sio
rmmod pl2303
rmmod modem
rmmod usbserial
rmmod acm


if [ -f /usr/local/dial/use_huawei ] ; then
insmod acm
insmod usbserial vendor=0x12d1 product=0x1003 maxpacketsize=16384
else
# max packetsize for motov3xx
insmod acm maxpacketsize=16384
# default is the motorola v3xx vendor/product
insmod usbserial vendor=0x22b8 product=0x6402 maxpacketsize=16384
fi

insmod modem
insmod pl2303
insmod ftdi_sio

while true; do
  kill -9 $(ps|grep pppd|grep mobile|awk -F' ' '{print $1}') 2>/dev/null
  # is this needed?
  # /tmp/ppp/zerocd

  # sleep 5

  DEVICE=/dev/usb/acm/0
  export DEVICE
  
  /usr/local/dial/prepare # copies the needed files to /tmp/ppp/peers
  
  pppd call mobile >> /tmp/chat.log

  sleep 25
done

Bei dem maxpacketsize soll man sich spielen um eine stabile höhere Geschwindigkeit zu kriegen!
Das Script ist für Huawei und Moto! Wenn halt die Datei /usr/local/dial/use_huawei existiert, ist es für Huawei.

/usr/local/dial/prepare:

#!/bin/sh
if [ -f /usr/local/dial/use_huawei ] ; then
cp /usr/local/dial/huawei220 /tmp/ppp/peers/mobile
# copy the init strings from provider 3 Austria to motov3xx.chat - just replace it with your isp
cp /usr/local/dial/3atPIN.chat /tmp/ppp/peers/mobile.chat
else
# copy the motorolla v3xx init script to /tmp/ppp/ppers
cp /usr/local/dial/motov3xx /tmp/ppp/peers/mobile
# copy the init strings from provider 3 Austria to motov3xx.chat - just replace it with your isp
cp /usr/local/dial/3at.chat /tmp/ppp/peers/mobile.chat
fi


# writes null entries to the pap-secrets and copy it to chap-secrets - if you need username/password insert
# in the first "" your username and in the second "" your password/pin

echo "# Secrets for authentication using CHAP" > /tmp/ppp/pap-secrets
echo "# client        server  secret                  IP addresses" >> /tmp/ppp/pap-secrets
echo '"" * "" *' >> /tmp/ppp/pap-secrets
chmod 600 /tmp/ppp/pap-secrets
cp /tmp/ppp/pap-secrets /tmp/ppp/chap-secrets


/usr/local/dial/motov3xx:

hide-password
noauth
debug
/dev/usb/acm/0
921600
defaultroute
noipdefault
noccp
nobsdcomp
usepeerdns
connect-delay 10000
nodetach
user ""
connect "/usr/sbin/chat -s -S -V -t 30 -f /tmp/ppp/peers/mobile.chat 2>>/tmp/chat.log"


/usr/local/dial/huawei220:

ide-password
noauth
debug
/dev/usb/tts/0
921600
defaultroute
noipdefault
noccp
nobsdcomp
usepeerdns
connect-delay 10000
nodetach
user ""
connect "/usr/sbin/chat -s -S -V -t 30 -f /tmp/ppp/peers/mobile.chat 2>>/tmp/chat.log"


/usr/local/dial/3at.chat

'' 'ATZ'
'OK' 'ATS0=0'
'OK' 'AT+CGATT=0'
'OK' 'AT+CGQREQ=1,0,0,0,0,0'
'OK' 'AT+CGQMIN=1,0,0,0,0,0'
'OK' 'AT+CGDCONT=1,"IP","drei.at","0.0.0.0",0,0'
'OK' 'ATE1V1&D2'
'OK' 'AT+IFC=2,2'
'OK' 'ATDT*99#'
'CONNECT' ''

Das ist ohne PIN Code! Da ja das motorola schon eingeschalten ist und man keinen Pin benötigt!

Fürs Huawei braucht man den PIN (wenn er nicht deaktiviert ist)! Hier ist 1234 der PIN Code!
/usr/local/dial/3atPIN.chat:

'' 'ATZ'
'OK' 'AT+CPIN=1234'
'OK' 'ATS0=0'
'OK' 'AT+CGATT=0'
'OK' 'AT+CGQREQ=1,0,0,0,0,0'
'OK' 'AT+CGQMIN=1,0,0,0,0,0'
'OK' 'AT+CGDCONT=1,"IP","drei.at","0.0.0.0",0,0'
'OK' 'ATE1V1&D2'
'OK' 'AT+IFC=2,2'
'OK' 'ATDT*99#'
'CONNECT' ''


Nachdem du das dort alles angelegt hast (also in /usr/local/dial) musst du noch:
flashfs save && flashfs commit && flashfs enable
sagen, sodaß er das ganze in den NVRAM schreibt und auch nach dem Reboot noch da ist.

Alle Scripte sind von mir selbst entworfen worden (nachdem ich die koppel Scripte analysiert habe). Also könnte es ruig sein das noch Fehler drinnen sind!
Normalerweise sollte er dir nach /tmp/chat.log mitloggen! Ansonsten in der Konsole einfach mal dial 99 (99 = User definied was du ja über die GUI einstellen musst) sagen und schaun was er hinschreibt!

mfg
...
:P
12.04.2009, 15:33 Uhr - Editiert von thE, alte Version: hier
Antworten PM Übersicht Chronologisch Zum Vorgänger
 
Melden nicht möglich
 

Dieses Forum ist eine frei zugängliche Diskussionsplattform.
Der Betreiber übernimmt keine Verantwortung für den Inhalt der Beiträge und behält sich das Recht vor, Beiträge mit rechtswidrigem oder anstößigem Inhalt zu löschen.
Datenschutzerklärung