[Commotion-dev] Commotion packages outside Commotion firmware

Genevieve Bastien gbastien+mesh at versatic.net
Tue Sep 17 02:24:49 UTC 2013


Hi Dan,

There's more than just commotion_helpers.lua to pull out for 
commotion-splash to work.  I now have access to the luci interface and I 
can configure the splash, but when actually using the splash page, I get 
infinite redirects (see below for full debug output from nodogsplash).

It seems page http://<my_ap>/cgi-bin/luci/commotion/splash returns an 
error.  When manually navigating to this page I get this:

/usr/lib/lua/luci/dispatcher.lua:328: Access Violation
The page at 'commotion/splash/' has no parent node so the access to this location has been denied.
This is a software bug, please report this message at http://luci.subsignal.org/trac/newticket
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/dispatcher.lua:328: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:195: in function </usr/lib/lua/luci/dispatcher.lua:194>

I'm not very familiar with luci.  Maybe you can point me in the right 
direction for this.  Otherwise, I'll dig into that later.

Thanks,
Geneviève



--- begin debug output from nodogsplash

[6][Thu Sep  8 13:25:27 2011][8839](gateway.c:344) Creating httpd 
request thread 1 for 192.168.43.194
[7][Thu Sep  8 13:25:27 2011][8839](httpd_thread.c:73) Thread 11839424 
calling httpdProcessRequest() for 192.168.43.194
[6][Thu Sep  8 13:25:27 2011][8839](http.c:92) Capturing index request 
from 192.168.43.194 for [www.google.com/]
[7][Thu Sep  8 13:25:27 2011][8839](http.c:280) Locking client list
[7][Thu Sep  8 13:25:27 2011][8839](http.c:280) Client list locked
[6][Thu Sep  8 13:25:27 2011][8839](client_list.c:194) Client 
192.168.43.194 00:11:11:11:11:11 token f7da337e already on client list
[7][Thu Sep  8 13:25:27 2011][8839](http.c:282) Unlocking client list
[7][Thu Sep  8 13:25:27 2011][8839](http.c:282) Client list unlocked
[6][Thu Sep  8 13:25:27 2011][8839](http.c:366) Serving splash page 
/etc/nodogsplash/htdocs/splash.html to 192.168.43.194
[6][Thu Sep  8 13:25:27 2011][8839](protocol.c:182) [libhttpd] 
192.168.43.194 - - GET "/" 200 1105
[7][Thu Sep  8 13:25:27 2011][8839](httpd_thread.c:75) Thread 11839424 
returned from httpdProcessRequest() for 192.168.43.194
[7][Thu Sep  8 13:25:27 2011][8839](httpd_thread.c:81) Thread 11839424 
ended request from 192.168.43.194
[7][Thu Sep  8 13:25:27 2011][8839](gateway.c:333) 0 current httpd threads.


-- begin repeat loop

[6][Thu Sep  8 13:25:27 2011][8839](gateway.c:344) Creating httpd 
request thread 2 for 192.168.43.194
[7][Thu Sep  8 13:25:27 2011][8839](httpd_thread.c:73) Thread 11839424 
calling httpdProcessRequest() for 192.168.43.194
[6][Thu Sep  8 13:25:27 2011][8839](protocol.c:214) [libhttpd] [error] 
[client 192.168.43.194] File does not exist: 
/cgi-bin/luci/commotion/splash/?authtarget=http%3A%2F%2F192.168.43.1%3A2050%2Fnodogsplash_auth%2F%3Fredir%3Dhttp%253A%252F%252Fwww.google.com%252F%26tok%3Df7da337e


[6][Thu Sep  8 13:25:27 2011][8839](http.c:80) Capturing as 404 request 
from 192.168.43.194 for 
[192.168.43.1/cgi-bin/luci/commotion/splash/?authtarget=http%3A%2F%2F192.168.43.1%3A2050%2Fnodogsplash_auth%2F%3Fredir%3Dhttp%253A%252F%252Fwww.google.com%252F%26tok%3Df7da337e]
[7][Thu Sep  8 13:25:27 2011][8839](http.c:280) Locking client list
[7][Thu Sep  8 13:25:27 2011][8839](http.c:280) Client list locked
[6][Thu Sep  8 13:25:27 2011][8839](client_list.c:194) Client 
192.168.43.194 00:11:11:11:11:11 token f7da337e already on client list
[7][Thu Sep  8 13:25:27 2011][8839](http.c:282) Unlocking client list
[7][Thu Sep  8 13:25:27 2011][8839](http.c:282) Client list unlocked
[6][Thu Sep  8 13:25:27 2011][8839](http.c:366) Serving splash page 
/etc/nodogsplash/htdocs/splash.html to 192.168.43.194
[6][Thu Sep  8 13:25:27 2011][8839](protocol.c:182) [libhttpd] 
192.168.43.194 - - GET 
"/cgi-bin/luci/commotion/splash/?authtarget=http%3A%2F%2F192.168.43.1%3A2050%2Fnodogsplash_auth%2F%3Fredir%3Dhttp%253A%252F%252Fwww.google.com%252F%26tok%3Df7da337e" 
200 1265
[7][Thu Sep  8 13:25:27 2011][8839](httpd_thread.c:75) Thread 11839424 
returned from httpdProcessRequest() for 192.168.43.194
[7][Thu Sep  8 13:25:27 2011][8839](httpd_thread.c:81) Thread 11839424 
ended request from 192.168.43.194
[7][Thu Sep  8 13:25:27 2011][8839](gateway.c:333) 0 current httpd threads.

