ardyesp / espwebdav Goto Github PK
View Code? Open in Web Editor NEWWifi WebDAV server using ESP8266
License: GNU General Public License v3.0
Wifi WebDAV server using ESP8266
License: GNU General Public License v3.0
I put the WebSrv.cpp file in a similar named folder in de the libraries folder. However on compilation I get this error:
/Users/biletsky/Documents/Arduino/Printer_3D/Printer_3D.ino: In function 'void setup()': Printer_3D:96:49: error: no matching function for call to 'ESPWebDAV::init(int, long unsigned int, int)' if(!dav.init(SD_CS, SPI_FULL_SPEED, SERVER_PORT)) { ^ /Users/biletsky/Documents/Arduino/Printer_3D/Printer_3D.ino:96:49: note: candidate is: In file included from /Users/biletsky/Documents/Arduino/Printer_3D/Printer_3D.ino:5:0: /Users/biletsky/Documents/Arduino/libraries/ESPWebDAV/ESPWebDAV.h:22:7: note: bool ESPWebDAV::init(int, SPISettings, int) bool init(int chipSelectPin, SPISettings spiSettings, int serverPort); ^ /Users/biletsky/Documents/Arduino/libraries/ESPWebDAV/ESPWebDAV.h:22:7: note: no known conversion for argument 2 from 'long unsigned int' to 'SPISettings' exit status 1 no matching function for call to 'ESPWebDAV::init(int, long unsigned int, int)'
How would I solve this?
I know you specify v2.4 of the esp8266 lib which it definitely needs or it just reboots over and over. I'm suspecting I also need older versions of a few other library's to get the program to work. Do you remember which versions of sdfat, esp8266wifi were used?
I've tried setting up a wemos mini d1 , eps-12f and esp-12e devices in my programmer, and a NodeMcu Lua with all showing the same errors using your wiring diagram.
I have it compiling but attempts to join the network using ip//DavWWWRoot have it showing a zero byte file "Failed to initialize SD Card" Using the original sketch with only the ssid and password added. It logs onto the network fine, after plugged in flashes a few times then does about 4 seconds of rapid flashes with nothing showing in the serial port. I'm also noticing the hostname does not seem to work . I've been dropping back on esp8266WiFi versions but it must have something to do with another library too.
Used ARDUINO IDE v1.8.12, ESP8266 Arduino Core version 2.4.0 and SdFat-1.0.16.
On the ESP module itself, the marking ESP8266MOD.
Everything compiled. Connected to WiFi. Gives an error ERROR: Failed to initialize SD Card.
The output to the terminal looks like this.
Connected to TP-LW
IP address: 192.168.7.56
RSSI: -64
Mode: 3
ERROR: Failed to initialize SD Card
WebDAV server started
SD connection is ok.
Am I doing something wrong or do I need to configure something correctly?
The error is observed in both examples from this library.
Can I configure a static IP directly in the firmware?
Because I don't have access to wifi router to fix IP by MAC from SD-WiFi module.
Hey guys,
i got some multiple errors: most of them caused by "cant complie for board esp8266" & "SdFat" erros.
which combination do you use to get it to run? IDE Version, SDFat Version, ESPlib Version.
Iam using; SDFat lastet, IDE 1.8.18, ESP 2.0
Error:
C:\Users\Icess\Desktop\sketch_feb06a\sketch_feb06a.ino: In function 'void setup()':
sketch_feb06a:48:50: error: no matching function for call to 'ESPWebDAV::init(int, long unsigned int, int)'
if(!dav.init(SD_CS, SPI_FULL_SPEED, SERVER_PORT)) {
^
C:\Users\Icess\Desktop\sketch_feb06a\sketch_feb06a.ino:48:50: note: candidate is:
In file included from C:\Users\Icess\Desktop\sketch_feb06a\sketch_feb06a.ino:8:0:
C:\Users\Icess\Documents\Arduino\libraries\ESPWebDAV/ESPWebDAV.h:25:7: note: bool ESPWebDAV::init(int, SPISettings, int)
bool init(int chipSelectPin, SPISettings spiSettings, int serverPort);
^
C:\Users\Icess\Documents\Arduino\libraries\ESPWebDAV/ESPWebDAV.h:25:7: note: no known conversion for argument 2 from 'long unsigned int' to 'SPISettings'
Mehrere Bibliotheken wurden für "SdFat.h" gefunden
Benutzt: C:\Users\Icess\Documents\Arduino\libraries\SdFat-2.2.2
Nicht benutzt: C:\Users\Icess\Documents\Arduino\libraries\SdFat_-_Adafruit_Fork
Mehrere Bibliotheken wurden für "Hash.h" gefunden
Benutzt: C:\Users\Icess\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Hash
Nicht benutzt: C:\Users\Icess\Documents\Arduino\libraries\AsyncElegantOTA
exit status 1
no matching function for call to 'ESPWebDAV::init(int, long unsigned int, int)'
Hello. Can I somehow increase the speed of work with the SD card? Now I have a speed of approximately 176kb / s.
Using an ESP12-E with SDcard attached as per your schematic and using ESP core V2.4 & SDFat V1.0.16, I can compile and run the device without error.
However when I try to connect from a W7 machine I can not see the device via the HOSTNAME. I can however connect to it by using the discrete IP address to either mount a network drive or via the Windows explorer.
For example, this works in the file explorer : \192.168.1.124/davwwwroot
and this works when mounting a network drive : \192.168.1.124
while this gives me an error : \ESPWD/davwwwroot (ESPWD being the hostname given in the scetch)
So any mentioning of the host name instead of the direct IP address gives an error saying "hostname" not found or not accessible.
Is there something I'm missing here? Is there a special protocol that needs to be running on the Windows computers to see it via the hostname, or is there something in the ESP Libraries that is not working ? Arduino IDE is at V2.03 -- Libs as per your docu, Simple.ino and Printer_3D exhibit the problem.
-- Gary
Hi there,
I have two questions actually:
In the hookup guide it says the CS Pin of the microsd should be connected to GPIO15. In the code, the fields "CS_SENSE" and "SD_CS" are mapped to pin 5 and 4. I actually did hook up the CS of the sd card to pin 5 now, because pin 15 needs to be low at startup if i remember correctly.
I only attached one pin to the CS pin though. But in the code there are two pins used for CS pin of the sdcard. One for communication and i guess the other to sense if there's some action going on already with the sdcard. I probably need to hookup pin 4 AND 5 to the sd cards's CS pin, am I right?
And thanks for the project! When I can get it to work, its gonna be a blast and will support my laziness a lot!
Greetings
Timo
I have programmed the module NodeMCU v2 (ESP8266 12E + CP2102) and connect according to the diagram. Unfortunately, I encountered a problem.
Basic information:
In short, what the situation looks like:
With the SD adapter and SD card adapter connected (extension cable without NodeMCU module) - with mounted 1k resistors, the SD card is correctly detected by the printer.
When the NodeMCU v2 module connected to the extension cable is access via WiFi to the SD card - I can write / read files from it - but the printer writes "No SD card". After copying the file from Windows through the explorator I close the window - the LED in the ESP module flashes several times - as I open again I see "Marlin is reading from SD card" - but the printer still has "No SD card".
In Marlin 2.0 I set the test in pins_RAMPS.h at the end #define SD_DETECT_PIN -1 (then after turning on the printer I can manually initialize the SD card) - unfortunately with the active NodeMCU module the printer still does not detect the SD card, despite the inclusion of Init. SD card (the LED flashes for several seconds).
If I disconnect the MISO line from the NodeMCU module (GPIO12) and enable Init. SD card I get access to the SD card in the printer, then in WebDav I have the message "Marlin is reading from SD card" - that is OK, then I connect again the MISO line (GPIO12) to NodeMCU - after a dozen or so seconds I get again access via WiFi to the card - but I lose access to the card again from the printer.
A slightly different situation:
The problem seems to be the takeover of control over the bus by NodeMCU, then the printer can not get to the access card. I checked connections several times. scheme, I did not find a problem.
Hi,
I have compiled the code for a Wemos D1 Mini Board and connected all like the schematic.
After startup, on the serial Monitor I see:
Connected to WLAN01234
IP address: 192.168.1.226
RSSI: -63
Mode: 3
WebDAV server started
I get the Error "Not found URI: / Method: GET" on the Webpage
What's wrong?
Thanks, regards Roland
Hi,
I like to compile simple.ino and i have different compiler errors : I added the libraries (sdfat and ESPWebDav) form github
Arduino: 1.8.13 (Windows 7), Board:"WeMos D1 R1, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
In file included from C:\Users\peter\Documents\Arduino\libraries\ESPWebDAV-master/ESPWebDAV.h:2:0,
from C:\Users\peter\AppData\Local\Temp\arduino_modified_sketch_549109\Simple.ino:8:
C:\Users\peter\Documents\Arduino\libraries\SdFat-master\src/SdFat.h:401:16: error: 'typedef class File32 File' conflicts with a previous declaration
typedef File32 File;
^
In file included from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/CertStoreBearSSL.h:26:0,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:30,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/WiFiClientSecure.h:41,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/WiFiServerSecure.h:20,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/ESP8266WiFi.h:41,
from C:\Users\peter\AppData\Local\Temp\arduino_modified_sketch_549109\Simple.ino:7:
C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\cores\esp8266/FS.h:52:7: note: previous declaration 'class fs::File'
class File : public Stream
^
In file included from C:\Users\peter\Documents\Arduino\libraries\ESPWebDAV-master/ESPWebDAV.h:2:0,
from C:\Users\peter\AppData\Local\Temp\arduino_modified_sketch_549109\Simple.ino:8:
C:\Users\peter\Documents\Arduino\libraries\SdFat-master\src/SdFat.h:401:16: error: 'typedef class File32 File' conflicts with a previous declaration
typedef File32 File;
^
In file included from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/CertStoreBearSSL.h:26:0,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:30,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/WiFiClientSecure.h:41,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/WiFiServerSecure.h:20,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/ESP8266WiFi.h:41,
from C:\Users\peter\AppData\Local\Temp\arduino_modified_sketch_549109\Simple.ino:7:
C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\cores\esp8266/FS.h:52:7: note: previous declaration 'class fs::File'
class File : public Stream
^
In file included from C:\Users\peter\Documents\Arduino\libraries\ESPWebDAV-master/ESPWebDAV.h:2:0,
from C:\Users\peter\AppData\Local\Temp\arduino_modified_sketch_549109\Simple.ino:8:
C:\Users\peter\Documents\Arduino\libraries\SdFat-master\src/SdFat.h:401:16: error: 'typedef class File32 File' conflicts with a previous declaration
typedef File32 File;
^
In file included from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/CertStoreBearSSL.h:26:0,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:30,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/WiFiClientSecure.h:41,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/WiFiServerSecure.h:20,
from C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi\src/ESP8266WiFi.h:41,
from C:\Users\peter\AppData\Local\Temp\arduino_modified_sketch_549109\Simple.ino:7:
C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\cores\esp8266/FS.h:52:7: note: previous declaration 'class fs::File'
class File : public Stream
^
C:\Users\peter\AppData\Local\Temp\arduino_modified_sketch_549109\Simple.ino: In function 'void setup()':
Simple:47:49: error: no matching function for call to 'ESPWebDAV::init(int, long unsigned int, int)'
if(!dav.init(SD_CS, SPI_FULL_SPEED, SERVER_PORT)) {
^
C:\Users\peter\AppData\Local\Temp\arduino_modified_sketch_549109\Simple.ino:47:49: note: candidate is:
In file included from C:\Users\peter\AppData\Local\Temp\arduino_modified_sketch_549109\Simple.ino:8:0:
C:\Users\peter\Documents\Arduino\libraries\ESPWebDAV-master/ESPWebDAV.h:22:7: note: bool ESPWebDAV::init(int, SPISettings, int)
bool init(int chipSelectPin, SPISettings spiSettings, int serverPort);
^
C:\Users\peter\Documents\Arduino\libraries\ESPWebDAV-master/ESPWebDAV.h:22:7: note: no known conversion for argument 2 from 'long unsigned int' to 'SPISettings'
Meerdere bibliotheken gevonden voor "SdFat.h"
Gebruikt: C:\Users\peter\Documents\Arduino\libraries\SdFat-master
Niet gebruikt: C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266SdFat
Bibliotheek ESP8266WiFi op versie 1.0 in map: C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\ESP8266WiFi wordt gebruikt
Bibliotheek ESPWebDAV-master in map: C:\Users\peter\Documents\Arduino\libraries\ESPWebDAV-master (legacy) wordt gebruikt
Bibliotheek SdFat-master op versie 2.0.2 in map: C:\Users\peter\Documents\Arduino\libraries\SdFat-master wordt gebruikt
Bibliotheek SPI op versie 1.0 in map: C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\SPI wordt gebruikt
Bibliotheek Hash op versie 1.0 in map: C:\Users\peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.0\libraries\Hash wordt gebruikt
exit status 1
no matching function for call to 'ESPWebDAV::init(int, long unsigned int, int)'
what did I wrong?
thanks
I would like to use your great project inside a open source project. Inside your code I didn't find any license information. It would be really nice if you could add a license e.g. MIT or GPL.
Dear Sirs,
I have been attempting to access a WebDAV server based on this code (device: https://www.ebay.com/itm/203949035388) using linux and davfs2.
The device can be accessed through Windows as described, but when I attempt to connect to it with Linux, I get:
"/sbin/mount.davfs: mounting failed; the server does not support WebDAV"
The device is not advertised to be able to service non Windows clients, but can it be made to do so?
I also cannot connect using Mac OS
Any help with using a Linux client would be appreciated.
Sincerely,
Duane Kaufman
If a file name or folder has an "&" in the name it locks up.
Hello.
I have a problem. I get a lot of errors when trying to compile a sketch:
`In file included from C:\Users\�����\Documents\Arduino\libraries\SdFat-master\src/FatLib/FatLib.h:27:0,
from C:\Users\�����\Documents\Arduino\libraries\SdFat-master\src/SdFat.h:33,
from C:\Users\�����\Documents\Arduino\libraries\ESPWebDAV-master/ESPWebDAV.h:2,
from D:\TEMP\arduino_modified_sketch_31055\Printer_3D.ino:5:
C:\Users\�����\Documents\Arduino\libraries\SdFat-master\src/FatLib/ArduinoFiles.h:122:7: error: redefinition of 'class fs::File'
class File : public FatFile, public Stream {
^
In file included from C:\Users\�����\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266WiFi\src/CertStoreBearSSL.h:26:0,
from C:\Users\�����\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:30,
from C:\Users\�����\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266WiFi\src/WiFiClientSecure.h:41,
from C:\Users\�����\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266WiFi\src/WiFiServerSecure.h:20,
from C:\Users\�����\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266WiFi\src/ESP8266WiFi.h:41,
from D:\TEMP\arduino_modified_sketch_31055\Printer_3D.ino:4:
C:\Users\�����\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/FS.h:52:7: error: previous definition of 'class fs::File'
class File : public Stream
^
In file included from C:\Users\�����\Documents\Arduino\libraries\SdFat-master\src/FatLib/FatLib.h:28:0,
from C:\Users\�����\Documents\Arduino\libraries\SdFat-master\src/SdFat.h:33,
from C:\Users\�����\Documents\Arduino\libraries\ESPWebDAV-master/ESPWebDAV.h:2,
from D:\TEMP\arduino_modified_sketch_31055\Printer_3D.ino:5:
C:\Users\�����\Documents\Arduino\libraries\SdFat-master\src/FatLib/FatFileSystem.h: In member function 'fs::File FatFileSystem::open(const char*, oflag_t)':
C:\Users\�����\Documents\Arduino\libraries\SdFat-master\src/FatLib/FatFileSystem.h:95:13: error: 'class fs::File' has no member named 'open'
tmpFile.open(vwd(), path, oflag);
^`
What could be the reason and how to solve it?
You have to ensure that you are using the esp8266 version 2.4 of the sdk in board manager, then install SdFat-1.0.16
If you do this, then this library will compile on moden Adrduino IDE
I found this code with the intention to use in a digital picture frame, so i can send pictures to it over wifi. Problem is, it doesn't always show the SD card in the network share when it's in the picture frame as the picture frame or any device with an SD slot is always trying to access the SD card. is there a way that the firmware can be modified to work for my application? I bought it thinking that it would work like a regular NAS, allowing me to copy files to it over wifi while the card is mounted in another device.
there are umpteen hundred forks and derivatives of this code yet the only one that truly works is the original!
I know, not an issue here, but I had to share after a day and a half of dorking around to come back to the original and it be more stable / reliable / functional then all the others.
Thanks for your work!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.