Discussion:
ppp and nokia 6630
(too old to reply)
Rodolfo Medina
2006-01-01 13:35:36 UTC
Permalink
I'm resuming and taking on the conversation developed in the thread
`Again about gprs', more clearly I hope.

Now: I connected a Nokia 6630 cellular phone to my laptop
with a mini usb cable. Debian Sarge 3.1 is the operating system.
I edited three scripts, that I'm reporting below:
/etc/ppp/peers/nokia, /etc/chatscripts/nokia and /etc/ppp/resolv/nokia.

The problem appears *also* if I put `AT&F' or `AT&F1' in place of `ATZ'
in /etc/chatscripts/nokia; and with the kernel 2.6 and also 2.4.

Sometimes the connection goes well, and this is the /var/log/syslog:



Jan 1 13:40:18 localhost pppd[3211]: pppd 2.4.3 started by root, uid 0
Jan 1 13:40:19 localhost chat[3212]: abort on (BUSY)
Jan 1 13:40:19 localhost chat[3212]: abort on (NO CARRIER)
Jan 1 13:40:19 localhost chat[3212]: abort on (VOICE)
Jan 1 13:40:19 localhost chat[3212]: abort on (NO DIALTONE)
Jan 1 13:40:19 localhost chat[3212]: abort on (NO DIAL TONE)
Jan 1 13:40:19 localhost chat[3212]: abort on (NO ANSWER)
Jan 1 13:40:19 localhost chat[3212]: abort on (DELAYED)
Jan 1 13:40:19 localhost chat[3212]: send (ATZ^M)
Jan 1 13:40:19 localhost chat[3212]: expect (OK)
Jan 1 13:40:19 localhost chat[3212]: ATZ^M^M
Jan 1 13:40:19 localhost chat[3212]: OK
Jan 1 13:40:19 localhost chat[3212]: -- got it
Jan 1 13:40:19 localhost chat[3212]: send
(AT+CGDCONT=1,"IP","web.omnitel.it"^M)
Jan 1 13:40:20 localhost chat[3212]: expect (OK)
Jan 1 13:40:20 localhost chat[3212]: ^M
Jan 1 13:40:20 localhost chat[3212]:
AT+CGDCONT=1,"IP","web.omnitel.it"^M^M
Jan 1 13:40:20 localhost chat[3212]: OK
Jan 1 13:40:20 localhost chat[3212]: -- got it
Jan 1 13:40:20 localhost chat[3212]: send (AT+CGATT=1^M)
Jan 1 13:40:20 localhost chat[3212]: expect (OK)
Jan 1 13:40:20 localhost chat[3212]: ^M
Jan 1 13:40:24 localhost chat[3212]: AT+CGATT=1^M^M
Jan 1 13:40:24 localhost chat[3212]: OK
Jan 1 13:40:24 localhost chat[3212]: -- got it
Jan 1 13:40:24 localhost chat[3212]: send (ATD*99#^M)
Jan 1 13:40:24 localhost chat[3212]: expect (CONNECT)
Jan 1 13:40:24 localhost chat[3212]: ^M
Jan 1 13:40:24 localhost chat[3212]: ATD*99#^M^M
Jan 1 13:40:24 localhost chat[3212]: CONNECT
Jan 1 13:40:24 localhost chat[3212]: -- got it
Jan 1 13:40:24 localhost chat[3212]: send (^M)
Jan 1 13:40:24 localhost pppd[3211]: Serial connection established.
Jan 1 13:40:24 localhost pppd[3211]: using channel 4
Jan 1 13:40:24 localhost pppd[3211]: Using interface ppp0
Jan 1 13:40:24 localhost pppd[3211]: Connect: ppp0 <--> /dev/ttyACM0
Jan 1 13:40:24 localhost hal.hotplug[3216]: could not get mountpoint
for sysfs
Jan 1 13:40:25 localhost pppd[3211]: sent [LCP ConfReq id=0x1
<asyncmap 0x0> <magic 0xadd86771> <pcomp> <accomp>]
Jan 1 13:40:25 localhost pppd[3211]: rcvd [LCP ConfRej id=0x1 <magic
0xadd86771> <pcomp> <accomp>]
Jan 1 13:40:25 localhost pppd[3211]: sent [LCP ConfReq id=0x2
<asyncmap 0x0>]
Jan 1 13:40:25 localhost pppd[3211]: rcvd [LCP ConfAck id=0x2
<asyncmap 0x0>]
Jan 1 13:40:27 localhost pppd[3211]: rcvd [LCP ConfReq id=0x0 <auth
pap> <mru 1500> <asyncmap 0xa0000>]
Jan 1 13:40:27 localhost pppd[3211]: No auth is possible
Jan 1 13:40:27 localhost pppd[3211]: sent [LCP ConfRej id=0x0 <auth
pap>]
Jan 1 13:40:27 localhost pppd[3211]: rcvd [LCP ConfReq id=0x1 <mru
1500> <asyncmap 0xa0000>]
Jan 1 13:40:27 localhost pppd[3211]: sent [LCP ConfAck id=0x1 <mru
1500> <asyncmap 0xa0000>]
Jan 1 13:40:27 localhost pppd[3211]: sent [LCP EchoReq id=0x0
magic=0x0]
Jan 1 13:40:27 localhost pppd[3211]: sent [CCP ConfReq id=0x1 <deflate
15> <deflate(old#) 15> <bsd v1 15>]
Jan 1 13:40:27 localhost pppd[3211]: sent [IPCP ConfReq id=0x1
<compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Jan 1 13:40:27 localhost pppd[3211]: rcvd [LCP EchoRep id=0x0
magic=0x0]
Jan 1 13:40:27 localhost pppd[3211]: rcvd [IPCP ConfReq id=0x0 <addr
10.6.6.6>]Jan 1 13:40:27 localhost pppd[3211]: sent [IPCP ConfAck
id=0x0 <addr 10.6.6.6>]Jan 1 13:40:27 localhost pppd[3211]: rcvd [LCP
ProtRej id=0x0 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Jan 1 13:40:27 localhost pppd[3211]: Protocol-Reject for 'Compression
Control Protocol' (0x80fd) received
Jan 1 13:40:28 localhost pppd[3211]: rcvd [IPCP ConfRej id=0x1
<compress VJ 0f 01>]
Jan 1 13:40:28 localhost pppd[3211]: sent [IPCP ConfReq id=0x2 <addr
0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Jan 1 13:40:28 localhost pppd[3211]: rcvd [IPCP ConfNak id=0x2 <addr
83.225.250.85> <ms-dns1 83.224.66.134> <ms-dns3 83.224.65.134>]
Jan 1 13:40:28 localhost pppd[3211]: sent [IPCP ConfReq id=0x3 <addr
83.225.250.85> <ms-dns1 83.224.66.134> <ms-dns3 83.224.65.134>]
Jan 1 13:40:28 localhost pppd[3211]: rcvd [IPCP ConfAck id=0x3 <addr
83.225.250.85> <ms-dns1 83.224.66.134> <ms-dns3 83.224.65.134>]
Jan 1 13:40:28 localhost pppd[3211]: Cannot determine ethernet address
for proxy ARP
Jan 1 13:40:28 localhost pppd[3211]: local IP address 83.225.250.85
Jan 1 13:40:28 localhost pppd[3211]: remote IP address 10.6.6.6
Jan 1 13:40:28 localhost pppd[3211]: primary DNS address
83.224.66.134
Jan 1 13:40:28 localhost pppd[3211]: secondary DNS address
83.224.65.134
Jan 1 13:40:28 localhost pppd[3211]: Script /etc/ppp/ip-up started
(pid 3223)
Jan 1 13:40:34 localhost pppd[3211]: Script /etc/ppp/ip-up finished
(pid 3223), status = 0x0
Jan 1 13:49:51 localhost pppd[3211]: Terminating on signal 15
Jan 1 13:49:51 localhost pppd[3211]: Connect time 9.4 minutes.
Jan 1 13:49:51 localhost pppd[3211]: Sent 187962 bytes, received
1167332 bytes.Jan 1 13:49:51 localhost pppd[3211]: Script
/etc/ppp/ip-down started (pid 3284)Jan 1 13:49:51 localhost
pppd[3211]: sent [LCP TermReq id=0x3 "User request"]
Jan 1 13:49:51 localhost pppd[3211]: rcvd [LCP TermAck id=0x3]
Jan 1 13:49:51 localhost pppd[3211]: Connection terminated.
Jan 1 13:49:51 localhost pppd[3211]: Waiting for 1 child processes...
Jan 1 13:49:51 localhost pppd[3211]: script /etc/ppp/ip-down, pid
3284
Jan 1 13:49:51 localhost hal.hotplug[3291]: could not get mountpoint
for sysfs
Jan 1 13:49:51 localhost pppd[3211]: Script /etc/ppp/ip-down finished
(pid 3284), status = 0x0
Jan 1 13:49:51 localhost pppd[3211]: Exit.



. Some other time, instead, the connection doesn't start, and this is
the /var/log/syslog after waiting 1 minute and 30 seconds:


Jan 1 13:27:25 localhost pppd[2487]: pppd 2.4.3 started by root, uid 0
Jan 1 13:27:26 localhost chat[2488]: abort on (BUSY)
Jan 1 13:27:26 localhost chat[2488]: abort on (NO CARRIER)
Jan 1 13:27:26 localhost chat[2488]: abort on (VOICE)
Jan 1 13:27:26 localhost chat[2488]: abort on (NO DIALTONE)
Jan 1 13:27:26 localhost chat[2488]: abort on (NO DIAL TONE)
Jan 1 13:27:26 localhost chat[2488]: abort on (NO ANSWER)
Jan 1 13:27:26 localhost chat[2488]: abort on (DELAYED)
Jan 1 13:27:26 localhost chat[2488]: send (ATZ^M)
Jan 1 13:27:26 localhost chat[2488]: expect (OK)
Jan 1 13:28:11 localhost chat[2488]: alarm
Jan 1 13:28:11 localhost chat[2488]: send (AT^M)
Jan 1 13:28:11 localhost chat[2488]: expect (OK)
Jan 1 13:28:56 localhost chat[2488]: alarm
Jan 1 13:28:56 localhost chat[2488]: Failed
Jan 1 13:28:56 localhost pppd[2487]: Connect script failed
Jan 1 13:28:57 localhost pppd[2487]: Exit.


. Below I'm reporting the three scripts.
Any help will be highly appreciated.

Happy new year,
Rodolfo



/etc/ppp/peers/nokia:

hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/nokia"
debug
-crtscts
/dev/ttyACM0
57600
defaultroute
noipdefault
remotename nokia
ipparam nokia
usepeerdns
logfile "/var/log/pppd.log"



/etc/chatscripts/nokia:

ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
'' ATZ
OK-AT-OK AT+CGDCONT=1,"IP","web.omnitel.it"
OK-AT-OK AT+CGATT=1 OK-AT-OK ATD*99#
CONNECT ''


/etc/ppp/resolv/nokia:

nameserver 194.185.97.134
Unruh
2006-01-01 14:47:00 UTC
Permalink
a) It would be really nice if you actually read the posts that people write
to try to help you. You still have not fixed the various errors that the
"successful" script throws up.

b) The problem you have is that the remote "modem" does not respond. This
has nothing to do with ppp. This has to do with your gps modem. (cell
phone)
read the manual for it.
If the modem does not respond to AT or ATZ there is nothing ppp or chat can
do. It is like asking us for help with ppp when what you did was forget to
switch on your cell phone.
It has nothing to do with your scripts. It has nothing to do with ppp. It
has nothing to do with your laptop.
Either the cable is not plugged in properly or your cell phone is not
switched on, or it is in some state where it does not respond to AT
commands.
Post by Rodolfo Medina
I'm resuming and taking on the conversation developed in the thread
`Again about gprs', more clearly I hope.
Now: I connected a Nokia 6630 cellular phone to my laptop
with a mini usb cable. Debian Sarge 3.1 is the operating system.
/etc/ppp/peers/nokia, /etc/chatscripts/nokia and /etc/ppp/resolv/nokia.
The problem appears *also* if I put `AT&F' or `AT&F1' in place of `ATZ'
in /etc/chatscripts/nokia; and with the kernel 2.6 and also 2.4.
Jan 1 13:40:18 localhost pppd[3211]: pppd 2.4.3 started by root, uid 0
Jan 1 13:40:19 localhost chat[3212]: abort on (BUSY)
Jan 1 13:40:19 localhost chat[3212]: abort on (NO CARRIER)
Jan 1 13:40:19 localhost chat[3212]: abort on (VOICE)
Jan 1 13:40:19 localhost chat[3212]: abort on (NO DIALTONE)
Jan 1 13:40:19 localhost chat[3212]: abort on (NO DIAL TONE)
Jan 1 13:40:19 localhost chat[3212]: abort on (NO ANSWER)
Jan 1 13:40:19 localhost chat[3212]: abort on (DELAYED)
Jan 1 13:40:19 localhost chat[3212]: send (ATZ^M)
Jan 1 13:40:19 localhost chat[3212]: expect (OK)
Jan 1 13:40:19 localhost chat[3212]: ATZ^M^M
Jan 1 13:40:19 localhost chat[3212]: OK
Jan 1 13:40:19 localhost chat[3212]: -- got it
Jan 1 13:40:19 localhost chat[3212]: send
(AT+CGDCONT=1,"IP","web.omnitel.it"^M)
Jan 1 13:40:20 localhost chat[3212]: expect (OK)
Jan 1 13:40:20 localhost chat[3212]: ^M
AT+CGDCONT=1,"IP","web.omnitel.it"^M^M
Jan 1 13:40:20 localhost chat[3212]: OK
Jan 1 13:40:20 localhost chat[3212]: -- got it
Jan 1 13:40:20 localhost chat[3212]: send (AT+CGATT=1^M)
Jan 1 13:40:20 localhost chat[3212]: expect (OK)
Jan 1 13:40:20 localhost chat[3212]: ^M
Jan 1 13:40:24 localhost chat[3212]: AT+CGATT=1^M^M
Jan 1 13:40:24 localhost chat[3212]: OK
Jan 1 13:40:24 localhost chat[3212]: -- got it
Jan 1 13:40:24 localhost chat[3212]: send (ATD*99#^M)
Jan 1 13:40:24 localhost chat[3212]: expect (CONNECT)
Jan 1 13:40:24 localhost chat[3212]: ^M
Jan 1 13:40:24 localhost chat[3212]: ATD*99#^M^M
Jan 1 13:40:24 localhost chat[3212]: CONNECT
Jan 1 13:40:24 localhost chat[3212]: -- got it
Jan 1 13:40:24 localhost chat[3212]: send (^M)
Jan 1 13:40:24 localhost pppd[3211]: Serial connection established.
Jan 1 13:40:24 localhost pppd[3211]: using channel 4
Jan 1 13:40:24 localhost pppd[3211]: Using interface ppp0
Jan 1 13:40:24 localhost pppd[3211]: Connect: ppp0 <--> /dev/ttyACM0
Jan 1 13:40:24 localhost hal.hotplug[3216]: could not get mountpoint
for sysfs
Jan 1 13:40:25 localhost pppd[3211]: sent [LCP ConfReq id=0x1
<asyncmap 0x0> <magic 0xadd86771> <pcomp> <accomp>]
Jan 1 13:40:25 localhost pppd[3211]: rcvd [LCP ConfRej id=0x1 <magic
0xadd86771> <pcomp> <accomp>]
Jan 1 13:40:25 localhost pppd[3211]: sent [LCP ConfReq id=0x2
<asyncmap 0x0>]
Jan 1 13:40:25 localhost pppd[3211]: rcvd [LCP ConfAck id=0x2
<asyncmap 0x0>]
Jan 1 13:40:27 localhost pppd[3211]: rcvd [LCP ConfReq id=0x0 <auth
pap> <mru 1500> <asyncmap 0xa0000>]
Jan 1 13:40:27 localhost pppd[3211]: No auth is possible
Jan 1 13:40:27 localhost pppd[3211]: sent [LCP ConfRej id=0x0 <auth
pap>]
Jan 1 13:40:27 localhost pppd[3211]: rcvd [LCP ConfReq id=0x1 <mru
1500> <asyncmap 0xa0000>]
Jan 1 13:40:27 localhost pppd[3211]: sent [LCP ConfAck id=0x1 <mru
1500> <asyncmap 0xa0000>]
Jan 1 13:40:27 localhost pppd[3211]: sent [LCP EchoReq id=0x0
magic=0x0]
Jan 1 13:40:27 localhost pppd[3211]: sent [CCP ConfReq id=0x1 <deflate
15> <deflate(old#) 15> <bsd v1 15>]
Jan 1 13:40:27 localhost pppd[3211]: sent [IPCP ConfReq id=0x1
<compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Jan 1 13:40:27 localhost pppd[3211]: rcvd [LCP EchoRep id=0x0
magic=0x0]
Jan 1 13:40:27 localhost pppd[3211]: rcvd [IPCP ConfReq id=0x0 <addr
10.6.6.6>]Jan 1 13:40:27 localhost pppd[3211]: sent [IPCP ConfAck
id=0x0 <addr 10.6.6.6>]Jan 1 13:40:27 localhost pppd[3211]: rcvd [LCP
ProtRej id=0x0 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Jan 1 13:40:27 localhost pppd[3211]: Protocol-Reject for 'Compression
Control Protocol' (0x80fd) received
Jan 1 13:40:28 localhost pppd[3211]: rcvd [IPCP ConfRej id=0x1
<compress VJ 0f 01>]
Jan 1 13:40:28 localhost pppd[3211]: sent [IPCP ConfReq id=0x2 <addr
0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Jan 1 13:40:28 localhost pppd[3211]: rcvd [IPCP ConfNak id=0x2 <addr
83.225.250.85> <ms-dns1 83.224.66.134> <ms-dns3 83.224.65.134>]
Jan 1 13:40:28 localhost pppd[3211]: sent [IPCP ConfReq id=0x3 <addr
83.225.250.85> <ms-dns1 83.224.66.134> <ms-dns3 83.224.65.134>]
Jan 1 13:40:28 localhost pppd[3211]: rcvd [IPCP ConfAck id=0x3 <addr
83.225.250.85> <ms-dns1 83.224.66.134> <ms-dns3 83.224.65.134>]
Jan 1 13:40:28 localhost pppd[3211]: Cannot determine ethernet address
for proxy ARP
Jan 1 13:40:28 localhost pppd[3211]: local IP address 83.225.250.85
Jan 1 13:40:28 localhost pppd[3211]: remote IP address 10.6.6.6
Jan 1 13:40:28 localhost pppd[3211]: primary DNS address
83.224.66.134
Jan 1 13:40:28 localhost pppd[3211]: secondary DNS address
83.224.65.134
Jan 1 13:40:28 localhost pppd[3211]: Script /etc/ppp/ip-up started
(pid 3223)
Jan 1 13:40:34 localhost pppd[3211]: Script /etc/ppp/ip-up finished
(pid 3223), status = 0x0
Jan 1 13:49:51 localhost pppd[3211]: Terminating on signal 15
Jan 1 13:49:51 localhost pppd[3211]: Connect time 9.4 minutes.
Jan 1 13:49:51 localhost pppd[3211]: Sent 187962 bytes, received
1167332 bytes.Jan 1 13:49:51 localhost pppd[3211]: Script
/etc/ppp/ip-down started (pid 3284)Jan 1 13:49:51 localhost
pppd[3211]: sent [LCP TermReq id=0x3 "User request"]
Jan 1 13:49:51 localhost pppd[3211]: rcvd [LCP TermAck id=0x3]
Jan 1 13:49:51 localhost pppd[3211]: Connection terminated.
Jan 1 13:49:51 localhost pppd[3211]: Waiting for 1 child processes...
Jan 1 13:49:51 localhost pppd[3211]: script /etc/ppp/ip-down, pid
3284
Jan 1 13:49:51 localhost hal.hotplug[3291]: could not get mountpoint
for sysfs
Jan 1 13:49:51 localhost pppd[3211]: Script /etc/ppp/ip-down finished
(pid 3284), status = 0x0
Jan 1 13:49:51 localhost pppd[3211]: Exit.
. Some other time, instead, the connection doesn't start, and this is
Jan 1 13:27:25 localhost pppd[2487]: pppd 2.4.3 started by root, uid 0
Jan 1 13:27:26 localhost chat[2488]: abort on (BUSY)
Jan 1 13:27:26 localhost chat[2488]: abort on (NO CARRIER)
Jan 1 13:27:26 localhost chat[2488]: abort on (VOICE)
Jan 1 13:27:26 localhost chat[2488]: abort on (NO DIALTONE)
Jan 1 13:27:26 localhost chat[2488]: abort on (NO DIAL TONE)
Jan 1 13:27:26 localhost chat[2488]: abort on (NO ANSWER)
Jan 1 13:27:26 localhost chat[2488]: abort on (DELAYED)
Jan 1 13:27:26 localhost chat[2488]: send (ATZ^M)
Jan 1 13:27:26 localhost chat[2488]: expect (OK)
Jan 1 13:28:11 localhost chat[2488]: alarm
Jan 1 13:28:11 localhost chat[2488]: send (AT^M)
Jan 1 13:28:11 localhost chat[2488]: expect (OK)
Jan 1 13:28:56 localhost chat[2488]: alarm
Jan 1 13:28:56 localhost chat[2488]: Failed
Jan 1 13:28:56 localhost pppd[2487]: Connect script failed
Jan 1 13:28:57 localhost pppd[2487]: Exit.
. Below I'm reporting the three scripts.
Any help will be highly appreciated.
Happy new year,
Rodolfo
hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/nokia"
debug
-crtscts
/dev/ttyACM0
57600
defaultroute
noipdefault
remotename nokia
ipparam nokia
usepeerdns
logfile "/var/log/pppd.log"
ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
'' ATZ
OK-AT-OK AT+CGDCONT=1,"IP","web.omnitel.it"
OK-AT-OK AT+CGATT=1 OK-AT-OK ATD*99#
CONNECT ''
nameserver 194.185.97.134
Rodolfo Medina
2006-01-01 18:49:05 UTC
Permalink
The cable is properly plugged in and the phone is switched on,
and in the user manual there's nothing that can help
with this problem.
The only thing I can say is that the problem disappears (it seems)
if I switch the phone off and then on again.
At 'www.nokia.com' all support is only about MS Windows, not certainly
about Linux.

Rodolfo
Unruh
2006-01-02 05:17:58 UTC
Permalink
Post by Rodolfo Medina
The cable is properly plugged in and the phone is switched on,
and in the user manual there's nothing that can help
with this problem.
The only thing I can say is that the problem disappears (it seems)
if I switch the phone off and then on again.
OK, yes, that sounds like the modem is in a state in which it is not
responding to AT commands. It may be that it gets left in that state after
you log off, or it may be you just have a defective phone.
Post by Rodolfo Medina
At 'www.nokia.com' all support is only about MS Windows, not certainly
about Linux.
This should not be linux specific. If you phone does not respond to AT
commands Windows should have trouble as well.
Now you could try the
+++ route
Have the system wait a second, send a +++ wait another second and then send
ATH and see if you get an OK response.

(+++ was the old Hayes modem escape which switched the modem into command
mode if it was not. It needs at least a 1 sec guard time befor and after
it.
Mikko Rapeli
2006-01-02 08:19:09 UTC
Permalink
Post by Unruh
Now you could try the
+++ route
Have the system wait a second, send a +++ wait another second and then send
ATH and see if you get an OK response.
Yes, I've used this disconnect script succesfully with many GPRS phones
including the Nokia 6630 (via both Bluetooth and USB):

#!/bin/sh
exec /usr/sbin/chat -V -s -S \
ABORT "BUSY" \
ABORT "ERROR" \
ABORT "NO DIALTONE" \
SAY "\nSending break to the modem\n" \
"" "\K" \
"" "\K" \
"" "\K" \
"" "+++ATH" \
"" "+++ATH" \
"" "+++ATH" \
SAY "\nPDP context detached\n"

Some phones are buggy and hang or crash for odd reasons. That's why
their so cheap. :)

-Mikko
Rodolfo Medina
2006-01-02 12:03:36 UTC
Permalink
Unruh, Mikko, thanks for your help.
Post by Unruh
Now you could try the
+++ route
Have the system wait a second, send a +++ wait another second and then send
ATH and see if you get an OK response.
Do you mean that in the console I should I type '+++ route', '+++'
and then 'ATH' ?
Post by Unruh
Yes, I've used this disconnect script succesfully with many GPRS phones
[...]
Do you mean that I should put that stuff in a file called
'/etc/chatscripts/nokia_disconnect' and add in '/etc/ppp/peers/nokia'
the following line:

disconnect "/usr/sbin/chat -f /etc/chatscripts/nokia_disconnect"

?

Cheers,
Rodolfo
Mikko Rapeli
2006-01-02 12:24:23 UTC
Permalink
Post by Rodolfo Medina
Do you mean that I should put that stuff in a file called
'/etc/chatscripts/nokia_disconnect' and add in '/etc/ppp/peers/nokia'
disconnect "/usr/sbin/chat -f /etc/chatscripts/nokia_disconnect"
No. Since my script had #!/bin/sh in the first line, it is an executable
script which requires execute permissions and a "disconnect
/etc/chatscripts/nokia_disconnect" line in the pppd configuration file.

-Mikko
Rodolfo Medina
2006-01-02 17:33:08 UTC
Permalink
Post by Unruh
Now you could try the
+++ route
Have the system wait a second, send a +++ wait another second and then send
ATH and see if you get an OK response.
Bear with my ignorance,
could you please explain how to do so?
I tried to type '+++' or 'ATH' from the console, but
of course all I got was a 'command not found' message.

Thanks indeed,
Rodolfo
Unruh
2006-01-02 19:27:45 UTC
Permalink
Post by Rodolfo Medina
Unruh, Mikko, thanks for your help.
Post by Unruh
Now you could try the
+++ route
Have the system wait a second, send a +++ wait another second and then send
ATH and see if you get an OK response.
Do you mean that in the console I should I type '+++ route', '+++'
and then 'ATH' ?
No the +++ route is the way of handling the modem.
And no you do not type it in the terminal you send it to the modem.
In your chat script put

"" "\d\d+++\d\dATH"

before you send AT
Post by Rodolfo Medina
Post by Unruh
Yes, I've used this disconnect script succesfully with many GPRS phones
[...]
Do you mean that I should put that stuff in a file called
'/etc/chatscripts/nokia_disconnect' and add in '/etc/ppp/peers/nokia'
disconnect "/usr/sbin/chat -f /etc/chatscripts/nokia_disconnect"
?
Cheers,
Rodolfo
Unruh
2006-01-02 19:25:48 UTC
Permalink
Post by Mikko Rapeli
Post by Unruh
Now you could try the
+++ route
Have the system wait a second, send a +++ wait another second and then send
ATH and see if you get an OK response.
Yes, I've used this disconnect script succesfully with many GPRS phones
#!/bin/sh
exec /usr/sbin/chat -V -s -S \
ABORT "BUSY" \
ABORT "ERROR" \
ABORT "NO DIALTONE" \
SAY "\nSending break to the modem\n" \
"" "\K" \
"" "\K" \
"" "\K" \
"" "+++ATH" \
Make those "\d\d+++\d\dATH"
so as to get the guard times in there.
+++ does not work if it it not preceeded and followed by one second of
silence for obvious reasons-- many pieces of binary code or compressed code
could have +++ in them.
Post by Mikko Rapeli
"" "+++ATH" \
"" "+++ATH" \
SAY "\nPDP context detached\n"
Some phones are buggy and hang or crash for odd reasons. That's why
their so cheap. :)
-Mikko
Mikko Rapeli
2006-01-02 20:14:16 UTC
Permalink
Post by Unruh
Make those "\d\d+++\d\dATH"
so as to get the guard times in there.
+++ does not work if it it not preceeded and followed by one second of
silence for obvious reasons-- many pieces of binary code or compressed code
could have +++ in them.
I'll do that. Thanks.

-Mikko
Rodolfo Medina
2006-01-02 23:41:48 UTC
Permalink
I tried to follow Unruh's and Mikko's indications, but the connection
failed:

Jan 3 00:27:56 localhost pppd[3999]: pppd 2.4.3 started by root, uid 0
Jan 3 00:27:57 localhost chat[4000]: abort on (BUSY)
Jan 3 00:27:57 localhost chat[4000]: abort on (NO CARRIER)
Jan 3 00:27:57 localhost chat[4000]: abort on (VOICE)
Jan 3 00:27:57 localhost chat[4000]: abort on (NO DIALTONE)
Jan 3 00:27:57 localhost chat[4000]: abort on (NO DIAL TONE)
Jan 3 00:27:57 localhost chat[4000]: abort on (NO ANSWER)
Jan 3 00:27:57 localhost chat[4000]: abort on (DELAYED)
Jan 3 00:27:57 localhost chat[4000]: send (\d\d+++\d\dATH^M)
Jan 3 00:28:01 localhost chat[4000]: send (ATZ^M)
Jan 3 00:28:02 localhost chat[4000]: expect (OK)
Jan 3 00:28:02 localhost chat[4000]: +++ATH^M^M
Jan 3 00:28:02 localhost chat[4000]: OK
Jan 3 00:28:02 localhost chat[4000]: -- got it
Jan 3 00:28:02 localhost chat[4000]: send
(AT+CGDCONT=1,"IP","web.omnitel.it"^M)
Jan 3 00:28:02 localhost chat[4000]: expect (OK)
Jan 3 00:28:02 localhost chat[4000]: ^M
Jan 3 00:28:02 localhost chat[4000]: ATZ^M^M
Jan 3 00:28:02 localhost chat[4000]: OK
Jan 3 00:28:02 localhost chat[4000]: -- got it
Jan 3 00:28:02 localhost chat[4000]: send (AT+CGATT=1^M)
Jan 3 00:28:02 localhost chat[4000]: expect (OK)
Jan 3 00:28:02 localhost chat[4000]: ^M
Jan 3 00:28:02 localhost chat[4000]:
AT+CGDCONT=1,"IP","web.omnitel.it"^M^M
Jan 3 00:28:02 localhost chat[4000]: OK
Jan 3 00:28:02 localhost chat[4000]: -- got it
Jan 3 00:28:02 localhost chat[4000]: send (ATD*99#^M)
Jan 3 00:28:02 localhost chat[4000]: expect (CONNECT)
Jan 3 00:28:02 localhost chat[4000]: ^M
Jan 3 00:28:02 localhost chat[4000]: AT+CGATT=1^MA^M
Jan 3 00:28:02 localhost chat[4000]: OK^M
Jan 3 00:28:47 localhost chat[4000]: alarm
Jan 3 00:28:47 localhost chat[4000]: Failed
Jan 3 00:28:47 localhost pppd[3999]: Connect script failed
Jan 3 00:28:48 localhost pppd[3999]: Exit.


. That's what I did:
I created the file '/etc/chatscripts/nokia_disconnect'
and filled it the following stuff:


#!/bin/sh
exec /usr/sbin/chat -V -s -S \
ABORT "BUSY" \
ABORT "ERROR" \
ABORT "NO DIALTONE" \
SAY "\nSending break to the modem\n" \
"" "\K" \
"" "\K" \
"" "\K" \
"" "\d\d+++\d\dATH" \
"" "\d\d+++\d\dATH" \
"" "\d\d+++\d\dATH" \
SAY "\nPDP context detached\n"


; the '/etc/ppp/peers/nokia' became:

hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/nokia"
disconnect "/etc/chatscripts/nokia_disconnect"
debug
-crtscts
/dev/ttyACM0
57600
# 460800
defaultroute
noipdefault
remotename nokia
ipparam nokia
usepeerdns
logfile "/var/log/pppd.log"


; the '/etc/chatscripts/nokia' became:

ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
"" "\d\d+++\d\dATH"
'' ATZ
OK-AT-OK AT+CGDCONT=1,"IP","web.omnitel.it"
OK-AT-OK AT+CGATT=1 OK-AT-OK ATD*99#
CONNECT ''


; the '/etc/ppp/resolv/nokia' remained:

nameserver 194.185.97.134


. What did I miss?
Rodolfo
Rodolfo Medina
2006-01-03 00:22:34 UTC
Permalink
... and now I put a TAB between "" and "\d\d+++\d\dATH"
and the connection started. Here's /etc/chatscripts/nokia:

ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
"" "\d\d+++\d\dATH"
'' ATZ
OK-AT-OK AT+CGDCONT=1,"IP","web.omnitel.it"
OK-AT-OK AT+CGATT=1 OK-AT-OK ATD*99#
CONNECT ''


. Is everything all right? If it is,
now I want to test the new ppp configuration with
the 'phone defect'.

Rodolfo
Unruh
2006-01-03 06:25:24 UTC
Permalink
Post by Rodolfo Medina
... and now I put a TAB between "" and "\d\d+++\d\dATH"
Your connection sounded to be intermitent anyway. So this working could
just be a fluke.
Posting the chat output log could be a help in deciding if something is
different.
In your last post, the system suddenly did not return a correct response
You modem seems to me to be very flakey.
Post by Rodolfo Medina
ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
"" "\d\d+++\d\dATH"
'' ATZ
OK-AT-OK AT+CGDCONT=1,"IP","web.omnitel.it"
OK-AT-OK AT+CGATT=1 OK-AT-OK ATD*99#
CONNECT ''
. Is everything all right? If it is,
now I want to test the new ppp configuration with
the 'phone defect'.
Rodolfo
James Carlson
2006-01-03 12:29:12 UTC
Permalink
Post by Rodolfo Medina
"" "\d\d+++\d\dATH"
'' ATZ
That sequence is bogus.

You're not waiting for anything (""), then sending "+++ ATH", then not
waiting for anything (again!), and then sending ATZ.

At that point, your modem is in an indeterminate state. Almost
anything could be expected to happen. It's equivalent to just this:

"" "\d\d+++\d\dATH\rATZ"

because an empty expect string in the expect-send pair means "just
send; don't expect."

The failure you're seeing is because the input stream to chat now has
*multiple* "OK" strings buffered in it, and it's impossible to tell
which "OK" you're matching against. And, indeed, the confusion is
evident in the results:

Jan 3 00:28:02 localhost chat[4000]: send (ATD*99#^M)
Jan 3 00:28:02 localhost chat[4000]: expect (CONNECT)
Jan 3 00:28:02 localhost chat[4000]: ^M
Jan 3 00:28:02 localhost chat[4000]: AT+CGATT=1^MA^M

You send something new, but are still receiving old data from the
modem.

If you must use +++ here due to flaws in the modem, then you're going
to have to achieve sync with the modem's command interface. It won't
be simple. Here's one suggestion:

# various failure codes
ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED

# Attempt to interrupt a left-over call and get the modem's attention.
"" '\d\d+++\d\dATH'

# We may now have zero or more "OKs" waiting for us. Send the factory
# reset command, then send an additional dummy command, and assume
# that the factory defaults include echo-on.
"" AT&F
OK ATS0=0
S0=0-ATS0=0-S0=0 '\c'

# Now we are back in sync and can send our commands. Note that the
# last expect string INTENTIONALLY has "\c" as the send string, so
# that we won't send a stray CR at the end of chat.
OK AT+CGDCONT=1,"IP","web.omnitel.it"
OK AT+CGATT=1
OK ATD*99#
CONNECT '\c'
--
James Carlson, KISS Network <***@sun.com>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Rodolfo Medina
2006-01-03 15:03:47 UTC
Permalink
I followed James Carlson's indications:
I put in /etc/chatscripts/nokia the following stuff:



# various failure codes
ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED

# Attempt to interrupt a left-over call and get the modem's attention.
"" '\d\d+++\d\dATH'

# We may now have zero or more "OKs" waiting for us. Send the factory
# reset command, then send an additional dummy command, and assume
# that the factory defaults include echo-on.
"" AT&F
OK ATS0=0
S0=0-ATS0=0-S0=0 '\c'

# Now we are back in sync and can send our commands. Note that the
# last expect string INTENTIONALLY has "\c" as the send string, so
# that we won't send a stray CR at the end of chat.
OK AT+CGDCONT=1,"IP","web.omnitel.it"
OK AT+CGATT=1
OK ATD*99#
CONNECT '\c'



. The connection started (with 'pon') and everything went well.
Then I got back to the old configuration and started and closed
a few connections, everything all right.
But then again the modem's flaw: the connection wouldn't start.
Then I tried James' configuration, and nothing:

Jan 3 15:45:15 localhost pppd[3913]: pppd 2.4.3 started by root, uid 0
Jan 3 15:45:16 localhost chat[3914]: abort on (BUSY)
Jan 3 15:45:16 localhost chat[3914]: abort on (NO CARRIER)
Jan 3 15:45:16 localhost chat[3914]: abort on (VOICE)
Jan 3 15:45:16 localhost chat[3914]: abort on (NO DIALTONE)
Jan 3 15:45:16 localhost chat[3914]: abort on (NO DIAL TONE)
Jan 3 15:45:16 localhost chat[3914]: abort on (NO ANSWER)
Jan 3 15:45:16 localhost chat[3914]: abort on (DELAYED)
Jan 3 15:45:16 localhost chat[3914]: send (\d\d+++\d\dATH^M)
Jan 3 15:45:20 localhost chat[3914]: send (AT&F^M)
Jan 3 15:45:20 localhost chat[3914]: expect (OK)
Jan 3 15:46:05 localhost chat[3914]: alarm
Jan 3 15:46:06 localhost chat[3914]: Failed
Jan 3 15:46:06 localhost pppd[3913]: Connect script failed
Jan 3 15:46:06 localhost pppd[3913]: Exit.


. Then I turned the phone off and on again, tried again James's
configuration
and it went well.
Now I'll try using *always* James' configuration to see if
the modem sticks or not.
Other suggestions welcome.
Thanks indeed for the help,

Rodolfo
James Carlson
2006-01-03 15:10:24 UTC
Permalink
Post by Rodolfo Medina
Jan 3 15:45:15 localhost pppd[3913]: pppd 2.4.3 started by root, uid 0
Jan 3 15:45:16 localhost chat[3914]: abort on (BUSY)
Jan 3 15:45:16 localhost chat[3914]: abort on (NO CARRIER)
Jan 3 15:45:16 localhost chat[3914]: abort on (VOICE)
Jan 3 15:45:16 localhost chat[3914]: abort on (NO DIALTONE)
Jan 3 15:45:16 localhost chat[3914]: abort on (NO DIAL TONE)
Jan 3 15:45:16 localhost chat[3914]: abort on (NO ANSWER)
Jan 3 15:45:16 localhost chat[3914]: abort on (DELAYED)
Jan 3 15:45:16 localhost chat[3914]: send (\d\d+++\d\dATH^M)
Jan 3 15:45:20 localhost chat[3914]: send (AT&F^M)
Jan 3 15:45:20 localhost chat[3914]: expect (OK)
Jan 3 15:46:05 localhost chat[3914]: alarm
Jan 3 15:46:06 localhost chat[3914]: Failed
Sigh.

There's just not much more you can do if the modem doesn't respond at
all, besides complaining to the manufacturer.
--
James Carlson, KISS Network <***@sun.com>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Mikko Rapeli
2006-01-03 07:19:37 UTC
Permalink
Post by Rodolfo Medina
ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
"" "\d\d+++\d\dATH"
'' ATZ
OK-AT-OK AT+CGDCONT=1,"IP","web.omnitel.it"
OK-AT-OK AT+CGATT=1 OK-AT-OK ATD*99#
^
Should these be on separate lines?

-Mikko
Rodolfo Medina
2006-01-03 11:03:03 UTC
Permalink
I tested the new ppp configuration with the 'modem defect' but it
failed:
I was keeping the old configuration waiting for the problem
to happen; it happened and I tried the new configuration, but:


Jan 3 11:46:19 localhost pppd[3859]: pppd 2.4.3 started by root, uid 0
Jan 3 11:46:20 localhost chat[3860]: abort on (BUSY)
Jan 3 11:46:20 localhost chat[3860]: abort on (NO CARRIER)
Jan 3 11:46:20 localhost chat[3860]: abort on (VOICE)
Jan 3 11:46:20 localhost chat[3860]: abort on (NO DIALTONE)
Jan 3 11:46:20 localhost chat[3860]: abort on (NO DIAL TONE)
Jan 3 11:46:20 localhost chat[3860]: abort on (NO ANSWER)
Jan 3 11:46:20 localhost chat[3860]: abort on (DELAYED)
Jan 3 11:46:20 localhost chat[3860]: send (\d\d+++\d\dATH^M)
Jan 3 11:46:24 localhost chat[3860]: send (ATZ^M)
Jan 3 11:46:24 localhost chat[3860]: expect (OK)
Jan 3 11:47:09 localhost chat[3860]: alarm
Jan 3 11:47:09 localhost chat[3860]: send (AT^M)
Jan 3 11:47:09 localhost chat[3860]: expect (OK)
Jan 3 11:47:54 localhost chat[3860]: alarm
Jan 3 11:47:55 localhost chat[3860]: Failed
Jan 3 11:47:55 localhost pppd[3859]: Connect script failed
Jan 3 11:47:55 localhost pppd[3859]: Exit.


Any other suggestions?
Post by Unruh
Posting the chat output log could be a help in deciding if something is
different.
Where do I find the chat output log?

Rodolfo
Unruh
2006-01-03 22:23:58 UTC
Permalink
Post by Rodolfo Medina
I tested the new ppp configuration with the 'modem defect' but it
I was keeping the old configuration waiting for the problem
Your phone is defective.
You are batting your head against a brick wall. Throw away the phone and
buy something useful.
Post by Rodolfo Medina
Jan 3 11:46:19 localhost pppd[3859]: pppd 2.4.3 started by root, uid 0
Jan 3 11:46:20 localhost chat[3860]: abort on (BUSY)
Jan 3 11:46:20 localhost chat[3860]: abort on (NO CARRIER)
Jan 3 11:46:20 localhost chat[3860]: abort on (VOICE)
Jan 3 11:46:20 localhost chat[3860]: abort on (NO DIALTONE)
Jan 3 11:46:20 localhost chat[3860]: abort on (NO DIAL TONE)
Jan 3 11:46:20 localhost chat[3860]: abort on (NO ANSWER)
Jan 3 11:46:20 localhost chat[3860]: abort on (DELAYED)
Jan 3 11:46:20 localhost chat[3860]: send (\d\d+++\d\dATH^M)
Jan 3 11:46:24 localhost chat[3860]: send (ATZ^M)
Jan 3 11:46:24 localhost chat[3860]: expect (OK)
Jan 3 11:47:09 localhost chat[3860]: alarm
Jan 3 11:47:09 localhost chat[3860]: send (AT^M)
Jan 3 11:47:09 localhost chat[3860]: expect (OK)
Jan 3 11:47:54 localhost chat[3860]: alarm
Jan 3 11:47:55 localhost chat[3860]: Failed
Jan 3 11:47:55 localhost pppd[3859]: Connect script failed
Jan 3 11:47:55 localhost pppd[3859]: Exit.
Any other suggestions?
Post by Unruh
Posting the chat output log could be a help in deciding if something is
different.
Where do I find the chat output log?
Rodolfo
James Carlson
2006-01-03 12:14:39 UTC
Permalink
Post by Mikko Rapeli
Post by Rodolfo Medina
OK-AT-OK AT+CGDCONT=1,"IP","web.omnitel.it"
OK-AT-OK AT+CGATT=1 OK-AT-OK ATD*99#
^
Should these be on separate lines?
It won't make any difference; all unescaped and unquoted white space
is the same to chat.
--
James Carlson, KISS Network <***@sun.com>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Loading...