Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 8 months ago.
changing path to access SD files
Thank you for useful sample of MiMic library for mbed. I want to use only SD card file system for Web acess, with disabling local, romfs, and so on. On this situation, can I change the path to access files in SD? For exampe, "http://(IP)/a.html" fo access "a.html" in SD card. How should I specify the first parameter in modsd.setParam()?
Question relating to:
1 Answer
9 years, 8 months ago.
Hello.
It will need to update ModLocalFileSystem.cpp. Current libMiMic can not change the file system path.
This request will take some time. Please wait time about a week.
The next version library has some changes around network interface. I think it is necessary to little change to the your application.
For a while update, libMiMic will be published frequently, but there is no compatibility with current API.
Please do not update your repository.
I was updated libMiMic library. Please update libMiMic of your project.
It requires changes to your main.c program.
1. Add MiMicNetIf netif; variable. see http://developer.mbed.org/users/nyatla/code/MbedFileServer/rev/6923864662d4 This is new network initialization sequence. 2. set "virtual path" parameter to modsd.setParam;
before modsd.setParam("sd",ModLocalFileSystem::FST_SDFATFS); after modsd.setParam("sd","/",ModLocalFileSystem::FST_SDFATFS);
2nd parameter is virtial host path. for example,"/" or "/virtual/" ("/*/")
Please tell me if you find out bugs.
posted by 17 Mar 2015
Thank you for updating your library. I've checked it, and it works fine! (In your sample code, there are two "Net" objects; the first one should be commended-out, is it OK?)
By the way, is it possible to access /index.html if accessed "http://(IP)/" ? (access to http://(IP)/ shows http://(IP)/index.html)
posted by Junichi Akita 24 Mar 2015