Re: GPRS unreliable: long lasting connection fail

2009-01-14 Thread Niccolo Rigacci
On Wed, Jan 14, 2009 at 04:53:16PM -0700, Eldon Koyle wrote:
> 
> If you have the 'persist' option in /etc/ppp/peers/,
> pppd will reconnect after errors.  To reconnect, it closes the device then
> reopens it.  With gsm0710muxd, when /dev/pts/N gets closed it is
> deallocated.  Then, pppd is trying to reconnect to a device that doesn't
> exist.

This is very interesting and disappointing :-(

But I experienced a different problem, because I don't use 
gsm0710muxd, so the device should be always valid.

What I noticed is that pppd release the lock file of the serial 
line, then it stays in a select loop, without retrying.

-- 
Niccolo Rigacci
Firenze - Italy

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-14 Thread Eldon Koyle
On  Jan 13 12:25-0700, Eldon Koyle wrote:
> I was looking at this once and I think the problem might be that pppd
> closes the device and re-opens it before reconnecting, and the mux
> device is no longer usable once it has been closed.
> 
> I didn't verify this, but it seemed logical to me ;).

I decided to take another look, and here is what happens:

If you have the 'persist' option in /etc/ppp/peers/,
pppd will reconnect after errors.  To reconnect, it closes the device then
reopens it.  With gsm0710muxd, when /dev/pts/N gets closed it is
deallocated.  Then, pppd is trying to reconnect to a device that doesn't
exist.

A hack-around for this might be to turn off the 'persist' option and make a 
script like:

identvar=$(date +%s)
while true; do
# code ripped of from somewhere to get a mux device
ptsvar=$(dbus-send --system --print-reply --type=method_call 
--dest=org.pyneo.muxer /org/pyneo/Muxer org.freesmartphone.GSM.MUX.AllocChannel 
string:$identvar | grep string | awk -F '"' '{ print $2 }')
[ -z "$ptsvar" ] && exit 1
logger -s "gprsd.sh[$$]: starting pppd using $ptsvar"
pppd "$ptsvar" 115200 call  nodetach
logger -s "gprsd.sh[$$]: connection closed, waiting 10 seconds"
sleep 10
done

-- 
Eldon Koyle
-- 
Treaties are like roses and young girls -- they last while they last.
-- Charles DeGaulle

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-13 Thread Eldon Koyle
I was looking at this once and I think the problem might be that pppd
closes the device and re-opens it before reconnecting, and the mux
device is no longer usable once it has been closed.

I didn't verify this, but it seemed logical to me ;).

-- 
Eldon Koyle
-- 
BOFH excuse #153:
Big to little endian conversion error


On  Jan 12 22:14+1300, Andrew Stephen wrote:
> On Mon, Jan 12, 2009 at 9:39 PM, Niccolo Rigacci  wrote:
> >
> [snip]
> > Please tell me: with gsm0710uxd the connection is still done by
> > pppd/chat?
> 
> Yes - gsm0710muxd creates a new serial device for each application
> needing access to the GSM device.  You just call pppd with its own
> device.
> [snip]
> >
> > I hope to last 12 hours or so, because I do GPS live tracking
> > with position upload to the internet every 5/10 seconds.
> [snip]
> 
> I've run GPRS for several hours at a time in a car travelling in some
> dodgy reception areas.  Sometimes it seemsed to lose connection and
> re-establish itself gracefully but more often than not I'd find that
> GPRS had died and pppd was still up but ineffective.  I usually had to
> reboot the FR before I could re-establish connection when this
> happened.
> --
> Andrew Stephen
> http://www.evil.geek.nz/
> 
> It is absurd to divide people into good and bad. People are either
> charming or tedious.
>  - Oscar Wilde
> 
> ___
> Openmoko community mailing list
> community@lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
> 

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-12 Thread Niccolo Rigacci
On Mon, Jan 12, 2009 at 06:07:45AM -0800, bytestore wrote:
> 
> lcp-echo-interval 3
> lcp-echo-failure 12
> ipcp-restart 10
> persist
> holdoff 15

I suggest you the "maxfail 0", if chat fails you get only 10 
tries. 

This is mine:

...
lcp-echo-interval 20
lcp-echo-failure 9
maxfail 0
holdoff 1
persist

Here it is a pppd log, after the "Connect script failed", nothing 
more succeeded.

Jan 11 15:29:32 om-gta02 daemon.debug pppd[670]: Script /etc/ppp/ip-up finished 
(pid 712), status = 0x0
Jan 11 15:33:46 om-gta02 daemon.info pppd[670]: No response to 9 echo-requests
Jan 11 15:33:46 om-gta02 daemon.notice pppd[670]: Serial link appears to be 
disconnected.
Jan 11 15:33:46 om-gta02 daemon.info pppd[670]: Connect time 4.3 minutes.
Jan 11 15:33:46 om-gta02 daemon.info pppd[670]: Sent 2871 bytes, received 628 
bytes.
Jan 11 15:33:46 om-gta02 daemon.notice pppd[670]: restoring old default route 
to usb0 [192.168.0.200]
Jan 11 15:33:46 om-gta02 daemon.debug pppd[670]: Script /etc/ppp/ip-down 
started (pid 792)
Jan 11 15:33:46 om-gta02 daemon.debug pppd[670]: sent [LCP TermReq id=0x3 "Peer 
not responding"]
Jan 11 15:33:47 om-gta02 daemon.debug pppd[670]: Script /etc/ppp/ip-down 
finished (pid 792), status = 0x0
Jan 11 15:33:49 om-gta02 daemon.debug pppd[670]: sent [LCP TermReq id=0x4 "Peer 
not responding"]
Jan 11 15:33:52 om-gta02 daemon.notice pppd[670]: Connection terminated.
Jan 11 15:33:52 om-gta02 daemon.notice pppd[670]: Modem hangup
Jan 11 15:33:54 om-gta02 daemon.info pppd[670]: Serial port initialized.
Jan 11 15:35:01 om-gta02 daemon.err pppd[670]: Connect script failed

-- 
Niccolo Rigacci
Firenze - Italy

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-12 Thread bytestore



Niccolo Rigacci wrote:
> 
> Hello,
> 
> I cannot get a reliable GPRS connection lasting for some hours, 
> while driving.
> 
> There is a problem with pppd, which does not restart the gprs 
> connection when failed: it seems that pppd options "persist" and 
> "holdoff" are not honored.
> 
> 

hmm 
my config is
/etc/ppp/peers/gprs
connect /etc/ppp/gprs-connect-chat
disconnect /etc/ppp/gprs-disconnect-chat
crtscts
lock
hide-password
defaultroute
usepeerdns
ipcp-accept-local
noauth
noipdefault
novj
novjccomp
replacedefaultroute
lcp-echo-interval 3
lcp-echo-failure 12
ipcp-restart 10
persist
holdoff 15

user "beeline"

try this http://projects.openmoko.org/frs/download.php/585/gprssettings.py
-- 
View this message in context: 
http://n2.nabble.com/GPRS-unreliable%3A-long-lasting-connection-fail-tp2143567p2145748.html
Sent from the Openmoko Community mailing list archive at Nabble.com.


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-12 Thread Timo Juhani Lindfors
Tom Yates  writes:
> my battery won't last that long!

Use $14 usb battery from

http://www.dealextreme.com/details.dx/sku.3060

:-) It seems to be able to fully recharge freerunner battery.




___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-12 Thread Helge Hafting
Tom Yates wrote:
> On Mon, 12 Jan 2009, Niccolo Rigacci wrote:
> 
>> I use a car lighter adapter :-)
> 
> ah, ok.  i don't have a car, and it's trickier to do the wiring on a 
> motorcycle.
>
You can have a cigarette lighter plug installed on a motorcycle too.
If you don't want that, consider something simpler like
connecting to the headlamp. Or the ignition switch.
Just don't go directly to the battery,
there should at least be a fuse between the adapter and the battery.

Helge Hafting

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-12 Thread Tom Yates
On Mon, 12 Jan 2009, Niccolo Rigacci wrote:

> I use a car lighter adapter :-)

