Re: [OpenWrt-Devel] [PATCH] packages/net/olsrd: retry tunnel setup

2013-01-21 Thread Daniel Golle
On 01/20/2013 11:53 PM, Bastian Bittorf wrote:
> * Daniel Golle  [20.01.2013 22:50]:
>> When started while boot, olsrd quits when SmartGW is enabled with the message
>>
>> olsrd[1395]: Received netlink error code Cannot assign requested address 
>> (-126)
>> olsrd[1395]: olsrd exit: Cannot initialize gateway tunnels
> 
> this is likely a netifd race which should be fixed with
> https://dev.openwrt.org/changeset/35240/trunk
> 
> please check if this patch helps you.

I had that included already when the problem initially occured.
I recompiled vanilla r35287 without my patch and the problem still persists.
Moving olsrd to the end of the init priority (START=99) does not help either.

Having olsrd retry for a while (as I did with my patch) does the trick.

olsrd also retries in case a main interface cannot be configured. Why not have
it retry as well in case the setup of the SmartGW tunnel interface(s) fails?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add support for TL-WDR3500

2013-01-21 Thread Gui Iribarren
Well, seems like i managed to fulfill every item of
http://www.kroah.com/log/linux/maintainer.html
and it's not my first patch sent to this list, so I have no excuse :(

OTOH, I succeeded in getting the ethernet ports straight,
so i'll send a properly formatted, improved PATCHv2

Thanks for your gentle words Luka,

Cheers!

On Sun, Jan 20, 2013 at 10:58 AM, Luka Perkov  wrote:
> On Sat, Jan 19, 2013 at 09:55:44PM -0300, Gui Iribarren wrote:
>> Inline patch, probably newline-broken :(
>
> Yes it is. Please fix your client or use git send-email for sending
> patches. Make sure to read official documentation:
>
> https://dev.openwrt.org/wiki/SubmittingPatches
>
> You can always send email to yourself and verify that you can apply it
> on a clean trunk.
>
> But the reason I'm writing this email is to tell that you don't send two
> mails with the same patch in the future ;)
>
> Luka
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 002/003] [ar71xx] add user space support for dir-825-c1

2013-01-21 Thread Alexander, Stadler
From: Alexander Stadler 

user space support for dir-825-c1

Signed-off-by: Alexander Stadler 
---
diff -urN a/trunk/target/linux/ar71xx/base-files/etc/diag.sh 
b/trunk/target/linux/ar71xx/base-files/etc/diag.sh
--- a/trunk/target/linux/ar71xx/base-files/etc/diag.sh  2012-12-31 
19:36:34.0 +0100
+++ b/trunk/target/linux/ar71xx/base-files/etc/diag.sh  2013-01-07 
20:14:38.0 +0100
@@ -74,6 +74,9 @@
dir-825-b1)
status_led="d-link:orange:power"
;;
+   dir-825-c1)
+   status_led="d-link:orange:power"
+   ;;
eap7660d)
status_led="eap7660d:green:ds4"
;;
diff -urN a/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
--- a/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
2012-12-31 19:36:34.0 +0100
+++ b/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
2013-01-07 20:16:32.0 +0100
@@ -64,6 +64,10 @@
ucidef_set_led_usbdev "usb" "USB" "d-link:blue:usb" "1-1"
;;
 
+dir-825-c1)
+   ucidef_set_led_usbdev "usb" "USB" "d-link:blue:usb" "1-1"
+   ;;
+
 hornet-ub)
ucidef_set_led_netdev "lan" "LAN" "alfa:blue:lan" "eth0"
ucidef_set_led_netdev "wan" "WAN" "alfa:blue:wan" "eth1"
diff -urN a/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
--- a/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network  
2012-12-31 19:36:34.0 +0100
+++ b/trunk/target/linux/ar71xx/base-files/etc/uci-defaults/02_network  
2013-01-07 20:18:26.0 +0100
@@ -55,6 +55,13 @@
ucidef_add_switch_vlan "rtl8366s" "1" "0 1 2 3 5t"
;;
 
