Re: [OpenWrt-Devel] /var/state/wireless not being updated any more?
On Wed, Jun 18, 2014 at 5:48 PM, Shankar Unni wrote: > Thanks for the pointers, all! > > Let me try with this approach. I'll probably have to build a wrapper > around it, since it's being probed from within a C user-space program. > If you're in C shouldn't you use json directly with ubus/procd/whatever it's called now? > On Jun 16, 2014, at 12:20 PM, Jo-Philipp Wich wrote: > > > Hi, > > > > the data is cached upon the first call. > > > > To force a resync, run "network_flush_cache". > > > > ~ Jow > > > > ___ > > openwrt-devel mailing list > > openwrt-devel@lists.openwrt.org > > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] /var/state/wireless not being updated any more?
Thanks for the pointers, all! Let me try with this approach. I'll probably have to build a wrapper around it, since it's being probed from within a C user-space program. On Jun 16, 2014, at 12:20 PM, Jo-Philipp Wich wrote: > Hi, > > the data is cached upon the first call. > > To force a resync, run "network_flush_cache". > > ~ Jow > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] /var/state/wireless not being updated any more?
Hi, the data is cached upon the first call. To force a resync, run "network_flush_cache". ~ Jow signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] /var/state/wireless not being updated any more?
On Thu, Jun 12, 2014 at 8:28 PM, Gui Iribarren wrote: > On 06/12/2014 09:13 PM, Shankar Unni wrote: > > Ping? > > > > How can I look up the current state of the various wireless interfaces > using "uci" now? > > > > http://wiki.openwrt.org/doc/uci/network#determining.linux.interface.names > > The uci state vars are deprecated and not used anymore for network > related information Quoting jow in the forum[0] > Use /lib/functions/network.sh: > > source /lib/functions/network.sh > > if network_get_ipaddr addr "wan"; then > echo "IP is $addr" > fi > Is this cached or refreshed every call? Can the IP/interface change in between network_get_ calls and I get stale data? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] /var/state/wireless not being updated any more?
On 06/12/2014 09:13 PM, Shankar Unni wrote: > Ping? > > How can I look up the current state of the various wireless interfaces using > "uci" now? > http://wiki.openwrt.org/doc/uci/network#determining.linux.interface.names The uci state vars are deprecated and not used anymore for network related information Quoting jow in the forum[0] Use /lib/functions/network.sh: source /lib/functions/network.sh if network_get_ipaddr addr "wan"; then echo "IP is $addr" fi [0]: https://forum.openwrt.org/viewtopic.php?pid=203787#p203787 you might also want to look into ubus http://wiki.openwrt.org/doc/techref/ubus cheers! > Thanks in advance, > > On Jun 10, 2014, at 5:09 PM, Shankar Unni wrote: > >> I recently updated my tree to a very recent trunk SVN version (40995), and I >> noticed that my system no longer seems to maintain a /var/state/wireless >> (UCI state of the wireless interfaces - up/down, interface name, etc.). It >> used to do so as recently as 38990 (which was the last version I was using). >> >> I tracked down the place where it gets updated to the functions >> "set_wifi_up()" and "set_wifi_down()" in /sbin/wifi, but no one seems to >> actually invoke these functions. >> >> Is there a more current way of getting this info (the state of the wifi >> interface, and its "real interface name"), via UCI? (Or any other CLI >> method?) >> >> Thanks in advance, >> -- >> Shankar >> >> >> ___ >> openwrt-devel mailing list >> openwrt-devel@lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] /var/state/wireless not being updated any more?
Ping? How can I look up the current state of the various wireless interfaces using "uci" now? Thanks in advance, On Jun 10, 2014, at 5:09 PM, Shankar Unni wrote: > I recently updated my tree to a very recent trunk SVN version (40995), and I > noticed that my system no longer seems to maintain a /var/state/wireless (UCI > state of the wireless interfaces - up/down, interface name, etc.). It used > to do so as recently as 38990 (which was the last version I was using). > > I tracked down the place where it gets updated to the functions > "set_wifi_up()" and "set_wifi_down()" in /sbin/wifi, but no one seems to > actually invoke these functions. > > Is there a more current way of getting this info (the state of the wifi > interface, and its "real interface name"), via UCI? (Or any other CLI method?) > > Thanks in advance, > -- > Shankar > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel