Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

ppp_demo/ppp_demo.c

This is the controlling application for the CDCS UltraLite basic ppp demonstration This demo is suited to the Call Direct UltraLite GM47 board rather than the regular Ethernut board and will need modification to run with ethernut or other boards. I don't have an original Ethernut so I cannot do this myself

To get started connect a terminal at 9600bps to uart0 and a modem to uart1

When the application starts it will try to turn on the GM47 phone module, if you're not using the Call Direct board you'll need to change this, you can probably remove the interface control thread, there is also a line in Nutmain that waits for the phone to turn on you'll need to remove this too.

The driver at the time of writing is only tested against the Sony Ericsson GSM/GPRS phone module, if you wish to use a different modem/ISP combination you will probably need to do some debuging and feature adding, the most obvious thing I can think of is that the driver does not fully support user authentication.

The application should now present an "RMU >" prompt hit ?<cr> to see a list of available commands. To start the PPP session type connect<cr>

ppp debug is activated in this application and the ppp driver should output something like the following on uart0 if :-

RMU> connect Resetting PPP link

RMU> Auto-Connecting to GPRS service s = OK r = at+cgqreq=1,1,1,4,4,12 g = 22 i = 18 s = OK r = g = 0 i = -79 s = OK r = OK g = 2 i = 0 s = OK r = at+cgqmin=1,0,0,0,0,0 g = 21 i = 18 s = OK r = g = 0 i = -79 s = OK r = OK g = 2 i = 0 s = OK r = at+cgdcont=1,"IP","telstra.internet",,0,0 g = 41 i = 18 s = OK r = g = 0 i = -79 s = OK r = OK g = 2 i = 0 s = CONNECT r = atd*99*0*1*1# g = 13 i = 30 s = CONNECT r = g = 0 i = -67 s = CONNECT r = CONNECT g = 7 i = 0 Calling IFConfig Enter PPPInit Waiting for connect Enter PPPReceive Enter LCP ACCM = 0 PFC =1 ACFC =1 AUTH = c023 Enter LCP LCP Options Negotiated Enter PAP PAP ACK Enter IPCP IPCP Request Enter IPCP IPCP Nack Enter IPCP IPCP Accept PPP State = UP PPP Configured IP Address = 10.224.0.175 IP Mask = 0.0.0.0 IP Remote = 10.224.0.174 PRI DNS = 139.130.4.4 SEC DNS = 203.50.2.71 Finished IFConfig

RMU>

To establish a PPP session I use CDNetPPPConnect() to dial the host and then call NutNetIfConfig() as in this example. CDNetPPPConnect(NUTDEVICE *dev, const char *scriptin) can run a very simple connect script to get you connected to your host device, to use it the dev parameter should point to the device to which the modem is attached, the scriptin string should contain the connection script in the format "command:expected response" this could be as simple as "atd <ISP Phone number>:CONNECT"

Unless you are using GPRS you will definatly need to change the connect script.

Once connected to your isp you can do some basic tests from the command line interface in the demo application.

The lookup command allows you to perform a DNS lookup eg:-

RMU> lookup mail.egnite.de Name: mail.egnite.de Address: 217.160.92.226

RMU>

The telnet command allows you to establish a simple TCP (not really telnet) session with some host eg:-

RMU> telnet mail.egnite.de 25 Connecting to 217.160.92.226 25 Use ^] to quit 220 p15095813.pureserver.info ESMTP Sendmail 8.11.3/8.11.3/SuSE Linux 8.11.1-0.5 ; Fri, 25 Oct 2002 03:17:06 +0200 500 5.5.1 Command unrecognized: "" 214-2.0.0 This is sendmail version 8.11.3 214-2.0.0 Topics: 214-2.0.0 HELO EHLO MAIL RCPT DATA 214-2.0.0 RSET NOOP QUIT HELP VRFY 214-2.0.0 EXPN VERB ETRN DSN AUTH 214-2.0.0 STARTTLS 214-2.0.0 For more info use "HELP <topic>". 214-2.0.0 To report bugs in the implementation send email to 214-2.0.0 sendmail-bugs@sendmail.org. 214-2.0.0 For local information send email to Postmaster at your site. 214 2.0.0 End of HELP info Done error = 0

RMU>

The PPP driver itself is stable for my configuration but will need work if it is going to be generally useful, as such it is being released as a pre-alpha driver at this stage Good Luck !!!


Generated on Thu Jan 30 22:30:43 2003 for EduNet by doxygen1.2.18