Open
Description
I run the webbino server on a stm32 bluepill with an sdcard, but I can not get server requests to work. it works if I use flash storage, but not when I use storage on sdcard.
In the example ledcontrol the function ledToggle is called from this line:
const Page page01 PROGMEM = {index_html_name, index_html, index_html_len, ledToggle};
how do I call that function when I use sdcard storage?
Thank you
Activity
SukkoPera commentedon Apr 26, 2019
This is not supported at the moment, if I remember correctly. Functions can only be associated to pages stored in flash.
I am currently away, I will check better when I'm home, in a week or so.
qniens commentedon Apr 26, 2019
A workaround is to make the following variable public instead of private
byte ethernetBuffer[MAX_URL_LEN + 16];
In WIZ5x00.h (or the interface you use) .
Then you can parse the GET request line yourself
SukkoPera commentedon Apr 26, 2019
Uhm, and where do you do that?
I don't think any hacks are necessary, this should be pretty straightforward to do with the last code refactoring I did. I will have a look at it ASAP.
jmcastillejo commentedon Apr 26, 2019
Thanks for your work, it's a great project
SukkoPera commentedon May 16, 2019
This should be done with 3c51945, please check out the current
master
branch, test it and report.See the
LedControl
example for the new method of associating functions to pages, this should work across all backends.jmcastillejo commentedon May 17, 2019
Hello!!
I have tested the modifications and it still does not work using the sd card, only work with flash
SukkoPera commentedon May 17, 2019
A quick test I did works instead. Can you please post your sketch?
SukkoPera commentedon May 17, 2019
@jmcastillejo: Make sure to associate the function with
FileFuncAssoc
rather than withFlashFileFuncAssoc
as shown in the current LedControl version.jmcastillejo commentedon May 17, 2019
if I change the FlashFileFuncAssoc function by FileFuncAssoc I get the following error:
src / WebbinoCore / WebServer.h: 101: 60: note: in definition of macro 'FileFuncAssoc'
exit status 1
initializer fails to determine size of '_ffa_indexAss'
SukkoPera commentedon May 18, 2019
Try something like:
jmcastillejo commentedon May 18, 2019
With that it compiles well, it executes the function in the http request but the tags do not work, and in the chrome the save window appears as when entering the url. This is the sketch: