All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem when disable GPRS context and try to re-enable it
@ 2013-05-17 10:33 Viallard Anthony
  2013-05-21 13:24 ` Denis Kenzior
  0 siblings, 1 reply; 3+ messages in thread
From: Viallard Anthony @ 2013-05-17 10:33 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2960 bytes --]

Hello,

I start a new thread about a bad thing I seen. I can't re-enable a 
previously disabled context.

Here the command to reproduce the issue:

---------------------------
dbus-send --system --type=method_call --print-reply --dest=org.ofono 
/simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
e" variant:boolean:true

dbus-send --system --type=method_call --print-reply --dest=org.ofono 
/simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
e" variant:boolean:false

dbus-send --system --type=method_call --print-reply --dest=org.ofono 
/simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
e" variant:boolean:true
---------------------------

and bellow, the log:

---------------------------
ofonod[10347]: Modem: > AT+CGDCONT=1,"IP","gprs.swisscom.ch"\r
ofonod[10347]: Modem: < \r\nOK\r\n
ofonod[10347]: drivers/atmodem/gprs-context.c:at_cgdcont_cb() ok 1
ofonod[10347]: Modem: > AT+CGDATA="PPP",1\r
ofonod[10347]: Modem: < \r\nCONNECT 115200\r\n
ofonod[10347]: drivers/atmodem/gprs-context.c:at_cgdata_cb() ok 1
ofonod[10347]: drivers/atmodem/gprs-context.c:setup_ppp()
ofonod[10347]: drivers/atmodem/gprs-context.c:ppp_connect()
ofonod[10347]: IP: 10.146.60.102
ofonod[10347]: DNS: 195.186.216.33, 195.186.152.33
ofonod[10347]: src/gprs.c:pri_activate_callback() 0x108698
ofonod[10347]: plugins/udev.c:udev_event() subsystem net add
ofonod[10347]: plugins/udev.c:udev_event() subsystem net finished
ofonod[10347]: plugins/udevng.c:check_modem_list()
ofonod[10347]: 
drivers/atmodem/gprs-context.c:at_gprs_deactivate_primary() cid 1
ofonod[10347]: plugins/udevng.c:remove_device() 
/sys/devices/virtual/net/ppp0
ofonod[10347]: plugins/udev.c:udev_event() subsystem net remove
ofonod[10347]: plugins/udev.c:remove_modem() /devices/virtual/net/ppp0
ofonod[10347]: plugins/udev.c:udev_event() subsystem net finished
ofonod[10347]: drivers/atmodem/gprs-context.c:ppp_disconnect() Reason: 6
ofonod[10347]: Modem: < \r\nNO CARRIER\r\n


ofonod[10347]: drivers/atmodem/gprs-context.c:at_gprs_activate_primary() 
cid 1
ofonod[10347]: src/gprs.c:pri_activate_callback() 0x108698
ofonod[10347]: src/gprs.c:pri_activate_callback() Activating context 
failed with error: Unknown error type
---------------------------

I read the code, added some logs and found the function 
at_chat_send_common() doesn't do his job because chat->command_queue is 
NULL.

I guess chat->command_queue is free and set to NULL in 
chat_cleanup(struct at_chat *chat) but I don't dig more why this 
function is call...

Any ideas ?

Regards,
Anthony Viallard.

-- 
-----------------------------------------
Viallard Anthony    (+41 024 455 24 82)
[ Embedded System | Software Designer ]
-----------------------------------------
   Syscom Instruments SA
   Rue de l'industrie 21
   1450     Sainte-Croix
-----------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem when disable GPRS context and try to re-enable it
  2013-05-17 10:33 Problem when disable GPRS context and try to re-enable it Viallard Anthony
@ 2013-05-21 13:24 ` Denis Kenzior
  2013-05-21 14:11   ` Viallard Anthony
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Kenzior @ 2013-05-21 13:24 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3199 bytes --]

Hi Anthony,

On 05/17/2013 05:33 AM, Viallard Anthony wrote:
> Hello,
>
> I start a new thread about a bad thing I seen. I can't re-enable a
> previously disabled context.
>
> Here the command to reproduce the issue:
>
> ---------------------------
> dbus-send --system --type=method_call --print-reply --dest=org.ofono
> /simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
> e" variant:boolean:true
>
> dbus-send --system --type=method_call --print-reply --dest=org.ofono
> /simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
> e" variant:boolean:false
>
> dbus-send --system --type=method_call --print-reply --dest=org.ofono
> /simcom_0/context1 org.ofono.ConnectionContext.SetProperty string:"Activ
> e" variant:boolean:true
> ---------------------------
>
> and bellow, the log:
>
> ---------------------------
> ofonod[10347]: Modem: > AT+CGDCONT=1,"IP","gprs.swisscom.ch"\r
> ofonod[10347]: Modem: < \r\nOK\r\n
> ofonod[10347]: drivers/atmodem/gprs-context.c:at_cgdcont_cb() ok 1
> ofonod[10347]: Modem: > AT+CGDATA="PPP",1\r
> ofonod[10347]: Modem: < \r\nCONNECT 115200\r\n
> ofonod[10347]: drivers/atmodem/gprs-context.c:at_cgdata_cb() ok 1
> ofonod[10347]: drivers/atmodem/gprs-context.c:setup_ppp()
> ofonod[10347]: drivers/atmodem/gprs-context.c:ppp_connect()
> ofonod[10347]: IP: 10.146.60.102
> ofonod[10347]: DNS: 195.186.216.33, 195.186.152.33
> ofonod[10347]: src/gprs.c:pri_activate_callback() 0x108698
> ofonod[10347]: plugins/udev.c:udev_event() subsystem net add
> ofonod[10347]: plugins/udev.c:udev_event() subsystem net finished
> ofonod[10347]: plugins/udevng.c:check_modem_list()
> ofonod[10347]:
> drivers/atmodem/gprs-context.c:at_gprs_deactivate_primary() cid 1
> ofonod[10347]: plugins/udevng.c:remove_device()
> /sys/devices/virtual/net/ppp0
> ofonod[10347]: plugins/udev.c:udev_event() subsystem net remove
> ofonod[10347]: plugins/udev.c:remove_modem() /devices/virtual/net/ppp0
> ofonod[10347]: plugins/udev.c:udev_event() subsystem net finished
> ofonod[10347]: drivers/atmodem/gprs-context.c:ppp_disconnect() Reason: 6
> ofonod[10347]: Modem: < \r\nNO CARRIER\r\n
>
>
> ofonod[10347]: drivers/atmodem/gprs-context.c:at_gprs_activate_primary()
> cid 1
> ofonod[10347]: src/gprs.c:pri_activate_callback() 0x108698
> ofonod[10347]: src/gprs.c:pri_activate_callback() Activating context
> failed with error: Unknown error type
> ---------------------------
>
> I read the code, added some logs and found the function
> at_chat_send_common() doesn't do his job because chat->command_queue is
> NULL.
>
> I guess chat->command_queue is free and set to NULL in
> chat_cleanup(struct at_chat *chat) but I don't dig more why this
> function is call...
>
> Any ideas ?

I think I've seen this before, or something similar.  It may be that 
when the modem hangs up the PPP link it also hangs up the serial port 
(e.g. using a HUP).  GAtChat thinks that the port has been closed and 
things no longer work.

On most devices this behavior can be turned off by sending AT&C0 init 
string.  Try that?

>
> Regards,
> Anthony Viallard.
>

Regards,
-Denis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem when disable GPRS context and try to re-enable it
  2013-05-21 13:24 ` Denis Kenzior
