0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-11-18 03:27:56 +01:00
Go to file
2016-03-23 16:37:47 +01:00
.settings Merge branch 'develop' 2014-04-09 16:04:16 +02:00
extra Include logrotate (+deps) in openwrt diffconfig. 2016-03-11 19:52:43 +01:00
src Include HTTP request headers in info/logfiles endpoint. 2016-03-23 16:37:47 +01:00
test Integrate new release scripts with firmware. 2014-02-21 11:33:42 +01:00
.buildpath Initial checkin of Doodle3D WiFi-box project. Files in src directory belong in /usr/share/lua/autowifi on the device and needs several symlinks as described in the readme. 2013-04-04 10:18:08 +02:00
.gitignore Add doxify.sh to generate HTML code documentation using ldoc; update documentation in several utility files. 2013-07-29 12:07:23 +02:00
.project Add openwrt diffconfig files (referenced from online wiki); change eclipse project name to match repository name. 2014-01-02 20:20:00 +01:00
Config.in Update Makefile and Config.in to handle/describe new www directory and API test interface properly. 2013-07-12 17:26:12 +02:00
config.ld Add LDoc configuration and slightly extend doxify.sh. 2013-11-04 22:34:09 +01:00
doxify.sh Add LDoc configuration and slightly extend doxify.sh. 2013-11-04 22:34:09 +01:00
license-spec.lua Update comment on possible log targets. 2016-01-08 23:20:09 +01:00
LICENSE.txt Add license + copyright info on external software. 2013-12-20 16:00:06 +01:00
Makefile Log rotation: 2016-03-16 22:33:38 +01:00
NOTICE.txt Update openwrt diffconfig to allow 802.11 driver to override regulatory domain stored in eeprom. 2014-02-01 01:41:39 +01:00
post-install.sh Log rotation: 2016-03-18 11:31:07 +01:00
post-remove.sh Properly start and stop signin.sh on package installation and removal. 2013-10-22 22:44:51 +02:00
pre-remove.sh Properly start and stop signin.sh on package installation and removal. 2013-10-22 22:44:51 +02:00
README.md Wifibox stdout/stderr log file: 2016-02-23 16:18:42 +01:00
ReleaseNotes.md 0.10.10-b version & releasenotes 2016-03-21 12:45:41 +01:00

WiFi box OpenWRT firmware package

General documentation can be found on the wiki: http://doodle3d.com/help/wiki. Source code documentation can be generated, see below.

Documentation

The script 'doxify.sh' generates HTML documentation of the source code in the directory 'docs'. Make sure the 'ldoc' program is installed on your machine and the LDOC variable in the script points there.

On OSX, this can be accomplished by installing it through luarocks (run sudo luarocks install ldoc). Luarocks can be installed using MacPorts. After installing that, the command would be sudo port install luarocks.

Debugging Lua

Syntax errors in Lua can lead to tricky issues since they might only surface when the faulty code is actually being run.

One countermeasure for this is to use pcall instead of regular calls in many cases. To let the error 'happen' (which in turn gives information in the form of stack traces), tell the code to use regular calls by setting 'M.DEBUG_PCALLS' to 'true' in conf_defaults.lua.

Additionally, when the pcall setting is not enough, a second way of debugging is to take uhttpd out of the loop and invoke the Lua code from command-line. To do this, set 'M.DEBUG_API' to 'true' in conf_defaults.lua. Then invoke the API using the command d3dapi p=/mod/func r=POST where p= is followed by the API path and r= followed by either 'GET' or 'POST'.

Note that because stack traces are sent to stderr, this script redirects output streams to a separate log file: /tmp/wifibox.stdout.log; apart from these traces, the file should not contain any data.

Finally, the CGI gateway of uhttpd also uses this script, so the API can also be used to obtain stack traces by calling it as <wifibox-ip>/cgi-bin/d3dapi/<endpoint> (note the extra cgi-bin).