+dir-825-c1)
+ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+ucidef_add_switch "eth0" "1" "1"
+ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
+ucidef_add_switch_vlan "eth0" "2" "0t 1"
+;;
+
 nbg460n_550n_550nh)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "rtl8366s" "1" "1"
diff -urN a/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh
--- a/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh2012-12-31 
19:36:34.0 +0100
+++ b/trunk/target/linux/ar71xx/base-files/lib/ar71xx.sh2013-01-07 
20:20:02.0 +0100
@@ -210,6 +210,9 @@
*"DIR-825 rev. B1")
name="dir-825-b1"
;;
+   *"DIR-825 rev. C1")
+   name="dir-825-c1"
+   ;;
*EAP7660D)
name="eap7660d"
;;
diff -urN a/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
--- a/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh  
2012-12-31 19:36:34.0 +0100
+++ b/trunk/target/linux/ar71xx/base-files/lib/upgrade/platform.sh  
2013-01-07 20:21:33.0 +0100
@@ -107,6 +107,7 @@
dir-600-a1 | \
dir-615-c1 | \
dir-615-e4 | \
+dir-825-c1 | \
ew-dorin | \
ew-dorin-router | \
mzk-w04nu | \
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 001/003] [ar71xx] add kernel support for dir-825-c1

2013-01-21 Thread Alexander, Stadler
From: Alexander Stadler 

kernel support for dir-825-c1

Signed-off-by: Alexander Stadler 
---
diff -urN a/trunk/target/linux/ar71xx/config-3.7 
b/trunk/target/linux/ar71xx/config-3.7
--- a/trunk/target/linux/ar71xx/config-3.7  2012-12-31 19:36:34.0 
+0100
+++ b/trunk/target/linux/ar71xx/config-3.7  2013-01-07 19:53:10.0 
+0100
@@ -38,6 +38,7 @@
 CONFIG_ATH79_MACH_DIR_600_A1=y
 CONFIG_ATH79_MACH_DIR_615_C1=y
 CONFIG_ATH79_MACH_DIR_825_B1=y
+CONFIG_ATH79_MACH_DIR_825_C1=y
 CONFIG_ATH79_MACH_EAP7660D=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_HORNET_UB=y
diff -urN 
a/trunk/target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-machines.patch 
b/trunk/target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-machines.patch
--- 
a/trunk/target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-machines.patch   
2012-12-31 19:36:34.0 +0100
+++ 
b/trunk/target/linux/ar71xx/patches-3.7/610-MIPS-ath79-openwrt-machines.patch   
2013-01-07 20:04:27.0 +0100
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/machtypes.h
 +++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,112 @@
+@@ -16,22 +16,113 @@
  
  enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
@@ -26,6 +26,7 @@
 +  ATH79_MACH_DIR_615_C1,  /* D-Link DIR-615 rev. C1 */
 +  ATH79_MACH_DIR_615_E4,  /* D-Link DIR-615 rev. E4 */
 +  ATH79_MACH_DIR_825_B1,  /* D-Link DIR-825 rev. B1 */
++  ATH79_MACH_DIR_825_C1,  /* D-Link DIR-825 rev. C1 */
 +  ATH79_MACH_EW_DORIN,/* embedded wireless Dorin Platform */
 +  ATH79_MACH_EW_DORIN_ROUTER, /* embedded wireless Dorin Router 
Platform */
 +  ATH79_MACH_EAP7660D,/* Senao EAP7660D */
@@ -216,7 +217,7 @@
  config ATH79_MACH_PB44
bool "Atheros PB44 reference board"
select SOC_AR71XX
-@@ -68,6 +148,488 @@ config ATH79_MACH_PB44
+@@ -68,6 +148,499 @@ config ATH79_MACH_PB44
  Say 'Y' here if you want your kernel to support the
  Atheros PB44 reference board.
  
@@ -343,6 +344,17 @@
 +  select ATH79_DEV_M25P80
 +  select ATH79_DEV_USB
 +
++config ATH79_MACH_DIR_825_C1
++bool "D-Link DIR-825 rev. C1 board support"
++select SOC_AR934X
++select ATH79_DEV_AP9X_PCI if PCI
++select ATH79_DEV_ETH
++select ATH79_DEV_GPIO_BUTTONS
++select ATH79_DEV_LEDS_GPIO
++select ATH79_DEV_M25P80
++select ATH79_DEV_USB
++select ATH79_DEV_WMAC
++
 +config ATH79_MACH_EW_DORIN
 +  bool "embedded wireless Dorin Platform support"
 +  select SOC_AR933X
@@ -767,7 +779,7 @@
  endif
 --- a/arch/mips/ath79/Makefile
 +++ b/arch/mips/ath79/Makefile
-@@ -38,9 +38,71 @@ obj-$(CONFIG_ATH79_ROUTERBOOT)  += route
+@@ -38,9 +38,72 @@ obj-$(CONFIG_ATH79_ROUTERBOOT)  += route
  #
  # Machines
  #
@@ -787,6 +799,7 @@
 +obj-$(CONFIG_ATH79_MACH_DIR_600_A1)   += mach-dir-600-a1.o
 +obj-$(CONFIG_ATH79_MACH_DIR_615_C1)   += mach-dir-615-c1.o
 +obj-$(CONFIG_ATH79_MACH_DIR_825_B1)   += mach-dir-825-b1.o
++obj-$(CONFIG_ATH79_MACH_DIR_825_C1)   += mach-dir-825-c1.o
 +obj-$(CONFIG_ATH79_MACH_EW_DORIN) += mach-ew-dorin.o
 +obj-$(CONFIG_ATH79_MACH_EAP7660D) += mach-eap7660d.o
 +obj-$(CONFIG_ATH79_MACH_JA76PF)   += mach-ja76pf.o
diff -urN a/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c 
b/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c
--- a/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c 
1970-01-01 01:00:00.0 +0100
+++ b/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c 
2013-01-20 22:40:32.0 +0100
@@ -0,0 +1,199 @@
+/*
+ *  D-Link DIR-825 rev. C1 board support
+ *
+ *  Copyright (C) 2013 Alexander Stadler
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include "common.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-spi.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define DIR825C1_GPIO_LED_BLUE_USB 11
+#define DIR825C1_GPIO_LED_ORANGE_POWER 15
+#define DIR825C1_GPIO_LED_BLUE_POWER   14
+//#define DIR825C1_GPIO_LED_BLUE_WPS   27
+#define DIR825C1_GPIO_LED_ORANGE_PLANET19
+#define DIR825C1_GPIO_LED_BLUE_PLANET  18
+
+#define DIR825C1_GPIO_BTN_RESET17
+#define DIR825C1_GPIO_BTN_WPS  16
+
+//#define DIR825C1_GPIO_USB_POWER  26
+
+#define DIR825C1_KEYS_POLL_INTERVAL20  /* msecs */
+#define DIR825C1_KEYS_DEBOUNCE_INTERVAL(3 * 
DIR825C1_KEYS_POLL_INTERVAL)
+
+#define DIR825C1_MAC0_OFFSET 0x4
+#define DIR825C1_MAC1

[OpenWrt-Devel] [PATCH 003/003] [ar71xx] add profile support for dir-825-c1

2013-01-21 Thread Alexander, Stadler
From: Alexander Stadler 

profile support for dir-825-c1

Signed-off-by: Alexander Stadler 
---
diff -urN a/trunk/target/linux/ar71xx/generic/profiles/d-link.mk 
b/trunk/target/linux/ar71xx/generic/profiles/d-link.mk
--- a/trunk/target/linux/ar71xx/generic/profiles/d-link.mk  2012-12-31 
19:36:34.0 +0100
+++ b/trunk/target/linux/ar71xx/generic/profiles/d-link.mk  2013-01-07 
20:29:43.0 +0100
@@ -61,3 +61,14 @@
 endef
 
 $(eval $(call Profile,DIR825B1))
