Talk:Manually using GPRS

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(My working gprs-connect-chat: new section)
(My working gprs-connect-chat)
 
Line 56: Line 56:
  
 
#!/bin/sh
 
#!/bin/sh
 
 
exec chat -v\
 
exec chat -v\
 
         ABORT BUSY\
 
         ABORT BUSY\

Latest revision as of 16:21, 28 November 2008

Contents

[edit] Error messages I get

First, let me say that I actually managed to get GPRS up and running with the provided instructions. However, not at the first attempt and generally only one in ten times.

There are two kinds of errors I seem to get:

  • in the first situation, I get a CONNECT and "serial connection established", "using channel 0", "Using interface ppp0", "Connect: ppp0 <--> /dev/ttySAC0" and then "tcsetattr: Invalid argument (line 964) and then the scrip stops
  • in the second situation, I get a CONNECT and then during the ppp negotiation I get "LCP terminated" and the script starts over.

But every ten or so attempts the whole thing works :-)

I'd be quite happy if anyone could shed some light on this.

I see the same thing, but I would put it at one in four. It seems the modem doesn't always start up reliably. --Sagacis 06:21, 29 August 2007 (CEST)

[edit] file not found /etc/init.d/gsmd


Since OM2008.9 (Maybe OM2008.8) we should not have anymore the gsmd installed.
Maybe we need to shutdown Qtopia phone stack.
Here is a working script to start the pppd connection script :

#!/bin/bash
if test -f /etc/init.d/gsmd; then
/etc/init.d/gsmd stop
fi
echo "1" > /sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
chown uucp.uucp /dev/ttySAC0
stty -F /dev/ttySAC0 crtscts
pppd call gprs

[edit] Got it working for freerunner on 2008.9

Works using Option 3: Without GSM multiplexing and without a GUI I'm in NZ on vodafone, YMMV. Significantly.

Used suggested /etc/ppp/peers/gprs file

Since Vodafone NZ has no password, used passworless /etc/ppp/pap-secrets file as suggested

Used gprs-connect-chat, version 1 file, changed internet to live.vodafone.com and phone number to whats suggested- probably a good idea to put stuff to be replaced with REPLACEWITHPHONENUMBER and REPLACEWITHAPN or similar, possibly even in bold. People see that better.

I chmod +x'd the gprs-connect-chat file, symlinked /etc/ppp/peers/gprs to /etc/ppp/peers/provider:

ln -s /etc/ppp/peers/gprs /etc/ppp/peers/provider

And pon worked like a charm. poff works, too.

The interesting bit here is that

  • I have a pin on my sim card, and it doesn't do weird things - I don't get a pin query loop on the GUI. This is after I've punched in the pin and the phone is in a steady running state.
  • I can call my phone while the GPRS connection is up, and the connection rings on my land line. I'm pretty sure that the phone is receiving an incoming call - if I put the phone next to powered speakers and do nothing, there is no sound, if i then ping (to validate that the GPRS connection is up), it makes noises on the speakers, then stop ping, noises stop, then straight away call phone, noise on powered speakers. This would seem to indicate that phone, or at least the GSM module is receiving and responding to GSM calls while in GPRS mode.

[edit] My working gprs-connect-chat

  1. !/bin/sh

exec chat -v\

       ABORT BUSY\
       ABORT DELAYED\
       ABORT "NO ANSWER"\
       ABORT "NO DIALTONE"\
       ABORT VOICE\
       ABORT ERROR\
       ABORT RINGING\
       TIMEOUT 20\
       "" +++\
       OK ATZ\
       OK ATE1\
       OK AT+CFUN=1\
       OK AT+COPS\
       OK AT+CMEE=2\
       OK AT+CGDCONT=1,\"IP\",\"internet.beeline.ru\"\
       OK AT+CGQREQ=1,0,0,0,0,0\
       OK AT+CGATT=1\
       OK ATD*99*1#\
       CONNECT /n/d
Personal tools

Error messages I get

First, let me say that I actually managed to get GPRS up and running with the provided instructions. However, not at the first attempt and generally only one in ten times.

There are two kinds of errors I seem to get:

  • in the first situation, I get a CONNECT and "serial connection established", "using channel 0", "Using interface ppp0", "Connect: ppp0 <--> /dev/ttySAC0" and then "tcsetattr: Invalid argument (line 964) and then the scrip stops
  • in the second situation, I get a CONNECT and then during the ppp negotiation I get "LCP terminated" and the script starts over.

But every ten or so attempts the whole thing works :-)

I'd be quite happy if anyone could shed some light on this.

I see the same thing, but I would put it at one in four. It seems the modem doesn't always start up reliably. --Sagacis 06:21, 29 August 2007 (CEST)

file not found /etc/init.d/gsmd


Since OM2008.9 (Maybe OM2008.8) we should not have anymore the gsmd installed.
Maybe we need to shutdown Qtopia phone stack.
Here is a working script to start the pppd connection script :

#!/bin/bash
if test -f /etc/init.d/gsmd; then
/etc/init.d/gsmd stop
fi
echo "1" > /sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
chown uucp.uucp /dev/ttySAC0
stty -F /dev/ttySAC0 crtscts
pppd call gprs

Got it working for freerunner on 2008.9

Works using Option 3: Without GSM multiplexing and without a GUI I'm in NZ on vodafone, YMMV. Significantly.

Used suggested /etc/ppp/peers/gprs file

Since Vodafone NZ has no password, used passworless /etc/ppp/pap-secrets file as suggested

Used gprs-connect-chat, version 1 file, changed internet to live.vodafone.com and phone number to whats suggested- probably a good idea to put stuff to be replaced with REPLACEWITHPHONENUMBER and REPLACEWITHAPN or similar, possibly even in bold. People see that better.

I chmod +x'd the gprs-connect-chat file, symlinked /etc/ppp/peers/gprs to /etc/ppp/peers/provider:

ln -s /etc/ppp/peers/gprs /etc/ppp/peers/provider

And pon worked like a charm. poff works, too.

The interesting bit here is that

  • I have a pin on my sim card, and it doesn't do weird things - I don't get a pin query loop on the GUI. This is after I've punched in the pin and the phone is in a steady running state.
  • I can call my phone while the GPRS connection is up, and the connection rings on my land line. I'm pretty sure that the phone is receiving an incoming call - if I put the phone next to powered speakers and do nothing, there is no sound, if i then ping (to validate that the GPRS connection is up), it makes noises on the speakers, then stop ping, noises stop, then straight away call phone, noise on powered speakers. This would seem to indicate that phone, or at least the GSM module is receiving and responding to GSM calls while in GPRS mode.

My working gprs-connect-chat

  1. !/bin/sh

exec chat -v\

       ABORT BUSY\
       ABORT DELAYED\
       ABORT "NO ANSWER"\
       ABORT "NO DIALTONE"\
       ABORT VOICE\
       ABORT ERROR\
       ABORT RINGING\
       TIMEOUT 20\
       "" +++\
       OK ATZ\
       OK ATE1\
       OK AT+CFUN=1\
       OK AT+COPS\
       OK AT+CMEE=2\
       OK AT+CGDCONT=1,\"IP\",\"internet.beeline.ru\"\
       OK AT+CGQREQ=1,0,0,0,0,0\
       OK AT+CGATT=1\
       OK ATD*99*1#\
       CONNECT /n/d