lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: lwip-users Digest, Vol 41, Issue 12


From: shobhit saxena
Subject: [lwip-users] Re: lwip-users Digest, Vol 41, Issue 12
Date: Tue, 23 Jan 2007 00:17:29 -0500

dear sir,
          thank you for replying.In my project i just wanted to
send/recieve string by ppp connection.i have tried functions like
cyg_io_write(),sio_send(),sio_write() but nothing is working.when i
tried to implement these functions the ppp connection fails means that
in my code when i use these functions after the lwip_init(),& try for
ppp connection it fails to connect giving an error "set_cofig flow
control error".I am not able to understand why this error occurs even
if i use other functions after lwip_init()???please tell me what to
do?????
i have already asked this problem on ecos-discuss forum but no answers
yet so kindly answer to my problem.thank you



On 1/22/07, address@hidden <address@hidden> wrote:
Send lwip-users mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.nongnu.org/mailman/listinfo/lwip-users
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of lwip-users digest..."


Today's Topics:

   1. problem in ppp connection (shobhit saxena)
   2. Re: problem in ppp connection (Jonathan Larmour)


----------------------------------------------------------------------

Message: 1
Date: Mon, 22 Jan 2007 04:19:14 -0500
From: "shobhit saxena" <address@hidden>
Subject: [lwip-users] problem in ppp connection
To: address@hidden
Message-ID:
        <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

hello everyone,
                    i am using an ARM e7t kit on ecos.i have
established a ppp connection using lwip_init() between two
pc's(fedora) through ARM kit.i have made one pc as the server & the
kit as client.
my problem is that i am want to transfer data from one pc to another
through ARM kit.i have tried many functions.
Can someone suugest me a way to transfer a string from one pc to another.
here is my code:-

#include <cyg/infra/cyg_type.h>
#include <stdio.h>                      /* printf */
#include <string.h>                     /* strlen */
#include <cyg/kernel/kapi.h>            /* All the kernel specific stuff */
#include <cyg/io/io.h>                  /* I/O functions */
#include <cyg/hal/hal_arch.h>           /* CYGNUM_HAL_STACK_SIZE_TYPICAL */
#include "ppp.h"
#include "init.c"


/* DEFINES */

#define NTHREADS 1
#define STACKSIZE ( CYGNUM_HAL_STACK_SIZE_TYPICAL + 4096 )

/* STATICS */

static cyg_handle_t thread[NTHREADS];
static cyg_thread thread_obj[NTHREADS];
static char stack[NTHREADS][STACKSIZE];

/* FUNCTIONS */

void pppLinkStatusCallback(void * ctx, int errCode, void * arg) {
       printf("entered call back\n");

}
static void simple_prog(CYG_ADDRESS data)
{
   cyg_io_handle_t handle1;
   Cyg_ErrNo err;
   const char str[]="hi.i am shobhit\n";
   cyg_uint32 len=strlen(str);

   cyg_io_lookup( "/dev/ser0", &handle1);
   printf("Starting serial example\n");

  lwip_init();         //this function only is reponsible for the ppp
connection//

}
 void cyg_user_start(void)
{
   cyg_thread_create(4, simple_prog, (cyg_addrword_t) 0, "serial",
                     (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
   cyg_thread_resume(thread[0]);
}




------------------------------

Message: 2
Date: Mon, 22 Jan 2007 10:36:28 +0000
From: Jonathan Larmour <address@hidden>
Subject: Re: [lwip-users] problem in ppp connection
To: Mailing list for lwIP users <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

shobhit saxena wrote:
> hello everyone,
>                    i am using an ARM e7t kit on ecos.i have
> established a ppp connection using lwip_init() between two
> pc's(fedora) through ARM kit.i have made one pc as the server & the
> kit as client.
> my problem is that i am want to transfer data from one pc to another
> through ARM kit.i have tried many functions.
> Can someone suugest me a way to transfer a string from one pc to another.
> here is my code:-

Are you wanting to use a TCP/IP stack really? Or do you want to just send a
string through the serial port. If you want a TCP/IP stack, then you need
to make TCP/IP networking calls to create a new connection, and be running
PPP at both ends. If you want to just send a string out a serial port in
eCos, read the eCos serial driver documentation, which says to use
cyg_io_write(). If you have more questions on this, take them to the eCos
mailing lists: <http://ecos.sourceware.org/intouch.html> as this list is
for lwIP only.

Jifl

> #include <cyg/infra/cyg_type.h>
> #include <stdio.h>                      /* printf */
> #include <string.h>                     /* strlen */
> #include <cyg/kernel/kapi.h>            /* All the kernel specific stuff */
> #include <cyg/io/io.h>                  /* I/O functions */
> #include <cyg/hal/hal_arch.h>           /* CYGNUM_HAL_STACK_SIZE_TYPICAL */
> #include "ppp.h"
> #include "init.c"
>
>
> /* DEFINES */
>
> #define NTHREADS 1
> #define STACKSIZE ( CYGNUM_HAL_STACK_SIZE_TYPICAL + 4096 )
>
> /* STATICS */
>
> static cyg_handle_t thread[NTHREADS];
> static cyg_thread thread_obj[NTHREADS];
> static char stack[NTHREADS][STACKSIZE];
>
> /* FUNCTIONS */
>
> void pppLinkStatusCallback(void * ctx, int errCode, void * arg) {
>       printf("entered call back\n");
>
> }
> static void simple_prog(CYG_ADDRESS data)
> {
>   cyg_io_handle_t handle1;
>   Cyg_ErrNo err;
>   const char str[]="hi.i am shobhit\n";
>   cyg_uint32 len=strlen(str);
>
>   cyg_io_lookup( "/dev/ser0", &handle1);
>   printf("Starting serial example\n");
>
>  lwip_init();         //this function only is reponsible for the ppp
> connection//
>
> }
> void cyg_user_start(void)
> {
>   cyg_thread_create(4, simple_prog, (cyg_addrword_t) 0, "serial",
>                     (void *)stack[0], STACKSIZE, &thread[0],
> &thread_obj[0]);
>   cyg_thread_resume(thread[0]);
> }
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>


--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
Visit us at Embedded World 2007, Nürnberg, Germany, 13-15 Feb, Stand 11-336
Company legal info, address and number:   http://www.ecoscentric.com/legal
------["The best things in life aren't things."]------      Opinions==mine




------------------------------

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

End of lwip-users Digest, Vol 41, Issue 12
******************************************





reply via email to

[Prev in Thread] Current Thread [Next in Thread]