[En-Nut-Discussion] PPP connection problems

M. Can Filibeli filipa at superonline.com
Thu Jan 22 02:15:19 CET 2004


Hi,

 

I am trying to connect to an ISP using the modified pppc.c. Let me point out
that the ISP requires authentication. The changes made consist only of the
following segment of code:

 

 

//**************START*********************

 

/*
 * PPP user and password.
 */
#define PPPUSER     "filipa"
#define PPPPASS     "can1826"
#define __AVR_ATmega128__
#define NUTDEBUG
/*
 * The Nut/OS modem chat utility works similar to the the UNIX
 * chat script. This one is used to connect to a Windows PC
 * using a direct cable.
 */
//#define PPPCHAT     "TIMEOUT 2 '' CLIENT\\c CLIENTSERVER"

/*
 * A very simple modem script.
 */
#define PPPCHAT     "'' AT OK ATD93990000 33600"


/*
 * PPP device settings.
 */
//#define PPPDEV      devAhdlc0   /* Use HDLC driver. */
#define PPPDEV      devUart0    /* Use standard UART driver. */
#define PPPCOM      "uart0"     /* Physical device name. */
#define PPPSPEED    115200      /* Baudrate. */
#define PPPRXTO     1000        /* Character receive timeout. */

 

 


/*
 * Debug output device settings.
 */
#ifdef __AVR_ATmega128__
//#define DBGDEV      devDebug1   /* Use debug driver. */
#define DBGDEV      devUart1    /* Use standard UART driver. */
#define DBGCOM      "uart1"     /* Device name. */
#define DBGSPEED    115200      /* Baudrate. */
#endif

 

//**************THE END*********************

 

 

I have traced into the code and found that the call to the function
NutEventWait (used under NutNetIfConfig) returns an error value reporting
that dcb->dcb_ipcp_state is not PPPS_OPENED as desired but rather
PPPS_STARTING. Could you provide me some clarification as to what this means
and its implications. It came to my attention that NutNetIfConfig() takes
parameters one of which is of type PPP_PARAMS. Your sample code passes 0 for
this parameter. Is this really correct or is there a need to pass a
PPP_PARAMS structure into the function. While debugging NutNetIfConfig I
found that the IP address and the mask were both left 0 (null) and that the
dcb_ipcp_state remains the same through out the processing of the function
as 1 (PPPS_STARTING). Most importantly, incorrect input of the password does
not create any changes in the values of the variables mentioned above. I
would be most grateful if you could provide me with some answers and shed me
some light.

 

Thanks,

Can.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20040122/310611f2/attachment-0001.html>


More information about the En-Nut-Discussion mailing list