Comments (10)
It seems the SD card library already supports USB drives. I guess sdcard.c needs to be changed to mount the USB drive instead of the SD card to make it work. More changes is likely needed to make it work alogside the SD card.
from imxrt1062.
Ok. Will try it. Thanks.
from imxrt1062.
Hi @terjeio sorry I couldn't find what needs to be changed in sdcard.c to mount USB drive instead of SD card. Will you please point me?
from imxrt1062.
I believe it is the device name set here.
Perhaps this snippet from one of the uSDFS examples is a clue for what to use?
#if TEST_DRV == 0
const char *Dev = "0:/"; // SPI
#elif TEST_DRV == 1
const char *Dev = "1:/"; // SDHC
#elif TEST_DRV == 2
const char *Dev = "2:/"; // USB
#endif
from imxrt1062.
Thanks for hint. I got the definition in driver.c changed it to 2:/ and USB opens through FTP. But there are some weird files along with. I have formatted it with FAT32 but the www directory has some different name like WW~1 I think it should be related to FS or FTP permissions. my webUI doesn't open inspite I have put the www directory in root of USB drive.
from imxrt1062.
the www directory has some different name like WW~1
Long filename support is not enabled for FatFs for some reason?
You may also try WebDAV via WinSCP - this does not keep track of current working directory that may mess things up with ftp.
my webUI doesn't open inspite I have put the www directory in root of USB drive.
What about ESP3D WebUI - same?
And do you use the webui backend?
If so then you may try WEBUI_ENABLE 2 instead of 1 to force the v2 protocol - if set to 1 I try to auto detect which one to use. Also be aware that the webui backend is in a somewhat fluid state now due to v3 support beeing finalized.
Oh, and your webui code is gzipped (index.html.gz)?
from imxrt1062.
I am not using ESP3D webUI. But will check with it. I am using grblTouch which is not gzipped, so simple to work with. I also don't use any webUI backend (actually I don't understand what do you mean by backend) but I can surely tell you that I have not used any of the code which is inside ESP3D webUI. Will try with Luc's webUI and post the results here as I get time.
from imxrt1062.
(actually I don't understand what do you mean by backend)
Ok, this may explain it - I have removed support for fetching index.html from the www directory if no backend is present. You will have to move it too the root directory or implement a mini backend the redirects the request.
A backend is code that processes http requests in different ways depending on the url provided, it is set up by registering url handlers with the http server. It may also register a file redirector with the server that get called when a file is not found - this can be used to look up the file elsewhere in the filing system.
The iMXRT1062 driver has gotten littlefs support, this is for storing files in flash. You may use this to store the grblTouch code, with file redirection you can check if the code is present on the sdcard, if not fall back to littlefs.
from imxrt1062.
Ok. That sounds interesting. Actually I am using server.c but my code is little older and there may be lots of changes by you. Will play around with your suggestions. BTW, will you point me on how to save my grblTouch web app to flash? I can see the path you have mentioned in server.c is /embedded for it.
from imxrt1062.
BTW, will you point me on how to save my grblTouch web app to flash? I can see the path you have mentioned in server.c is /embedded for it.
The actual file system path is /littlefs - the /embedded file system path is read-only and files are stored in a .c file. The WebUI index.html.gz stored in this file is for updating the WebUI image in littlefs, either when index.html.gz is not found in the / or /www directories or when http:///forcefallback=yes is opened. All this is handled via file redirection in server.c - and you may redirect whatever filenames you want.
With WinSCP I open /littlefs mount via WebDAV by specifying /littlefs as the remote directory in advanced settings.
ftp access to mounts other than the root mount is not yet working - I'll fix this later.
A bit more complicated than before I know, but the http server daemon is a lot more flexible now.
If storing grblTouch in flash you really should minimize the javascript and gzip the result- you will save a lot of flash that way. It might not even be possible to store it in flash if not doing so.
from imxrt1062.
Related Issues (20)
- Compile errors with latest code. HOT 44
- z-axis TLO and probing report with bCNC HOT 4
- How to input Motor Fault signal? HOT 5
- LATHE Y to Z HOT 2
- BLTouch Servo Probe HOT 5
- RC PWM Spindle control HOT 2
- Question: Why is it an error to use a pin other than 12 or 13 for SPN PWM? HOT 11
- How to add new pins and use them. HOT 17
- I have run the compile both with Arduino IDE and PlatformIO with MCP3221 Enabled. HOT 2
- aggiungere pin alla configurazione HOT 13
- laser co2 + diodo
- valore ottimale planner $398 HOT 4
- COOLANT_MIST_PIN changing from pin 24 to any other available pin breaks communication with board after flashing successfully. HOT 4
- Hello and I have Been Known to Misinterpret Ideas HOT 5
- Using native USB host port as HID input for wireless keyboards HOT 2
- Error in GRBLHAL2000_map.h file HOT 1
- calo improvviso emissione fascio laser / pwm HOT 6
- Not an issue: I want to know MODBUS implementation. HOT 23
- $398=100 homing problems HOT 1
- Compilation problem after I formatted my macbook HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imxrt1062.