Reply by ech3l0n February 20, 20092009-02-20
--- In l..., "ech3l0n" wrote:
>
> --- In l..., "FreeRTOS.org Info"
> wrote:
> >
> > > Subject: [lpc2000] FreeRTOS + uIP serial to ethernet and vise
> > > versa ???
> > >
> > > I've got FreeRTOS + uIP up and running with serial and
> > > ethernet functioning 100%.
> > >
> > > I've created 2 tasks, 1 for uart and 1 for uIP.
> > >
> > > How can I send the data that comes in from my uart1 out to my
> > > ethernet port ?
> > >
> > > Normally I just would do uip_send("Welcome!", 8); and it
> > > would send the data to my server no issues as long as I do it
> > > from inside the uIP task.
> > >
> > > I tried that from the uart task after I was able to confirm
> > > the lpc2378 was infact connected into the server via a
> > > variable I shared between my source code files.
> > >
> > > Any help would be greatly appreciated.
> >
> > Have the uIP task block on a queue with a timeout. If you want
to
> send
> > data, send it to the queue, this will wake the uIP task which
will
> receive
> > the data and send it on the queue (best not queue the entire data
> unless its
> > just a couple of bytes, just a pointer to the data). The timeout
> can be
> > used to perform any periodic processing for the occasions that no
> data
> > arrives on the queue.
> >
> > Regards,
> > Richard.
> >
> > + http://www.FreeRTOS.org
> > Designed for Microcontrollers. More than 7000 downloads per
month.
> >
> > + http://www.FreeRTOS.org/Documentation
> > New FreeRTOS eBook - learn how to use an RTOS
> > Ok what I've tried so far is to send the data from the queue in
task1
> to the queue in task2 then from task one connect to the server
which
> then call uip_send inside task2
>
> Thats not seeming to work out so well.
>
> Any example code on this ?
>

Yes I have my uart1 on it's own task then I have created another task
that communicates with the server back and forth relaying data via
queue's to and from the uart task.

So far I've ran into a few problems.

#1 being that when I want to send the data from the uart to my server
via the ethernet port of my olimex board I seem to have to issue a
uip_connect to do it every time. I was hoping I could do uip connect
then issue uip_send every time after that to send the data then issue
uip_close when I wanted to disconnect from the server, maybe my
appcall for the server communication task is wrong.

#2 is that the data I get from my uart1 comes from another device
that I responde to with responses that come from my server after I've
sent the request to the server and gathered the proper response hence
I should get a diffrent request made by the device connected to my
uart the 2nd time around but it seems as if it never gets my data
that I send back to it which is rather odd and I wonder if it's
related to timers or whatnot ?

An Engineer's Guide to the LPC2100 Series

Reply by ech3l0n February 18, 20092009-02-18
--- In l..., "FreeRTOS.org Info"
wrote:
>
> > Subject: [lpc2000] FreeRTOS + uIP serial to ethernet and vise
> > versa ???
> >
> > I've got FreeRTOS + uIP up and running with serial and
> > ethernet functioning 100%.
> >
> > I've created 2 tasks, 1 for uart and 1 for uIP.
> >
> > How can I send the data that comes in from my uart1 out to my
> > ethernet port ?
> >
> > Normally I just would do uip_send("Welcome!", 8); and it
> > would send the data to my server no issues as long as I do it
> > from inside the uIP task.
> >
> > I tried that from the uart task after I was able to confirm
> > the lpc2378 was infact connected into the server via a
> > variable I shared between my source code files.
> >
> > Any help would be greatly appreciated.
>
> Have the uIP task block on a queue with a timeout. If you want to
send
> data, send it to the queue, this will wake the uIP task which will
receive
> the data and send it on the queue (best not queue the entire data
unless its
> just a couple of bytes, just a pointer to the data). The timeout
can be
> used to perform any periodic processing for the occasions that no
data
> arrives on the queue.
>
> Regards,
> Richard.
>
> + http://www.FreeRTOS.org
> Designed for Microcontrollers. More than 7000 downloads per month.
>
> + http://www.FreeRTOS.org/Documentation
> New FreeRTOS eBook - learn how to use an RTOS
>

Ok what I've tried so far is to send the data from the queue in task1
to the queue in task2 then from task one connect to the server which
then call uip_send inside task2

Thats not seeming to work out so well.

Any example code on this ?

Reply by "FreeRTOS.org Info" February 18, 20092009-02-18
> Subject: [lpc2000] FreeRTOS + uIP serial to ethernet and vise
> versa ???
>
> I've got FreeRTOS + uIP up and running with serial and
> ethernet functioning 100%.
>
> I've created 2 tasks, 1 for uart and 1 for uIP.
>
> How can I send the data that comes in from my uart1 out to my
> ethernet port ?
>
> Normally I just would do uip_send("Welcome!", 8); and it
> would send the data to my server no issues as long as I do it
> from inside the uIP task.
>
> I tried that from the uart task after I was able to confirm
> the lpc2378 was infact connected into the server via a
> variable I shared between my source code files.
>
> Any help would be greatly appreciated.

Have the uIP task block on a queue with a timeout. If you want to send
data, send it to the queue, this will wake the uIP task which will receive
the data and send it on the queue (best not queue the entire data unless its
just a couple of bytes, just a pointer to the data). The timeout can be
used to perform any periodic processing for the occasions that no data
arrives on the queue.

Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers. More than 7000 downloads per month.

+ http://www.FreeRTOS.org/Documentation
New FreeRTOS eBook - learn how to use an RTOS

Reply by ech3l0n February 17, 20092009-02-17
I've got FreeRTOS + uIP up and running with serial and ethernet
functioning 100%.

I've created 2 tasks, 1 for uart and 1 for uIP.

How can I send the data that comes in from my uart1 out to my ethernet
port ?

Normally I just would do uip_send("Welcome!", 8); and it would send the
data to my server no issues as long as I do it from inside the uIP task.

I tried that from the uart task after I was able to confirm the lpc2378
was infact connected into the server via a variable I shared between my
source code files.

Any help would be greatly appreciated.

Thanks.