+
+define Profile/DIR825C1
+NAME:=D-Link DIR-825 rev. C1
+PACKAGES:=kmod-usb-core mod-usb2 kmod-ledtrig-usbdev
+endef
+
+define Profile/DIR825C1/Description
+Package set optimized for the D-Link DIR-825 rev. C1.
+endef
+
+$(eval $(call Profile,DIR825C1))
diff -urN a/trunk/target/linux/ar71xx/image/Makefile 
b/trunk/target/linux/ar71xx/image/Makefile
--- a/trunk/target/linux/ar71xx/image/Makefile  2012-12-31 19:36:34.0 
+0100
+++ b/trunk/target/linux/ar71xx/image/Makefile  2013-01-07 20:33:23.0 
+0100
@@ -170,6 +170,7 @@
 
cameo7240_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,960k(kernel),2752k(rootfs),64k(mac)ro,64k(art)ro,3712k@0x4(firmware)
 
cameo913x_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(config)ro,960k(kernel),2880k(rootfs),64k(art)ro,3840k@0x3(firmware)
 
cameo933x_mtdlayout=mtdparts=spi0.0:64k(u-boot)ro,64k(art)ro,64k(mac)ro,64k(nvram)ro,192k(language)ro,896k(kernel),2752k(rootfs),3648k@0x7(firmware)
+cameo934x_mtdlayout=mtdparts=spi0.0:64k(uboot)ro,64k(nvram)ro,1280k(kernel),14656k(rootfs),192k(lang)ro,64k(mac)ro,64k(art)ro,15936k@0x2(firmware)
 
cap4200ag_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom)ro,1536k(kernel),12096k(rootfs),2048k(failsafe),64k(art),13632k@0xa(firmware)
 
db120_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x5(firmware)
 
dir825b1_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),5184k(rootfs),64k(caldata)ro,1600k(unknown)ro,6208k@0x5(firmware),64k@0x7f(caldata_copy)
@@ -352,6 +353,14 @@
$(call MkuImageLzma/initramfs,$(2),$(3) $(cameo933x_mtdlayout))
 endef
 
+define Image/Build/Cameo934x
+$(call 
Image/Build/Cameo,$(1),$(2),$(3),$(cameo934x_mtdlayout),1310720,15007744,$(4))
+endef
+
+define Image/Build/Cameo934x/initramfs
+$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo934x_mtdlayout))
+endef
+
 define Image/Build/Ath
$(call Sysupgrade/$(7),$(1),$(2),$(5),$(6))
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
@@ -843,6 +852,8 @@
 
 $(eval $(call 
SingleProfile,Cameo933x,$(fs_squash),TEW712BR,tew-712br,TEW-712BR,ttyATH0,115200,"HORNET-RT-TEW712BR-3"))
 
+$(eval $(call 
SingleProfile,Cameo934x,$(fs_64k),DIR825C1,dir-825-c1,DIR-825-C1,ttyS0,115200,"00DB120AR9344-RT-101214-00"))
+
 $(eval $(call 
SingleProfile,CyberTAN,$(fs_64k),WRT160NL,wrt160nl,WRT160NL,ttyS0,115200,1.00.01))
 
 $(eval $(call 
SingleProfile,DIR825B1,$(fs_64k),DIR825B1,dir-825-b1,DIR-825-B1,ttyS0,115200,01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] hostapd hang - cannot associate but existing connections ok

2013-01-21 Thread Felix Fietkau
On 2013-01-21 6:22 PM, Justin Vallon wrote:
> The symptom is that I cannot connect to my wireless network, but 
> existing connections are ok.  Once I try to reconnect from the client 
> (wifi off > wifi on), that device is then unable to connect.  In the 
> past, restarting hostapd has fixed the problem.
What OpenWrt version are you using?

- Felix

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


[OpenWrt-Devel] hostapd hang - cannot associate but existing connections ok

2013-01-21 Thread Justin Vallon
The symptom is that I cannot connect to my wireless network, but 
existing connections are ok.  Once I try to reconnect from the client 
(wifi off > wifi on), that device is then unable to connect.  In the 
past, restarting hostapd has fixed the problem.


strace says it is stuck here:

sendto(9, 
"\2\3\0_\2\0\212\0\20\0\0\0\0\0\0\0\1zu\3647v\353\246E\270\260\302c\362\232\337"..., 
99, 0, {sa_family=AF_PACKET, proto=0x888e, if34, pkttype=PACKET_HOST, 
addr(6)={0, e4ce8f297c0c}, 20


# lsof -p 19442
COMMAND   PID USER   FD  TYPE DEVICE SIZE/OFFNODE NAME
...
hostapd 19442 root9u pack3009857  0t0   0 
type=SOCK_DGRAM

...

Why would this hang?

{ kill hostapd, wifi up }

Restarting hostapd fixed it.

--
-Justin
justinval...@gmail.com

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


Re: [OpenWrt-Devel] new package ndpi-netfilter

2013-01-21 Thread Vince Huang
Hello,is there any updates of ndpi?I tried iptables -I FORWARD -m ndpi --bittorrent -j REJECTutorrent still running at full speed.-- Original --From:  "Jo-Philipp Wich";Date:  Mon, Dec 17, 2012 09:18 PMTo:  "openwrt-devel"; Subject:  Re: [OpenWrt-Devel] new package ndpi-netfilter-BEGIN PGP SIGNED MESSAGE-Hash: SHA1> But I can still surf webs after this : iptables -I OUTPUT -m ndpi> --http -j REJECT This means it's not working properly?No this means you should use FORWARD instead of OUTPUT when browsingvia the router...~ Jow-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.12 (GNU/Linux)Comment: Using GnuPG with undefined - http://www.enigmail.net/iEYEARECAAYFAlDPG7UACgkQdputYINPTPNGHQCfZ+vL+jRfUNy0r5BO484UCUwzGOoAn1Ktms6vLiycdsnJAEsiIfW5Hz+O=MBcN-END PGP SIGNATURE-___openwrt-devel mailing listopenwrt-devel@lists.openwrt.orghttps://lists.openwrt.org/mailman/listinfo/openwrt-devel___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWRT pull request php5 updates

2013-01-21 Thread Florian Fainelli

Hey Michael,

On 01/19/2013 10:58 AM, Michael Heimpold wrote:

Hi Florian,

please have a look my openwrt-packages php5 branch on GitHub:
https://github.com/mhei/openwrt-packages/commits/php5.

I not sure whether there still exists any compile time problems
(not sure whether you still remember), on my host everything works
fine. However I guess we should
publish it so that it becomes a broader audience, shouldn't we?

I marked php5-pecl-bcompile as BROKEN, feel free to leave this
package out. I contacted upstream several times, but didn't got
any response yet.

Ok, all of that is very good, merged into packages, thanks!
--
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [ar71xx] add TP-LINK WA-801ND to run-time model detection

2013-01-21 Thread Amir Sagie
A small cosmetic fix to show the HW model name correctly in LuCI.

---
 target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 31b6dde..720c19e 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -87,6 +87,9 @@ tplink_board_detect() {
"074300"*)
model="TP-Link TL-WR743N/ND"
;;
+   "080100"*)
+   model="TP-Link TL-WA801N/ND"
+   ;;
"084100"*)
model="TP-Link TL-WR841N/ND"
;;
-- 
1.8.1

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


Re: [OpenWrt-Devel] How to check the field is empty?

2013-01-21 Thread Nguyễn Hồng Quân

Add this attribute to your option:
.optional = false

Your example will become:
code = s:option(Value, "code", translate("Code"))
code.option = false

(Don't understand what "password" means and why it is there).

On Mon 21 Jan 2013 05:25:19 PM ICT, . Elvis wrote:

hi all, If the field does not enter a value, how can display a warning
message("You must enter a value") !

 code = s:option(Value, "code", translate("Code"))
 code.password = true


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] about m.uci:get!

2013-01-21 Thread Nguyễn Hồng Quân

Your config:

config pin
   option pincode1 '1'

means that "pin" is "Typed Section", while the uci:get require a "Named 
Section".
You can use uci:get_first() with Typed Section, or convert to Named 
Section like this

config general pin
 option
("general" is Typed Section and "pin" now is Named Section)


On Mon 21 Jan 2013 02:40:53 PM ICT, . Elvis wrote:

Hi all,  Why I can not get "pinpro" value? I got empty!
/etc/config/verify
config pin
option pincode1 '1'
option oldcode '11'
option protect 'disable'

In the model/cbi
function code.write(self, section, value)
local pinpro = m.uci:get("verify", "pin", "protect")
 ---> is empty
if pinpro == "enable" then
pincode:add_error(section, translate("enable"))
else
pincode:add_error(section, translate("disable"))
end
end

thanks all.


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


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] How to check the field is empty?

2013-01-21 Thread . Elvis
hi all, If the field does not enter a value, how can display a warning
message("You must enter a value") !

 code = s:option(Value, "code", translate("Code"))
 code.password = true



thanks all,
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] PPPoE not working on TP-Link 941ND firmware

2013-01-21 Thread Nguyễn Hồng Quân
Please ignore the last log. It is wrong (it is when I plugged out the 
wire).


Here is the correct one:

OpenWrt daemon.info pppd[4655]: Plugin rp-pppoe.so loaded.
OpenWrt daemon.info pppd[4655]: RP-PPPoE plugin version 3.8p compiled 
against pppd 2.4.5

OpenWrt daemon.notice pppd[4655]: pppd 2.4.5 started by root, uid 0
OpenWrt kern.info kernel: [ 2919.45] eth1: link up (100Mbps/Full 
duplex)

OpenWrt daemon.info pppd[4655]: PPP session is 7009
OpenWrt daemon.warn pppd[4655]: Connected to 00:00:5e:00:01:04 via 
interface eth1

OpenWrt daemon.info pppd[4655]: Using interface pppoe-wan
OpenWrt daemon.notice pppd[4655]: Connect: pppoe-wan <--> eth1
OpenWrt daemon.info pppd[4655]: Terminating on signal 15
OpenWrt daemon.notice netifd: Interface 'wan' is now down
OpenWrt kern.info kernel: [ 2957.34] eth1: link down

On Mon 21 Jan 2013 04:51:57 PM ICT, Nguyễn Hồng Quân wrote:

Hello

I've just flashed my router TP-Link WR940N with OpenWrt Backfire and
Attitude Adjustment (same firmware with 941ND). For both OpenWrt
version, the WAN port does not work with PPPoE, though it works with
"static address" protocol.

Could you let me know how to solve this?

Thanks!



--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan


--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] PPPoE not working on TP-Link 941ND firmware

2013-01-21 Thread Nguyễn Hồng Quân

For more information, here is the log:
OpenWrt daemon.info pppd[2592]: Plugin rp-pppoe.so loaded.
OpenWrt daemon.info pppd[2592]: RP-PPPoE plugin version 3.8p compiled 
against pppd 2.4.5

OpenWrt daemon.notice pppd[2592]: pppd 2.4.5 started by root, uid 0
OpenWrt daemon.info dnsmasq[2012]: reading /tmp/resolv.conf.auto
OpenWrt daemon.info dnsmasq[2012]: using nameserver 192.168.1.200#53
OpenWrt daemon.info dnsmasq[2012]: using local addresses only for 
domain lan

OpenWrt daemon.warn pppd[2592]: Timeout waiting for PADO packets
OpenWrt daemon.err pppd[2592]: Unable to complete PPPoE Discovery
OpenWrt daemon.info pppd[2592]: Exit.
OpenWrt daemon.notice netifd: Interface 'wan' is now down`

On Mon 21 Jan 2013 04:30:55 PM ICT, Nguyễn Hồng Quân wrote:

Hello

I've just flashed my router TP-Link WR940N with OpenWrt Backfire and
Attitude Adjustment (same firmware with 941ND). For both OpenWrt
version, the WAN port does not work with PPPoE, though it works with
"static address" protocol.

Could you let me know how to solve this?

Thanks!



--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] PPPoE not working on TP-Link 941ND firmware

2013-01-21 Thread Nguyễn Hồng Quân

Hello

I've just flashed my router TP-Link WR940N with OpenWrt Backfire and 
Attitude Adjustment (same firmware with 941ND). For both OpenWrt 
version, the WAN port does not work with PPPoE, though it works with 
"static address" protocol.


Could you let me know how to solve this?

Thanks!

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan

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