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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

shobhit saxena
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, [hidden email] <[hidden email]> wrote:

> Send lwip-users mailing list submissions to
>         [hidden email]
>
> 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
>         [hidden email]
>
> You can reach the person managing the list at
>         [hidden email]
>
> 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" <[hidden email]>
> Subject: [lwip-users] problem in ppp connection
> To: [hidden email]
> Message-ID:
>         <[hidden email]>
> 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 <[hidden email]>
> Subject: Re: [lwip-users] problem in ppp connection
> To: Mailing list for lwIP users <[hidden email]>
> Message-ID: <[hidden email]>
> 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
> > [hidden email]
> > 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
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
> End of lwip-users Digest, Vol 41, Issue 12
> ******************************************
>


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

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

Jonathan Larmour
shobhit saxena wrote:
> 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()

I'm not sure you understand fully what a PPP connection gives you. A PPP
connection is a means of providing a transport for the TCP/IP stack. You
cannot communicate directly over it. Instead you use socket calls, or with
lwIP you can use the sequential API. To do that you have to establish a
connection with the remote peer's IP address.

If you want to just send a plain string over the serial line, then you
don't want to be using PPP on it at all.

Jifl
--
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
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users