@ 2013-05-21 14:11   ` Viallard Anthony
  0 siblings, 0 replies; 3+ messages in thread
From: Viallard Anthony @ 2013-05-21 14:11 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]

Hi Denis,

On 21. 05. 13 15:24, Denis Kenzior wrote:
> On 05/17/2013 05:33 AM, Viallard Anthony wrote:
>> ofonod[10347]: drivers/atmodem/gprs-context.c:at_gprs_activate_primary()
>> cid 1
>> ofonod[10347]: src/gprs.c:pri_activate_callback() 0x108698
>> ofonod[10347]: src/gprs.c:pri_activate_callback() Activating context
>> failed with error: Unknown error type
>> ---------------------------
>>
>> I read the code, added some logs and found the function
>> at_chat_send_common() doesn't do his job because chat->command_queue is
>> NULL.
>>
>> I guess chat->command_queue is free and set to NULL in
>> chat_cleanup(struct at_chat *chat) but I don't dig more why this
>> function is call...
>>
>> Any ideas ?
>
> I think I've seen this before, or something similar. It may be that when
> the modem hangs up the PPP link it also hangs up the serial port (e.g.
> using a HUP). GAtChat thinks that the port has been closed and things no
> longer work.
>
> On most devices this behavior can be turned off by sending AT&C0 init
> string. Try that?
>

AT&C0 fixes the wrong behavior. Thanks !

Regards,
Anthony.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-21 14:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-17 10:33 Problem when disable GPRS context and try to re-enable it Viallard Anthony
2013-05-21 13:24 ` Denis Kenzior
2013-05-21 14:11   ` Viallard Anthony

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.