Trolltech Home | Qtopia-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qtopia-interest Archive, March 2008
Qtopia modem support


Message 1 in thread

Hello,
      I use qtopia phone edition on HTC Blueangel, since start i got qtopia 
error segfault after received AT commands ( this phone works with other free 
phone software like gpephone, openmoko).
      The first problem is coming from qatchat.cpp, for example if we 
receive on atcmd channel something like "\n\r\n+CSCS : "HEX"\r\n\r\nOK\r\n". 
I did not found any clean way to solve this.
      This segfault is coming from void QAtChat::incoming() because we are 
sending directly an empty buffer to processLine in case of 0xA is coming 
first.

      Now after some fix in phone kernel driver to avoid this case, send / 
receive works fine until I execute function void 
QModemPhoneBook::cscsDone( bool ok, const QAtResult& result ). When i come 
here function updateCodec( name ); is ok, but after the QTimer::singleShot 
did not success after the delay. The next AT command is never send and 
qtopia stops here with an error message which say that qtopia can not join 
qws server.

      I hope my explanation are ok ;), if someone can help me to find out 
what is wrong...

Regards,

Fabrice 


--
 [ signature omitted ] 

Message 2 in thread

Hello again,
       Yesturday  i manage to run qtopia with few patches, but these
hack are dirty. I do something like that :

diff --git a/src/libraries/qtopiacomm/serial/qatchat.cpp
b/src/libraries/qtopiacomm/serial/qatchat.cpp
index 0b40640..1e591c7 100644
--- a/src/libraries/qtopiacomm/serial/qatchat.cpp
+++ b/src/libraries/qtopiacomm/serial/qatchat.cpp
@@ -853,21 +869,32 @@ void QAtChat::incoming()
    int posn;
    bool resetTimer = false;

    // Process the lines in the incoming input.
    posn = 0;
    while ( d->device->getChar(&ch) ) {
+          if ( ch == 0x0A ) && (posn == 0)  {
+             buf[posn] = (char)ch;
+             d->line += buf;
+          }
        if ( ch == 0x0A ) && (posn != 0)  {
            // LF terminates the line.
           buf[posn] = '\0';
            d->line += buf;
            if ( !d->wakeupInProgress ) {
                resetTimer |= processLine( d->line );
            } else {
                // Discard response lines while a wakeup is in
progress.
                qLog(AtChat) << "W :" << d->line;
            }
            d->line = "";
            posn = 0;
+               // Reset the dead timer if we got some useful data.
+               if ( resetTimer && d->deadTimer->isActive() ) {
+                       d->deadTimer->start( d->deadTimeout );
+               }
+           // Reset the dead timer if we got some useful data.
+           if ( resetTimer ) {
+               break;
+           }
        } else if ( ch != 0x00 && ch != 0x0D ) {
            buf[posn++] = (char)ch;
            if ( posn >= (int)(sizeof(buf) - 1) ) {
@@ -877,6 +904,7 @@ void QAtChat::incoming()
            }
        }
    }
    if ( posn > 0 ) {
        buf[posn] = '\0';
        d->line += buf;

"Fabrice CROHAS" <fcrohas@xxxxxxxxx> wrote in message 
news:fqh2fi$k5b$1@xxxxxxxxxxxxxxxxxxxxx
> Hello,
>      I use qtopia phone edition on HTC Blueangel, since start i got qtopia 
> error segfault after received AT commands ( this phone works with other 
> free phone software like gpephone, openmoko).
>      The first problem is coming from qatchat.cpp, for example if we 
> receive on atcmd channel something like "\n\r\n+CSCS : 
> "HEX"\r\n\r\nOK\r\n". I did not found any clean way to solve this.
>      This segfault is coming from void QAtChat::incoming() because we are 
> sending directly an empty buffer to processLine in case of 0xA is coming 
> first.
>
>      Now after some fix in phone kernel driver to avoid this case, send / 
> receive works fine until I execute function void 
> QModemPhoneBook::cscsDone( bool ok, const QAtResult& result ). When i come 
> here function updateCodec( name ); is ok, but after the QTimer::singleShot 
> did not success after the delay. The next AT command is never send and 
> qtopia stops here with an error message which say that qtopia can not join 
> qws server.
>
>      I hope my explanation are ok ;), if someone can help me to find out 
> what is wrong...
>
> Regards,
>
> Fabrice
> 


--
 [ signature omitted ]