Quantcast
Channel: Renesas Synergy Platform
Viewing all articles
Browse latest Browse all 23645

Forum Post: Adding a webserver to a project.

$
0
0
Dear Forum, So I have taken the old BL00IA - Adding Value to Your Application with XWare Components lab from devcon and got it running on the SK board.  I have the Netx running, Telnet, changed from the sd card to the usb host disk, and running ssp1.1.0 and latest E^2 studio.  Im using this as a starting point. What I want to next do is add in the webserver.  I dont know enough about Netx and the FileX usb Host stuff to make this a simple easy task and hoping someone can point me in the correct direction.  I have working the NetDuo demo web server.  I have been using it as a reference for what I can but its configured differently then what Im wanting to do and not sure how to proceeded in a few areas. So Basically Im am looking to have the Webserver be able to read and write files to the usb disk.  I dont want to use the ram disk.  Not sure where where to place the "gp_media" pointer I copied from the USB host demo so that I can use it instead of the ramdisk.  Can I just replace for example the &ram_disk_media with maybe the &gp_media and be good to go? status =  nx_http_server_create(&my_server, (CHAR*)"My HTTP Server", &ip_0, &ram_disk_media, &NETX_SVR, 4096, &pool_0, my_authentication_check, my_get_notify); Where do we specify the starting file locations?  Where do I tell the webserver what is the main webpage and where that file is located?  Index.html, or what ever file I want as the main webpage?  Im guessing this is the same location where the 404.html "not found" files will also be defined.  Once that is done are there any other changes that need to be made to a webserver using a usb host? (As a side note)Also noticed on the USB host demo (as someone else also mentioned) that if you insert the usb disk more then once, on the 8th time it basically hangs.  Or takes forever to recognize the drive.  Anyone have a fix for this yet? Other question is with threads.  From which thread do I call the nx_http_server_create, nx_http_server_start.  The NetDuo webserver spawns a bunch of threads.  Do I need to call the the two commands from the thread that opened the file system and created the gp_media pointer?  What is recommended? For the call like the following, Im thinking I do not need to make these calls since NetX is up and running(to the best of my knowledge) from my configuration getting the telnet server running?  Or is it recommended to make these calls after all? /* Create a packet pool.  */ status =  nx_packet_pool_create(&pool_0, (CHAR*)"NetX Main Packet Pool", (1536 + 32), packet_pool_area, sizeof(packet_pool_area)); /* Create an IP instance.  */ status = nx_ip_create(&ip_0, (CHAR*)"NetX IP Instance 0", SERVER_IP_ADDRESS, 0xFFFFFF00UL, &pool_0,nx_ether_driver_eth1,                           &NETX_TP, 2048, 1); To help get the most speed from the data transfers of the webpages what are the recommended settings for buffers?  I have around 300-400k of html,js,css, and images Ill be sending back to the end user web client. Thank you for any help! Matt

Viewing all articles
Browse latest Browse all 23645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>