-
-
Notifications
You must be signed in to change notification settings - Fork 11
The Configuration File
Certain features of Webbino need to be configured in one of its source files: it is named webbino_config.h
and you will find it in the src
subdirectory of the Webbino library directory. Libraries are usually installed in the libraries
subdirectory of your Arduino sketch directory, by the way.
All the settings there have a comment that explains their purpose.
Note that Enabling means removing the comment mark, while disabling means adding back the comment mark
The most important setting is the first one you'll find in the file, that is the platform selection. You will have to enable only one of the subsequent lines, corresponding to the platform you will be using.
This supports the original Ethernet Shield, it has no external dependencies and can be used straight away.
This supports the official Arduino Ethernet Shield 2, originally released by arduino.org. It requires the Ethernet 2 library which can be installed through the Library Manager in the Arduino IDE.
This supports the ENC28J60 Ethernet Controller through the EtherCard library library, which is recommended on microcontrollers/boards with limited resources, such as the Uno. It has some limitations and uses a lot of RAM for the packet buffer, which is currently set at 800 bytes including TCP/IP headers, leaving about 750 bytes for data to be sent to the client. Since the library also forces all communications to be single-packet, about 750 bytes is the maximum size of any data that is exchanged between server and client (i.e.: of webpages). See below for an alternative.
This is an alternative for the ENC28J60 Ethernet Controller which uses the UIPEthernet library. It is more complete but heavier on resource usage, so it is only recommended on more powerful platforms, such as the Arduino Mega, Due or on boards based on STM32 microcontrollers.
Supports the ESP8266 WiFi module as an add-on to Arduino. You will need Bruno Portaluri's WiFiEsp library available in the Library Manager or at https://github.com/bportaluri/WiFiEsp.
Supports the ESP8266 as a standalone board. You will need to install the ESP8266 core, available at https://github.com/esp8266/Arduino.
Supports the original Arduino WiFi shield (untested) AND the ESP32 as a standalone board. For the latter you will need to install the ESP32 core.
Supports WINC1500-based shields through the WiFi101 library that can be installed through the Library Manager. Note that this is currently experimental and might not work.
Supports the WiFi module available on Fishino boards. It requires the Fishino package.
Supports Digistump's DigiX clone of the Arduino Due board, which has an onboard WiFi controller. Please get in touch with me if you need to use this.
Supports the native Ethernet controller built in the MCU used on PJRC's Teensy 4.1 board. This requires installing the Teensyduino support package.
The SD Content Storage can use two different libraries to access FAT filesystems. This will use Arduino's built-in SD library, which only allows DOS-style (i.e. 8+3 characters) file names. This implies that you will have to name your pages with a .htm
extension instead of .html
. If you don't like this, see below.
This requires the SDFat library and allows the SD Content Storage to access files with long names (LFNs), if properly configured (see SdFatConfig.h
in the library sources).
This is automatically enabled when compiling for the ESP8266 and ESP32 and allows storing web content in the filesystem-on-flash that is built into these microcontrollers, but it can be disabled if desired. Please refer to this page for further information on how to take advantage of this feature.
Note that you might need to install the LITTLEFS library on ESP32.
This enables support for an older mechanism that was very similar to LittleFS. It is now DEPRECATED and will be removed in a future version.
Enables support for Replacement Tags, i.e.: replace
This enables support for Page Functions. It is enabled by default and should not be turned off unless you don't need this feature and you are really low on flash.
Define this to enable support for HTTP Basic Authorization. This feature requires the Base64 library.
By default only the GET
HTTP method/verb is supported (i.e.: all requests are implicitly assumed to be GET
s). Define this to enable the parsing of the actual method that was passed in the request. It will be made available to Page Functions through the HttpRequest
object.
This feature is currently EXPERIMENTAL.
Enables some features that will help implementing REST services. Note that you should probably enable ENABLE_ALL_METHODS
too, if you need this.
This feature is currently VEEEERY EXPERIMENTAL and UNDOCUMENTED.
By default, only MIME types for html
, css
, js
, png
, jpeg
, gif
and ico
files are enabled. Define this to enable some extra types, namely xml
, pdf
, zip
and gz
.
You probably should not touch these, but they might be tweaked if you are low on RAM/flash.
Character that delimits tags.
NOTE: Make sure this is a byte
and not a char
.
Maximum length of a replacement tag placeholder.
Maximum length of a filename in the Flash storage.
Maximum length of a GET-style URL parameter name and value.
Maximum length of an URL to process.
TCP port the server will listen on.
NOTE: Port 80 can not be used on DigiFi. NOTE: Currently changing this will have no effect with most cards. Sorry.
Size of output buffer. This speeds up transmission, by sending clients more than one character at a time. Size it appropriately according to available RAM. Theoretically it could be reduced to 1, but this has not been tested.
This is the maximum length of the username:password
string that needs to be hashed for validating Basic Authorization requests.
Maximum time in milliseconds without receiving characters after which a client connection is dropped. Solves hanging connection from Chrome on OSX. Undefine to turn off this feature.
NOTE: This feature is not available on ENC28J60 when using the EtherCard library.
You are not going to need these unless you are a developer, in which case I'll let you figure out what they do on your own ;).
DEFINE this to DISABLE debug messages