lwIP for eCos (LPC1768)

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

lwIP for eCos (LPC1768)

EnneGi
Hi all, i'm in trouble with lwIP. I'm trying the examples of lwIP for eCos SO on my board (LPC1768 , a cortexM board). I found any examples of lwIP in eCos repository

(you find it here: https://www.dropbox.com/s/fn1qp2pt70sfnw2/tests.zip )

in particular, I try the httpd_simple.c example. It compiles and works on my board, but I can't test it with a connection by ethernet between board and pc. My computer doesn't link to a board.

I set a static ip address by configtools, but it doesn't works.
My question is:
how can I test httpd_simple?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

Felix R
EnneGi wrote
 My computer doesn't link to a board.
Is the Speed negotiated? Could you give us your Terminal output?
I had the same issue with a USB to Ethernet Adapter. I had to unplug and plug the adapter before the link worked, each time i started the http simple demo.
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

Michael Jones
You may want to run WireShark on the PC and see what the packets are doing.



On May 15, 2013, at 9:33 AM, Felix R <[hidden email]> wrote:

> EnneGi wrote
>> My computer doesn't link to a board.
>
> Is the Speed negotiated? Could you give us your Terminal output?
> I had the same issue with a USB to Ethernet Adapter. I had to unplug and
> plug the adapter before the link worked, each time i started the http simple
> demo.
>
>
>
> --
> View this message in context: http://sourceware-org.1504.n7.nabble.com/lwIP-for-eCos-LPC1768-tp231949p231954.html
> Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

EnneGi
In reply to this post by Felix R
thanks for reply!
via debug port (uart0) I have this output:

INFO:<Testing httpd>
INFO:<Initializing lwIP>                                                       
igmp_init: initializing                                                        
                                                                               
LPC2XXX_ETH: Initialising 0x50000000                                            
LPC2XXX_ETH - Warning! ESA unknown                                              
LPC2XXX_ETH: 12:34:56:78:9a:bc                                                  
INFO:<Initializing pcb>                                                         
INFO:<Create pcb>                                                               
tcp_bind: bind to port 80                                                      
INFO:<Running>                                                                 
tcp_slowtmr: no active pcbs                                                    
tcp_slowtmr: no active pcbs                                                    
tcp_slowtmr: no active pcbs                                                    
tcp_slowtmr: no active pcbs                                                    
tcp_slowtmr: no active pcbs                                                    
tcp_slowtmr: no active pcbs                                                    
tcp_slowtmr: no active pcbs                                                    
tcp_slowtmr: no active pcbs                                                    
tcp_slowtmr: no active pcbs                                                    
tcp_slowtmr: no active pcbs                                                    
etharp_timer                                                                    
tcp_slowtmr: no active pcbs                                                    
tcp_slowtmr: no active pcbs
(this is repeated)    

I link the board to LAN port of my computer, but the computer doesn't establish the connection...
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

EnneGi
In reply to this post by Michael Jones
thanks! so, I must use wireshark for establish the connection?
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

Michael Jones
It is a spy tool that lets you see the packets when debugging problems.




On May 15, 2013, at 9:50 AM, EnneGi <[hidden email]> wrote:

> thanks! so, I must use wireshark for establish the connection?
>
>
>
> --
> View this message in context: http://sourceware-org.1504.n7.nabble.com/lwIP-for-eCos-LPC1768-tp231949p231968.html
> Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

EnneGi
ok...so, how can it helps me?
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

Felix R
Testing httpd
Initializing lwIP
igmp_init: initializing
data->link_speed = 100
netif_set_ipaddr: netif address being changed
netif: IP address of interface  set to 192.168.1.222
netif: netmask of interface  set to 255.255.255.0
netif: GW address of interface  set to 192.168.1.1
netif: added interface et IP addr 192.168.1.222 netmask 255.255.255.0 gw 192.168.1.1
netif: setting default interface et
et0: IP: 192.168.1.222 Submask: 255.255.255.0 Gateway: 192.168.1.1
etharp_request: sending ARP request.
pbuf_alloc(length=42)
pbuf_alloc(length=42) == 0x0015dce0
etharp_raw: sending raw ARP packet.
pbuf_free(0x0015dce0)
pbuf_free: deallocating 0x0015dce0
Initializing tcb
tcp_bind: bind to port 80
Running
pbuf_alloc(length=60)
pbuf_alloc: allocated pbuf 0x001627c8
pbuf_alloc(length=60) == 0x001627c8

for me, it looks like this. Dont mind all the debug information.
Yours uses bind_tcp before the link is even up. You are missing the marked line an i guess before that there is no communication visible to wireshark.
Try disable/enable unplug/plug you netwok adapter or using a switch.
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

EnneGi
Sorry, can you post your code please? It's important for me...I must see if your code is different...

Thanks a lot!
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

Felix R
httpd_simple.c

Here you go. I think i did not edit anything.
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

EnneGi
ok thanks! So, how do you link the board to your pc?
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

Felix R
I just run the Software and connect the Network cable.

Depening on your hardware you might have to use a twisted pair cable or a switch. Another possibility is, that your network controller isnt workin correctly.
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

Ilija Kocho [Илија Кочо]
On 17.05.2013 09:16, Felix R wrote:
> I just run the Software and connect the Network cable.
>
> Depening on your hardware you might have to use a twisted pair cable or a
> switch. Another possibility is, that your network controller isnt workin
> correctly.

I assume that you are using Olimex LPC1766 platform or something derived
from that. Then it should work on LPC1768 provided that other hardware
is compatible. Let's check other components. Check Ethernet PHY on your
board against platform. Does it fit?

I hope this helps.


Ilija

>
>
> --
> View this message in context: http://sourceware-org.1504.n7.nabble.com/lwIP-for-eCos-LPC1768-tp231949p232324.html
> Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.
>


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

EnneGi
Yes, I used lpc1766 template. Ethernet PHY is abilited by configtool; what must I change? Lpc1766 architecture is complitely compatible with lpc1768...
Reply | Threaded
Open this post in threaded view
|

Re: lwIP for eCos (LPC1768)

Ilija Kocho [Илија Кочо]
On 17.05.2013 12:43, EnneGi wrote:
> Yes, I used lpc1766 template. Ethernet PHY is abilited by configtool; what
> must I change? Lpc1766 architecture is complitely compatible with lpc1768...

PHY is a separate chip that physically couples Ethernet MAC (on chip)
with Ethernet physical Tx and Rx signals. Check if the one on your board
is same as the one selected in configtool, and if necessary select other.

Ilija


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss