[Commotion-dev] jsoninfo updates: UUID and /sys/class/net info

Hans-Christoph Steiner hans at guardianproject.info
Tue Jul 3 14:49:52 UTC 2012


luci sounds interesting, can luci export all the olsrd data that available in txtinfo or httpinfo (things like HNA, neighbors, links, etc.)?  I've ended up putting additional status data into jsoninfo as well.  In any case, sounds like there should be some kind of merge between jsoninfo and luci, for openwrt nodes at least.  luci probably won't help us on everything else.

As for jsoninfo, I highly recommend using the version from git, rather than the version in the 0.6.3 release.  There have been many improvements and bugfixes.

.hc


On Jul 3, 2012, at 9:52 AM, Benjamin Chodoroff wrote:

> hi josh! did you end up getting started on the openwrt json mesh
> endpoint? is there a reason to do this via luci vs. via an olsrd
> plugin?
> 
> -b
> 
> On Wed, Jun 6, 2012 at 3:23 PM, Josh King <jking at chambana.net> wrote:
>> Hi Hans,
>> 
>> This is great, and I like the addition of the UUID (especially since
>> I'm working on better unique identifiers for nodes right now anyway).
>> I'm thinking about working on a LuCI plugin to expose mesh information
>> through the JSON API on OpenWRT; I'm planning on using this as a
>> template.
>> 
>> On Tue 05 Jun 2012 08:05:22 PM EDT, Hans-Christoph Steiner wrote:
>>> 
>>> jsoninfo is now officially part of olsrd, it was included by default in
>>> the 0.6.3 release today.  In the released version, the whole JSON dump
>>> is wrapped as one big chunk with a timestamp.  I just did some more work
>>> on it for some more experimental stuff.  First, I added the possibility
>>> for setting a UUID in a file, configurable in the jsoninfo section of
>>> olsrd.conf, then if its present, that UUID is included in the outermost
>>> json wrapper:
>>> 
>>> {
>>>      "data": [all of the requested data],
>>>      "systemTime": 1338940817,
>>>      "uuid": "khjhaskldjfhajksetnrjky41h98uij23u4h"}
>>> }
>>> 
>>> Next, I started gathering lots of data from /sys/class/net and adding it
>>> to interfaces:
>>> 
>>> {
>>> "data": [{"interfaces": [
>>> {
>>>      "name": "wlan0",
>>>      "state": "up",
>>>      "mtu": 1472,
>>>      "wireless": true,
>>>      "ipv4Address": "172.29.126.189",
>>>      "netmask": "255.255.0.0",
>>>      "broadcast": "172.29.255.255",
>>>      "addressLength": "6",
>>>      "carrier": "1",
>>>      "dormant": "0",
>>>      "flags": "0x1003",
>>>      "linkMode": "0",
>>>      "macAddress": "00:1b:63:cc:7e:bd",
>>>      "MTU": "1500",
>>>      "operationalState": "unknown",
>>>      "txQueueLength": "1000",
>>>      "collisions": "0",
>>>      "multicastPackets": "0",
>>>      "rxBytes": "4020976",
>>>      "rxCompressed": "0",
>>>      "rxCrcErrors": "0",
>>>      "rxDropped": "0",
>>>      "rxErrors": "0",
>>>      "rxFifoErrors": "0",
>>>      "rxFrameErrors": "0",
>>>      "rxLengthErrors": "0",
>>>      "rxMissedErrors": "0",
>>>      "rxOverErrors": "0",
>>>      "rxPackets": "48842",
>>>      "txAbortedErrors": "0",
>>>      "txBytes": "851046",
>>>      "txCarrierErrors": "0",
>>>      "txCompressed": "0",
>>>      "txDropped": "0",
>>>      "txErrors": "0",
>>>      "txFifoErrors": "0",
>>>      "txHeartbeatErrors": "0",
>>>      "txPackets": "6675",
>>>      "txWindowErrors": "0"}]}
>>> ]
>>> ,
>>>      "systemTime": 1338940817,
>>>      "uuid": "khjhaskldjfhajksetnrjky41h98uij23u4h"}
>>> 
>>> _______________________________________________
>>> Commotion-dev mailing list
>>> Commotion-dev at lists.chambana.net
>>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>>> 
>> 
>> --
>> Josh King
>> 
>> "I am an Anarchist not because I believe Anarchism is the final goal,
>> but because there is no such thing as a final goal." -Rudolf Rocker
>> 
>> 
>> _______________________________________________
>> Commotion-dev mailing list
>> Commotion-dev at lists.chambana.net
>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>> 
> 
> 
> 
> -- 
> Work Department / theworkdept.com
> Thermitic / thermitic.net
> Detroit Digital Justice Coalition / detroitdjc.org



More information about the Commotion-dev mailing list