Zainstalowałem sobie arch'a obok ubuntu, żeby sobie poćwiczyć ;-). Rozpakowałem sobie hso driver skompilowałem i ok. Zrestartowałem ;-). Wpisałem lsmod widzę hso w modułach ok, patrzę są /dev/ttyHSO* ok. Czytam readme, dobra oglądam skrypt connect.sh wpisuje do niego dane i odpalam ./connect.sh up.
Po uruchomieniu skryptu pisze cały czas ok, ok a więc cieszę się (za wcześnie)
wpisuję ping www.google.pl, rozczarowanie
ifconfig hso0 nieaktywne (ale co dziwne diody nie pulsują (tak jakby modem był połączony) wpisuję ./connect.sh down i diody migotają (jak rozłączony)
Dane:
init
connecting
OK
OK
_OWANDATA: 1, 10.112.16.151, 0.0.0.0, 213.158.199.1, 213.158.199.5, 0.0.0.0, 0.0.0.0, 72000
OK n inet
connected
add route
set nameserver
eth0 Link encap:Ethernet HWaddr 00:24:8C:30:58:DF
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:28 Base address:0xc000
hso0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
POINTOPOINT NOARP MULTICAST MTU:1486 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
wlan0 Link encap:Ethernet HWaddr 00:24:23:0A:39:2E
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
wmaster0 Link encap:UNSPEC HWaddr 00-24-23-0A-39-2E-00-00-00-00-00-00-00-00-00-00
[NO FLAGS] MTU:0 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
disconnecting
reset nameserver
Skrypt connect.sh
#!/bin/sh
export APN="erainternet"
export USR="erainternet"
export PAS="erainternet"
export PIN="4562"
#export APN="erainternet"
#export USR="erainternet"
#export PAS="erainternet"
DEVICE=/dev/ttyHS0
TMPFIL=/tmp/connect.$$
up() {
echo connecting
stty 19200 -tostop
rm -f $TMPFIL
(
/usr/sbin/chat -E -s -V -f dial.cht <$DEVICE > $DEVICE
) 2>&1 |tee $TMPFIL
echo " "n inet
echo connected
echo " "
PIP="`grep '^_OWANDATA' $TMPFIL | cut -d, -f2`"
NS1="`grep '^_OWANDATA' $TMPFIL | cut -d, -f4`"
NS2="`grep '^_OWANDATA' $TMPFIL | cut -d, -f5`"
#ifconfig hso0 $PIP netmask 255.255.255.255 up
ORT="`route | grep default | awk '{printf $8}'`" # find the old default route and replace it
#route delete default dev $ORT
echo "add route"
#route add default dev hso0
#mv -f /etc/resolv.conf /tmp/resolv.conf.tmp
echo "set nameserver"
( # update the DNS
echo "nameserver $NS1"
echo "nameserver $NS2"
) > /etc/resolv.conf
rm -f $TMPFIL
}
down() {
echo disconnecting
/usr/sbin/chat -V -f stop.cht <$DEVICE >$DEVICE
ifconfig hso0 down
echo "reset nameserver"
mv -f /tmp/resolv.conf.tmp /etc/resolv.conf
}
init() {
echo init
/usr/sbin/chat -E -s -V -f init.cht <$DEVICE >$DEVICE
}
usage() {
echo Usage: $0 \\(up\\|down\\|restart\\|init\\)
}
case "$1" in
up)
up
;;
down)
down
;;
restart)
down
up
;;
init)
init
;;
*)
usage
;;
esac
Ktoś móglby pomóc?
Próbowałem już wszystkiego co mogłem znaleźsc (chyba), a próbuję zrobić w konsoli ponieważ xorga nie mam ;-)
Próbowałem:
#!/bin/sh
#################################################################################################
# Script: hso_connect.sh
# Purpose:Bring the interface up and down, send the needed AT commands to connect
#################################################################################################
# checking for root
USERID=`id -u`
if [ "$USERID" != "0" ]
then
echo "Need root permissions to run this script"
exit
fi
# always start with checking if a connection data file has been supplied
CONNECTIONFILE="conninfo.ini"
if [ -z "$2" ]
then
if [ ! -f $CONNECTIONFILE ]
then
echo "# this file contains the connection information for your subscription" >> $CONNECTIONFILE
echo "APN=web.pro.be" >> $CONNECTIONFILE
echo "# USER=" >> $CONNECTIONFILE
echo "# PASS=" >> $CONNECTIONFILE
echo "# PIN=" >> $CONNECTIONFILE
fi
else
if [ -f $2 ]
then
CONNECTIONFILE=$2
else
echo "Supplied file $2 does not exist"
exit 1
fi
fi
DEVICE=/dev/ttyHS0
NETDEV=hso0
TMPFIL=/tmp/connect.$$
OUTPUTFILE=/tmp/output.$$
SCRIPTFILE=/tmp/scriptfile.$$
#################################################################################################
# METHOD: Connect
# PURPOSE:Connect to the specified APN with the specified user and pass and get the ip
# set the IP to the interface
#################################################################################################
Connect()
{
echo "Initializing..."
#============================================================
# get the APN, USER, PASS and PIN out of the connection file
#============================================================
APN=`grep '^APN=' $CONNECTIONFILE | cut -d= -f2`
USER=`grep '^USER=' $CONNECTIONFILE | cut -d= -f2`
PASS=`grep '^PASS=' $CONNECTIONFILE | cut -d= -f2`
PIN=`grep '^PIN=' $CONNECTIONFILE | cut -d= -f2`
if [ -z "$APN" ]
then
echo "Please provide an APN (eg web.pro.be)"
exit
fi
#============================================================
# send the PIN, APN, USER and PASS
#============================================================
rm -f $SCRIPTFILE
echo "ABORT ERROR" > $SCRIPTFILE
echo "TIMEOUT 10" >> $SCRIPTFILE
echo "\\"\\" ATZ" >> $SCRIPTFILE
if [ -n "$PIN" ]
then
echo "OK \\"AT+CPIN=\\\\\\"$PIN\\\\\\"^m\\"" >> $SCRIPTFILE
fi
echo "OK \\"AT+COPS=0^m\\"" >> $SCRIPTFILE
echo "OK \\"\\d\\d\\d\\d\\d\\d\\dAT+COPS=?^m\\"" >> $SCRIPTFILE
echo "OK \\"AT+CGDCONT=1,,\\\\\\"$APN\\\\\\"^m\\"" >> $SCRIPTFILE
if [ -n "$USER" -a -n "$PASS" ]
then
echo "OK \\"AT\\$QCPDPP=1,1,\\\\\\"$PASS\\\\\\",\\\\\\"$USER\\\\\\"^m\\"" >> $SCRIPTFILE
fi
echo "OK \\"\\"" >> $SCRIPTFILE
#============================================================
# run the script
#============================================================
echo "Trying $APN ..."
rm -f $OUTPUTFILE
( /usr/sbin/chat -E -s -V -f $SCRIPTFILE <$DEVICE >$DEVICE ) 2> $OUTPUTFILE
ISERROR="`grep '^ERROR' $OUTPUTFILE`"
if [ -n "$ISERROR" ]
then
echo "Failed to initialize connection"
cat $OUTPUTFILE
echo " "
rm -f $OUTPUTFILE
exit
fi
ISERROR="`grep '^+CME' $OUTPUTFILE`"
if [ -n "$ISERROR" ]
then
echo "Failed to initialize connection"
cat $OUTPUTFILE
echo " "
rm -f $OUTPUTFILE
exit
fi
rm -f $SCRIPTFILE
sleep 2
#============================================================
# now actually connect
#============================================================
echo "Connecting..."
stty 19200 -tostop
# make the call script
echo "ABORT ERROR" > $SCRIPTFILE
echo "TIMEOUT 10" >> $SCRIPTFILE
echo "\\"\\" ATZ" >> $SCRIPTFILE
echo "OK \\"AT_OWANCALL=1,1,0^m\\"" >> $SCRIPTFILE
echo "OK \\"\\d\\d\\d\\d\\dAT_OWANDATA=1^m\\"" >> $SCRIPTFILE
echo "OK \\"\\"" >> $SCRIPTFILE
PIP=""
COUNTER=""
while [ -z "$PIP" -a "$COUNTER" != "-----" ]
do
echo "trying$COUNTER"
sleep 2
rm -f $OUTPUTFILE
( /usr/sbin/chat -E -s -V -f $SCRIPTFILE <$DEVICE > $DEVICE ) 2> $OUTPUTFILE
ISERROR=`grep '^ERROR' $OUTPUTFILE`
if [ -z "$ISERROR" ]
then
PIP="`grep '^_OWANDATA' $OUTPUTFILE | cut -d, -f2`"
NS1="`grep '^_OWANDATA' $OUTPUTFILE | cut -d, -f4`"
NS2="`grep '^_OWANDATA' $OUTPUTFILE | cut -d, -f5`"
fi
COUNTER="${COUNTER}-"
done
echo Connected
#============================================================
# always check the IP address
#============================================================
if [ -z "$PIP" ]
then
echo "We did not get an IP address from the provider, bailing ..."
cat $OUTPUTFILE
rm -f $OUTPUTFILE
exit
fi
rm -f $OUTPUTFILE
#============================================================
# setting network settings
#============================================================
echo "Setting IP address to $PIP"
ifconfig $NETDEV $PIP netmask 255.255.255.255 up
echo "Adding route"
route add default dev $NETDEV
mv -f /etc/resolv.conf /tmp/resolv.conf.hso
echo "Setting nameserver"
echo "nameserver $NS1" > $OUTPUTFILE
echo "nameserver $NS2" >> $OUTPUTFILE
mv $OUTPUTFILE /etc/resolv.conf
echo "Done."
}
#################################################################################################
# METHOD: Disconnect
# PURPOSE:disconnect from the providers network
#################################################################################################
Disconnect()
{
echo "Bringing interface down..."
ifconfig $NETDEV down
echo "Disconnecting..."
# make the disconnect script
rm -f $SCRIPTFILE
echo "TIMEOUT 10" >> $SCRIPTFILE
echo "ABORT ERROR" >> $SCRIPTFILE
echo "\\"\\" ATZ" >> $SCRIPTFILE
echo "OK \\"AT_OWANCALL=1,0,0^m\\"" >> $SCRIPTFILE
echo "OK \\"\\"" >> $SCRIPTFILE
#============================================================
# run the script
#============================================================
/usr/sbin/chat -V -f $SCRIPTFILE <$DEVICE >$DEVICE 2> /dev/null
if [ -f /tmp/resolv.conf.hso ]
then
echo "Reset nameserver..."
mv -f /tmp/resolv.conf.hso /etc/resolv.conf
fi
echo "Done."
}
#################################################################################################
# METHOD: usage
# PURPOSE:
#################################################################################################
usage()
{
echo Usage: $0 \\(up\\|down\\|restart\\)
}
#################################################################################################
# Choose your action
#################################################################################################
case "$1" in
up)
Connect
;;
down)
Disconnect
;;
restart)
Disconnect
Connect
;;
*)
usage
;;
esac
Wynik:
Initializing...
Trying erainternet ...
Failed to initialize connection
OK
OK
OK
OK
ERRORFailed (ERROR)
Próbowałem:
#!/bin/sh
export APN="internet.eplus.de"
export USR="eplus"
export PAS="gprs"
export PIN="0000"
#export APN="web.vodafone.de"
#export USR=""
#export PAS=""
DEVICE=/dev/ttyHS0
TMPFIL=/tmp/connect.$$
up() {
echo connecting
stty 19200 -tostop
rm -f $TMPFIL
(
/usr/sbin/chat -E -s -V -f dial.cht <$DEVICE > $DEVICE
) 2>&1 |tee $TMPFIL
echo " "n inet
echo connected
echo " "
PIP="`grep '^_OWANDATA' $TMPFIL | cut -d, -f2`"
NS1="`grep '^_OWANDATA' $TMPFIL | cut -d, -f4`"
NS2="`grep '^_OWANDATA' $TMPFIL | cut -d, -f5`"
#ifconfig hso0 $PIP netmask 255.255.255.255 up
ORT="`route | grep default | awk '{printf $8}'`" # find the old default route and replace it
#route delete default dev $ORT
echo "add route"
#route add default dev hso0
#mv -f /etc/resolv.conf /tmp/resolv.conf.tmp
echo "set nameserver"
( # update the DNS
echo "nameserver $NS1"
echo "nameserver $NS2"
) > /etc/resolv.conf
rm -f $TMPFIL
}
down() {
echo disconnecting
/usr/sbin/chat -V -f stop.cht <$DEVICE >$DEVICE
ifconfig hso0 down
echo "reset nameserver"
mv -f /tmp/resolv.conf.tmp /etc/resolv.conf
}
init() {
echo init
/usr/sbin/chat -E -s -V -f init.cht <$DEVICE >$DEVICE
}
usage() {
echo Usage: $0 \\(up\\|down\\|restart\\|init\\)
}
case "$1" in
up)
up
;;
down)
down
;;
restart)
down
up
;;
init)
init
;;
*)
usage
;;
esac
Wynik:
connecting
OK
OK
ERRORFailed (ERROR)
n inet
connected
add route
set nameserver
Próbowalem dalej:
Blueconnect na USB
Michal Sutkowski michal w sutkowski.pl
Nie, 1 Kwi 2007, 19:57:23 CEST
* Poprzednia wiadomość: [Th] kilka problemow
* Następna wiadomość: Blueconnect na USB
* Wiadomości posortowane według: [ daty ] [ wątku ] [ tytułu ] [ autora ]
Saturday 31 of March 2007 11:17:49 Paweł Kośka napisał(a):
> Witam,
>
> Czy ktoś korzysta z blueconnecta na modemie USB? Najlepiej takim co
> obsługuje HSDPA ;)
> Właśnie najlepiej jak by działał ten Option ICON z Ery, bo on HSDPA
> obsługuje. Szukam jakiś informacji czy komuś działają te urządzenia.
Potwierdzam, działa :-)
Po przyłączeniu widać to jako nośnik pamięci USB (read only) ze sterownikami
do windowsów. Należy uruchomić programik icon_switch, który przełącza
urządzenie w tryb portu szeregowego. Następnie ładujemy moduł 'usbserial' i
już możemy się bawić w łączenie w erą.
Tworzymy plik "/etc/ppp/peers/era" z zawartością:
noauth
connect "/usr/sbin/chat -v -f /etc/ppp/era-connect"
disconnect "/usr/sbin/chat -v -f /etc/ppp/era-disconnect"
/dev/tts/USB0
crtscts
lock
local
defaultroute
nodetach
usepeerdns
lcp-echo-failure 4
lcp-echo-interval 65535
a następnie plik "/etc/ppp/era-connect" o zawartości:
TIMEOUT 600
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
SAY 'Startuję HDSPA'
"" ATZ
OK 'AT+CPIN=Twój_PIN!!!'
OK 'AT+CGDCONT=1,"IP","erainternet","",0,0'
ABORT 'NO CARRIER'
SAY 'DIALING... \\n'
OK 'ATDT*99#'
zamieniając "Twój_PIN!!!" na swój PIN na kartę. Jeżeli nie masz PINu na karcie
kasujesz całą linijkę "OK 'AT+CPIN=Twój_PIN!!!".
i plik "/etc/ppp/era-disconnect" z zawartością:
"" "\\K"
"" "+++ATH0"
SAY "HDSPA disconnected"
Aby działał HSDPA trzeba załadować nowy firmware. To już trzeba zrobić w
Windowsach albo w salonie Ery.
> Modem USB jest chyba dla mnie jedynym rozwiązaniem skoro chcę używać BC na
> 3 różnych maszynach.
ja używam ICONa jako łącze backupowe do internetu. W momencie kiedy brakuje
internetu w którymkolwiek z serwerów, którymi sie opiekuję przyjeżdżam z
ICONem, podłączam i już jest internet :-D
> Zastanawiam się też nad kartą Novatel Wireless Merlin XU870 do laptopa bez
> pcmcia. On posiada tylko Express Card, chociaż ten na USB był by lepszy...
> do stacjonarnego PC też bym mógł podłączyć.
>
>
> Macie jakieś doświadczenie w tym zakresie?
gdybyś miał jakieś problemy to pisz na mój adres firmowy:
michal.sutkowski w ppietc.eu
Pozdrawiam.
--
Michał Sutkowski
Nie wyszło
Ktoś ma jeszcze jakieś pomysły?
zamiast
umieść
Wtedy powinno lecieć wszystko do logów systemowych
Jeszcze druga sprawa
Blueconnect na USB
Michal Sutkowski michal w sutkowski.pl
Nie, 1 Kwi 2007, 19:57:23 CEST
(...)
Tworzymy plik "/etc/ppp/peers/era" z zawartością:
noauth
connect "/usr/sbin/chat -v -f /etc/ppp/era-connect"
disconnect "/usr/sbin/chat -v -f /etc/ppp/era-disconnect"
/dev/tts/USB0
crtscts
lock
local
defaultroute
nodetach
usepeerdns
lcp-echo-failure 4
lcp-echo-interval 65535
"/dev/tts/USB0" - czy tu masz modem???
porównaj z moim dot. innej sieci akurat, ale zasada jest ta sama. Ja używałem tego skryptu z serownikiem usb_modeswitch, ale bez tego też chodziło w trochę inny sposób. No i miałem wpisane debug, które właśnie w /var/log/ gdzies zostawiało dużo komunikatów.
debug
show-password
connect "/usr/sbin/chat -v -f /etc/ppp/peers/iplus-connect"
disconnect "/usr/sbin/chat -v -f /etc/ppp/peers/iplus-disconnect"
/dev/ttyUSB2
921600
ipcp-accept-local
defaultroute
novj
nobsdcomp
novjccomp
nopcomp
noaccomp
noauth
Zainstalowałem sobie arch'a obok ubuntu, żeby sobie poćwiczyć ;-). Rozpakowałem sobie hso driver skompilowałem i ok. Zrestartowałem ;-). Wpisałem lsmod widzę hso w modułach ok, patrzę są /dev/ttyHSO* ok. Czytam readme, dobra oglądam skrypt connect.sh wpisuje do niego dane i odpalam ./connect.sh up.
czyli są coś w rodzaju /dev/ttyHDO0, /dev/ttyHDO1,.......albo podobnie
Po uruchomieniu skryptu pisze cały czas ok, ok a więc cieszę się (za wcześnie)
wpisuję ping www.google.pl, rozczarowanie
ifconfig hso0 nieaktywne (ale co dziwne diody nie pulsują (tak jakby modem był połączony) wpisuję ./connect.sh down i diody migotają (jak rozłączony)
Dane:
init
connecting
OK
OK
_OWANDATA: 1, 10.112.16.151, 0.0.0.0, 213.158.199.1, 213.158.199.5, 0.0.0.0, 0.0.0.0, 72000
OK n inet
connected
add route
set nameserver
eth0 Link encap:Ethernet HWaddr 00:24:8C:30:58:DF
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:28 Base address:0xc000
hso0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
POINTOPOINT NOARP MULTICAST MTU:1486 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
wlan0 Link encap:Ethernet HWaddr 00:24:23:0A:39:2E
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
wmaster0 Link encap:UNSPEC HWaddr 00-24-23-0A-39-2E-00-00-00-00-00-00-00-00-00-00
[NO FLAGS] MTU:0 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
disconnecting
reset nameserver
Skrypt connect.sh
#!/bin/sh
export APN="erainternet"
export USR="erainternet"
export PAS="erainternet"
export PIN="4562"
#export APN="erainternet"
#export USR="erainternet"
#export PAS="erainternet"
DEVICE=/dev/ttyHS0
może ma być
DEVICE=/dev/ttyHSO0 # lub /dev/ttyHSO1....
TMPFIL=/tmp/connect.$$
up() {
echo connecting
stty 19200 -tostop
rm -f $TMPFIL
(
/usr/sbin/chat -E -s -V -f dial.cht <$DEVICE > $DEVICE
) 2>&1 |tee $TMPFIL
echo " "n inet
echo connected
echo " "
PIP="`grep '^_OWANDATA' $TMPFIL | cut -d, -f2`"
NS1="`grep '^_OWANDATA' $TMPFIL | cut -d, -f4`"
NS2="`grep '^_OWANDATA' $TMPFIL | cut -d, -f5`"
#ifconfig hso0 $PIP netmask 255.255.255.255 up
ORT="`route | grep default | awk '{printf $8}'`" # find the old default route and replace it
#route delete default dev $ORT
echo "add route"
#route add default dev hso0
#mv -f /etc/resolv.conf /tmp/resolv.conf.tmp
echo "set nameserver"
( # update the DNS
echo "nameserver $NS1"
echo "nameserver $NS2"
) > /etc/resolv.conf
rm -f $TMPFIL
}
down() {
echo disconnecting
/usr/sbin/chat -V -f stop.cht <$DEVICE >$DEVICE
ifconfig hso0 down
echo "reset nameserver"
mv -f /tmp/resolv.conf.tmp /etc/resolv.conf
}
init() {
echo init
/usr/sbin/chat -E -s -V -f init.cht <$DEVICE >$DEVICE
}
usage() {
echo Usage: $0 \\(up\\|down\\|restart\\|init\\)
}
case "$1" in
up)
up
;;
down)
down
;;
restart)
down
up
;;
init)
init
;;
*)
usage
;;
esac
Ktoś móglby pomóc?
J
ohn1212
Ależ, bardzo proszę.
John1212