gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnokii (0.4.3) on FreeBSD (4.x) with 6130


From: Paul Civati
Subject: Re: gnokii (0.4.3) on FreeBSD (4.x) with 6130
Date: Sat, 10 Aug 2002 21:46:10 +0100

Pawel Kot <address@hidden> wrote:

> > "--prefix=/usr/local/gnokii", perhaps a simple access() check could be put
> > in gnokiid at the beginning of it's startup to catch potential failures in
> > finding mgnokiidev.
> 
> The patch is very welcome :-) If not a patch, at least a suggested way to
> do it.

I've combined an access() check and my perrer() change into one patch below.

> > (I had to modify common/data/virtmodem.c and make the perror() for execl()
> > supply some arguments before it was obvious what I had done wrong).
> 
> Would you mind to show the patch? Maybe it's worth of applying?

*** virtmodem.c.orig    Mon Aug  5 17:21:20 2002
--- virtmodem.c Sat Aug 10 21:33:08 2002
***************
*** 274,280 ****
  {
        int fd, sockfd[2], status;
        pid_t childpid;
!       char c, argsockfd[10];
  
        if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sockfd) < 0) return -1;
  
--- 274,280 ----
  {
        int fd, sockfd[2], status;
        pid_t childpid;
!       char c, argsockfd[10], execdebug[255];
  
        if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sockfd) < 0) return -1;
  
***************
*** 287,293 ****
                close(sockfd[0]);
                snprintf(argsockfd, sizeof(argsockfd), "%d", sockfd[1]);
                execl(command, "mgnokiidev", argsockfd, NULL);
!               perror("execl: ");
        default:
                /* Parent */
                break;
--- 287,295 ----
                close(sockfd[0]);
                snprintf(argsockfd, sizeof(argsockfd), "%d", sockfd[1]);
                execl(command, "mgnokiidev", argsockfd, NULL);
!               snprintf(execdebug, sizeof(execdebug), "execl: %s %s",
!                       command, argsockfd);
!               perror(execdebug);
        default:
                /* Parent */
                break;
***************
*** 335,340 ****
--- 337,348 ----
                strcat(mgnokiidev, "/");
        }
        strncat(mgnokiidev, "mgnokiidev", 200 - strlen(bindir));
+ 
+       if ( -1 == access(mgnokiidev, X_OK) ) {
+               fprintf (stderr, "%s not found or not executable.\n",
+                       mgnokiidev);
+               return(-1);
+       }
  
        PtyRDFD = gopen(mgnokiidev);


> > I can get gnokkid started now, and get to start making a data call, but it
> > stops before it connects.
> 
> Care to show the gnokiid output?

Hmm I think a first step is going to be getting monitor mode working first.

Looking at the errors below, it seems like something more fundamental
to do with the way gnokii is communicating with the phone under FreeBSD.

How goes gnokii handle the data input/output, does it use some kind of
threading or i/o that maybe isn't working under FreeBSD?

> That's strange... It means that initialize failed. Could you apply the
> following patch and show the result (it will fail as well, but should give
> more verbose output).

[Received Ack of type 64, seq:  2]
[Received Ack of type 0c, seq:  3]
[Received Ack of type 0c, seq:  4]
SM_Block Retry - 1
Message sent: 0x0c / 0x0005
00 01 00 40 01                                  |    @            
SM_Block Retry - 2
Telephone interface init failed: Function not supported by the phone Quitting.

It seems very intermittent in its failure mode, for instance when
running '--monitor' sometimes I would just get a core dump instead?

[..]
Message sent: 0x14 / 0x0005
00 01 00 36 64                                  |    6d           
[Sending Ack of type 03, seq: 5]
Message received: 0x03 / 0x0005
01 08 00 09 7d                                  |     }           
Received message type 03
[Received Ack of type 14, seq:  4]
SM_Block Retry - 0
Message sent: 0x14 / 0x0005
00 01 00 36 64                                  |    6d           
[Sending Ack of type 03, seq: 6]
Message received: 0x03 / 0x0007
01 08 00 08 02 32 00                            |      2          
Received message type 03
Segmentation fault (core dumped)

Cheers,

-Paul-





reply via email to

[Prev in Thread] Current Thread [Next in Thread]