ah, ok.  i don't have a car, and it's trickier to do the wiring on a 
motorcycle.

> I can pass from cell to cell through long highway tunnels and the
> GSM modem handles the connection recover transparently, pppd does
> not notice it.

ok, we both see that behaviour.

> But if the pppd notice the failure (due LCP echo request timeout), it 
> cannot recover.
>
> I had experience of PPP over DSL lines, where "persist" and
> "holdoff" parameters did the trick, but it seems that pppd on the
> FreeRunner has a bug.

then i'd have to say i see that behaviour, too.  at those times i bounce 
pppd manually, and the connection generally comes back fine.  but if what 
you're saying is that when the underlying connection goes away long enough 
for pppd to notice, it doesn't autorecover, then i'd say i see the same 
thing.  it just doesn't happen often enough to me that i've looked into 
it.


-- 

   Tom Yates  -  http://www.teaparty.net

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-12 Thread Niccolo Rigacci
On Mon, Jan 12, 2009 at 09:41:57AM +, Tom Yates wrote:
>
>> I hope to last 12 hours or so, because I do GPS live tracking
>> with position upload to the internet every 5/10 seconds.
>
> my battery won't last that long!

I use a car lighter adapter :-)

> i'm not sure that pppd is handling the autorecovery, though; i have a  
> vague feeling it's the call handling between the calypso chip and the 
> base station(s)

I can pass from cell to cell through long highway tunnels and the 
GSM modem handles the connection recover transparently, pppd does 
not notice it. But if the pppd notice the failure (due LCP echo 
request timeout), it cannot recover.

I had experience of PPP over DSL lines, where "persist" and 
"holdoff" parameters did the trick, but it seems that pppd on the 
FreeRunner has a bug.

-- 
Niccolo Rigacci
Firenze - Italy

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-12 Thread Tom Yates
On Mon, 12 Jan 2009, Niccolo Rigacci wrote:

