Hallo, Hier der SourceCode für einen Philips LPC213x ARM Microcontroller und dem bekannten ENC28J60 Ethernetcontroller von Microchip. Unterstützt wird zurzeit erst ARP und ICMP (Ping). Der ENC28J60 hängt dabei an SPI0. Dies ist nur eine Experimentier Version. Gruss Ulrich Radig
Wird es einen kompletten Webserver mit dem LPC213x geben ? Diese bieten ja genügend Flash und RAM für einen kleinen Webserver der ohne zusätzlichen Speicher wie MMC/SD Karte auskommt.
Hallo, Hier der WEBSERVER Source Code auf Basis des uIP Stacks. Weitere Detais demnächst wie immer auch auf meiner Webseite. Gruss Ulrich Radig
Ich habe die Basics Version mal auf einem LPC2131 ausprobiert: Beide LEDs am ENC28J60 blinken, ebenso die LED am LPC sobald dieser startet. Sobald ich die IP anpinge erzeugt der ENC28J20 einen Interrupt, aber der Ping wird nur ab und zu mal beantwortet. Wenn er beantwortet wird, dann nur 1 oder 2x nach einem Reset des LPC, danach garnichtmehr. Spätestens nach einigen Minuten hängt sich der LPC dann auf (die LED bleibt an oder aus.) Die Schaltung rund um den ENC28 müsste OK sein, da ich lediglich den uC (vorher ATmega32) ersetzt habe, und vorher ein kleiner Webserver eine Woche damit lief. Gibt es beim Anschluss irgendwas zu beachten ? Meine Anschlussbelegung: SPI0, CS an P0.21, Int an P0.16
Hallo, Mit welchem Quarz läuft das Board ich benutze ein 10Mhz. Gruss Ulrich
Ich habe 14,318MHz verwendet. Das ergibt bei M=4 etwa 57MHz. PSEL ist auch angepasst, daran liegt es also nicht. Wenn ich den PLL abschalte ändern sich die Erfolge beim Anpingen auch nicht: Spätestens nach dem 4. Anpingen ist ein Reset notwendig.
Hallo, Ich kann den Fehler bei mir leider nicht nach vollziehen. Habe aber noch etwas geändert. Evt. könnte nun der Fehler draussen sein. Gruss Ulrich
Ich habe jetzt einen LPC2136 bekommen, damit funktioniert die Basics Version auch nur ab und zu, der Webserver läuft aber wunderbar. Gibt es irgendwo eine Beschreibung zu dem Webserver alleine (in der uip Doku steht nichts dazu) ? Ich versuche gerade eigene Webseiten auf diesen zu kopieren, verstehe aber nicht so ganz wie man die Daten erzeugt und einbindet: const struct httpd_fsdata_file file_processes_shtml[] = {{NULL, data_processes_shtml, data_processes_shtml + 17, sizeof(data_processes_shtml) - 17}}; const struct httpd_fsdata_file file_404_html[] = {{file_processes_shtml, data_404_html, data_404_html + 10, sizeof(data_404_html) - 10}}; const struct httpd_fsdata_file file_files_shtml[] = {{file_404_html, data_files_shtml, data_files_shtml + 13, sizeof(data_files_shtml) - 13}}; Die ersten beiden scheinen die Liste der Dateien zu sein, die einfach als Array gespeichert werden, aber woher kommen diese beiden Zahlenwerte hinter dem Array (dieses +17, +10, +13 usw.) ?
Hallo, Lade dir den Source uIP1.0 herrunter bei der Applikation Webserver ist ein Ordner hier müssen alle Daten HTML Fies hereinkoppiert werden danach wird ein Makefile ausgeführt. UND FERTIG!! Gruss Ulrich Radig
Unter Windows ohne perl geht das nicht ganz so einfach, aber zum Glück gibt es auf der Seite noch ein unter Windows lauffähiges Tool das genau dasselbe macht. Noch eine letzte Frage: Gibt es irgendwo zu dem Scripting vom Webserver eine Beschreibung ?
Wie heißt denn dieses windows-tool? kann es auf der seite von adem nicht finden...
Hello, I post in english (well Frenchstyle english :)), I wish I could get some replies ;) After finding out the Ulrich's website, I decided to buy a small dev board based on LPC2148 chip. I also buy a ENC28J60 chip and connect it to SPI0, with CS on P0.21 and IRQ on P0.16. Crystal is same as Ulrich's one (10MHz) After burning his program (Basic or Standard), both LED on Ethernet connector blink together. I think the init process is fine but then nothing happens. - On the ARM_uiP, I changed IP address both on my board (192.168.0.99 to 192.168.0.1) and on my router (192.168.0.98 to 192.168.1.1), recompile his code and burn it. The mask is correct. Have I forgot something ? (I've not change the MAC addr) - In the basic code, I only see the first IP address of the target but no from the router... After burning the firmware, how can I check the board is working ? Ping command ? a small web server ? Thank you very much by advance, Regards, David from France :) ps : I've also sent an email to Ulrich today :p
Hi, if you'r trying to run your ARM board with ip 192.168.0.1 and the router with 192.168.1.1 you might experience problems connecting / pinging your board because they wont be on the same subnet. For example if I set my board's adress to 192.168.0.1 and my router to 192.168.1.1 then I wont be able to get a connection to my board, whereas router:192.168.1.1 board:192.168.1.2 remaining computers on my network: 192.168.1.xyz just works fine for me. However, I'm not familiar with neither ARM's nor the uIP stack(I use my own stack on AVR controllers) so the problem might be something else. But I think pings should be enabled in Ulrichs uIP so the ping command should be just fine to check if your boards running :) Regards, Nik
Thanks Nik :) You're right, I've changed IP addresses, here is the NAT : - router : 192.168.1.1 - board : 192.168.1.2 - my computer : 192.168.1.16 I can access from my computer to the modem/router settings (through its http web server) and I opened HTTP port 80 on 192.168.1.2 (board)). Ping is working for the modem (no surprise :)) but nothing from my board... and the LED on Ethernet connector blink all the time (each second), probably an error somewhere. In the main file, I only changed the values like this : uip_ipaddr(ipaddr, 192,168,1,2); uip_sethostaddr(ipaddr);// Board uip_ipaddr(ipaddr, 192,168,1,1); uip_setdraddr(ipaddr);// Router uip_ipaddr(ipaddr, 255,255,255,0); uip_setnetmask(ipaddr); // mask : no change, it's ok Any (little) idea ? :-) Thanks again :) Regards David
Hi David, with this line: enc28j60PhyWrite(0x14,0x0AA0); you say the enc that the leds should always blink. see datasheet page 11... u can change the 2. value to 0x0470, the enc shows you now the link-status and the transmit/receive-status... if link-status isn't on, your hardware isn't ok...
I've got it working finaly. I can change the value like you described too, thanks for all your help :) The firewall and AVG antivirus blocked the pages. The next step will be to understand how to change the pages into the web server. The pages seems to be stored in the local flash through a filesystem. Is there a tool to convert a html page into a C-array code (like the header files) ? Thanks again :) David, who goes back to the code listing :)
Hi David, cool that you could make it work ! :) I use Ulrich Radig's Tool 'WinBin' it can convert any file into an array of values (http://www.ulrichradig.de/home/index.php/projekte/winbin)
download uip und look at the example-webserver... "makefsdata" is a perl-script... download perl and run: perl makefsdata the arrays will be built from the html-files...
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.