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

Re: PPP connection? Palm IIIs? Getty?



Robbie Huffman <robbie@user-37kbu2i.dialup.mindspring.com> writes:

> If this list is still alive, can anyone say how to get a ppp connection to
> a Palm III running? I've tried numerous sources, but my biggest problem is
> that I don't have a static IP address. I've seen hints on using 10.0.0.x, but
> that fails, probably because I don't have something right on the routing
> tables. I'd appreciate any hints!
> 
> Also, I've been able to establish a connection using Palm Telnet and getty,
> but it dies just after I enter my password. The connection finally times out.
> It "feels" like getty is not receiveing the carriage return after the password.

Well, what are you trying to do here?  Establish ppp over the hotsync
cradle?  I've done that with my palm pilot pro., but it took some
trickery.  It may take less trickery with a palm III, but I assume
that the more trickery method will still work.

Basically, you've got to convince your palm device that when it's
hooked up to the hotsync cradle it's actually talking to a modem.
This can be done with the perl script I attach below; you run it by
doing:
perl pilotppp.pl <>/dev/pilot 1>&0

The script pretends to be a modem, and fakes enough of the responses
so that a pilot can initialize it and think that it's dialing into
somewhere.  The last line then invokes the program that will then
start up "slirp", which I find to be a better way to use ppp with the
pilot; slirp takes care of letting your palmpilot then use your
machine's net connection (if it connects to anything other than
10.0.2.*) - it's like doing all the ipmasquerade stuff without having
to go through setting that up.  It's a really nice utility.  Of
course, one could use pppd and use this script (minus the last line)
something like a connect script; I've done that, but you'll have to
work out the details yourself.

On your palm device, tell it that it's dialing in with a modem, at
38400 baud (I find my hotsync cable can't handle 115200 baud, but
maybe yours can), and that it's going to be doing a ppp connection
where the local (that is, palmpilot) ip address is 10.0.2.15, the
remote address is 10.0.2.0, and the DNS server is at 10.0.2.3.  (I
can't seem to find my palm pilot at the moment to check these
settings).  Start the perl script on your machine and then tell your
palm device to connect.

You may also want to add the following to your ~/.slirprc file:
ppp_exit
redir 5192 10.0.2.0:23

The second line there allows you to control your slirp connection by
telneting to port 5192 on your local machine; otherwise the only way
to control things would be to telnet from the palmpilot to address
10.0.2.0.  the "ppp_exit" line tells slirp to shut down when the pilot 
turns ppp off.

Slirp can allow you to do many things - for instance, set up imapd or
popd (or in fact anything that inetd can start) that will respond only 
to your palm device (by adding "add exec" lines in your slirprc).  The 
best thing that I like, however, is that with this setup my palmpilot
can share my main machine's network connection.

Anyway, here's the script:

#!/usr/bin/perl
$/ = "\r";
$responses = 1;
$doecho = 1;
$isdialing = 0;
$error = 0;

sub echo {
  if ($doecho == 1) {print "@_";}
}
$| = 1;

sub respond {
  if ($responses == 1) {print "\r\n@_\r\n";}
}

while (<>) {
  echo($_);
  if (s/^.*?AT//) { # We've got ourselves a command
    chomp;
    $error = 0;
    tr/a-z/A-Z/;
    while(s/^(\&?[A-Z])(\d*)(=\d*|\?)?//) {
      $command = $1;
      $digitarg = $2 || 0;
      $extraarg = $3;
      s/^\=|\?/S$&/;
      if ($command eq "E") {
        if (($digitarg == 0) || ($digitarg==1)) {$doecho=$digitarg;}
        else {$error=1;}
      }
      if ($command eq "Q") {
        if (($digitarg == 0) || ($digitarg==1)) {$responses = 1 - $digitarg;}
        else {$error=1;}
      }
      if ($command eq "D") {
        s/^/$digitarg$extraarg/;
        s/^([TP]*)([\d,@]*)//;
        $pulsetone = $1;
        $number = $2;
        sleep 2;
        respond("CARRIER 26400");
        respond("PROTOCOL: LAP-M");
        respond("CONNECT 38400");
        exit 0;
      }
    }
    if ($_ ne "") {$error = 1;}
    if ($error == 1) {respond("ERROR");} else {respond("OK");}
  }
}

exec 'slirp', 'ppp', 'baudrate 38400';
__END__


Reply to: