Problem web server CORTEX_STM32F107_GCC_Rowle

nicoooooooooo wrote on Thursday, August 02, 2012:

Hi everybody,

I have a problem with the demo example “CORTEX_STM32F107_GCC_Rowley” (7.1.1 version). I have no problem with building and launch the demo on my STM3210C-EVAL board, the LCD displays “www.freertos.org”, the IP of the web server and the status. However, when I ping the web server, it doesn’t work at all. My network configuration is okay. I am convinced it comes from the demo. Everyone already encountered this problem and figured out how to solve it ?

Thank you :slight_smile:

davedoors wrote on Thursday, August 02, 2012:

How are you connecting to the EVAL board? Directly or through a hub?
What kind of cable are you using? Standard ethernet or cross over?

nicoooooooooo wrote on Thursday, August 02, 2012:

(by the way, I am working with uip1.0)

nicoooooooooo wrote on Thursday, August 02, 2012:

Oh I’m sorry I hadn’t seen your reply. It is connected through a hub with a standard ethernet cable

rtel wrote on Thursday, August 02, 2012:

Have you configured a MAC address that is compatible with the computer from which the pings are originating?

Is the network initialising correctly?  Put a break point on the line while( xEthInitialise() != pdPASS ) in webserver/uIP_Task.c to see if the loop is ever exited.

If so, put a break point in the function vMAC_ISR() in the file webserver/emac.c, is the break point ever hit? 

If so, is data ever received in the handler?  (if it is the line xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken ); will be executed.

If so, is the line if( ( uip_len > 0 ) && ( uip_buf != NULL ) ) ever passing in uIP_Task.c so pass the received data into the uip stack?

Regards.

nicoooooooooo wrote on Friday, August 03, 2012:

Thank you very much for your help.
Hmmm stupid question, how should the MAC address be configured?
For the rest, yes, my network is initialising correctly and I am hitting all the breakpoints you mentionned…

rtel wrote on Friday, August 03, 2012:

In a real system the MAC address would come from ROM somewhere, as each has to be unique.  In test systems the MAC address is just fixed in the C code, but still has to be unique on the network, so connecting two boards to the same network requires two separate configurations.

In your demo the MAC address is defined by the constants:

#define configMAC_ADDR0 0x00
#define configMAC_ADDR1 0x12
#define configMAC_ADDR2 0x13
#define configMAC_ADDR3 0x10
#define configMAC_ADDR4 0x15
#define configMAC_ADDR5 0x11

which you will find in FreeRTOSConfig.h.

If data is being received, as it seems it is, the next thing to do would be to follow the packet through the uIP stack using the debugger to see if it gets dropped somewhere (in which case you will see why) or if it generated some output.

Do you have Wireshark connected so you can see the traffic going back and forth?

Regards.

nicoooooooooo wrote on Monday, August 06, 2012:

Thank you again for your answer and apologize for the late. No I don’t have Wireshark, I will download it to see how it is!

nicoooooooooo wrote on Tuesday, August 07, 2012:

ok now ping works but when I type the IP address in my browser, the index page doesn’t load… Any suggestion? (I checked the fsdata.c, httpd.c, everything is okay, when I debug and try to access the page in my browser, I reach “fs_opent(file_index_html.name,&file)” so it should work…) Thank you