Openmoko Bug #2257: gsm0710muxd: "Modem does not respond to AT commands"

Openmoko Public Trac bugs at docs.openmoko.org
Tue Apr 28 23:18:42 CEST 2009


#2257: gsm0710muxd: "Modem does not respond to AT commands"
-----------------------------+----------------------------------------------
 Reporter:  lindi            |          Owner:  openmoko-kernel     
     Type:  defect           |         Status:  new                 
 Priority:  high             |      Milestone:  stable-kernel-2009.1
Component:  System Software  |        Version:  unspecified         
 Severity:  major            |       Keywords:                      
 Haspatch:  0                |      Blockedby:                      
Estimated:                   |    Patchreview:                      
 Blocking:                   |   Reproducible:  sometimes           
-----------------------------+----------------------------------------------

Comment(by arhuaco):

 I tested with your setup. The shr-testing kernel I flashed is recent
 enough.

 - flash http://build.shr-project.org/shr-testing/images/om-gta02/shr-lite-
 image-om-gta02.jffs2
 - flash http://build.shr-project.org/shr-testing/images/om-
 gta02/uImage-2.6.29-oe10+gitr81c61a7d1abb03aecd13f5395aba355e996a1641-r3.4
 -om-gta02.bin
 - boot
 - install http://www.opkg.org/packages/socat_1.3.2.1-r1_armv4t.ipk
 - reboot

 root at om-gta02 ~ $ fuser /dev/ttySAC0
 1540
 root at om-gta02 ~ $ kill -9 1540
 root at om-gta02 ~ $ fuser /dev/ttySAC0

 You might want to move /usr/sbin/gsm0710muxd out of the way while you make
 this test because it can be started while you are testing (it happened to
 me).

  root at om-gta02 ~ $ cd /sys/class/i2c-adapter/i2c-0/0-0073/neo1973-pm-
 gsm.0/ ; echo 0 > power_on ; sleep 3 ; echo 1 > power_on ; echo 1 > reset
 ; socat - file:/dev/ttySAC0,crtscts,crnl,b115200
  AT-Command Interpreter ready

 (Last command worked in the same way 5 times).

 Relevant kernel messages after you execute the command (once):

  modem wakeup interrupt
  rxerr: port=0 ch=0x00, rxs=0x0000000c


 I tried latest andy-tracking and I think the later rxerr message is OK
 when you start using the port. I enabled dbg in samsung.h (and a few other
 messages, see diffs at the end) and I got this:

 [21474677.270000] modem wakeup interrupt
 [21474834.305000] dbg:s3c24xx_serial_stop_rx: port=c04a06fc
 [   32.630000] modem wakeup interrupt
 [   34.010000] dbg:s3c24xx_serial_startup: port=50000000
 (f5000000,c04a09b4)
 [   34.015000] rxerr: port=0 ch=0x00, rxs=0x0000000c
 [   34.015000] dbg:break!
 [   34.015000] dbg:S3C2410_UERSTAT_FRAME
 [   34.015000] dbg:flag=0
 [   34.020000] dbg:requesting tx irq...
 [   34.025000] dbg:s3c24xx_serial_startup ok
 [   34.030000] dbg:config: 8bits/char
 [   34.035000] dbg:setting ulcon to 00000003, brddiv to 26, udivslot
 00000000
 [   34.035000] dbg:uart: ulcon = 0x00000003, ucon = 0x000003c5, ufcon =
 0x00000011

 Could you repeat the same test? (without the kernel modifications), just
 make sure that /usr/sbin/gsm0710muxd doesn't interrupt your tests.

 Now I guess even when this is working we might get interruptions once in a
 while and that is the problem that was originally reported.

 gsm0710muxd has a watchdog. I assume that if "echo 0 > power_on; sleep 3;
 echo 1 > power_on; echo 1 > reset" is working then the watchdog could do
 exactly the same? (It already resets the modem but there could be a timing
 issue, perhaps a longer delay is needed before the power_on?).

 --- a/drivers/serial/samsung.c
 +++ b/drivers/serial/samsung.c
 @@ -250,10 +250,14 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id)
                                     goto ignore_char;
                         }

 -                       if (uerstat & S3C2410_UERSTAT_FRAME)
 +                       if (uerstat & S3C2410_UERSTAT_FRAME) {
 +                               dbg("S3C2410_UERSTAT_FRAME\n");
                                 port->icount.frame++;
 -                       if (uerstat & S3C2410_UERSTAT_OVERRUN)
 +                       }
 +                       if (uerstat & S3C2410_UERSTAT_OVERRUN) {
 +                               dbg("S3C2410_UERSTAT_OVERRUN\n");
                                 port->icount.overrun++;
 +                       }

                         uerstat &= port->read_status_mask;

 @@ -264,6 +268,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id)
                         else if (uerstat & (S3C2410_UERSTAT_FRAME |
                                             S3C2410_UERSTAT_OVERRUN))
                                 flag = TTY_FRAME;
 +                       dbg("flag=%d\n", flag);
                 }


 --- a/drivers/serial/samsung.h
 +++ b/drivers/serial/samsung.h
 @@ -98,10 +98,6 @@ console_initcall(s3c_serial_console_init)
  #define s3c24xx_console_init(drv, inf) extern void no_console(void)
  #endif

 -#ifdef CONFIG_SERIAL_SAMSUNG_DEBUG
 -
 -extern void printascii(const char *);
 -
  static void dbg(const char *fmt, ...)
  {
         va_list va;
 @@ -111,9 +107,5 @@ static void dbg(const char *fmt, ...)
         vsprintf(buff, fmt, va);
         va_end(va);

 -       printascii(buff);
 +       printk(KERN_ERR "dbg:%s", buff);
  }
 -
 -#else
 -#define dbg(x...) do { } while (0)
 -#endif

-- 
Ticket URL: <https://docs.openmoko.org/trac/ticket/2257#comment:24>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac


More information about the buglog mailing list