[En-Nut-Discussion] (no subject)

Harald Kipp harald.kipp at egnite.de
Tue Mar 2 16:40:26 CET 2004


Can,

NutTracePPP(stdout, 1);

will enable tracing (1) and direct debug output to
the specified stream (stdout).

Remove the surrounding
  #ifdef NUTDEBUG
  #endif
to make sure this one is exeuted.

NutNetIfConfig("ppp", 0, 0, 0) sets
   ppp_hackup = 1;
(This global variable hack will vanish soon)
and hang at NutEventWait(&dcb->dcb_state_chg).

The background thread in the PPP driver
   THREAD(PPPRx, arg)
exists this loop
         while(ppp_hackup == 0)
             NutSleep(250);
as soon as ppp_hackup differs from zero.

Anyway, it should have output
   "Enter PPPReceive"
before even entering this loop.

Your previous question about devDebug1 confuses me
a bit. The original pppc.c clearly specifies:
#define DBGDEV      devDebug1
Did you change anything else?

Are you sure that icc/lib contains the correct
libraries, those you compiled with NUTDEBUG?

Also note, that when using NUTDEBUG, you can
add printf() statements anywhere, possibly
#include <stdio.h>
needs to be added to the modified file. And,
each time you modified the libs, run 'make install'
and do not forget to copy the libraries to the
ICCAVR lib directory. Or use nutconf, which will
rebuild the libs and also copy them.

Harald



At 16:44 02.03.2004 +0200, you wrote:
>Dear Harald,
>
>I have get output from uart1. However, I can't get anything that could help
>me on debugging. (I didn't get outputs from NutTracePPP).
>
>By using the pppc.c, I only get even when I enable the nutDebug the
>following lines.
>
>Open uart.done
>
>Connecting.done
>
>Configure PPP.
>
>I am completely lost in ppp and in its debugging.
>In order to debug the code, I should get an idea about the state of the
>configuration of the ppp which fails.
>
>Can.
>
>
>
>
>-----Original Message-----
>From: en-nut-discussion-bounces at egnite.de
>[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Harald Kipp
>Sent: Tuesday, March 02, 2004 3:12 PM
>To: Ethernut User Chat (English)
>Subject: Re: [En-Nut-Discussion] (no subject)
>
>Hi Can,
>
>At 14:40 02.03.2004 +0200, you wrote:
>
> >Hi,
> >
> >
> >
> >I am trying to use the debug feature of the Ethernut.
> >
> >
> >
> >First of all I changed the makedefs.icc file and enable the nutdebug. Then
> >I entered make clean and make install . After compiling all libraries
> >successfully I copied the lib files to the icc lib folder.
>
>Actually you define it in Makedefs, but running
>nutconf copies Makedefs.icc to Makedefs.
>
>
>
> >I also included the macro definition _MCU_enhanced NUTDEBUG into my
> >compiler options.
>
>At this place NUTDEBUG is used by your application only.
>So it may or may not be used.
>
>
> >What is the difference between devDebug1 and devUart1?
>
>For debugging use devDebug1. It uses polling,
>not interrupts and is safer.
>
>
> >I am using devUart1 but I am not getting any different lines from uart. I
> >only get the situation of the ppp connection
>
>Are you aware that UART1 is not attached
>to the DB9. It is available at the expansion
>port but requires an additional RS232 driver.
>As a lucky owner of Ethernut 2, you can set
>jumpers to have both UARTs available, but
>you need a special DB9 adapter.
>
>[some lines deleted]
>
>
> >I am trying to connect to my ISP for a couple of months using an external
> >modem. Is there anyone who achieved to connect using a modem to an ISP?
>
>Lots of, via telephone line as well as GPRS. Sometimes
>problems appear with some special settings on the
>provider's side. Without tracing (debugging) you are
>lost.
>
> >Can you please guide me?
>
>You are on the right track. Write a simple application and
>try to get some output on UART1 first. Then go back to
>PPP debugging.
>
>Harald
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list