Hello!
I'm trying to run HTTP-server on my LPC1788 board. lwip stack works fine. But when I try to run http-server under RL-ARM programm doesn't start at all. I included to my project follow files: EMAC_LPC177x_8x.c, Net_Config.c, TCP_CM3.lib, TCPD_CM3.lib (and corresponding headers Net_Config.h, EMAC_LPC177x_8x.h). Here my program:
include "LPC177x_8x.h" #include "debug_frmwrk.h" #include "RTL.h" int main (void) { SystemInit(); debug_frmwrk_init(); _DBG_("Started!"); init_TcpNet (); while (1) { main_TcpNet(); } }
I want just to try ping my board from my PC Ethernet. Do you mind to explain to me what is wrong?
Regards, Vasilij.
yep, look for example : Keil\ARM\Boards\Keil\MCB1700\EasyWEB
Thank you very much, it works!!! Another one question, do you mind? I need to dynamically create web pages using data from SD card and send large amounts of data by HTTP. Haw can I manually create HTTP responses?
I don't use TCPNet anymore, but it should be in EMAC_LPC177x_8x.c:
#ifdef _DP83848_ #define PHY_DEF_ADR DP83848C_DEF_ADR #define PHY_ID DP83848C_ID #else #define PHY_DEF_ADR KSZ8001_DEF_ADR #define PHY_ID KSZ8001_ID #endif
Tamir Michael,
Where is this constant located?
Vasilij,
Maybe you need to rebuild using the correct PHY constant defined...?
YES AND THEY HAVE DIFFERENT IDENTIFIER VALUES. YOU MUST EDIT THE FILE.
It's still don't working. I noticed that in my board used LAN8720 and in and in EMAC_LPC177x_8x.c LAN8700 used. Does it compatible?
It's that what I need! Thank you a lot for your help!
Sorry, what I gave you relates to TCP server, I'm not sure if that is what you are looking for.
Yep, and need to open a socket too, look into the sample projects provided by keil.
U16 tcp_callback (U8 soc, U8 event, U8 *ptr, U16 usPar) { // look for project example about what to do on this function return (0); } int main (void) { SystemInit(); init_TcpNet (); tcp_soc = tcp_get_socket (TCP_TYPE_SERVER , 0, 120, tcp_callback); if (tcp_soc != 0) { // Start listening on TCP port 80. tcp_listen (tcp_soc, 80); } while (1) { main_TcpNet (); if(DATA_received == __TRUE ) { process_incoming(); DATA_received = __FALSE; } } }
I don't exactly understand what you mean, sorry. Should I manualy create tcp_callback?
Is your tcp_callback set?
Of course there are samples - in your own installation path of the Keil toolchain. See here:
..\Keil\ARM\Boards\Keil\MCB2470\RL\TCPnet
Thank you for your help! Does there exist some samples project where TcpNet from Rl-arm are implenented?
May be it will be easier to understand if you see my project: dl.dropbox.com/.../rlArmWeb.zip
View all questions in Keil forum