[En-Nut-Discussion] Reading web files from UFLASH

Mateusz K. mateusz778 at vp.pl
Sun Aug 24 18:42:10 CEST 2014


Hello,
I have problem with reading files from UFLASH.
Previously, I was able to run UFLASH with (UFlashAttach(&devUFlash0,
&flashAt45dib0, &spiBus0Avr), and NutRegisterDevice(&devUFlash0, 0, 0)).
Later I prepared simple FTP server and I save files on UFLASH by FTP,
something like that:
<http://microcontrollers.2385.n7.nabble.com/file/n191755/ftptransfer.png> 
Now, I prepared simple http server program which the same code to
initialization UFLASH and ethernet controller. But in web browser is "404
not found". If I click refresh, led on board (dataflash) is blinking once,
it means that NutRegisterHttpRoot("UFLASH0:/"); works good, but why the
default file "index.htm" is not opened? 
The main code :
*int main(void)
{
    unsigned long baud = 115200;
    NutRegisterDevice(&DEV_DEBUG, 0, 0);
    freopen(DEV_DEBUG_NAME, "w", stdout);
    _ioctl(_fileno(stdout), UART_SETSPEED, &baud);

    init_UFLASH();
    init_network();
    NutRegisterHttpRoot("UFLASH0:/");
    for (;;)
    	{
    	    s = NutTcpCreateSocket();					
    	    NutTcpAccept(s, 80);				
    	    f = _fdopen((int) s, "r+b");		
    	    NutHttpProcessRequest(f);    		
    	    fclose(f);
    	    NutTcpCloseSocket(s);			
    	};
    return 0;
}*
Maybe I forgot about something?

Best Regards,
Matthew 



--
View this message in context: http://microcontrollers.2385.n7.nabble.com/Reading-web-files-from-UFLASH-tp191755.html
Sent from the MicroControllers - Ethernut mailing list archive at Nabble.com.


More information about the En-Nut-Discussion mailing list