-- end repeat loop


On 13-09-12 01:11 PM, Dan Staples wrote:
> Hi Geneviève,
>
> I just talked with our lead developer, and we are planning on pulling
> out commotion_helpers into a separate OpenWRT package in the next few
> weeks, so that you would be able to install Commotion-splash without any
> unnecessary dependences. But for now, I would say just include the
> commotion_helpers.lua file in /usr/lib/lua.
>
> Dan
>
> On 09/10/2013 10:58 PM, Dan Staples wrote:
>> Hi Geneviève,
>>
>> Commotion-splash uses the commotion_helpers.lua module, which is
>> included in our luci-commotion package, hence the dependency. It's a
>> simple collection of helper functions, and it made sense to me at the
>> time to put it in our general LuCI package.
>>
>> For your use, I would say get the commotion_helpers.lua file[1] and just
>> put it in /usr/lib/lua/, and that should solve your issue.
>>
>> Since you're interested in using commotion-splash for your firmware, it
>> would be a good idea to package the Commotion helpers module as a
>> separate package, so people can use it (and thus commotion-splash)
>> without the rest of the Commotion dependencies and LuCI menus.
>>
>> I'll work on that tomorrow and let you know.
>>
>> cheers,
>> Dan
>>
>> [1]
>> https://github.com/opentechinstitute/luci-commotion/blob/master/luasrc/commotion_helpers.lua
>>
>> On 09/10/2013 10:22 PM, Genevieve Bastien wrote:
>>> Hello all,
>>>
>>> I wanted to use the Commotion-splash package, as a nice front end to
>>> nodogsplash, on our non-commotion firmware.  I could install it, without
>>> needing dependencies, but when I tried connection to the web interface,
>>> I got this error message:
>>>
>>> .../lib/lua/luci/controller/commotion-splash/splash.lua:6: module
>>> 'commotion_helpers' not found:
>>>      no field package.preload['commotion_helpers']
>>>      no file './commotion_helpers.lua'
>>>      no file '/usr/share/lua/commotion_helpers.lua'
>>>      no file '/usr/share/lua/commotion_helpers/init.lua'
>>>      no file '/usr/lib/lua/commotion_helpers.lua'
>>>      no file '/usr/lib/lua/commotion_helpers/init.lua'
>>>      no file './commotion_helpers.so'
>>>      no file '/usr/lib/lua/commotion_helpers.so'
>>>      no file '/usr/lib/lua/loadall.so'
>>> stack traceback:
>>>      [C]: in function 'require'
>>>      .../lib/lua/luci/controller/commotion-splash/splash.lua:6: in main
>>> chunk
>>>      [C]: in function 'require'
>>>      /usr/lib/lua/luci/dispatcher.lua:538: in function 'createindex_plain'
>>>      /usr/lib/lua/luci/dispatcher.lua:474: in function 'createindex'
>>>      /usr/lib/lua/luci/dispatcher.lua:566: in function 'createtree'
>>>      /usr/lib/lua/luci/dispatcher.lua:230: in function 'dispatch'
>>>      /usr/lib/lua/luci/dispatcher.lua:195: in function
>>> </usr/lib/lua/luci/dispatcher.lua:194>
>>>
>>> I needed to install luci-commotion, which adds a "Commotion" menu item
>>> with "mesh configuration" and "mesh profile" that cause this error when
>>> selected:
>>>
>>> /usr/lib/lua/luci/dispatcher.lua:448: Failed to execute cbi dispatcher
>>> target for entry '/admin/commotion/meshconfig'.
>>> The called action terminated with an exception:
>>> /usr/lib/lua/luci/cbi.lua:334: Unable to read UCI data: commotiond
>>> stack traceback:
>>>      [C]: in function 'assert'
>>>      /usr/lib/lua/luci/dispatcher.lua:448: in function 'dispatch'
>>>      /usr/lib/lua/luci/dispatcher.lua:195: in function
>>> </usr/lib/lua/luci/dispatcher.lua:194>
>>>
>>> because it does not find the commotiond package.
>>>
>>> Those dependencies should be stated in the packages' Makefiles.  Or
>>> preferably and if possible, those dependencies should be removed so that
>>> one can install, say, commotion-splash, without having to install the
>>> full commotion suite.
>>>
>>> If that is desirable on your part, I could help work on it.  We'd rather
>>> use packages developed and supported by the community than rewrite our
>>> own.  Using the full Commotion firmware is not our option, as we're
>>> using babel for mesh protocol.  Until Commotion supports babel, if I
>>> ever find time to implement it, as promised in an earlier thread
>>>
>>> Thanks,
>>> Geneviève
>>>
>>> _______________________________________________
>>> Commotion-dev mailing list
>>> Commotion-dev at lists.chambana.net
>>> https://lists.chambana.net/mailman/listinfo/commotion-dev



More information about the Commotion-dev mailing list