Rebuilding Slush to include PPP

11 May

Rebuilding Slush to include PPP
The Optional Slush Command ppp
In the TINI software distribution, tini1_102b.tgz (or whichever version you’re using), there is a file called OptionalSlushCommandsSrc.jar. If you unzip that file, you will find that it contains many files, among them, PPPCommand.java. It will unzip into a directory structure based on .\com\dalsemi\slush\command. The mechanics of taking an optional slush command like this and building it into slush is a topic that was discussed in Chapter 7. What we’re going to discuss here is what the PPPCommand class does for us, and what we have to do to make it work.

The PPPCommand class inserts a command called ppp into slush. The ppp command has the following options:

-a XX.XX.XX.XX

Sets the IP address of the TINI  stick ppp interface. This gets used when you are using the ppp command to set up the stick as a PPP server, waiting for an incoming call from another computer. The IP address of the remote computer’s PPP interface will be set with the –r option. You will also be using the –x and –s options with this.

-c

This closes the PPP connection. In our previous examples, we started the PPPClient or PPPServer application and it ran until you killed it. But, if you establish a ppp connection with the ppp command in slush, you can close the connection cleanly by typing ppp –c. This only works if you started the connection with the ppp command in slush. If you form the PPP connection using one of the previous examples, and you use ppp –c, nothing happens.

-p password

This sets the login password in cases when you are using the TINI stick as a PPP client, dialing into a PPP server. It gets used in conjunction with the –x, -d, and –u options. For instance if you have a dialup account at an ISP and you are trying to form a connection to it with a TINI stick, you would use this option and enter the account login password that you use with the ISP.

-r XX.XX.XX.XX

Sets the IP address of the remote ppp interface in cases when you are using the ppp command to set up the stick as a PPP server, waiting for an incoming call from another computer. The IP address of the TINI stick’s PPP interface will be set with the –a option. You will also be using the –x and –s options with this.

-u username

This sets the login username in cases when you are using the TINI stick as a PPP client, dialing into a PPP server. It gets used in conjunction with the –x, -d, and – p options. For instance if you have a dialup account at an ISP and you are trying to form a connection to it with a TINI stick, you would use this option and enter the account login ID that you use with  the ISP.

-s

This is the start server option. You use this when you want the TINI to act as a PPP server and await an incoming phone call from another computer. You use it in conjunction with the –x, -a, and –r options.

-d

This is the dial up a server option. You use this when you want the TINI to act as a PPP client and call a PPP server such as an ISP. You use it in conjunction with the –x, -p, and –u options.

-x serial_port_number

This defines which serial port you want to use for the PPP connection. This gets used whenever you are forming a PPP connection. Oddly, it doesn’t seem to be documented.

Usage Examples

Suppose you want to form a PPP connection with an ISP. You have a login account with a name (rosie) and a password (dalmation). You want to use serial0.

ppp –x 0 –d –u rosie –p dalmation

The –x 0 is for serial0, the –d for dialup, the –u and –p for username and password.

Suppose you want to form a PPP connection with your laptop. You want to use serial0. You will type the following on TINI:

ppp –x 0 –s –a 207.168.0.5 –r 130.130.132.10

The –x 0 is for serial0, the –s for start server, the –a and –r are the IP addresses of the PPP interfaces on the TINI and the laptop, respectively. If the TINI has an IP address defined for the Ethernet interface, the PPP interface should have an IP address on a different network. The same is true for the laptop. For instance, if

you TINI eth0 at 192.168.0.5, and the laptop eth0 at 192.168.0.2, you can’t put their ppp IP addresses on the 192.168.0.x network. You get the ppp.UP event, and the interface will be present, but nothing can communicate. You can, however,

put them at 192.168.10.x such as 192.168.10.9 and 192.168.10.12, respectively. If both are stand alone, with no other interfaces, you can pretty much use any numbers you want. The command, above, will be entered on the TINI. The TINI will wait for an incoming call from the laptop. On the laptop, it will be just like you are calling an ISP. (You have to have a userID and password setup on TINI, because authentication will be performed.)

Random Posts

Comments are closed.