[OpenWrt-Devel] Decentralized Chat Application

2014-03-25 Thread Justyn

Hello list,

I'm currently running a few wireless nodes (Ubiquiti PicoStations) with 
OpenWrt to form an 802.11s mesh network.  I'm also currently writing a 
package to manage these nodes that are set up on the network as well.  
I'd like to get information about each node (name, IP, MAC, lat, lon, 
all stored in /etc/config/mypackage).  To accomplish this, I've 
written a client/server package that uses multicast UDP to send requests 
from one node to all the other nodes that are set up on my network, and 
receive back the relevant information about them all.  Each node has 
both the server side running on it and the client side available for 
network status requests.  In this manner, any node can get information 
about the network on-the-fly without any connection to a centralized 
server. Then this information is displayed in LuCI.


Obviously using multicast UDP packets over the air presents reliability 
challenges.


I'm also interested in writing a completely decentralized multicast chat 
application and interfacing it with LuCI.  So I've saved up some 
questions that I'd appreciate if anyone skimmed over and could provide 
some help on a couple things:


1)  To overcome the reliability problem with multicast UDP, my program 
sends multiple UDP packets, and on receive, weeds out the duplicates.  
This has helped tremendously when it comes to reliability, but at the 
cost of increased network traffic.  Also, although the reliability 
/appears/ to be there, it doesn't guarantee packet 100% reliable 
transmission/reception.
a)  Is there a way and/or has anyone implemented any form of 'reliable 
multicasting' within the OpenWrt package framework?  Is it possible, and 
where would I start?
b)  Is it possible to set the multicast rate on my particular nodes?  I 
see in the wiki that there is an mcast_rate option in the wireless 
configuration settings, but warns that Only supported by |madwifi|, and 
|mac80211| (for type |adhoc| in trunk).  I have a virtual interface in 
mesh mode, so does this mean this option doesn't work for me?  
Lowering the multicast rate would help even more for reliability.  
Again, I'm just sending information about the network around, not 
streaming 1080p video.


2)  Does there exist a chat application available for OpenWrt, or 
something that I've not heard of in which I can port for compilation in 
OpenWrt?  The biggest issue is that it can't rely on any sort of 
centralized server/node.  Which means I can't use any sort of reliable 
network communication protocols (TCP, basically).  Is there a design 
that doesn't involve a centralized server that I haven't thought of?  
The immediate solution is to do what I did for managing the nodes via 
multicast, and just send multiple chat messages to all the nodes, and 
discard duplicates.  But I admit this is hacky, ugly, and will add a lot 
in terms of network traffic.


Thanks for any help,
Justyn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Question About Interfacing with UCI

2013-08-19 Thread Justyn Bell

Hello all.

I'm developing a custom package that I would like to interface with 
UCI.  That is, I would like to have a config file in /etc/config/ that 
configures my custom package which can be changed via the command line, 
LuCI, or a C application.


Firstly, I've read through the documentation here: 
http://wiki.openwrt.org/doc/uci.  It says UCI is also editable through 
various programming APIs (like Shell, Lua and C).  Where can I find 
these APIs?  Specifically the C UCI API.


Secondly, I'm sort of lost about where the config files in /etc/config 
get parsed and applied to other applications.  Eg, when I change the 
configuration in /etc/config/network, and do a /etc/init.d/network 
restart, where do these configuration values get passed such that the 
network is updated appropriately?  I'm trying to find an existing 
package that does what I'm attempting to do so that I can use it as an 
example to go forward with my own package.


Sorry about the basic question.  I couldn't find help on the developers 
forum, so I decided to try the mailing list.  If this isn't appropriate 
to put here, I'll refrain from doing so in the future.


--
Justyn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel