Re: [OpenWrt-Devel] problem with uci delete

2016-07-26 Thread nam228

you can not delete an entire config at once by using uci
You can only delete one by one.For example:

uci delete network.lan.ifname

On 24/07/2016 16:56, Stephan Hennig wrote:

[moving to devel, since there has been no response on the users list]

Hi,

uci help has this on the delete command


root@uap:~# uci
Usage: uci []  []

Commands:

[...]

 delete [.[[.][=]]]

Which I interpret as: you can delete an entire config at once (and fill
it again with 'uci set' afterwards).  However, 'uci delete '
returns an error:

   root@uap:~# uci delete network
   uci: Invalid argument
   root@uap:~# uci changes
   root@uap:~#

(And 'uci commit' doesn't seem to do anything.)

Am I missing something?

system:

   OpenWrt 15.05.1 CC
   Nanostation 5 loco

Background: Task is to deploy WDS bridge configuration on devices via
shell script.  Instead of managing separate (network and other)
configuration files for access points and stations that share many
identical lines and are therefore hard to maintain, the idea is to
deploy a parametrized shell script which builds configuration files on
the device in question.  Now, so that existing configuration doesn't get
into the way, the script should be able to remove, i.e., network
configuration, at once and rebuild it using 'uci set' commands afterwards.

Best regards,
Stephan Hennig
___
openwrt-users mailing list
openwrt-us...@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users
___
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] Getting error after upgrading LUCI

2016-03-09 Thread nam228

Deal all,

I am using OpenWRT Chaos Calmer (Revision: 46522).
I have the error "sending SIGSEGV to ubusd for invalid write access ..." 
after upgrading luci.


I upgraded luci by these commands:

 openwrt/script/feeds update
 openwrt/script/feeds install luci

Do you have any idea about this problem?

Thanks,
Nam.


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


[OpenWrt-Devel] Need to check version of LUCI

2015-10-26 Thread nam228

Hi all,

I am using OpenWRT trunk version 47213
svn://svn.openwrt.org/openwrt/trunk

I installed luci by these commands:
trunk/script/feed update -a
trunk/script/feed install luci

My question is: can i check version of luci ? or how can i downgrade it .

In my case , the luci web-page is not working well.
For example: when I edit the Network/Wifi  it automatically log out to 
the login page


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


Re: [OpenWrt-Devel] help

2015-07-02 Thread nam228


How about  reboot -f  ?

On 03/07/2015 12:00, ldy647 wrote:

Dear sir/Madam,

recently, when we install our wireless router, we found when we run 
the reboot command, the board couldn't restart.  We hope you could 
lend us a hand to solve this problem. We'll be quite grateful for what 
you do for us.


By the way, our board is MT7620 equipped with 32M  spi flash, and 
works under  Openwrt trunk. We have set w25q256 in dts. Every other 
command works fine except reboot. Some people said it may be about the 
switch of spi flash between 3 byte and 4 byte.  Could you tell us how 
to solve this problem or a fixed padding? We'll be quite grateful. Thanks.


Looking forward to your reply as soon as possible.

Your Sincerely
Anna


___
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] Patch file for QCA8334 eth switch chip

2015-05-18 Thread nam228

Hi all,

I have a board with a qca8334 eth switch chip.The chip is found by the 
ar8216 phy as an ar8337.


My board can not ping unless I remove the AR8337_PAD_MAC06_EXCHANGE_EN 
with a path file.


The patch file is:

--- a/drivers/net/phy/ar8327.c
+++ b/drivers/net/phy/ar8327.c
@@ -508,8 +508,8 @@ ar8327_hw_config_pdata(struct ar8xxx_pri
 data-port6_status = 
ar8327_get_port_init_status(pdata-port6_cfg);


 t = ar8327_get_pad_cfg(pdata-pad0_cfg);
-   if (chip_is_ar8337(priv))
-   t |= AR8337_PAD_MAC06_EXCHANGE_EN;
+   //if (chip_is_ar8337(priv))
+   //  t |= AR8337_PAD_MAC06_EXCHANGE_EN;

 ar8xxx_write(priv, AR8327_REG_PAD0_MODE, t);
 t = ar8327_get_pad_cfg(pdata-pad5_cfg);


Does anyone know if the qca8334 is different from the ar8337 ?

Thanks,

Nam.

P/S: my OpenWRT version is Chaos Calmer.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Dynamically generate custom files before building?

2015-03-25 Thread nam228

Thank Jo-Philipp Wich for sharing your knowledge.

In my case I'm using Barrier Breaker.
I modified this file :

openwrt/target/linux/ar71xx/base-files/etc/uci-defaults/02_network

Nam.

On 25/03/2015 19:36, Jo-Philipp Wich wrote:

Hi,

some architectures do not have any default files for wireless and
network in the repository. Those files are generated by scripts on first
boot.

The question is raised over and over again in the forums and on the
lists. The natural solution to your kind of objective is to write an
(files/)etc/uci-defaults/99_mystuff script which amends/modifies the
just generated files according to your needs.

This way you also do not need to maintain complete configurations for
each possible model you intend to cover, especially if the only actual
delta is a different SSID and setting a PSK.

Apart from that it is also possible to make a wireless config somewhat
generic by replacing the option path or option macaddr phy
identifier with option phy phy0 - this way it would work across a
range of different models, assuming they all use mac80211.

The script approach would be something like that:

$ cat files/etc/uci-defaults/99_mysettings
#!/bin/sh

uci set wireless.radio0.channel=3
uci del wireless.radio0.disabled

uci set wireless.@wifi-iface[0].ssid=Foo Bar
uci set wireless.@wifi-iface[0].encryption=psk2
uci set wireless.@wifi-iface[0].key=secr3t123

# do we have a 5ghz radio?
if uci -q get wireless.radio1 /dev/null; then
 uci set wireless.radio1.channel=52
 uci del wireless.radio1.disabled

 uci set wireless.@wifi-iface[1].ssid=Foo Bar 5
 uci set wireless.@wifi-iface[1].encryption=psk2
 uci set wireless.@wifi-iface[1].key=secr3t123
fi

exit 0


etc.

HTH,
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] Dynamically generate custom files before building?

2015-03-23 Thread nam228

Hi a Quan,

I think you should try to modify openwrt/Makefile
Add your own script  for target devices.
After that when compiling  run make target=XX or something like that.

Nam.

On 24/03/2015 00:10, Nguyễn Hồng Quân wrote:

Hello all

If I want to build customized OpenWrt, I need to place all custom file 
in files/ folder.
The problem is that a set of custom files can only be applied to 1 
device, i.e /etc/config/wireless file for TP Link router can not be 
used for D-Link.


Is there any way that I can use a script to modify the default config 
file for each target device, create the one in files/ folder before 
building? Where can I find the default /etc/config/wireless target device?


Thanks

--
Quân
***
* Nguyễn Hồng Quân *
* Y!M: ng_hquan_vn *
* Facebook: ng.hong.quan *
* Web: quan.hoabinh.vn http://quan.hoabinh.vn   *
***


___
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