Closed euphoria360 closed 7 years ago
So I'm reluctant to add official support for OpenWRT because I lack the hardware to test it on. Nor can I write instructions in the Readme.md to give OpenWRT users a proper guide as to how to install it since I lack the hardware to test it on and keep up with changes.
It is possible to incorporate the changes you have stated however they will probably not be tested when new changes are made so it will be up to the community to provide fixes for OpenWRT support.
yes most likely to check for the existance of the commands I'll be doing a which nvram and which uci to detect the existance of each they are non null when the command is present.
DDWRT also uses uhttpd however it uses that to run it's native configuration UI so it's pretty locked down configuration wise.
Again unless I have another maintainer testing all the time OpenWRT support will probably remain in beta the whole time since I lack the hardware to test it on and derive a fix.
That said however I don't see a problem in having unofficial support for OpenWRT with the changes you have described so I should be able to merge those changes. I've had about 3 requests to show the speeds in MB/s and Mbps toggle-able so that may be implemented first before this. FYI
So glad to see your kind reply. Thanks. I will look forward to your merge. Also as a user of your script, as long as im on openwrt, ill try to inform you of changes needed.
@euphoria360 Yeah i gonna give this a try, do you have steam in case i have issues? lol
Nicely done. Will keep a close eye on this one.
Debating right now if a fork would be better than an integrated one solution fits all. I'd imagine there are other differences as well in OpenWRT does anyone know about this area?
Unfortunately I am not that well aware of it. On the other hand, you might be able to emulate openwrt on VM, https://wiki.openwrt.org/doc/howto/virtualbox http://ediy.com.my/blog/item/31-openwrt-in-virtualbox
I can vouch for the Virtual Machine method, from https://wiki.openwrt.org/doc/howto/virtualbox, i made windows 7 VM and OpenWRT in another VM, they were both in an Internal Network, so i could access everything via 192.168.1.1 and SHH etc..
But the current issue i have is when i run this with euphoria360's changes, seems as if my DHCP leases break on restart and i have to either wait for them to renew or manually reset the machines.
EDIT: it appears that the DHCP Leases Issue is just a bug in 15.05.1 https://dev.openwrt.org/ticket/20853
No plans to implement this in the near future so I'm closing this issue.
It would be great if you can make this script compatible with new OpenWRT version, since they are very similar.
Today I tried your great work on my fresh OpenWRT 15.05.1 and it didn't work out of the box. But by looking into the scripts I was able to run it successfully by changing few things. I tried to change your scripts as less as possible. So Only 3 changes in your scripts. I also used "/opt/bwmon" for your script location.
As far as I figured These things are different in OpenWRT:
Things I changed in your script (or added) in order to make it compatible with OpenWRT:
WAN_IFACE=$(nvram get wan_ifname)
changed toWAN_IFACE=$(uci get network.wan.ifname)
ln -s /tmp/dnsmasq.conf /tmp/www/dnsmasq-conf.js
changed toln -s /etc/dnsmasq.conf /tmp/www/dnsmasq-conf.js
ln -s /tmp/dnsmasq.leases /tmp/www/dnsmasq-leases.js
changed toln -s /tmp/dhcp.leases /tmp/www/dnsmasq-leases.js
mkdir /tmp/www
ln -s /tmp/www /www/bwmon
ln -s /tmp/www/bwmon.html /tmp/www/index.html
at the end, I was able to successfully open stats in http://[router address]/bwmon
Do you think it is possible to merge these with your script? you can use "nvram" and "uci" to detect if it is DD-WRT or OpenWRT.