> On Mon, Jan 12, 2009 at 08:13:56AM +, Tom Yates wrote:
>>
>> i use 2008.12 with gsm0710uxd, and i've had fairly long travelling GPRS
>> calls (15-20 minutes on the train back from london).
>
> Please tell me: with gsm0710uxd the connection is still done by
> pppd/chat?

it definitely is.  read my writeup at 
http://www.teaparty.net/technotes/openmoko-2.html#GPRS if you want to see 
exactly what i'm doing (my writeup's about 2008.09, but it's identical to 
the setup i just did for 2008.12 save that gsm0710muxd was in the 
repository so i didn't have to get the packages manually.

> I hope to last 12 hours or so, because I do GPS live tracking
> with position upload to the internet every 5/10 seconds.

my battery won't last that long!

> But the real problem is that if the connection fails, it will not
> restart again. I can add a cronjob to test connection and restart
> it, but I know that pppd should manage the fault.

i have *definitely* had pppd drop and autorecover the connection on 
shorter calls (eg, on the train - the cambridge-london line has tunnels on 
it, which provide a handy means of testing drop/recover).

i'm not sure that pppd is handling the autorecovery, though; i have a 
vague feeling it's the call handling between the calypso chip and the base 
station(s) that are responsible for setting up my GPRS connection again). 
i can post my ppp and ping logs next time i see this behaviour, if you'd 
like, so we can see if ppp even appears to notice the outage?


-- 

   Tom Yates  -  http://www.teaparty.net

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-12 Thread Andrew Stephen
On Mon, Jan 12, 2009 at 9:39 PM, Niccolo Rigacci  wrote:
>
[snip]
> Please tell me: with gsm0710uxd the connection is still done by
> pppd/chat?

Yes - gsm0710muxd creates a new serial device for each application
needing access to the GSM device.  You just call pppd with its own
device.
[snip]
>
> I hope to last 12 hours or so, because I do GPS live tracking
> with position upload to the internet every 5/10 seconds.
[snip]

I've run GPRS for several hours at a time in a car travelling in some
dodgy reception areas.  Sometimes it seemsed to lose connection and
re-establish itself gracefully but more often than not I'd find that
GPRS had died and pppd was still up but ineffective.  I usually had to
reboot the FR before I could re-establish connection when this
happened.
--
Andrew Stephen
http://www.evil.geek.nz/

It is absurd to divide people into good and bad. People are either
charming or tedious.
 - Oscar Wilde

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-12 Thread Niccolo Rigacci
On Mon, Jan 12, 2009 at 08:13:56AM +, Tom Yates wrote:
>
> i use 2008.12 with gsm0710uxd, and i've had fairly long travelling GPRS  
> calls (15-20 minutes on the train back from london).

Please tell me: with gsm0710uxd the connection is still done by 
pppd/chat?

> since i have an  
> all-you-can-eat GPRS plan, i'd happily try this for myself and give you  
> feedback.  how long is "long-lasting", for you?

I hope to last 12 hours or so, because I do GPS live tracking 
with position upload to the internet every 5/10 seconds.

But the real problem is that if the connection fails, it will not 
restart again. I can add a cronjob to test connection and restart 
it, but I know that pppd should manage the fault.

-- 
Niccolo Rigacci
Firenze - Italy

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: GPRS unreliable: long lasting connection fail

2009-01-12 Thread Tom Yates
On Mon, 12 Jan 2009, Niccolo Rigacci wrote:

> I tried Om2007.2 and Om2008.12 without GPS multiplexing: I
> just stop gsmd (2007.2) or qpe (2008.12) before starting pppd and
> chat, but the problem is still there.
>
> - Can gsm0710muxd (GSM multiplexer) help in some way?
>
> - Does GPRS require pppd or are there different software
>  solutions? Don't know FSO, etc...
>
> What are other experiences with long-lasting GPRS calls?

i use 2008.12 with gsm0710uxd, and i've had fairly long travelling GPRS 
calls (15-20 minutes on the train back from london).  since i have an 
all-you-can-eat GPRS plan, i'd happily try this for myself and give you 
feedback.  how long is "long-lasting", for you?


-- 

   Tom Yates  -  http://www.teaparty.net

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


GPRS unreliable: long lasting connection fail

2009-01-11 Thread Niccolo Rigacci
Hello,

I cannot get a reliable GPRS connection lasting for some hours, 
while driving.

There is a problem with pppd, which does not restart the gprs 
connection when failed: it seems that pppd options "persist" and 
"holdoff" are not honored.

I opened a bug ticket, which did not get reply:
https://docs.openmoko.org/trac/ticket/1955

I tried Om2007.2 and Om2008.12 without GPS multiplexing: I
just stop gsmd (2007.2) or qpe (2008.12) before starting pppd and 
chat, but the problem is still there.

- Can gsm0710muxd (GSM multiplexer) help in some way?

- Does GPRS require pppd or are there different software 
  solutions? Don't know FSO, etc...

What are other experiences with long-lasting GPRS calls?

-- 
Niccolo Rigacci
Firenze - Italy

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community