[En-Nut-Discussion] PPP - Nut-os4.6.6 - atmega128.

Paulo Silva(OpenSoftware) psilva at opensoftware-br.com
Thu Dec 11 17:29:54 CET 2008


jaripetteri escreveu:

>>About uart settings, I'm using my own board and there are two uarts:
>>-uart0 for pc serial port for debug
>>-uart1 for BT module to access GPRS modem
>>which driver I should use with those? Can I use two different or same for
>>both?

AFAIK you need to select one for PPP.

>>I understand that possibilities for uart are devAhdlcx, devUartx and
>>devDebugx. I tried with devAhdlc for both but end up freezing MCU. devAhdlc
>>is needed for PPP, right? With other combinations I get only either one
>>running.

You need use either devAhdlc0 or devAhdlc1, according with uart0 or uart1 that you are using.

>>Also I need to sent some commands to uart (basically to Bluetooth module to
>>call my cellular) before NutChat(pppcom, PPPCHAT) line, so how to do that?
>>Sending via NutChat is not working since I'm getting no response there and I
>>need some wait time. Also call command is quite long. I have manage to get
>>call and open BT uart and make GPRS call just sending command via
>>hyperterminal to BT so my commands should be right.

I think the problem is about the use of the correct uart, NutChat works.

Here is my settings, in pppc.c, nut demo application.

/*
 * PPP device settings.
 */
#if defined(__AVR__)
#define PPPDEV      devAhdlc1   /* Use HDLC driver. */
//#define PPPDEV      devUart0    /* Use standard UART driver. */
#else
#warning "Works on ATmega128 only."
#endif
#define PPPCOM      "uart1"     /* Physical device name. */
#define PPPSPEED    115200      /* Baudrate. */
#define PPPRXTO     1000        /* Character receive timeout. */

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



Here you can see that I used uart0 to debug and uart1 for PPP.

Cheers.

/psilva








More information about the En-Nut-Discussion mailing list