Jaki modem do Aero2

Daniel Dawid Majewski light-i w o2.pl
Pon, 28 Maj 2012, 00:32:09 CEST


W odpowiedzi na wiadomość z dnia 27.05.2012 23:35, od Grzesiek Sójka:
> Witam serdecznie.
>
> Właśnie kupiłem kartę do Aero2 i potrzebny mi modem (na USB). Co
> polecacie do PLD?
U mnie dobrze się spisuje Nokia 21M-02:
#!/bin/bash
USB_ID="0421:0638"
USB_LIST=$(lsusb)
_udevinf="/sbin/udevadm info"
[ $(id -u) -ne 0 ] && _udevinf="sudo /sbin/udevadm info"
CurrentDevice=$(echo "${USB_LIST}" | grep ${USB_ID})
find_nokiaCD() {
for IndexCD in {0..32}; do
	echo -n "Testing /dev/sr${IndexCD} : "
	if [ ! -b "/dev/sr${IndexCD}" ] ; then
		echo "Not existing" ; exit -1
	fi
	UdevInfoCD=$($_udevinf -a  -p $($_udevinf -q path -n /dev/sr${IndexCD}) 
| sed -n "/^.*DRIVERS==\"sr\".*$/,/^.*queue_type.*$/p")
	UdevVenMod=$(echo "${UdevInfoCD}" | egrep "ATTRS{(vendor|model)}")
	Vendor=$(echo "${UdevVenMod}" | grep "vendor" | sed 's#.*"\(.*\)"#\1#g' )
	Model=$(echo "${UdevVenMod}" | grep "model" | sed 's#.*"\(.*\)"#\1#g' )
# 	echo -n "\"${UdevVenMod}\"/\"${Vendor}\"/\"${Model}\" - "
	echo -n "\"${Vendor}\"/\"${Model}\" - "
	if [ "${Vendor}" == "Nokia   " -a "${Model}" == "USB Modem CD-ROM" ]; then
		echo "OK" ; break
	else
		echo "Mismatch"
	fi
done
# echo "End"
}
if [ -z "${CurrentDevice}" ]; then
	USB_ID="0421:0637"
	CurrentDevice=$(echo "${USB_LIST}" | grep ${USB_ID})
	[ -z "${CurrentDevice}" ] && exit -1
# 	USB_BusNo=$(echo "${CurrentDevice}" | sed -n 
"s/^Bus[[:space:]]\([[:digit:]]\{3\}\).*/\1/p")
# 	USB_DevNo=$(echo "${CurrentDevice}" | sed -n 
's/^.*Device[[:space:]]\([[:digit:]]\{3\}\).*/\1/p')
	find_nokiaCD
# 	exit 0
	eject -s /dev/sr${IndexCD}
	until [ -c "/dev/ttyACM0" ]; do
#	echo -n
	sleep 5
	done
fi
NAMESRVS="193.41.112.14 193.41.112.18"
sudo /usr/local/sbin/resolvh "${NAMESRVS}"
sudo wvdial
-----------------------------------
wvdial.conf:
[Dialer Defaults]
Modem = /dev/ttyACM0
;Baud = 460800
Baud = 921600
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 = AT+CGDCONT=1,"IP","darmowy"
Init4 = AT&C1
Carrier Check = no
Phone = *99#
;Phone = *99***1#
;Dial Command = ATDTW
Dial Command = ATD
Stupid Mode = 1
ISDN = 0
Auto DNS = 1
apn = darmowy
Username =;
Password =;
Auto Reconnect = on
-----------------------------------

  ;)
-- 
Pozdrawiam,
Daniel Dawid Majewski
jabber:light-i/pld-users.org



Więcej informacji o liście pld-users-pl