RoeeK
RoeeK

Reputation: 1162

pppd stuck in dialing process

i'm connecting several usb modems to my Ubuntu:
uname -a
Linux devlp 2.6.32-28-generic #55-Ubuntu SMP Mon Jan 10 21:21:01 UTC 2011 i686 GNU/Linux
pppd version: 2.4.5

i'm doing a test with 8 sierra wireless modems, and all of them are connected and work. each of them has a "ppp" interface.
after they are connected, i'm trying to reconnect ppp7, and at first, pppd fails, then in the second try it reaches the point where it says: "Serial connection established" and stuck. i tried all kill signals to kill that pppd without success, and the only way to terminate it is to plug-out the modem it tried to dial.
i looked for the exact place where the pppd get stuck and it's right over here:

int generic_establish_ppp (int fd)
{
    int x;

    if (new_style_driver) {
        int flags;
        FILE *f=fopen("/root/ptest.log","a");
        fputs("before get channel\n",f);
        fflush(f);
        /* Open an instance of /dev/ppp and connect the channel to it */
        if (ioctl(fd, PPPIOCGCHAN, &chindex) == -1) { // <<<<<<< STUCK HERE
            error("Couldn't get channel number: %m");
            goto err;
        }
        fputs("after get channel\n",f);
        ....
    }
}

it looks like the problem is specifically with ppp7 - and it can be any modem so i don't think it's a modem problem, but what i don't understand is what really happens in that command? who is responsible for the answer? is it only the kernel? the modem driver? the modem itself? i don't quite understand what to do with that information since PPPIOCGCHAN documentation is very poor..

i thought at first that maybe pppd is not releasing the channel or ppp after disconnect so i compiled my own pppd version and added PPPIOCDISCONN and PPPIOCDETACH just to make sure my version is fine with that, and the results were the same.
what you think?

Upvotes: 0

Views: 1251

Answers (1)

RoeeK
RoeeK

Reputation: 1162

well i'm pretty i solved this one - I've added some lines in pppd before the ioctl command to make fd NONBLOCK :)

Upvotes: 1

Related Questions