[OpenWrt-Devel] Command to Disable Reset Button

2016-02-21 Thread John kerry
Hi,

I have configured the Reset button and it's working fine for normal reset
and press for 3 seconds for factory reset.

I need to disable the reset button using command and enable it.

Could anyone please help me how i can enable/disable the reset button.

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


[OpenWrt-Devel] Openwrt AR9344 Factory reset issue

2016-02-17 Thread John kerry
I have written the mac_address, wifi mac address and Serial number in mtd5
(ART) successfully as below location :
Mac Address : offset 0x0
Wi-Fi Mac Address: offset 4098
Seral number : offset 4104

and its working fine. Able to read and write.

but after that when i do the factory reset using below command it's not
happening, it's hanged and showing below messages:
mtd -r erase rootfs_data

Unlocking rootfs_data ...
Erasing rootfs_data ...

Rebooting ... [ 723.21] Removing MTD device #3 (rootfs_data) with use
count 1
[ 723.24] Restarting system.

Below is the partition
Creating 6 MTD partitions on "spi0.0":
0x-0x0004 : "u-boot"
0x0004-0x0005 : "u-boot-env"
0x0005-0x0068 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=5B, len=D
0x005b-0x0068 : "rootfs_data"
0x0068-0x007f : "kernel"
0x007f-0x0080 : "art"
0x0005-0x007e : "firmware"

cat /proc/mtd
dev:size   erasesize  name
mtd0: 0004 0001 "u-boot"
mtd1: 0001 0001 "u-boot-env"
mtd2: 0063 0001 "rootfs"
mtd3: 000d 0001 "rootfs_data"
mtd4: 0017 0001 "kernel"
mtd5: 0001 0001 "art"
mtd6: 0079 0001 "firmware"

Could anyone help me to solve this issue.
Regards,
John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] write/read from mtd ART partition

2016-02-16 Thread John kerry
Hi,

Sorry for the previous email, The MAC address got changed.
Could you please help me to write the serial number also.

Actually i have enabled the ART2 also for the calibration.

So how i can write the MAC, Serial number (15 Digits) without overwriting
on calibration data.


Thanks,
John

On Tue, Feb 16, 2016 at 8:44 PM, John kerry <kerry9...@gmail.com> wrote:

> Hi,
>
> Thank you so much for reply.
>
> The offset for the mac address is as below:
> Ethernet MAC address is saved in art partition with offset 0
> WiFi device calibration data is saved in art partition with offset 0x1000
>
> As you mentioned above: I have tried the below command but the mac address
> is not changed
>
> root@ST-MA_WIFI:/# dd if=/dev/mtd5 of=/tmp/art.img
> 128+0 records in
> 128+0 records out
> root@ST-MA_WIFI:/# printf "\x00\x26\x75\x96\x22\x33" | dd conv=notrunc
> of=/tmp/a
> rt.img bs=1 seek=$((0x0))
> 6+0 records in
> 6+0 records out
> root@ST-MA_WIFI:/# mtd write /tmp/art.img art
> Unlocking art ...
>
> Writing from /tmp/art.img to art ...
>
> Thanks,
> John
>
>
>
> On Tue, Feb 16, 2016 at 7:23 PM, <micke.p...@telldus.se> wrote:
>
>> 2016-02-16 11:43 skrev John kerry:
>>
>> Hi
>>>
>>> I am trying to write mac address and Serial number in ART partition.
>>>
>>> Creating 6 MTD partitions on "spi0.0":
>>> 0x-0x0004 : "u-boot"
>>> 0x0004-0x0005 : "u-boot-env"
>>> 0x0005-0x0068 : "rootfs"
>>> mtd: partition "rootfs" set to be root filesystem
>>> mtd: partition "rootfs_data" created automatically, ofs=5B, len=D
>>> 0x005b-0x0068 : "rootfs_data"
>>> 0x0068-0x007f : "kernel"
>>> 0x007f-0x0080 : "art"
>>> 0x0005-0x007e : "firmware"
>>>
>>> cat /proc/mtd
>>> dev: size erasesize name
>>> mtd0: 0004 0001 "u-boot"
>>> mtd1: 0001 0001 "u-boot-env"
>>> mtd2: 0063 0001 "rootfs"
>>> mtd3: 000d 0001 "rootfs_data"
>>> mtd4: 0017 0001 "kernel"
>>> mtd5: 0001 0001 "art"
>>> mtd6: 0079 0001 "firmware"
>>>
>>> Could anyone help me to write wifi mac address and Serial number to ART
>>> partition without overwriting on calibration data.
>>>
>>> Thanks, John
>>>
>>> ___
>>> openwrt-devel mailing list
>>> openwrt-devel@lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel [1]
>>>
>>
>> You may modify these three lines for your application. You need to alter
>> the offset for the mac address:
>>
>> dd if=/dev/mtd5 of=/tmp/art.img
>> printf "\xAA\xBB\xCC\xDD\xEE\xFF" | dd conv=notrunc of=/tmp/art.img bs=1
>> seek=$((0x10))
>> mtd write /tmp/art.img art
>>
>> ___
>> 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] write/read from mtd ART partition

2016-02-16 Thread John kerry
Hi,

Thank you so much for reply.

The offset for the mac address is as below:
Ethernet MAC address is saved in art partition with offset 0
WiFi device calibration data is saved in art partition with offset 0x1000

As you mentioned above: I have tried the below command but the mac address
is not changed

root@ST-MA_WIFI:/# dd if=/dev/mtd5 of=/tmp/art.img
128+0 records in
128+0 records out
root@ST-MA_WIFI:/# printf "\x00\x26\x75\x96\x22\x33" | dd conv=notrunc
of=/tmp/a
rt.img bs=1 seek=$((0x0))
6+0 records in
6+0 records out
root@ST-MA_WIFI:/# mtd write /tmp/art.img art
Unlocking art ...

Writing from /tmp/art.img to art ...

Thanks,
John



On Tue, Feb 16, 2016 at 7:23 PM, <micke.p...@telldus.se> wrote:

> 2016-02-16 11:43 skrev John kerry:
>
> Hi
>>
>> I am trying to write mac address and Serial number in ART partition.
>>
>> Creating 6 MTD partitions on "spi0.0":
>> 0x-0x0004 : "u-boot"
>> 0x0004-0x0005 : "u-boot-env"
>> 0x0005-0x0068 : "rootfs"
>> mtd: partition "rootfs" set to be root filesystem
>> mtd: partition "rootfs_data" created automatically, ofs=5B, len=D
>> 0x005b-0x0068 : "rootfs_data"
>> 0x0068-0x007f : "kernel"
>> 0x007f-0x0080 : "art"
>> 0x0005-0x007e : "firmware"
>>
>> cat /proc/mtd
>> dev: size erasesize name
>> mtd0: 0004 0001 "u-boot"
>> mtd1: 0001 0001 "u-boot-env"
>> mtd2: 0063 0001 "rootfs"
>> mtd3: 000d 0001 "rootfs_data"
>> mtd4: 0017 0001 "kernel"
>> mtd5: 0001 0001 "art"
>> mtd6: 0079 0001 "firmware"
>>
>> Could anyone help me to write wifi mac address and Serial number to ART
>> partition without overwriting on calibration data.
>>
>> Thanks, John
>>
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel [1]
>>
>
> You may modify these three lines for your application. You need to alter
> the offset for the mac address:
>
> dd if=/dev/mtd5 of=/tmp/art.img
> printf "\xAA\xBB\xCC\xDD\xEE\xFF" | dd conv=notrunc of=/tmp/art.img bs=1
> seek=$((0x10))
> mtd write /tmp/art.img art
>
> ___
> 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] write/read from mtd ART partition

2016-02-16 Thread John kerry
Hi

I am trying to write mac address and Serial number in ART partition.

Creating 6 MTD partitions on "spi0.0":
0x-0x0004 : "u-boot"
0x0004-0x0005 : "u-boot-env"
0x0005-0x0068 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=5B, len=D
0x005b-0x0068 : "rootfs_data"
0x0068-0x007f : "kernel"
0x007f-0x0080 : "art"
0x0005-0x007e : "firmware"

cat /proc/mtd
dev:size   erasesize  name
mtd0: 0004 0001 "u-boot"
mtd1: 0001 0001 "u-boot-env"
mtd2: 0063 0001 "rootfs"
mtd3: 000d 0001 "rootfs_data"
mtd4: 0017 0001 "kernel"
mtd5: 0001 0001 "art"
mtd6: 0079 0001 "firmware"

Could anyone help me to write wifi mac address and Serial number to ART
partition without overwriting on calibration data.

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


Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-16 Thread John kerry
Hi ,

[ "$ACTION" = "pressed" ] && [ "$BUTTON" = "lanwifi" ] && [ "$INTERFACE" =
"wan" ] &&
  {
 devstatus "$MYDEV" | grep '"up": true' &&
 {

echo "" > /dev/console
echo "SWITCH TO RJ45" > /dev/console
echo "255" >
/sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
  }
   }

even i checked on http://www.shellcheck.net/ , its not giving any feedback,
it seems correct but still its not working.

I writing this script under /etc/hotplug.d/button/50-button file.

I have to change any other file?

Regards,
john

On Wed, Sep 16, 2015 at 2:43 PM, Bastian Bittorf <bitt...@bluebottle.com>
wrote:

> * John kerry <kerry9...@gmail.com> [16.09.2015 08:10]:
> > Hi,
> >
> > I have changed the script as below:
> >
> > MYDEV='eth0.2'
> >
> >  ["$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" -a "INTERFACE" = 'wan'] &&
>^^^ a space here, so [ "$ACTION" - the same at the end: 'wan' ]
> use "$INTERFACE" with the '$'
>
> please learn shell-scripting. maybe it's an good idea to use a static
> checker like http://www.shellcheck.net/
>
> >{
> > devstatus "$MYDEV" | grep '"up": true' &&
> >{
> > echo "255" >
> > /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
> > }
> > }
> >
> >
> > but its not working.
> >
> > What mistake i am doing.
>
> bye, bastian - greetings to china?!
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-16 Thread John kerry
Hi,

I understand its not good to mail like this, But I am quite new on this and
even no body knows in my friends about this. Could you please help

I hard coded the interface as below:

set | logger


[ "$ACTION" = "pressed" ] && [ "$BUTTON" = "lanwifi" ] &&
 {
 devstatus "eth0.2" | grep "up":true &&
 {
echo "" > /dev/console
echo "SWITCH TO RJ45" > /dev/console
echo "255" >
/sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
  }
  }

But still same problem.

Regards,
John

On Wed, Sep 16, 2015 at 6:23 PM, Bastian Bittorf <bitt...@bluebottle.com>
wrote:

> * John kerry <kerry9...@gmail.com> [16.09.2015 12:18]:
> > I am getting below log:
>
> ok, i see: INTERFACE is not set, so you have to remove the check for
> this var and hardcode it.
>
> please stop sending mails like this, debug on your own with a local friend.
>
> bye, bastian
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi,

I have changed the script as below:

MYDEV='eth0.2'

 ["$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" -a "INTERFACE" = 'wan'] &&
   {
devstatus "$MYDEV" | grep '"up": true' &&
   {
echo "255" >
/sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
}
}


but its not working.

What mistake i am doing.

Could you please correct it me.

Regards,
John

On Tue, Sep 15, 2015 at 7:51 PM, Bastian Bittorf <bitt...@bluebottle.com>
wrote:

> * John kerry <kerry9...@gmail.com> [15.09.2015 13:44]:
> > Hi,
> >
> > I have added following condition but its not working:
> >
> > MYDEV='eth0'
> >
> > if [ "$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" ] && {
>   remove the 'if'
> >   devstatus "$MYDEV" | grep '"up": true' && {
> > echo "255" >
> > /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
> >   }
> > }
> >
> > fi
>   remove the 'fi'
>
> please change the first line to e.g.
> [ "$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" -a "$INTERFACE" = 'wan' ]
> && {
>
> INTERFACE is the 'name' of the device, e.g. 'wan' or 'lan'
> DEVICE is the real thing, e.g. eth0.1
>
> > Am i doing any mistake or need to change anything
>
> you can always TEST you script with e.g.
>
> set -x
> INTERFACE=bla
> DEVICE=blubb
> . name_of_your_script
> set +x
>
> bye, bastian
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi,

I have tried script:









*["$ACTION" = "pressed" -a "$BUTTON" = "BUT_2"] && {   ["${ACTION}" =
"ifup" -a "${INTERFACE}" = "wan"] && {echo "" > /dev/console
echo "SWITCH TO RJ45" > /dev/consoleecho "255" >
/sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
} &  }*



*but still no luck :(*
Could anyone please figure out what mistakes i am doing.

Regards,
John

On Wed, Sep 16, 2015 at 9:12 AM, John kerry <kerry9...@gmail.com> wrote:

> Hi,
>
> I have changed the script as below:
>
> MYDEV='eth0.2'
>
>  ["$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" -a "INTERFACE" = 'wan'] &&
>{
> devstatus "$MYDEV" | grep '"up": true' &&
>{
> echo "255" >
> /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
> }
> }
>
>
> but its not working.
>
> What mistake i am doing.
>
> Could you please correct it me.
>
> Regards,
> John
>
> On Tue, Sep 15, 2015 at 7:51 PM, Bastian Bittorf <bitt...@bluebottle.com>
> wrote:
>
>> * John kerry <kerry9...@gmail.com> [15.09.2015 13:44]:
>> > Hi,
>> >
>> > I have added following condition but its not working:
>> >
>> > MYDEV='eth0'
>> >
>> > if [ "$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" ] && {
>>   remove the 'if'
>> >   devstatus "$MYDEV" | grep '"up": true' && {
>> > echo "255" >
>> > /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
>> >   }
>> > }
>> >
>> > fi
>>   remove the 'fi'
>>
>> please change the first line to e.g.
>> [ "$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" -a "$INTERFACE" = 'wan' ]
>> && {
>>
>> INTERFACE is the 'name' of the device, e.g. 'wan' or 'lan'
>> DEVICE is the real thing, e.g. eth0.1
>>
>> > Am i doing any mistake or need to change anything
>>
>> you can always TEST you script with e.g.
>>
>> set -x
>> INTERFACE=bla
>> DEVICE=blubb
>> . name_of_your_script
>> set +x
>>
>> bye, bastian
>>
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Please can anyone reply

On Tue, Sep 15, 2015 at 2:16 PM, John kerry <kerry9...@gmail.com> wrote:

> Hi,
>
> I have written the following condition in /etc/hotplug.d/button/50-wps file
> if [ "$ACTION" = "pressed" -a "$BUTTON" = "lanwifi" ]; then
> echo "" > /dev/console
> echo "SWITCH TO RJ45" > /dev/console
> echo "255" >
> /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
> fi
>
> So Now whenever i pressed button the Status LED will glow otherwise OFF.
>
> But i need to check one more condition eth0 link UP/Down, If UP only i
> have to ON the status LED.
>
> Could anyone please tell how i can add such condition in this script.
>
> Regards,
>
>
>
> On Tue, Sep 15, 2015 at 2:00 PM, John kerry <kerry9...@gmail.com> wrote:
>
>> Hi,
>>
>> I have to write some condition in
>> /etc/hotplug.d/button/50-wps/ file
>>
>> I have to configure cat /etc/hotplug.d/button/00-wps file for following
>> condition:
>> if [ "$BUTTON" = "BTN_2" ] && [ "$ACTION" = "pressed" ]; then
>>
>> I have to check eth0.1 if link is up then have ON status led otherwise
>> OFF.
>>
>> I am able ON/OFF Status LED based on eth0 link up/down using below
>>
>> config led 'led_status'
>> option name 'STATUS'
>> option interval '50'
>> option sysfs 'wndr3700:green:status'
>> option default '0'
>> option trigger 'netdev'
>> option mode 'link'
>> option dev 'eth0'
>>
>>  But i need to check first above button that is pressed only i have to
>> check eth0 status.
>>
>> I am not able to mix both condition in one place.
>>
>> Could anyone please reply, how i can add such condition in that file.
>>
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi,

I have written the following condition in /etc/hotplug.d/button/50-wps file
if [ "$ACTION" = "pressed" -a "$BUTTON" = "lanwifi" ]; then
echo "" > /dev/console
echo "SWITCH TO RJ45" > /dev/console
echo "255" >
/sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
fi

So Now whenever i pressed button the Status LED will glow otherwise OFF.

But i need to check one more condition eth0 link UP/Down, If UP only i have
to ON the status LED.

Could anyone please tell how i can add such condition in this script.

Regards,


On Tue, Sep 15, 2015 at 2:00 PM, John kerry <kerry9...@gmail.com> wrote:

> Hi,
>
> I have to write some condition in
> /etc/hotplug.d/button/50-wps/ file
>
> I have to configure cat /etc/hotplug.d/button/00-wps file for following
> condition:
> if [ "$BUTTON" = "BTN_2" ] && [ "$ACTION" = "pressed" ]; then
>
> I have to check eth0.1 if link is up then have ON status led otherwise OFF.
>
> I am able ON/OFF Status LED based on eth0 link up/down using below
>
> config led 'led_status'
> option name 'STATUS'
> option interval '50'
> option sysfs 'wndr3700:green:status'
> option default '0'
> option trigger 'netdev'
> option mode 'link'
> option dev 'eth0'
>
>  But i need to check first above button that is pressed only i have to
> check eth0 status.
>
> I am not able to mix both condition in one place.
>
> Could anyone please reply, how i can add such condition in that file.
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi,

I have to write some condition in
/etc/hotplug.d/button/50-wps/ file

I have to configure cat /etc/hotplug.d/button/00-wps file for following
condition:
if [ "$BUTTON" = "BTN_2" ] && [ "$ACTION" = "pressed" ]; then

I have to check eth0.1 if link is up then have ON status led otherwise OFF.

I am able ON/OFF Status LED based on eth0 link up/down using below

config led 'led_status'
option name 'STATUS'
option interval '50'
option sysfs 'wndr3700:green:status'
option default '0'
option trigger 'netdev'
option mode 'link'
option dev 'eth0'

 But i need to check first above button that is pressed only i have to
check eth0 status.

I am not able to mix both condition in one place.

Could anyone please reply, how i can add such condition in that file.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi,

I have added following condition but its not working:

MYDEV='eth0'

if [ "$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" ] && {
  devstatus "$MYDEV" | grep '"up": true' && {
echo "255" >
/sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
  }
}

fi

Am i doing any mistake or need to change anything

Regards,
John

On Tue, Sep 15, 2015 at 4:07 PM, Bastian Bittorf <bitt...@bluebottle.com>
wrote:

> * John kerry <kerry9...@gmail.com> [15.09.2015 08:52]:
> > I have to write some condition in
> > /etc/hotplug.d/button/50-wps/ file
> >
> > I have to configure cat /etc/hotplug.d/button/00-wps file for following
> > condition:
> > if [ "$BUTTON" = "BTN_2" ] && [ "$ACTION" = "pressed" ]; then
> >
> > I have to check eth0.1 if link is up then have ON status led otherwise
> OFF.
>
> if i understand you correctly, you want this:
>
> MYDEV='eth0.1'
> [ "$BUTTON" = 'BTN_2' -a "$ACTION" = 'pressed' ] && {
>   devstatus "$MYDEV" | grep '"up": true' && {
> your_action_here
>   }
> }
>
> but this is at least...rude. better you use the correct
> JSON-parser like:
>
> . /usr/share/libubox/jshn.sh
> json_load "$( devstatus eth0.1 )"
> json_get_var 'JSON_VAR_up' 'up'
> json_cleanup
>
> in case your dev is up you have e.g.
> $JSON_VAR_up = 1
>
> bye, bastian
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi,

If i am configuring below config under /etc/config/system file , The STATUS
LED working fine based on eth0 link up/down.

config led 'led_status'
option name 'STATUS'
option interval '50'
option sysfs 'db120:green:status'
option default '0'
option trigger 'netdev'
option mode 'link'
option dev 'eth0'

The switch button defined as below under /etc/hotplug.d/button/50-wps

if [ "$ACTION" = "pressed" -a "$BUTTON" = "lanwifi" ]; then
echo "255" >
/sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
fi

This working fine. I need to add condition as below:

if [ "$ACTION" = "pressed" -a "$BUTTON" = "lanwifi" ]; then

NEED TO ADD CONDITION
(config led 'led_status'
option name 'STATUS'
option interval '50'
option sysfs 'db120:green:status'
option default '0'
option trigger 'netdev'
option mode 'link'
option dev 'eth0' )

echo "255" >
/sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
fi

Can anyone help me to solve this.

Regards,
John


On Tue, Sep 15, 2015 at 6:38 PM, John kerry <kerry9...@gmail.com> wrote:

> Hi,
>
> I have added following condition but its not working:
>
> MYDEV='eth0'
>
> if [ "$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" ] && {
>   devstatus "$MYDEV" | grep '"up": true' && {
> echo "255" >
> /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
>   }
> }
>
> fi
>
> Am i doing any mistake or need to change anything
>
> Regards,
> John
>
> On Tue, Sep 15, 2015 at 4:07 PM, Bastian Bittorf <bitt...@bluebottle.com>
> wrote:
>
>> * John kerry <kerry9...@gmail.com> [15.09.2015 08:52]:
>> > I have to write some condition in
>> > /etc/hotplug.d/button/50-wps/ file
>> >
>> > I have to configure cat /etc/hotplug.d/button/00-wps file for following
>> > condition:
>> > if [ "$BUTTON" = "BTN_2" ] && [ "$ACTION" = "pressed" ]; then
>> >
>> > I have to check eth0.1 if link is up then have ON status led otherwise
>> OFF.
>>
>> if i understand you correctly, you want this:
>>
>> MYDEV='eth0.1'
>> [ "$BUTTON" = 'BTN_2' -a "$ACTION" = 'pressed' ] && {
>>   devstatus "$MYDEV" | grep '"up": true' && {
>> your_action_here
>>   }
>> }
>>
>> but this is at least...rude. better you use the correct
>> JSON-parser like:
>>
>> . /usr/share/libubox/jshn.sh
>> json_load "$( devstatus eth0.1 )"
>> json_get_var 'JSON_VAR_up' 'up'
>> json_cleanup
>>
>> in case your dev is up you have e.g.
>> $JSON_VAR_up = 1
>>
>> bye, bastian
>>
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] AR9344 OpenWrt GUI

2015-09-10 Thread John kerry
Where its applying the settings, except resetting the radio(s) we can do
everything . I Know it involves the resetting but we can comment that
resetting part. Could please tell where this part of code exist

On Thu, Sep 10, 2015 at 3:12 PM, David Lang <da...@lang.hm> wrote:

> On Thu, 10 Sep 2015, John kerry wrote:
>
> Yes after reset we are to able to reconnect, I understand using wired
>> connection we can configure but we need to configure using wireless only.
>> Is there anyway that we can avoid the Wi-Fi reset?
>>
>
> No, if you tell it to reconfigure wifi and apply the settings, it needs to
> do what you told it to do, and that involves resetting the radio(s) to make
> sure they now do everything you told it to do.
>
> David Lang
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] AR9344 OpenWrt GUI

2015-09-09 Thread John kerry
Hi,

We are working on AR9344 OpenWrt,

We have configured the wireless as AP mode and broadcasting the SSID so any
device can connect to it and even we are able access the GUI on Smartphone
after connecting to that AP.

Then we do survey the scanning devices, its gives the Scanning result, then
we can join Network  to anyone from the list. Then blow page will show as
shown below:


[image: Inline image 1]


The we enter the PassPhrase and Click on Submit button. Then next page will
show as below
[image: Inline image 2]

After Clicking the on *Save & Apply button, *The following files
/etc/config/network

/etc/config/dhcp, /etc/config/qos etc.

Because of this files changes Wi-Fi connection is reset the connection. So
we are unable to configure above configuration using Smartphone.



Could anyone please help us to solve this issue.


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


Re: [OpenWrt-Devel] AR9344 OpenWrt GUI

2015-09-09 Thread John kerry
Hi,

Yes after reset we are to able to reconnect, I understand using wired
connection we can configure but we need to configure using wireless only.
Is there anyway that we can avoid the Wi-Fi reset?

Regards,

On Thu, Sep 10, 2015 at 7:29 AM, David Lang <da...@lang.hm> wrote:

> On Wed, 9 Sep 2015, John kerry wrote:
>
> Hi,
>>
>> We are working on AR9344 OpenWrt,
>>
>> We have configured the wireless as AP mode and broadcasting the SSID so
>> any
>> device can connect to it and even we are able access the GUI on Smartphone
>> after connecting to that AP.
>>
>> Then we do survey the scanning devices, its gives the Scanning result,
>> then
>> we can join Network  to anyone from the list. Then blow page will show as
>> shown below:
>>
>>
>> [image: Inline image 1]
>>
>>
>> The we enter the PassPhrase and Click on Submit button. Then next page
>> will
>> show as below
>> [image: Inline image 2]
>>
>> After Clicking the on *Save & Apply button, *The following files
>> /etc/config/network
>>
>> /etc/config/dhcp, /etc/config/qos etc.
>>
>> Because of this files changes Wi-Fi connection is reset the connection. So
>> we are unable to configure above configuration using Smartphone.
>>
>
> Well, when you reconfigure the interface you are connected to, it is going
> to bounce. Which is why it's suggested that you configure the wireless
> through a wired link.
>
> But once the wifi is reset, you should be able to reconnect, login again
> and continue. Is this not working? If not, what is happening?
>
> David Lang
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] AR9344 OpenWrt GUI

2015-09-09 Thread John kerry
Could anyone please help me to solve this issue. How we can avoid the wifi
reset.

On Thu, Sep 10, 2015 at 9:24 AM, John kerry <kerry9...@gmail.com> wrote:

> Hi,
>
> Yes after reset we are to able to reconnect, I understand using wired
> connection we can configure but we need to configure using wireless only.
> Is there anyway that we can avoid the Wi-Fi reset?
>
> Regards,
>
> On Thu, Sep 10, 2015 at 7:29 AM, David Lang <da...@lang.hm> wrote:
>
>> On Wed, 9 Sep 2015, John kerry wrote:
>>
>> Hi,
>>>
>>> We are working on AR9344 OpenWrt,
>>>
>>> We have configured the wireless as AP mode and broadcasting the SSID so
>>> any
>>> device can connect to it and even we are able access the GUI on
>>> Smartphone
>>> after connecting to that AP.
>>>
>>> Then we do survey the scanning devices, its gives the Scanning result,
>>> then
>>> we can join Network  to anyone from the list. Then blow page will show as
>>> shown below:
>>>
>>>
>>> [image: Inline image 1]
>>>
>>>
>>> The we enter the PassPhrase and Click on Submit button. Then next page
>>> will
>>> show as below
>>> [image: Inline image 2]
>>>
>>> After Clicking the on *Save & Apply button, *The following files
>>> /etc/config/network
>>>
>>> /etc/config/dhcp, /etc/config/qos etc.
>>>
>>> Because of this files changes Wi-Fi connection is reset the connection.
>>> So
>>> we are unable to configure above configuration using Smartphone.
>>>
>>
>> Well, when you reconfigure the interface you are connected to, it is
>> going to bounce. Which is why it's suggested that you configure the
>> wireless through a wired link.
>>
>> But once the wifi is reset, you should be able to reconnect, login again
>> and continue. Is this not working? If not, what is happening?
>>
>> David Lang
>>
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Fwd: AR9344 OpenWrt (Scanning Device)

2015-09-01 Thread John kerry
 I am using openwrt + luci 0.11.1

[image: Inline image 1]

When we do scan Its takes too much time to display the scanning device list
and some times its fail to display

On Tue, Sep 1, 2015 at 4:38 PM, Bruno Randolf <b...@einfach.org> wrote:

> Hello John,
>
> Not sure what exactly you are referring to with scanning, but my tool
> called "horst" may help to quickly get an overview of what's happening
> in the "air"... It needs a monitor interface however.
>
> http://br1.einfach.org/tech/horst/
>
> bruno
>
> On 09/01/2015 04:23 AM, John kerry wrote:
> > Hi,
> >
> > I am working on AR9344 openWrt project. When I am doing scanning the
> > device wireless It's taking very long time to display the Scanning
> devices.
> >
> > Could anyone help me, how I can reduce the delay.
> >
> > Thanks,
> >
> >
> > ___
> > 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] AR9344 OpenWrt (Scanning Device)

2015-08-31 Thread John kerry
Hi,

I am working on AR9344 openWrt project. When I am doing scanning the device
wireless It's taking very long time to display the Scanning devices.

Could anyone help me, how I can reduce the delay.

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


Re: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-13 Thread John kerry
Hi,

i will check whether this is driver issue or Luci,

I have to add  disable WPS if this feature is enabled for the WiFi module
this in wireless. How i can handle this.

Thanks,

On Thu, Aug 13, 2015 at 2:18 PM, David Lang da...@lang.hm wrote:

 On Thu, 13 Aug 2015, John kerry wrote:

 But i dont think so this driver might be the problem, Because when i am
 doing using GUI its working so there will be not driver problem.

 Just i am not getting how to add this in build config.

 Normally what will be the wireless config for the repeater mode default.


 the exact file that you create as a result of the GUI is what you would
 put in the build config. But you say that you don't want that file because
 you want to connect to different SSIDs on different channels, so you don't
 _have_ any one file that you want to put in the default.

 When you use LUCI to scan and attach to a different SSID, you say that it
 looses the config for the local systems to connect to it. This could be a
 LUCI problem, or it could be that the driver requires that this be reset
 afterwords.

 If it's a LUCI problem, you will have to fix that code (or go to where
 tehy develop it and convince them to fix it). If it's a driver problem you
 are out of luck.

 But we can't tell you a file to put in the build that will connect to any
 remote system because there isn't one file that will automatically connect
 to any of several remote systems.

 David Lang


 On Thu, Aug 13, 2015 at 11:40 AM, David Lang da...@lang.hm wrote:

 If you want to have one config thaqt will talk to many different APs with
 different names/configs you are asking for magic. You have to change the
 config to talk to the different destinations.

 Since you are using a non-mainline driver, we don't know what the driver
 s
 able to do.

 It sounds as if there is a problem that could either be in the driver or
 in LUCI that makes it loose the rest of the config when you have it scan
 for networks.

 you can probably avoid that by just changing the info in the file to be
 appropriate for the new environment and restarting wifi/rebooting. If you
 want to do this via the existing GUI you will need to make code changes
 to
 LUCI.

 But at this point you are talking custom stuff.

 David Lang


 On Thu, 13 Aug 2015, John kerry wrote:

 Hi,


 Still i am not able to configure wireless config file. The problem i am
 facing, i cannot add fixed router name and password. It should every
 time
 scan and connect to any router. If i used GUI one config its fixed to
 that
 router which i connected. So with that configuration we are not able to
 scan again and connect to any other router next time.



 On Wed, Aug 12, 2015 at 9:29 AM, John kerry kerry9...@gmail.com
 wrote:

 Yes i able to config using GUI, But when i am configuring GUI i scan and

 connect to one AP and then add one more AP mode to it. So finally i
 will
 have wireless configuration.

 But i cant keep this config in build option because if i load this
 configuration it will load what i connected last time, so next time i
 cant
 scan it anymore it showing the same connected to last AP.




 On Wed, Aug 12, 2015 at 1:36 AM, David Lang da...@lang.hm wrote:

 I thought you said a couple posts ago that you were able to configure
 it

 through the GUI to work the way you wanted it to, you were just
 wanting
 to
 make something the default.

 So do you have it working or not?

 If you have it working, it should keep working after a reboot. What
 are
 you meaning when you say that you want to change the default?

 Are you meaning that you want to create an image that will behave this
 way when you do a factory reset (or when you first flash it)? If so,
 then
 you need to take your working config and make it part of your image
 via
 the
 files/ mechansim.

 If you are meaning something else, I'm still not understanding what
 you
 are trying to do.

 David Lang



 On Tue, 11 Aug 2015, John kerry wrote:

 Date: Tue, 11 Aug 2015 21:20:58 +0800


 From: John kerry kerry9...@gmail.com
 To: David Lang da...@lang.hm
 Cc: Alex Weedy weedy2...@gmail.com,
 OpenWrt Development List openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was:
 Multiple
 Wi-Fi client/AP interfaces on one radio)

 Hi,

 How to config wireless config file for repeater mode. I am not able
 to
 config.

 On Tue, Aug 11, 2015 at 5:34 PM, John kerry kerry9...@gmail.com
 wrote:

 When i load firmware the wireless config will be like below:


 config wifi-device 'wifi0'
 option type 'qcawifi'
 option macaddr '00:26:75:bd:37:24'
 option hwmode '11ng'
 option txpower '16'
 option htmode 'HT20'
 option disabled '0'
 option channel '1'

 config wifi-iface
 option device 'wifi0'
 option mode 'ap'
 option ssid 'Test_ap'
 option network 'lan'
 option encryption 'psk2'
 option key 'Test_ap'
 option wds '1'

 so

Re: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-13 Thread John kerry
Sorry i didn't mentioned fully.

I want this to happen,   disable WPS if this feature is enabled for the
WiFi module

On Thu, Aug 13, 2015 at 5:22 PM, David Lang da...@lang.hm wrote:

 On Thu, 13 Aug 2015, John kerry wrote:

 Hi,

 i will check whether this is driver issue or Luci,

 I have to add  disable WPS if this feature is enabled for the WiFi
 module
 this in wireless. How i can handle this.


 ??? is this something you want to happen? something that happens that you
 don't want? we can't read your mind.

 David Lang



 Thanks,

 On Thu, Aug 13, 2015 at 2:18 PM, David Lang da...@lang.hm wrote:

 On Thu, 13 Aug 2015, John kerry wrote:

 But i dont think so this driver might be the problem, Because when i am

 doing using GUI its working so there will be not driver problem.

 Just i am not getting how to add this in build config.

 Normally what will be the wireless config for the repeater mode default.


 the exact file that you create as a result of the GUI is what you would
 put in the build config. But you say that you don't want that file
 because
 you want to connect to different SSIDs on different channels, so you
 don't
 _have_ any one file that you want to put in the default.

 When you use LUCI to scan and attach to a different SSID, you say that it
 looses the config for the local systems to connect to it. This could be a
 LUCI problem, or it could be that the driver requires that this be reset
 afterwords.

 If it's a LUCI problem, you will have to fix that code (or go to where
 tehy develop it and convince them to fix it). If it's a driver problem
 you
 are out of luck.

 But we can't tell you a file to put in the build that will connect to any
 remote system because there isn't one file that will automatically
 connect
 to any of several remote systems.

 David Lang


 On Thu, Aug 13, 2015 at 11:40 AM, David Lang da...@lang.hm wrote:


 If you want to have one config thaqt will talk to many different APs
 with

 different names/configs you are asking for magic. You have to change
 the
 config to talk to the different destinations.

 Since you are using a non-mainline driver, we don't know what the
 driver
 s
 able to do.

 It sounds as if there is a problem that could either be in the driver
 or
 in LUCI that makes it loose the rest of the config when you have it
 scan
 for networks.

 you can probably avoid that by just changing the info in the file to be
 appropriate for the new environment and restarting wifi/rebooting. If
 you
 want to do this via the existing GUI you will need to make code changes
 to
 LUCI.

 But at this point you are talking custom stuff.

 David Lang


 On Thu, 13 Aug 2015, John kerry wrote:

 Hi,


 Still i am not able to configure wireless config file. The problem i
 am
 facing, i cannot add fixed router name and password. It should every
 time
 scan and connect to any router. If i used GUI one config its fixed to
 that
 router which i connected. So with that configuration we are not able
 to
 scan again and connect to any other router next time.



 On Wed, Aug 12, 2015 at 9:29 AM, John kerry kerry9...@gmail.com
 wrote:

 Yes i able to config using GUI, But when i am configuring GUI i scan
 and

 connect to one AP and then add one more AP mode to it. So finally i
 will
 have wireless configuration.

 But i cant keep this config in build option because if i load this
 configuration it will load what i connected last time, so next time i
 cant
 scan it anymore it showing the same connected to last AP.




 On Wed, Aug 12, 2015 at 1:36 AM, David Lang da...@lang.hm wrote:

 I thought you said a couple posts ago that you were able to configure
 it

 through the GUI to work the way you wanted it to, you were just
 wanting
 to
 make something the default.

 So do you have it working or not?

 If you have it working, it should keep working after a reboot. What
 are
 you meaning when you say that you want to change the default?

 Are you meaning that you want to create an image that will behave
 this
 way when you do a factory reset (or when you first flash it)? If so,
 then
 you need to take your working config and make it part of your image
 via
 the
 files/ mechansim.

 If you are meaning something else, I'm still not understanding what
 you
 are trying to do.

 David Lang



 On Tue, 11 Aug 2015, John kerry wrote:

 Date: Tue, 11 Aug 2015 21:20:58 +0800


 From: John kerry kerry9...@gmail.com
 To: David Lang da...@lang.hm
 Cc: Alex Weedy weedy2...@gmail.com,
 OpenWrt Development List openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was:
 Multiple
 Wi-Fi client/AP interfaces on one radio)

 Hi,

 How to config wireless config file for repeater mode. I am not able
 to
 config.

 On Tue, Aug 11, 2015 at 5:34 PM, John kerry kerry9...@gmail.com
 wrote:

 When i load firmware the wireless config will be like below:


 config wifi-device 'wifi0'
 option type 'qcawifi'
 option macaddr '00:26:75:bd:37:24

Re: [OpenWrt-Devel] Separate Default SSID for 2.4GHz and 5GHz

2015-08-13 Thread John kerry
Hi,

Yes exactly i have one radio which i want to switch between 2.4GHz and
5GHz. GUI side i will add one switch button, But i am not getting how
handle backend wireless config. i mean to say where i can add this when
selected 2.4GHz load 2.4GHz wireless configuration and same for 5GHz.

On Thu, Aug 13, 2015 at 8:21 PM, Bastian Bittorf bitt...@bluebottle.com
wrote:

 * Sami Olmari s...@olmari.fi [07.08.2015 15:48]:
  In openwrt you are free to configure each and every radio as own unit, so
  use whatever SSID you see fit for each radio. This is default basic
 OpenWrt
  stuff :)

 seems that Afkar has 1 radio which must be switched between 2.4 and 5 GHz,
 Afkar?

 bye, bastian
 ___
 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] Fwd: 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-11 Thread John kerry
Yes,

i can copy the config and build with this configuration,

for example now i have connected to some router, another time we can
connect to any router. So how i can fix the settings by default.

On Tue, Aug 11, 2015 at 12:45 AM, David Lang da...@lang.hm wrote:

 On Mon, 10 Aug 2015, John kerry wrote:

 I followed the same steps and its working too. But this i want in wireless
 config file, Because i dont want every time to add using GUI. So When i
 connect to another router also, no need to add one more. I mean to say it
 should be in default wireless config file.


 what do you mean by default wireless config file

 Once you have set it from the GUI, it is in the config files. The next
 time you boot it will use that config.

 If you mean that you want it in the factory default config (for when you
 first flash the router or do a factory reset), then take the
 /etc/config/wireless and /etc/config/network files and add them to your
 build under /files

 David Lang


 On Mon, Aug 10, 2015 at 6:18 PM, David Lang da...@lang.hm wrote:

 On Mon, 10 Aug 2015, John kerry wrote:

 Date: Mon, 10 Aug 2015 18:10:14 +0800

 From: John kerry kerry9...@gmail.com
 To: Alex Weedy weedy2...@gmail.com,
 OpenWrt Development List openwrt-devel@lists.openwrt.org
 Subject: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was: Multiple
 Wi-Fi
 client/AP interfaces on one radio)

 Firstly i configure wireless config as below:

 config wifi-device 'wifi0'
option type 'qcawifi'
option macaddr '00:01:11:00:01:00'
option hwmode '11ng'
option txpower '17'
option htmode 'HT20'
option disabled '0'
option channel '1'

 config wifi-iface
option device 'wifi0'
option mode 'ap'
option ssid 'Testing_ap'
option network 'lan'
option encryption 'psk2'
option key 'Testing_ap'

 so its SSID was showing and able to connect any device to it.

 Then i scan the device and connect to one of it. While joining the
 network
 i selected Client(WDS) then the wireless config becomes like below:


 why don't you try following the steps in the video that you posted.

 first connect as a client, then add an additional interface and make the
 second interface the AP for things to connect to.

 the order may make a difference.

 David Lang


 config wifi-device 'wifi0'

option type 'qcawifi'
option macaddr '00:01:11:00:01:00'
option hwmode '11ng'
option txpower '17'
option htmode 'HT20'
option disabled '0'
option channel '1'

 config wifi-iface
option network 'wwan'
option ssid 'D_Link_Router'
option encryption 'psk2'
option device 'wifi0'
option mode 'sta'
option key 'Dlink_Router'
option wds '1'

 Then  i added one as shown in the video. Now its connected to router
 also
 and this add one also showing so i can connect to this also.

 But i am not getting how to keep this in default wireless config.

 Because every time we cant add one to configure like this. It should be
 like default should be in ap mode so any device we can connect, if its
 connected to another router also that SSID still should be visible and
 able
 to connect to this.




 On Mon, Aug 10, 2015 at 2:57 PM, John kerry kerry9...@gmail.com wrote:

 When i try to configure based on video, its shows 2 one as client
 another

 one as Master but i am not able to enable it . I mean to say wireless
 becomes disable. If i enable it using GUI also its not happening.

 On Mon, Aug 10, 2015 at 2:55 PM, David Lang da...@lang.hm wrote:

 What happens when you try to follow the video?


 Based on your comments, i'm guessing that things don't work when you
 try
 and configure the second network and have it with a different SSID
 than
 the
 first network that you put in client mode.

 Is this correct?

 David Lang

 On Mon, 10 Aug 2015, John kerry wrote:

 Yes, When i am connecting to Another router its changed to Client
 mode.


 Can i configure this in repeater mode like its shows in below link:

 https://www.youtube.com/watch?v=3rbsh2zxPnk




 ___
 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] Fwd: 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-11 Thread John kerry
When i load firmware the wireless config will be like below:

config wifi-device 'wifi0'
option type 'qcawifi'
option macaddr '00:26:75:bd:37:24'
option hwmode '11ng'
option txpower '16'
option htmode 'HT20'
option disabled '0'
option channel '1'

config wifi-iface
option device 'wifi0'
option mode 'ap'
option ssid 'Test_ap'
option network 'lan'
option encryption 'psk2'
option key 'Test_ap'
option wds '1'

so it works as Access point, i can connect to it any devices. When i scan
it shows me list of devices then connect to anyone. then the wireless
config  will becomes like below:

config wifi-device 'wifi0'
option type 'qcawifi'
option macaddr '00:26:75:bd:37:24'
option hwmode '11ng'
option txpower '16'
option htmode 'HT20'
option disabled '0'
option channel '1'

config wifi-iface
option network 'wwan'
option ssid 'D-link-Router'
option encryption 'psk2'
option device 'wifi0'
option mode 'sta'
option key '0010069039'
option wds '1'

Then i add one more ap mode so wireless config becomes,
config wifi-device 'wifi0'
option type 'qcawifi'
option macaddr '00:26:75:bd:37:24'
option hwmode '11ng'
option txpower '16'
option htmode 'HT20'
option disabled '0'
option channel '1'

config wifi-iface
   option network 'wwan'
option ssid 'D-link-Router'
option encryption 'psk2'
option device 'wifi0'
option mode 'sta'
option key '0010069039'
option wds '1'

config wifi-iface
option device 'wifi0'
option mode 'ap'
option ssid 'Test_ap'
option network 'lan'
option encryption 'psk2'
option key 'Test_ap'
option wds '1'

This i added manually one ap mode.

So if i copy this config file, build and load this firmware, its load what
it was there so it shows one client which i was connected last time and one
AP which i added.

But now i cannot scan anymore and connect to new router instead of old
client.

This is the problem i am facing.

Basically i need to configure the wireless file for repeater mode.

So after connecting to another router this SSID still should be there and
other device can connect to it.

On Tue, Aug 11, 2015 at 4:30 PM, David Lang da...@lang.hm wrote:

 you have a working config

 but you want to do something by default

 what you want to do is different at different times.

 what is it that you want to be the default? when do you want this default
 to apply? This isn't clear.

 David Lang

 On Tue, 11 Aug 2015, John kerry wrote:

 Date: Tue, 11 Aug 2015 15:51:38 +0800
 From: John kerry kerry9...@gmail.com
 To: David Lang da...@lang.hm
 Cc: Alex Weedy weedy2...@gmail.com,
 OpenWrt Development List openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was:
 Multiple

 Wi-Fi client/AP interfaces on one radio)

 Yes,

 i can copy the config and build with this configuration,

 for example now i have connected to some router, another time we can
 connect to any router. So how i can fix the settings by default.

 On Tue, Aug 11, 2015 at 12:45 AM, David Lang da...@lang.hm wrote:

 On Mon, 10 Aug 2015, John kerry wrote:

 I followed the same steps and its working too. But this i want in
 wireless

 config file, Because i dont want every time to add using GUI. So When i
 connect to another router also, no need to add one more. I mean to say
 it
 should be in default wireless config file.


 what do you mean by default wireless config file

 Once you have set it from the GUI, it is in the config files. The next
 time you boot it will use that config.

 If you mean that you want it in the factory default config (for when you
 first flash the router or do a factory reset), then take the
 /etc/config/wireless and /etc/config/network files and add them to your
 build under /files

 David Lang


 On Mon, Aug 10, 2015 at 6:18 PM, David Lang da...@lang.hm wrote:


 On Mon, 10 Aug 2015, John kerry wrote:


 Date: Mon, 10 Aug 2015 18:10:14 +0800

 From: John kerry kerry9...@gmail.com
 To: Alex Weedy weedy2...@gmail.com,
 OpenWrt Development List openwrt-devel@lists.openwrt.org
 Subject: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was:
 Multiple
 Wi-Fi
 client/AP interfaces on one radio)

 Firstly i configure wireless config as below:

 config wifi-device 'wifi0'
option type 'qcawifi'
option macaddr '00:01:11:00:01:00'
option hwmode '11ng'
option txpower '17'
option htmode 'HT20'
option disabled '0'
option channel '1'

 config wifi-iface
option device 'wifi0'
option mode 'ap'
option ssid 'Testing_ap'
option network 'lan'
option encryption 'psk2'
option key 'Testing_ap'

 so its SSID

Re: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-11 Thread John kerry
Yes i able to config using GUI, But when i am configuring GUI i scan and
connect to one AP and then add one more AP mode to it. So finally i will
have wireless configuration.

But i cant keep this config in build option because if i load this
configuration it will load what i connected last time, so next time i cant
scan it anymore it showing the same connected to last AP.




On Wed, Aug 12, 2015 at 1:36 AM, David Lang da...@lang.hm wrote:

 I thought you said a couple posts ago that you were able to configure it
 through the GUI to work the way you wanted it to, you were just wanting to
 make something the default.

 So do you have it working or not?

 If you have it working, it should keep working after a reboot. What are
 you meaning when you say that you want to change the default?

 Are you meaning that you want to create an image that will behave this way
 when you do a factory reset (or when you first flash it)? If so, then you
 need to take your working config and make it part of your image via the
 files/ mechansim.

 If you are meaning something else, I'm still not understanding what you
 are trying to do.

 David Lang



 On Tue, 11 Aug 2015, John kerry wrote:

 Date: Tue, 11 Aug 2015 21:20:58 +0800

 From: John kerry kerry9...@gmail.com
 To: David Lang da...@lang.hm
 Cc: Alex Weedy weedy2...@gmail.com,
 OpenWrt Development List openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was:
 Multiple
 Wi-Fi client/AP interfaces on one radio)

 Hi,

 How to config wireless config file for repeater mode. I am not able to
 config.

 On Tue, Aug 11, 2015 at 5:34 PM, John kerry kerry9...@gmail.com wrote:

 When i load firmware the wireless config will be like below:

 config wifi-device 'wifi0'
 option type 'qcawifi'
 option macaddr '00:26:75:bd:37:24'
 option hwmode '11ng'
 option txpower '16'
 option htmode 'HT20'
 option disabled '0'
 option channel '1'

 config wifi-iface
 option device 'wifi0'
 option mode 'ap'
 option ssid 'Test_ap'
 option network 'lan'
 option encryption 'psk2'
 option key 'Test_ap'
 option wds '1'

 so it works as Access point, i can connect to it any devices. When i scan
 it shows me list of devices then connect to anyone. then the wireless
 config  will becomes like below:

 config wifi-device 'wifi0'
 option type 'qcawifi'
 option macaddr '00:26:75:bd:37:24'
 option hwmode '11ng'
 option txpower '16'
 option htmode 'HT20'
 option disabled '0'
 option channel '1'

 config wifi-iface
 option network 'wwan'
 option ssid 'D-link-Router'
 option encryption 'psk2'
 option device 'wifi0'
 option mode 'sta'
 option key '0010069039'
 option wds '1'

 Then i add one more ap mode so wireless config becomes,
 config wifi-device 'wifi0'
 option type 'qcawifi'
 option macaddr '00:26:75:bd:37:24'
 option hwmode '11ng'
 option txpower '16'
 option htmode 'HT20'
 option disabled '0'
 option channel '1'

 config wifi-iface
option network 'wwan'
 option ssid 'D-link-Router'
 option encryption 'psk2'
 option device 'wifi0'
 option mode 'sta'
 option key '0010069039'
 option wds '1'

 config wifi-iface
 option device 'wifi0'
 option mode 'ap'
 option ssid 'Test_ap'
 option network 'lan'
 option encryption 'psk2'
 option key 'Test_ap'
 option wds '1'

 This i added manually one ap mode.

 So if i copy this config file, build and load this firmware, its load
 what
 it was there so it shows one client which i was connected last time and
 one
 AP which i added.

 But now i cannot scan anymore and connect to new router instead of old
 client.

 This is the problem i am facing.

 Basically i need to configure the wireless file for repeater mode.

 So after connecting to another router this SSID still should be there and
 other device can connect to it.

 On Tue, Aug 11, 2015 at 4:30 PM, David Lang da...@lang.hm wrote:

 you have a working config

 but you want to do something by default

 what you want to do is different at different times.

 what is it that you want to be the default? when do you want this
 default
 to apply? This isn't clear.

 David Lang

 On Tue, 11 Aug 2015, John kerry wrote:

 Date: Tue, 11 Aug 2015 15:51:38 +0800

 From: John kerry kerry9...@gmail.com
 To: David Lang da...@lang.hm
 Cc: Alex Weedy weedy2...@gmail.com,
 OpenWrt Development List openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was:
 Multiple

 Wi-Fi client/AP interfaces on one radio)

 Yes,

 i can copy the config and build with this configuration,

 for example now i have connected to some router, another time we can
 connect

[OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-10 Thread John kerry
Firstly i configure wireless config as below:

config wifi-device 'wifi0'
option type 'qcawifi'
option macaddr '00:01:11:00:01:00'
option hwmode '11ng'
option txpower '17'
option htmode 'HT20'
option disabled '0'
option channel '1'

config wifi-iface
option device 'wifi0'
option mode 'ap'
option ssid 'Testing_ap'
option network 'lan'
option encryption 'psk2'
option key 'Testing_ap'

so its SSID was showing and able to connect any device to it.

Then i scan the device and connect to one of it. While joining the network
i selected Client(WDS) then the wireless config becomes like below:

config wifi-device 'wifi0'
option type 'qcawifi'
option macaddr '00:01:11:00:01:00'
option hwmode '11ng'
option txpower '17'
option htmode 'HT20'
option disabled '0'
option channel '1'

config wifi-iface
option network 'wwan'
option ssid 'D_Link_Router'
option encryption 'psk2'
option device 'wifi0'
option mode 'sta'
option key 'Dlink_Router'
option wds '1'

Then  i added one as shown in the video. Now its connected to router also
and this add one also showing so i can connect to this also.

But i am not getting how to keep this in default wireless config.

Because every time we cant add one to configure like this. It should be
like default should be in ap mode so any device we can connect, if its
connected to another router also that SSID still should be visible and able
to connect to this.


On Mon, Aug 10, 2015 at 2:57 PM, John kerry kerry9...@gmail.com wrote:

 When i try to configure based on video, its shows 2 one as client another
 one as Master but i am not able to enable it . I mean to say wireless
 becomes disable. If i enable it using GUI also its not happening.

 On Mon, Aug 10, 2015 at 2:55 PM, David Lang da...@lang.hm wrote:

 What happens when you try to follow the video?

 Based on your comments, i'm guessing that things don't work when you try
 and configure the second network and have it with a different SSID than the
 first network that you put in client mode.

 Is this correct?

 David Lang

 On Mon, 10 Aug 2015, John kerry wrote:

 Yes, When i am connecting to Another router its changed to Client mode.

 Can i configure this in repeater mode like its shows in below link:

 https://www.youtube.com/watch?v=3rbsh2zxPnk



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


Re: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-10 Thread John kerry
I followed the same steps and its working too. But this i want in wireless
config file, Because i dont want every time to add using GUI. So When i
connect to another router also, no need to add one more. I mean to say it
should be in default wireless config file.

On Mon, Aug 10, 2015 at 6:18 PM, David Lang da...@lang.hm wrote:

 On Mon, 10 Aug 2015, John kerry wrote:

 Date: Mon, 10 Aug 2015 18:10:14 +0800
 From: John kerry kerry9...@gmail.com
 To: Alex Weedy weedy2...@gmail.com,
 OpenWrt Development List openwrt-devel@lists.openwrt.org
 Subject: [OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was: Multiple
 Wi-Fi
 client/AP interfaces on one radio)

 Firstly i configure wireless config as below:

 config wifi-device 'wifi0'
option type 'qcawifi'
option macaddr '00:01:11:00:01:00'
option hwmode '11ng'
option txpower '17'
option htmode 'HT20'
option disabled '0'
option channel '1'

 config wifi-iface
option device 'wifi0'
option mode 'ap'
option ssid 'Testing_ap'
option network 'lan'
option encryption 'psk2'
option key 'Testing_ap'

 so its SSID was showing and able to connect any device to it.

 Then i scan the device and connect to one of it. While joining the network
 i selected Client(WDS) then the wireless config becomes like below:


 why don't you try following the steps in the video that you posted.

 first connect as a client, then add an additional interface and make the
 second interface the AP for things to connect to.

 the order may make a difference.

 David Lang


 config wifi-device 'wifi0'
option type 'qcawifi'
option macaddr '00:01:11:00:01:00'
option hwmode '11ng'
option txpower '17'
option htmode 'HT20'
option disabled '0'
option channel '1'

 config wifi-iface
option network 'wwan'
option ssid 'D_Link_Router'
option encryption 'psk2'
option device 'wifi0'
option mode 'sta'
option key 'Dlink_Router'
option wds '1'

 Then  i added one as shown in the video. Now its connected to router also
 and this add one also showing so i can connect to this also.

 But i am not getting how to keep this in default wireless config.

 Because every time we cant add one to configure like this. It should be
 like default should be in ap mode so any device we can connect, if its
 connected to another router also that SSID still should be visible and
 able
 to connect to this.




 On Mon, Aug 10, 2015 at 2:57 PM, John kerry kerry9...@gmail.com wrote:

 When i try to configure based on video, its shows 2 one as client another
 one as Master but i am not able to enable it . I mean to say wireless
 becomes disable. If i enable it using GUI also its not happening.

 On Mon, Aug 10, 2015 at 2:55 PM, David Lang da...@lang.hm wrote:

 What happens when you try to follow the video?

 Based on your comments, i'm guessing that things don't work when you try
 and configure the second network and have it with a different SSID than
 the
 first network that you put in client mode.

 Is this correct?

 David Lang

 On Mon, 10 Aug 2015, John kerry wrote:

 Yes, When i am connecting to Another router its changed to Client mode.


 Can i configure this in repeater mode like its shows in below link:

 https://www.youtube.com/watch?v=3rbsh2zxPnk




 ___
 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] 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-08 Thread John kerry
Hi,

I have to keep 2 default settings for wireless, i means to say i have to
configure default settings for 2.4GHz and 5GHz.

How i can configure wireless files. mainly i will add switch button in the
GUI to switch over 2.4GHz and 5GHz.

How i can control this in backend, how i can add file which handle this and
configure 2 separate default settings for 2.4GHz and 5GHz.

Thanks,

On Fri, Aug 7, 2015 at 1:50 PM, David Lang da...@lang.hm wrote:

 You cannot use both radios on the same channel, or even the same band.

 One radio will only work on channels 1-11 and the other will only work on
 channels 36+

 pick which band you are going to use to connect to the remote AP and which
 you are going to use to have your clients connect to it.

 David Lang


 On Fri, 7 Aug 2015, John kerry wrote:

 Hi,


 I have one and i configured as below:

 config wifi-device 'wifi0'
option type 'qcawifi'
option channel 'auto'
option macaddr '00:26:75:bd:37:24'
option hwmode '11ng'
option txpower '16'
option htmode 'HT20'

 config wifi-iface
option device 'wifi0'
option network 'lan'
option mode 'ap'
option ssid 'Test_Ap'
option encryption 'psk2'
option key 'Test_AP'


 We can configure one radio only to work like that.
 Something like below:

 config wifi-device 'radio0'

 option type 'mac80211'
 option channel '11'
 option hwmode '11g'
 option path 'platform/ar933x_wmac'
 option htmode 'HT20'
 option country 'US'
 option txpower '20'

 config wifi-iface 'ap1'
 option device 'radio0'
 option mode 'ap'
 option wds '1'
 option ssid 'my AP'
 option network 'lan'

 config wifi-iface 'mesh1'
 option device 'radio0'
 option mode 'mesh'
 option mesh_id 'my mesh'
 option network 'lan'




 On Fri, Aug 7, 2015 at 11:31 AM, Weedy weedy2...@gmail.com wrote:

 On 6 Aug 2015 23:15, John kerry kerry9...@gmail.com wrote:


 Hi,


 Could anyone please help me on this to configure the wireless in such a

 way that when we connect to wireless WAN the LAN SSID should not change.



 Thanks,


 You need 2 physical radios.



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


Re: [OpenWrt-Devel] 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-08 Thread John kerry
Hi,

Could anyone Please guide me how i can create 2 separate default settings
for 2.4GHz and 5GHz.

Thanks,

On Sat, Aug 8, 2015 at 8:26 PM, John kerry kerry9...@gmail.com wrote:

 Hi,

 I have to keep 2 default settings for wireless, i means to say i have to
 configure default settings for 2.4GHz and 5GHz.

 How i can configure wireless files. mainly i will add switch button in the
 GUI to switch over 2.4GHz and 5GHz.

 How i can control this in backend, how i can add file which handle this
 and configure 2 separate default settings for 2.4GHz and 5GHz.

 Thanks,

 On Fri, Aug 7, 2015 at 1:50 PM, David Lang da...@lang.hm wrote:

 You cannot use both radios on the same channel, or even the same band.

 One radio will only work on channels 1-11 and the other will only work on
 channels 36+

 pick which band you are going to use to connect to the remote AP and
 which you are going to use to have your clients connect to it.

 David Lang


 On Fri, 7 Aug 2015, John kerry wrote:

 Hi,


 I have one and i configured as below:

 config wifi-device 'wifi0'
option type 'qcawifi'
option channel 'auto'
option macaddr '00:26:75:bd:37:24'
option hwmode '11ng'
option txpower '16'
option htmode 'HT20'

 config wifi-iface
option device 'wifi0'
option network 'lan'
option mode 'ap'
option ssid 'Test_Ap'
option encryption 'psk2'
option key 'Test_AP'


 We can configure one radio only to work like that.
 Something like below:

 config wifi-device 'radio0'

 option type 'mac80211'
 option channel '11'
 option hwmode '11g'
 option path 'platform/ar933x_wmac'
 option htmode 'HT20'
 option country 'US'
 option txpower '20'

 config wifi-iface 'ap1'
 option device 'radio0'
 option mode 'ap'
 option wds '1'
 option ssid 'my AP'
 option network 'lan'

 config wifi-iface 'mesh1'
 option device 'radio0'
 option mode 'mesh'
 option mesh_id 'my mesh'
 option network 'lan'




 On Fri, Aug 7, 2015 at 11:31 AM, Weedy weedy2...@gmail.com wrote:

 On 6 Aug 2015 23:15, John kerry kerry9...@gmail.com wrote:


 Hi,


 Could anyone please help me on this to configure the wireless in such a

 way that when we connect to wireless WAN the LAN SSID should not change.



 Thanks,


 You need 2 physical radios.




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


Re: [OpenWrt-Devel] 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-08 Thread John kerry
Hi,

Basically i will add one switch in GUI to select either 2.4GHz or 5GHz.

So if i select 2.4GHz the settings should be like below,

*config wifi-device 'wifi0'*













* option type 'qcawifi' option channel 'auto'
option macaddr '00:03:7f:42:06:61' option hwmode '11ng'
option txpower '19' option htmode 'HT20' config wifi-iface
option device 'wifi0' option network 'lan' option mode 'ap'
option encryption 'psk2' option ssid 'Test_ap_1'
option key 'Test_ap_1'*

so if i do factory reset it settings.

When i select 5GHz the config load with 5GHz as below:

*config wifi-device 'wifi0'*













* option type 'qcawifi' option channel 'auto'
option macaddr '00:03:7f:42:06:61' option hwmode '11na'
option txpower '23' option htmode 'HT20' config wifi-iface
option device 'wifi0' option network 'lan' option mode 'ap'
option encryption 'psk2' option ssid 'Test_ap_1'
option key 'Test_ap_1'*


*So basically how i can condition in wireless config file to load the
config based on the selection.*


*Can i write condition in wireless config file.*



*Thanks,*


On Sun, Aug 9, 2015 at 7:02 AM, David Lang da...@lang.hm wrote:

 On Sat, 8 Aug 2015, John kerry wrote:

 Hi,

 I have to keep 2 default settings for wireless, i means to say i have to
 configure default settings for 2.4GHz and 5GHz.

 How i can configure wireless files. mainly i will add switch button in the
 GUI to switch over 2.4GHz and 5GHz.

 How i can control this in backend, how i can add file which handle this
 and
 configure 2 separate default settings for 2.4GHz and 5GHz.


 It's not clear what you are asking to do. Please explain in more detail.

 David Lang


 Thanks,

 On Fri, Aug 7, 2015 at 1:50 PM, David Lang da...@lang.hm wrote:

 You cannot use both radios on the same channel, or even the same band.

 One radio will only work on channels 1-11 and the other will only work on
 channels 36+

 pick which band you are going to use to connect to the remote AP and
 which
 you are going to use to have your clients connect to it.

 David Lang


 On Fri, 7 Aug 2015, John kerry wrote:

 Hi,



 I have one and i configured as below:

 config wifi-device 'wifi0'
option type 'qcawifi'
option channel 'auto'
option macaddr '00:26:75:bd:37:24'
option hwmode '11ng'
option txpower '16'
option htmode 'HT20'

 config wifi-iface
option device 'wifi0'
option network 'lan'
option mode 'ap'
option ssid 'Test_Ap'
option encryption 'psk2'
option key 'Test_AP'


 We can configure one radio only to work like that.
 Something like below:

 config wifi-device 'radio0'

 option type 'mac80211'

 option channel '11'
 option hwmode '11g'
 option path 'platform/ar933x_wmac'
 option htmode 'HT20'
 option country 'US'
 option txpower '20'

 config wifi-iface 'ap1'
 option device 'radio0'
 option mode 'ap'
 option wds '1'
 option ssid 'my AP'
 option network 'lan'

 config wifi-iface 'mesh1'
 option device 'radio0'
 option mode 'mesh'
 option mesh_id 'my mesh'
 option network 'lan'




 On Fri, Aug 7, 2015 at 11:31 AM, Weedy weedy2...@gmail.com wrote:

 On 6 Aug 2015 23:15, John kerry kerry9...@gmail.com wrote:



 Hi,


 Could anyone please help me on this to configure the wireless in such
 a

 way that when we connect to wireless WAN the LAN SSID should not
 change.



 Thanks,


 You need 2 physical radios.





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


Re: [OpenWrt-Devel] 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-06 Thread John kerry
Hi,

I have configured wireless file as below:

config wifi-device 'wifi0'
option type 'qcawifi'
option channel 'auto'
option macaddr '00:26:75:bd:37:24'
option hwmode '11ng'
option txpower '16'
option htmode 'HT20'

config wifi-iface
option device 'wifi0'
option network 'lan'
option mode 'ap'
option ssid 'Test_AP'
option encryption 'psk2'
option key 'Test_AP'

config wifi-iface 'mesh1'
option device 'wifi0'
option mode 'mesh'
option mesh_id 'my mesh'
option network 'lan'

[image: Inline image 1]

[image: Inline image 4]

Its created one more but still facing same problem.

Could anyone guide how i can do that.

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


Re: [OpenWrt-Devel] 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-06 Thread John kerry
Hi,


I have one and i configured as below:

config wifi-device 'wifi0'
option type 'qcawifi'
option channel 'auto'
option macaddr '00:26:75:bd:37:24'
option hwmode '11ng'
option txpower '16'
option htmode 'HT20'

config wifi-iface
option device 'wifi0'
option network 'lan'
option mode 'ap'
option ssid 'Test_Ap'
option encryption 'psk2'
option key 'Test_AP'


We can configure one radio only to work like that.
Something like below:

config wifi-device 'radio0'
 option type 'mac80211'
 option channel '11'
 option hwmode '11g'
 option path 'platform/ar933x_wmac'
 option htmode 'HT20'
 option country 'US'
 option txpower '20'

 config wifi-iface 'ap1'
 option device 'radio0'
 option mode 'ap'
 option wds '1'
 option ssid 'my AP'
 option network 'lan'

 config wifi-iface 'mesh1'
 option device 'radio0'
 option mode 'mesh'
 option mesh_id 'my mesh'
 option network 'lan'



On Fri, Aug 7, 2015 at 11:31 AM, Weedy weedy2...@gmail.com wrote:

 On 6 Aug 2015 23:15, John kerry kerry9...@gmail.com wrote:
 
  Hi,
 
 
  Could anyone please help me on this to configure the wireless in such a
 way that when we connect to wireless WAN the LAN SSID should not change.
 
 
  Thanks,

 You need 2 physical radios.

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


Re: [OpenWrt-Devel] 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-06 Thread John kerry
Hi,


Could anyone please help me on this to configure the wireless in such a way
that when we connect to wireless WAN the LAN SSID should not change.


Thanks,


On Thu, Aug 6, 2015 at 9:24 PM, John kerry kerry9...@gmail.com wrote:

 Hi,

 I have configured wireless as below:















 *config wifi-device 'wifi0'option type 'qcawifi'option
 channel 'auto'option macaddr '00:03:7f:42:06:61'option
 hwmode '11ng'option txpower '19'option htmode 'HT20'config
 wifi-ifaceoption device 'wifi0'option network 'lan'
 option mode 'ap'option encryption 'psk2'option ssid
 'Test_ap_1'option key **'Test_ap_1'*



 *It works fine with WPA2 key but when i try to connect another router this
 will become as client and SSID will change to that router SSID as i
 mentioned before also.*


 *As i understand we can create one more to avoid this problem as explained
 in previous mail.*

 *Basically i need that when i connect to wireless WAN, the LAN SSID should
 not change. I am using AR9344. Can i use below script for my requirement.*

 config wifi-device 'radio0'
  option type 'mac80211'
  option channel '11'
  option hwmode '11g'
  option path 'platform/ar933x_wmac'
  option htmode 'HT20'
  option country 'US'
  option txpower '20'
 
  config wifi-iface 'ap1'
  option device 'radio0'
  option mode 'ap'
  option wds '1'
  option ssid 'my AP'
  option network 'lan'
 
  config wifi-iface 'mesh1'
  option device 'radio0'
  option mode 'mesh'
  option mesh_id 'my mesh'
  option network 'lan'


 Thanks  Regards,

 On Wed, Aug 5, 2015 at 7:00 AM, Roman Yeryomin leroi.li...@gmail.com
 wrote:

 On 4 August 2015 at 23:24, Joshua Judson Rosen jro...@harvestai.com
 wrote:
  On 2015-08-04 14:14, Roman Yeryomin wrote:
  On 4 August 2015 at 17:58, Joshua Judson Rosen jro...@harvestai.com
 wrote:
  On 2015-08-04 02:26, David Lang wrote:
  A given radio can be either an AP or a client, but not both at once.
 
  so if you use a radio to connect to another AP, you are making it a
 client, and
  in client mode all it can do is connect to that other AP as shows up
 as the SSID
  of that other AP.
 
  you can do this with one radio, while using the other radio
 (assuming you have
  two) to act as an AP for local clients.
 
 
  This is not necessarily true: with at least some hardware/drivers,
 it's
  possible to create multiple virtual interfaces on top of a single
 radio--
  and separate virtual interfaces can in fact operate in different modes
  (e.g.: one in STA mode, two in AP mode, one in mesh mode...).
 
  Assuming that your hardware/driver is capable of supporting multiple
  virtual interfaces on top of the single physical radio,
  you can create these interfaces by adding wifi-iface stanzas
  in /etc/config/wireless, e.g:
 
  config wifi-device 'radio0'
  option type 'mac80211'
  option channel '11'
  option hwmode '11g'
  option path 'platform/ar933x_wmac'
  option htmode 'HT20'
  option country 'US'
  option txpower '20'
 
  config wifi-iface 'ap1'
  option device 'radio0'
  option mode 'ap'
  option wds '1'
  option ssid 'my AP'
  option network 'lan'
 
  config wifi-iface 'mesh1'
  option device 'radio0'
  option mode 'mesh'
  option mesh_id 'my mesh'
  option network 'lan'
 
 
  That creates two virtual interfaces using the same physical radio,
  and bridges them together onto the OpenWrt lan network
  (which is itself defined in /etc/config/network).
 
 
  I believe you could also have an interface with mode 'sta', but note
  that it would also need to use the same channel as the other
 interfaces--
  which means that the external AP to which you connect it would also
  need to use that same channel (11, in the example above).
  That's where having multiple *radios* helps: you can run them on
  different frequencies (either completely different bands [2.4 GHz vs.
 5 GHz],
  or on different channels within the same band [e.g. 2.427 GHz =
 channel 4
  vs. 2.472 GHz = channel 13]) to increase efficiency by multiplexing
  less data over a single radio, or to increase compatibility with other
  APs outside of your control that you might want to connect to.
 
  Also note that, if you want to bridge a STA interface onto anything
 else,
  it'll need to be in WDS mode _and_ the the AP to which it's
 connecting
  will also need to be in WDS mode (note the option wds '1',
  in my example above), because

[OpenWrt-Devel] Fwd: 3-address Wi-Fi bridging (was: Multiple Wi-Fi client/AP interfaces on one radio)

2015-08-06 Thread John kerry
Hi,

I have configured wireless as below:















*config wifi-device 'wifi0'option type 'qcawifi'option
channel 'auto'option macaddr '00:03:7f:42:06:61'option
hwmode '11ng'option txpower '19'option htmode 'HT20'config
wifi-ifaceoption device 'wifi0'option network 'lan'
option mode 'ap'option encryption 'psk2'option ssid
'Test_ap_1'option key **'Test_ap_1'*



*It works fine with WPA2 key but when i try to connect another router this
will become as client and SSID will change to that router SSID as i
mentioned before also.*


*As i understand we can create one more to avoid this problem as explained
in previous mail.*

*Basically i need that when i connect to wireless WAN, the LAN SSID should
not change. I am using AR9344. Can i use below script for my requirement.*

config wifi-device 'radio0'
 option type 'mac80211'
 option channel '11'
 option hwmode '11g'
 option path 'platform/ar933x_wmac'
 option htmode 'HT20'
 option country 'US'
 option txpower '20'

 config wifi-iface 'ap1'
 option device 'radio0'
 option mode 'ap'
 option wds '1'
 option ssid 'my AP'
 option network 'lan'

 config wifi-iface 'mesh1'
 option device 'radio0'
 option mode 'mesh'
 option mesh_id 'my mesh'
 option network 'lan'


Thanks  Regards,

On Wed, Aug 5, 2015 at 7:00 AM, Roman Yeryomin leroi.li...@gmail.com
wrote:

 On 4 August 2015 at 23:24, Joshua Judson Rosen jro...@harvestai.com
 wrote:
  On 2015-08-04 14:14, Roman Yeryomin wrote:
  On 4 August 2015 at 17:58, Joshua Judson Rosen jro...@harvestai.com
 wrote:
  On 2015-08-04 02:26, David Lang wrote:
  A given radio can be either an AP or a client, but not both at once.
 
  so if you use a radio to connect to another AP, you are making it a
 client, and
  in client mode all it can do is connect to that other AP as shows up
 as the SSID
  of that other AP.
 
  you can do this with one radio, while using the other radio (assuming
 you have
  two) to act as an AP for local clients.
 
 
  This is not necessarily true: with at least some hardware/drivers, it's
  possible to create multiple virtual interfaces on top of a single
 radio--
  and separate virtual interfaces can in fact operate in different modes
  (e.g.: one in STA mode, two in AP mode, one in mesh mode...).
 
  Assuming that your hardware/driver is capable of supporting multiple
  virtual interfaces on top of the single physical radio,
  you can create these interfaces by adding wifi-iface stanzas
  in /etc/config/wireless, e.g:
 
  config wifi-device 'radio0'
  option type 'mac80211'
  option channel '11'
  option hwmode '11g'
  option path 'platform/ar933x_wmac'
  option htmode 'HT20'
  option country 'US'
  option txpower '20'
 
  config wifi-iface 'ap1'
  option device 'radio0'
  option mode 'ap'
  option wds '1'
  option ssid 'my AP'
  option network 'lan'
 
  config wifi-iface 'mesh1'
  option device 'radio0'
  option mode 'mesh'
  option mesh_id 'my mesh'
  option network 'lan'
 
 
  That creates two virtual interfaces using the same physical radio,
  and bridges them together onto the OpenWrt lan network
  (which is itself defined in /etc/config/network).
 
 
  I believe you could also have an interface with mode 'sta', but note
  that it would also need to use the same channel as the other
 interfaces--
  which means that the external AP to which you connect it would also
  need to use that same channel (11, in the example above).
  That's where having multiple *radios* helps: you can run them on
  different frequencies (either completely different bands [2.4 GHz vs.
 5 GHz],
  or on different channels within the same band [e.g. 2.427 GHz =
 channel 4
  vs. 2.472 GHz = channel 13]) to increase efficiency by multiplexing
  less data over a single radio, or to increase compatibility with other
  APs outside of your control that you might want to connect to.
 
  Also note that, if you want to bridge a STA interface onto anything
 else,
  it'll need to be in WDS mode _and_ the the AP to which it's
 connecting
  will also need to be in WDS mode (note the option wds '1',
  in my example above), because the standard 3-address mode of Wi-Fi
  isn't bridgeable (and note that WDS 4-address mode is bridgeable,
  but not standardised across different platforms--so you're probably
  OK so long as all of your equipment is running Linux and using
  the same Wi-Fi driver, but don't expect 

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-04 Thread John kerry
Hi,

Yes i configured the mode as AP. could you please guide how i can add
script for another radio.

presently my wireless script is as below:















*config wifi-device 'wifi0'option type 'qcawifi'option
channel 'auto'option macaddr '00:03:7f:42:06:61'option
hwmode '11ng'option txpower '19'option htmode 'HT20'config
wifi-ifaceoption device 'wifi0'option network 'lan'
option mode 'ap'option encryption 'psk2'option ssid
'Test_ap_1'option key **'Test_ap_1'*

















*config wifi-device 'wifi1'option type 'qcawifi'option
channel 'auto'option macaddr '00:03:7f:42:06:62'option
hwmode '11na'option txpower '23'option htmode 'HT20'config
wifi-ifaceoption device 'wifi1'option network 'lan'
option mode 'ap'option ssid 'Test_ap_2'option encryption
'psk2'option key 'test_ap_2'*


*How i can change this to make it work.*


*Thanks,*

On Tue, Aug 4, 2015 at 2:26 PM, David Lang da...@lang.hm wrote:

 A given radio can be either an AP or a client, but not both at once.

 so if you use a radio to connect to another AP, you are making it a
 client, and in client mode all it can do is connect to that other AP as
 shows up as the SSID of that other AP.

 you can do this with one radio, while using the other radio (assuming you
 have two) to act as an AP for local clients.

 David Lang

  On Tue, 4 Aug 2015, John kerry wrote:

 Hi,

 Its working, i am able to access internet but there is one problem,

 When i scan the wireless devices, its gives the list of devices are there
 nearby, then i connect anyone device, it will connect but my board wifi0
 SSID name will change to that router which i connected. I mean LAN side
 SSID should not change after connecting to WAN SSID.



 On Tue, Aug 4, 2015 at 12:42 PM, John kerry kerry9...@gmail.com wrote:

 Hi
 This is my firewall file:

 config defaults
 option syn_flood '1'
 option input 'ACCEPT'
 option output 'ACCEPT'
 option forward 'REJECT'

 config zone
 option name 'lan'
 option network 'lan'
 option input 'ACCEPT'
 option output 'ACCEPT'
 option forward 'REJECT'

 config zone
 option name 'wan'
 option network 'wan'
 option input 'REJECT'
 option output 'ACCEPT'
 option forward 'REJECT'
 option masq '1'
 option mtu_fix '1'

 config forwarding
 option src 'lan'
 option dest 'wan'

 config rule
 option name 'Allow-DHCP-Renew'
 option src 'wan'
 option proto 'udp'
 option dest_port '68'
 option target 'ACCEPT'
 option family 'ipv4'

 config rule
 option name 'Allow-Ping'
 option src 'wan'
 option proto 'icmp'
 option icmp_type 'echo-request'
 option family 'ipv4'
 option target 'ACCEPT'

 config rule
 option name 'Allow-DHCPv6'
 option src 'wan'
 option proto 'udp'
 option src_ip 'fe80::/10'
 option src_port '547'
 option dest_ip 'fe80::/10'
 option dest_port '546'
 option family 'ipv6'
 option target 'ACCEPT'

 config rule
 option name 'Allow-ICMPv6-Input'
 option src 'wan'
 option proto 'icmp'
 list icmp_type 'echo-request'
 list icmp_type 'echo-reply'
 list icmp_type 'destination-unreachable'
 list icmp_type 'packet-too-big'
 list icmp_type 'time-exceeded'
 list icmp_type 'bad-header'
 list icmp_type 'unknown-header-type'
 list icmp_type 'router-solicitation'
 list icmp_type 'neighbour-solicitation'
 list icmp_type 'router-advertisement'
 list icmp_type 'neighbour-advertisement'
 option limit '1000/sec'
 option family 'ipv6'
 option target 'ACCEPT'

 config rule
 option name 'Allow-ICMPv6-Forward'
 option src 'wan'
 option dest '*'
 option proto 'icmp'
 list icmp_type 'echo-request'
 list icmp_type 'echo-reply'
 list icmp_type 'destination-unreachable'
 list icmp_type 'packet-too-big'
 list icmp_type 'time-exceeded'
 list icmp_type 'bad-header'
 list icmp_type 'unknown-header-type'
 option limit '1000/sec'
 option family 'ipv6'
 option target 'ACCEPT'

 config include
 option path '/etc/firewall.user'

 config include 'miniupnpd'
 option type 'script'
 option path '/usr/share/miniupnpd/firewall.include'
 option family 'IPv4'
 option reload '1'

 On Tue, Aug 4, 2015 at 12:38 PM, Weedy weedy2...@gmail.com wrote:

 Is there something wrong with the default rules for your use case?

 Your WiFi interfaces are tagged LAN, things should just work.
 On 4 Aug 2015 00:07, John kerry kerry9...@gmail.com wrote

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread John kerry
Hi
This is my firewall file:

config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'

config zone
option name 'lan'
option network 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'

config zone
option name 'wan'
option network 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'

config forwarding
option src 'lan'
option dest 'wan'

config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'

config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'

config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option src_ip 'fe80::/10'
option src_port '547'
option dest_ip 'fe80::/10'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'

config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'

config include
option path '/etc/firewall.user'

config include 'miniupnpd'
option type 'script'
option path '/usr/share/miniupnpd/firewall.include'
option family 'IPv4'
option reload '1'

On Tue, Aug 4, 2015 at 12:38 PM, Weedy weedy2...@gmail.com wrote:

 Is there something wrong with the default rules for your use case?

 Your WiFi interfaces are tagged LAN, things should just work.
 On 4 Aug 2015 00:07, John kerry kerry9...@gmail.com wrote:

 Hi,

 below is the /etc/config/network and /etc/config/wireless changes.

 */etc/config/network:*
 config interface 'loopback'
 option ifname 'lo'
 option proto 'static'
 option ipaddr '127.0.0.1'
 option netmask '255.0.0.0'

 config interface 'lan'
 option ifname 'eth0.1 eth1'
 option type 'bridge'
 option proto 'static'
 option ipaddr '192.168.1.5'
 option netmask '255.255.255.0'

 config interface 'wan'
 option ifname 'eth0.2'
 option proto 'dhcp'

 config switch
 option name 'eth0'
 option reset '1'
 option enable_vlan '1'

 config switch_vlan
 option device 'eth0'
 option vlan '1'
 option ports '0t 2 3 4 5'

 config switch_vlan
 option device 'eth0'
 option vlan '2'
 option ports '0t 1'

 config switch
 option name 'eth1'
 option reset '1'
 option enable_vlan '1'

 config switch_vlan
 option device 'eth1'
 option vlan '1'
 option ports '0 1 2 3 4 5'



















 */etc/config/wireless:config wifi-device 'wifi0'option type
 'qcawifi'option channel 'auto'option macaddr
 '00:03:7f:42:06:61'option hwmode '11ng'option txpower
 '19'option htmode 'HT20'config wifi-ifaceoption device
 'wifi0'option network 'lan'option mode 'ap'option
 encryption 'psk2'option ssid 'Test_ap_1'option key *
 *'Test_ap_1'*

















 *config wifi-device 'wifi1'option type 'qcawifi'option
 channel 'auto'option macaddr '00:03:7f:42:06:62'option
 hwmode '11na'option txpower '23'option htmode 'HT20'config
 wifi-ifaceoption device 'wifi1'option network 'lan'
 option mode 'ap'option ssid 'Test_ap_2'option encryption
 'psk2'option key 'test_ap_2''*


 *Thanks,*

 On Tue, Aug 4, 2015 at 11:56 AM, David Lang da...@lang.hm wrote:

 can

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread John kerry
Hi,

I am using ar71xx OpenWrt. I have connected internet connection to WAN port
and my PC to LAN. I have enabled the WiFi0. The LAN port static IP i am
able to open GUI and even my mobile i connected to Wifi AP and able to open
GUI in mobile. But I am not able to access internet on mobile which is
connected to wifi0 AP.

I have added below script under /etc/firewall.user file.
iptables ...flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables -A FORWARD -j ACCEPT -i br-lan -o eth0.2 -m state --state NEW
iptables -A FORWARD -m state --state ESTABLISHED,RELATED  -j ACCEPT
iptables -A POSTROUTING -t nat -o eth0.2 -j MASQUERADE
echo 1   /proc/sys/net/ipv4/ip_forward

#where br-lan = LAN
   eth0.2 = WAN

Could anyone help me to write the proper NAT rules so that able to access
the internet.

Thanks,

On Mon, Aug 3, 2015 at 11:29 AM, John kerry kerry9...@gmail.com wrote:

 Hello Guys,

 It's working. Thanks a lot to all of you :)

 On Mon, Aug 3, 2015 at 10:43 AM, David Lang da...@lang.hm wrote:

 The way to do this is to first forget about the factory reset problem and
 configure the AP to do what you want (including any encryption)

 then you can take the resulting file and put it into the build system so
 that it becomes the 'factory default' settings.

 Since you are not understanding how to configure the files from the
 documentation, configure them from the GUI and then look at the resulting
 files.

 David Lang


 On Mon, 3 Aug 2015, John kerry wrote:

 Hi All,

 I created separate files directory and added network and wireless files
 and
 its working everything but still i am not able to use encryption wpa2.
 Below is the my script.
 config wifi-device  wifi0
option type qcawifi
option channel  auto
option macaddr  00:03:7f:42:06:61
option hwmode   11ng
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0

 config wifi-iface
option device   wifi0
option network  lan
option mode ap
option ssid CD-1
option encryption psk2
option key  CD-1

 M I doing anything wrong?

 Thanks,

 On Mon, Aug 3, 2015 at 6:40 AM, David Lang da...@lang.hm wrote:

 to make the config be there after a factory reset, you need to put the
 changes into the image that you build.

 you already did this for /etc/config/network, do the same thing for
 /etc/config/wireless

 David Lang


 On Sun, 2 Aug 2015, John kerry wrote:

 Hi Leiten,


 I have one issue, after upgrading this firmware it will load wireless
 configuration with this changes, actually it should load when i do
 factory
 reset.

 Thanks,

 On Sun, Aug 2, 2015 at 3:45 PM, John kerry kerry9...@gmail.com
 wrote:

 Hi Leiten,


 Thank you so much, Its working :)

 On Sun, Aug 2, 2015 at 3:12 PM, N.Leiten nicklei...@gmail.com
 wrote:

 Hi,


 Don't answer to my e-mail only, you need to add openwrt-devel
 maillist
 to
 CC or just answer to CC, in each case I'll receive message but also
 everyone could see all discussion.

 In email dated Воскресенье - 02 августа 2015 12:54:32 user John kerry
 wrote:

 Hi Leiten,

 I have added new files under and written below :
 vi target/linux/ar71xx/base-files/etc/uci-defaults/wireless


 Use index in prefix of filename to set order of execution, so it'll
 be
 like '99-wireless'.


 #!/bin/sh
 #
 # Copyright (c) 2013 The Linux Foundation. All rights reserved.
 # Copyright (C) 2011 OpenWrt.org
 #

 [ -e /etc/config/wireless ]  exit 0


 Here is the problem. When uci-defaults invoke scripts there's already
 preconfiguration done and /etc/config/wireless already exists, so
 your
 script just exit at this point. Remove this line.


 touch /etc/config/wireless

 uci set wireless.@wifi-device[0].disabled=0;
 uci set system.@system[0].hostname=test_ap
 uci set wireless.@wifi-iface[0].mode=ap
 uci set wireless.@wifi-iface[0].ssid=CD-2.4D
 uci set wireless.@wifi-iface[0].encryption=none
 uci set wireless.@wifi-iface[0].wds=1
 uci set wireless.radio0.disabled=0

 uci commit wireless

 exit 0

 and compile the source code using make V=s but still not changed
 default
 settings.

 Please help me to make it works.

 Thanks,


 On Sat, Aug 1, 2015 at 4:38 PM, N.Leiten nicklei...@gmail.com
 wrote:

 You can also use uci-defaults mechanism for your purpose. Just put

 script in base-files/etc/uci-defaults and set your preferrable
 parameters with uci and don't forget to 'exit 0' at the end of
 script,
 in elsecase it'll be run every time at boot ruining changes.

 2015-07-31 12:08 GMT+03:00 John kerry kerry9...@gmail.com:

 Hi,

 I am working on Ar71xx openWRT Luci project. By default the Wi-Fi
 is
 disabled and SSID is OpenWrt. I need to change the default
 settings.
 Could anyone help me to change the default settings.


 Best Regards,
 John

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

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread John kerry
Hi,

below is the /etc/config/network and /etc/config/wireless changes.

*/etc/config/network:*
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config interface 'lan'
option ifname 'eth0.1 eth1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.5'
option netmask '255.255.255.0'

config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'

config switch
option name 'eth0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'eth0'
option vlan '1'
option ports '0t 2 3 4 5'

config switch_vlan
option device 'eth0'
option vlan '2'
option ports '0t 1'

config switch
option name 'eth1'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'eth1'
option vlan '1'
option ports '0 1 2 3 4 5'



















*/etc/config/wireless:config wifi-device 'wifi0'option type
'qcawifi'option channel 'auto'option macaddr
'00:03:7f:42:06:61'option hwmode '11ng'option txpower
'19'option htmode 'HT20'config wifi-ifaceoption device
'wifi0'option network 'lan'option mode 'ap'option
encryption 'psk2'option ssid 'Test_ap_1'option key *
*'Test_ap_1'*

















*config wifi-device 'wifi1'option type 'qcawifi'option
channel 'auto'option macaddr '00:03:7f:42:06:62'option
hwmode '11na'option txpower '23'option htmode 'HT20'config
wifi-ifaceoption device 'wifi1'option network 'lan'
option mode 'ap'option ssid 'Test_ap_2'option encryption
'psk2'option key 'test_ap_2''*


*Thanks,*

On Tue, Aug 4, 2015 at 11:56 AM, David Lang da...@lang.hm wrote:

 can you connect via a wired port?

 given that you've been changing /etc/config/network and
 /etc/config/wireless, could you show us what you ended up with there?

 David Lang


 On Tue, 4 Aug 2015, John kerry wrote:

 Hi,

 I am using ar71xx OpenWrt. I have connected internet connection to WAN
 port
 and my PC to LAN. I have enabled the WiFi0. The LAN port static IP i am
 able to open GUI and even my mobile i connected to Wifi AP and able to
 open
 GUI in mobile. But I am not able to access internet on mobile which is
 connected to wifi0 AP.

 I have added below script under /etc/firewall.user file.
 iptables ...flush
 iptables --table nat --flush
 iptables --delete-chain
 iptables --table nat --delete-chain
 iptables -A FORWARD -j ACCEPT -i br-lan -o eth0.2 -m state --state NEW
 iptables -A FORWARD -m state --state ESTABLISHED,RELATED  -j ACCEPT
 iptables -A POSTROUTING -t nat -o eth0.2 -j MASQUERADE
 echo 1   /proc/sys/net/ipv4/ip_forward

 #where br-lan = LAN
   eth0.2 = WAN

 Could anyone help me to write the proper NAT rules so that able to access
 the internet.

 Thanks,

 On Mon, Aug 3, 2015 at 11:29 AM, John kerry kerry9...@gmail.com wrote:

 Hello Guys,

 It's working. Thanks a lot to all of you :)

 On Mon, Aug 3, 2015 at 10:43 AM, David Lang da...@lang.hm wrote:

 The way to do this is to first forget about the factory reset problem and
 configure the AP to do what you want (including any encryption)

 then you can take the resulting file and put it into the build system so
 that it becomes the 'factory default' settings.

 Since you are not understanding how to configure the files from the
 documentation, configure them from the GUI and then look at the
 resulting
 files.

 David Lang


 On Mon, 3 Aug 2015, John kerry wrote:

 Hi All,


 I created separate files directory and added network and wireless files
 and
 its working everything but still i am not able to use encryption wpa2.
 Below is the my script.
 config wifi-device  wifi0
option type qcawifi
option channel  auto
option macaddr  00:03:7f:42:06:61
option hwmode   11ng
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0

 config wifi-iface
option device   wifi0
option network  lan
option mode ap
option ssid CD-1
option encryption psk2
option key  CD-1

 M I doing anything wrong?

 Thanks,

 On Mon, Aug 3, 2015 at 6:40 AM, David Lang da...@lang.hm wrote:

 to make the config be there after a factory reset, you need to put the

 changes into the image that you build.

 you already did this for /etc/config/network, do the same thing for
 /etc/config/wireless

 David Lang


 On Sun, 2 Aug 2015, John kerry wrote:

 Hi Leiten,


 I have one issue, after upgrading this firmware it will load wireless
 configuration with this changes, actually it should load when i do
 factory
 reset.

 Thanks,

 On Sun, Aug 2, 2015 at 3:45 PM, John kerry kerry9...@gmail.com
 wrote:

 Hi Leiten

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-03 Thread John kerry
Hi,

Its working, i am able to access internet but there is one problem,

When i scan the wireless devices, its gives the list of devices are there
nearby, then i connect anyone device, it will connect but my board wifi0
SSID name will change to that router which i connected. I mean LAN side
SSID should not change after connecting to WAN SSID.



On Tue, Aug 4, 2015 at 12:42 PM, John kerry kerry9...@gmail.com wrote:

 Hi
 This is my firewall file:

 config defaults
 option syn_flood '1'
 option input 'ACCEPT'
 option output 'ACCEPT'
 option forward 'REJECT'

 config zone
 option name 'lan'
 option network 'lan'
 option input 'ACCEPT'
 option output 'ACCEPT'
 option forward 'REJECT'

 config zone
 option name 'wan'
 option network 'wan'
 option input 'REJECT'
 option output 'ACCEPT'
 option forward 'REJECT'
 option masq '1'
 option mtu_fix '1'

 config forwarding
 option src 'lan'
 option dest 'wan'

 config rule
 option name 'Allow-DHCP-Renew'
 option src 'wan'
 option proto 'udp'
 option dest_port '68'
 option target 'ACCEPT'
 option family 'ipv4'

 config rule
 option name 'Allow-Ping'
 option src 'wan'
 option proto 'icmp'
 option icmp_type 'echo-request'
 option family 'ipv4'
 option target 'ACCEPT'

 config rule
 option name 'Allow-DHCPv6'
 option src 'wan'
 option proto 'udp'
 option src_ip 'fe80::/10'
 option src_port '547'
 option dest_ip 'fe80::/10'
 option dest_port '546'
 option family 'ipv6'
 option target 'ACCEPT'

 config rule
 option name 'Allow-ICMPv6-Input'
 option src 'wan'
 option proto 'icmp'
 list icmp_type 'echo-request'
 list icmp_type 'echo-reply'
 list icmp_type 'destination-unreachable'
 list icmp_type 'packet-too-big'
 list icmp_type 'time-exceeded'
 list icmp_type 'bad-header'
 list icmp_type 'unknown-header-type'
 list icmp_type 'router-solicitation'
 list icmp_type 'neighbour-solicitation'
 list icmp_type 'router-advertisement'
 list icmp_type 'neighbour-advertisement'
 option limit '1000/sec'
 option family 'ipv6'
 option target 'ACCEPT'

 config rule
 option name 'Allow-ICMPv6-Forward'
 option src 'wan'
 option dest '*'
 option proto 'icmp'
 list icmp_type 'echo-request'
 list icmp_type 'echo-reply'
 list icmp_type 'destination-unreachable'
 list icmp_type 'packet-too-big'
 list icmp_type 'time-exceeded'
 list icmp_type 'bad-header'
 list icmp_type 'unknown-header-type'
 option limit '1000/sec'
 option family 'ipv6'
 option target 'ACCEPT'

 config include
 option path '/etc/firewall.user'

 config include 'miniupnpd'
 option type 'script'
 option path '/usr/share/miniupnpd/firewall.include'
 option family 'IPv4'
 option reload '1'

 On Tue, Aug 4, 2015 at 12:38 PM, Weedy weedy2...@gmail.com wrote:

 Is there something wrong with the default rules for your use case?

 Your WiFi interfaces are tagged LAN, things should just work.
 On 4 Aug 2015 00:07, John kerry kerry9...@gmail.com wrote:

 Hi,

 below is the /etc/config/network and /etc/config/wireless changes.

 */etc/config/network:*
 config interface 'loopback'
 option ifname 'lo'
 option proto 'static'
 option ipaddr '127.0.0.1'
 option netmask '255.0.0.0'

 config interface 'lan'
 option ifname 'eth0.1 eth1'
 option type 'bridge'
 option proto 'static'
 option ipaddr '192.168.1.5'
 option netmask '255.255.255.0'

 config interface 'wan'
 option ifname 'eth0.2'
 option proto 'dhcp'

 config switch
 option name 'eth0'
 option reset '1'
 option enable_vlan '1'

 config switch_vlan
 option device 'eth0'
 option vlan '1'
 option ports '0t 2 3 4 5'

 config switch_vlan
 option device 'eth0'
 option vlan '2'
 option ports '0t 1'

 config switch
 option name 'eth1'
 option reset '1'
 option enable_vlan '1'

 config switch_vlan
 option device 'eth1'
 option vlan '1'
 option ports '0 1 2 3 4 5'



















 */etc/config/wireless:config wifi-device 'wifi0'option type
 'qcawifi'option channel 'auto'option macaddr
 '00:03:7f:42:06:61'option hwmode '11ng'option txpower
 '19'option htmode 'HT20'config wifi-ifaceoption device
 'wifi0'option network 'lan'option mode 'ap'option
 encryption 'psk2'option ssid 'Test_ap_1'option key *
 *'Test_ap_1

Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-02 Thread John kerry
Hello Guys,

It's working. Thanks a lot to all of you :)

On Mon, Aug 3, 2015 at 10:43 AM, David Lang da...@lang.hm wrote:

 The way to do this is to first forget about the factory reset problem and
 configure the AP to do what you want (including any encryption)

 then you can take the resulting file and put it into the build system so
 that it becomes the 'factory default' settings.

 Since you are not understanding how to configure the files from the
 documentation, configure them from the GUI and then look at the resulting
 files.

 David Lang


 On Mon, 3 Aug 2015, John kerry wrote:

 Hi All,

 I created separate files directory and added network and wireless files
 and
 its working everything but still i am not able to use encryption wpa2.
 Below is the my script.
 config wifi-device  wifi0
option type qcawifi
option channel  auto
option macaddr  00:03:7f:42:06:61
option hwmode   11ng
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0

 config wifi-iface
option device   wifi0
option network  lan
option mode ap
option ssid CD-1
option encryption psk2
option key  CD-1

 M I doing anything wrong?

 Thanks,

 On Mon, Aug 3, 2015 at 6:40 AM, David Lang da...@lang.hm wrote:

 to make the config be there after a factory reset, you need to put the
 changes into the image that you build.

 you already did this for /etc/config/network, do the same thing for
 /etc/config/wireless

 David Lang


 On Sun, 2 Aug 2015, John kerry wrote:

 Hi Leiten,


 I have one issue, after upgrading this firmware it will load wireless
 configuration with this changes, actually it should load when i do
 factory
 reset.

 Thanks,

 On Sun, Aug 2, 2015 at 3:45 PM, John kerry kerry9...@gmail.com wrote:

 Hi Leiten,


 Thank you so much, Its working :)

 On Sun, Aug 2, 2015 at 3:12 PM, N.Leiten nicklei...@gmail.com wrote:

 Hi,


 Don't answer to my e-mail only, you need to add openwrt-devel maillist
 to
 CC or just answer to CC, in each case I'll receive message but also
 everyone could see all discussion.

 In email dated Воскресенье - 02 августа 2015 12:54:32 user John kerry
 wrote:

 Hi Leiten,

 I have added new files under and written below :
 vi target/linux/ar71xx/base-files/etc/uci-defaults/wireless


 Use index in prefix of filename to set order of execution, so it'll be
 like '99-wireless'.


 #!/bin/sh
 #
 # Copyright (c) 2013 The Linux Foundation. All rights reserved.
 # Copyright (C) 2011 OpenWrt.org
 #

 [ -e /etc/config/wireless ]  exit 0


 Here is the problem. When uci-defaults invoke scripts there's already
 preconfiguration done and /etc/config/wireless already exists, so your
 script just exit at this point. Remove this line.


 touch /etc/config/wireless

 uci set wireless.@wifi-device[0].disabled=0;
 uci set system.@system[0].hostname=test_ap
 uci set wireless.@wifi-iface[0].mode=ap
 uci set wireless.@wifi-iface[0].ssid=CD-2.4D
 uci set wireless.@wifi-iface[0].encryption=none
 uci set wireless.@wifi-iface[0].wds=1
 uci set wireless.radio0.disabled=0

 uci commit wireless

 exit 0

 and compile the source code using make V=s but still not changed
 default
 settings.

 Please help me to make it works.

 Thanks,


 On Sat, Aug 1, 2015 at 4:38 PM, N.Leiten nicklei...@gmail.com
 wrote:

 You can also use uci-defaults mechanism for your purpose. Just put

 script in base-files/etc/uci-defaults and set your preferrable
 parameters with uci and don't forget to 'exit 0' at the end of
 script,
 in elsecase it'll be run every time at boot ruining changes.

 2015-07-31 12:08 GMT+03:00 John kerry kerry9...@gmail.com:

 Hi,

 I am working on Ar71xx openWRT Luci project. By default the Wi-Fi
 is
 disabled and SSID is OpenWrt. I need to change the default
 settings.
 Could anyone help me to change the default settings.


 Best Regards,
 John

 ___
 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





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


Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-02 Thread John kerry
Hi Leiten,

Thank you so much, Its working :)

On Sun, Aug 2, 2015 at 3:12 PM, N.Leiten nicklei...@gmail.com wrote:

 Hi,

 Don't answer to my e-mail only, you need to add openwrt-devel maillist to
 CC or just answer to CC, in each case I'll receive message but also
 everyone could see all discussion.

 In email dated Воскресенье - 02 августа 2015 12:54:32 user John kerry
 wrote:
  Hi Leiten,
 
  I have added new files under and written below :
  vi target/linux/ar71xx/base-files/etc/uci-defaults/wireless

 Use index in prefix of filename to set order of execution, so it'll be
 like '99-wireless'.

 
  #!/bin/sh
  #
  # Copyright (c) 2013 The Linux Foundation. All rights reserved.
  # Copyright (C) 2011 OpenWrt.org
  #
 
  [ -e /etc/config/wireless ]  exit 0

 Here is the problem. When uci-defaults invoke scripts there's already
 preconfiguration done and /etc/config/wireless already exists, so your
 script just exit at this point. Remove this line.

 
  touch /etc/config/wireless
 
  uci set wireless.@wifi-device[0].disabled=0;
  uci set system.@system[0].hostname=test_ap
  uci set wireless.@wifi-iface[0].mode=ap
  uci set wireless.@wifi-iface[0].ssid=CD-2.4D
  uci set wireless.@wifi-iface[0].encryption=none
  uci set wireless.@wifi-iface[0].wds=1
  uci set wireless.radio0.disabled=0
 
  uci commit wireless
 
  exit 0
 
  and compile the source code using make V=s but still not changed default
  settings.
 
  Please help me to make it works.
 
  Thanks,
 
 
  On Sat, Aug 1, 2015 at 4:38 PM, N.Leiten nicklei...@gmail.com wrote:
 
   You can also use uci-defaults mechanism for your purpose. Just put
   script in base-files/etc/uci-defaults and set your preferrable
   parameters with uci and don't forget to 'exit 0' at the end of script,
   in elsecase it'll be run every time at boot ruining changes.
  
   2015-07-31 12:08 GMT+03:00 John kerry kerry9...@gmail.com:
Hi,
   
I am working on Ar71xx openWRT Luci project. By default the Wi-Fi is
disabled and SSID is OpenWrt. I need to change the default settings.
Could anyone help me to change the default settings.
   
   
Best Regards,
John
   
___
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

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


Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-02 Thread John kerry
Hi Leiten,

I have one issue, after upgrading this firmware it will load wireless
configuration with this changes, actually it should load when i do factory
reset.

Thanks,

On Sun, Aug 2, 2015 at 3:45 PM, John kerry kerry9...@gmail.com wrote:

 Hi Leiten,

 Thank you so much, Its working :)

 On Sun, Aug 2, 2015 at 3:12 PM, N.Leiten nicklei...@gmail.com wrote:

 Hi,

 Don't answer to my e-mail only, you need to add openwrt-devel maillist to
 CC or just answer to CC, in each case I'll receive message but also
 everyone could see all discussion.

 In email dated Воскресенье - 02 августа 2015 12:54:32 user John kerry
 wrote:
  Hi Leiten,
 
  I have added new files under and written below :
  vi target/linux/ar71xx/base-files/etc/uci-defaults/wireless

 Use index in prefix of filename to set order of execution, so it'll be
 like '99-wireless'.

 
  #!/bin/sh
  #
  # Copyright (c) 2013 The Linux Foundation. All rights reserved.
  # Copyright (C) 2011 OpenWrt.org
  #
 
  [ -e /etc/config/wireless ]  exit 0

 Here is the problem. When uci-defaults invoke scripts there's already
 preconfiguration done and /etc/config/wireless already exists, so your
 script just exit at this point. Remove this line.

 
  touch /etc/config/wireless
 
  uci set wireless.@wifi-device[0].disabled=0;
  uci set system.@system[0].hostname=test_ap
  uci set wireless.@wifi-iface[0].mode=ap
  uci set wireless.@wifi-iface[0].ssid=CD-2.4D
  uci set wireless.@wifi-iface[0].encryption=none
  uci set wireless.@wifi-iface[0].wds=1
  uci set wireless.radio0.disabled=0
 
  uci commit wireless
 
  exit 0
 
  and compile the source code using make V=s but still not changed default
  settings.
 
  Please help me to make it works.
 
  Thanks,
 
 
  On Sat, Aug 1, 2015 at 4:38 PM, N.Leiten nicklei...@gmail.com wrote:
 
   You can also use uci-defaults mechanism for your purpose. Just put
   script in base-files/etc/uci-defaults and set your preferrable
   parameters with uci and don't forget to 'exit 0' at the end of script,
   in elsecase it'll be run every time at boot ruining changes.
  
   2015-07-31 12:08 GMT+03:00 John kerry kerry9...@gmail.com:
Hi,
   
I am working on Ar71xx openWRT Luci project. By default the Wi-Fi is
disabled and SSID is OpenWrt. I need to change the default settings.
Could anyone help me to change the default settings.
   
   
Best Regards,
John
   
___
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



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


Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-02 Thread John kerry
Hi,

Sorry i didn't get, you mean to say i should not add files under

vi target/linux/ar71xx/base-files/etc/uci-defaults/99-wireless

Could you please explain.



On Mon, Aug 3, 2015 at 12:22 AM, Weedy weedy2...@gmail.com wrote:


 On 2 Aug 2015 12:19, John kerry kerry9...@gmail.com wrote:
 
  Hi,
 
  I am using below uci script,
 
  vi target/linux/ar71xx/base-files/etc/uci-defaults/99-wireless

 If you're building images yourself you might like to use files/ instead.

 svn checkout/files/etc/config/wireless

 You can dump any file you want in the finished image in there.

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


Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-02 Thread John kerry
Hi,

See that i created files in console,

The main source code there is path :

package/base-files/files/etc/config/

under this now already two files are there, but if i see in console under
/etc/config it shows
rwxrwxr-x1 root root 0 Jan  1  1970 .
drwxrwxr-x1 root root 0 Jul 30 18:33 ..
-rw-rw-r--1 root root  4045 Jul 30 16:47 ddns
-rw-r--r--1 root root   885 Jul 30 18:08 dhcp
-rw-r--r--1 root root  1642 Jul 30  2015 dhcp6c
-rw-r--r--1 root root   134 Jul 30 18:09 dropbear
-rw-r--r--1 root root  2148 Jul 30 18:33 firewall
-rw-r--r--1 root root   645 Jul 30 18:33 luci
-rw-r--r--1 root root   131 Jul 30 18:44 mcproxy
-rw-r--r--1 root root   763 Jul 30 18:33 network
-rw-rw-r--1 root root89 Jul 30 16:47 pppoe
-rw-rw-r--1 root root  1773 Jul 30 16:47 qos
-rw-r--r--1 root root   652 Jul 30 18:49 radvd
-rw-r--r--1 root root   324 Jul 30 18:49 ripd
-rw-r--r--1 root root 0 Jul 30 18:33 sound
-rw-rw-r--1 root root   407 Jul 30 18:33 system
-rw-r--r--1 root root   128 Jul 30 18:33 ubootenv
-rw-r--r--1 root root   680 Jul 30 18:33 ucitrack
-rw-r--r--1 root root  2408 Jul 30 18:23 uhttpd
-rw-r--r--1 root root   646 Jul 30 18:33 upnpd

I am not getting where to create new directory and add this files.

Sorry I am totally new in this, It may be silly question please guide me.

Thanks,

On Mon, Aug 3, 2015 at 12:58 AM, Weedy weedy2...@gmail.com wrote:

 make

 On Sun, Aug 2, 2015 at 12:56 PM, John kerry kerry9...@gmail.com wrote:
  Hi,
 
  so i created directory as below  and copy the following files
 
  root@OpenWrt:/# ls -al files/etc/config/
  drwxr-xr-x2 root root 0 Jul 30 18:42 .
  drwxr-xr-x3 root root 0 Jul 30 18:35 ..
  -rw-r--r--1 root root  4045 Jul 30 18:42 ddns
  -rw-r--r--1 root root   885 Jul 30 18:41 dhcp
  -rw-r--r--1 root root  2148 Jul 30 18:41 firewall
  -rw-r--r--1 root root   763 Jul 30 18:41 network
  -rw-r--r--1 root root   646 Jul 30 18:42 upnpd
  -rw-r--r--1 root root   718 Jul 30 18:36 wireless
 
  but how i will link this into building image.
 
 
 
 
  2015-08-03 0:38 GMT+08:00 Weedy weedy2...@gmail.com:
 
  You seem to be having problems using uci-defaults. So forget that.
 
  Copy the running/working/complete config file from your device into
  files/etc/config/wireless.
  You need to make the files directory. You can put anything in there.
 
  weedy@HAF ~/projects/openwrt $ ls -al files/etc/config/
  total 60
  drwxr-xr-x 2 weedy weedy 4096 Jul 13 23:05 .
  drwxr-xr-x 8 weedy weedy 4096 Jul 31 00:35 ..
  -rw-r--r-- 1 weedy weedy  138 Jul 13 23:05 darkstat
  -rw-r--r-- 1 weedy weedy  441 Jul 13 23:05 ddns
  -rw-r--r-- 1 weedy weedy 1204 Jul 30 22:48 dhcp
  -rw-r--r-- 1 weedy weedy  119 Jul 13 23:05 dropbear
  -rw-r--r-- 1 weedy weedy 4290 Jul 13 23:05 firewall
  -rw-r--r-- 1 weedy weedy   38 Jun 11  2013 netcheck
  -rw-r--r-- 1 weedy weedy 1059 Jul 13 23:05 network
  -rw-r--r-- 1 weedy weedy 1821 Jun 30 21:04 qos
  -rw-r--r-- 1 weedy weedy  761 Jul 13 23:05 system
  -rw-r--r-- 1 weedy weedy 2165 Jul 13 23:05 uhttpd
  -rw-r--r-- 1 weedy weedy  639 Jul 13 23:05 upnpd
  -rw-r--r-- 1 weedy weedy 1353 Jul 13 23:05 wireless
 
 

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


Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-02 Thread John kerry
Hi,

so i created directory as below  and copy the following files

root@OpenWrt:/# ls -al files/etc/config/
drwxr-xr-x2 root root 0 Jul 30 18:42 .
drwxr-xr-x3 root root 0 Jul 30 18:35 ..
-rw-r--r--1 root root  4045 Jul 30 18:42 ddns
-rw-r--r--1 root root   885 Jul 30 18:41 dhcp
-rw-r--r--1 root root  2148 Jul 30 18:41 firewall
-rw-r--r--1 root root   763 Jul 30 18:41 network
-rw-r--r--1 root root   646 Jul 30 18:42 upnpd
-rw-r--r--1 root root   718 Jul 30 18:36 wireless

but how i will link this into building image.




2015-08-03 0:38 GMT+08:00 Weedy weedy2...@gmail.com:

 You seem to be having problems using uci-defaults. So forget that.

 Copy the running/working/complete config file from your device into
 files/etc/config/wireless.
 You need to make the files directory. You can put anything in there.

 weedy@HAF ~/projects/openwrt $ ls -al files/etc/config/
 total 60
 drwxr-xr-x 2 weedy weedy 4096 Jul 13 23:05 .
 drwxr-xr-x 8 weedy weedy 4096 Jul 31 00:35 ..
 -rw-r--r-- 1 weedy weedy  138 Jul 13 23:05 darkstat
 -rw-r--r-- 1 weedy weedy  441 Jul 13 23:05 ddns
 -rw-r--r-- 1 weedy weedy 1204 Jul 30 22:48 dhcp
 -rw-r--r-- 1 weedy weedy  119 Jul 13 23:05 dropbear
 -rw-r--r-- 1 weedy weedy 4290 Jul 13 23:05 firewall
 -rw-r--r-- 1 weedy weedy   38 Jun 11  2013 netcheck
 -rw-r--r-- 1 weedy weedy 1059 Jul 13 23:05 network
 -rw-r--r-- 1 weedy weedy 1821 Jun 30 21:04 qos
 -rw-r--r-- 1 weedy weedy  761 Jul 13 23:05 system
 -rw-r--r-- 1 weedy weedy 2165 Jul 13 23:05 uhttpd
 -rw-r--r-- 1 weedy weedy  639 Jul 13 23:05 upnpd
 -rw-r--r-- 1 weedy weedy 1353 Jul 13 23:05 wireless

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


Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-02 Thread John kerry
Hi,

I am using below uci script,

vi target/linux/ar71xx/base-files/etc/uci-defaults/99-wireless

#copyright (c) 2013 The Linux Foundation. All rights reserved.
# Copyright (C) 2011 OpenWrt.org
#


touch /etc/config/wireless

uci set wireless.@wifi-device[0].disabled=0;
uci set system.@system[0].hostname=OpenWrt
uci set wireless.@wifi-iface[0].mode=ap
uci set wireless.@wifi-iface[0].ssid=Home_plug_1
uci set wireless.@wifi-iface[0].encryption=wpa2
uci set wireless.@wifi-iface[0].key=Home_plug_1
#uci set wireless.radio0.disabled=0

uci set wireless.@wifi-device[1].disabled=0;
uci set wireless.@wifi-iface[1].mode=ap
uci set wireless.@wifi-iface[1].ssid=Home_plug_2
uci set wireless.@wifi-iface[1].encryption=wpa2
uci set wireless.@wifi-iface[1].key=Home_plug_2
#uci set wireless.radio0.disabled=0


uci commit wireless

exit 0

The default SSID is working but not able to set encryption type and key.

Thanks,


On Sun, Aug 2, 2015 at 9:19 PM, John kerry kerry9...@gmail.com wrote:

 Hi Leiten,

 I have one issue, after upgrading this firmware it will load wireless
 configuration with this changes, actually it should load when i do factory
 reset.

 Thanks,

 On Sun, Aug 2, 2015 at 3:45 PM, John kerry kerry9...@gmail.com wrote:

 Hi Leiten,

 Thank you so much, Its working :)

 On Sun, Aug 2, 2015 at 3:12 PM, N.Leiten nicklei...@gmail.com wrote:

 Hi,

 Don't answer to my e-mail only, you need to add openwrt-devel maillist
 to CC or just answer to CC, in each case I'll receive message but also
 everyone could see all discussion.

 In email dated Воскресенье - 02 августа 2015 12:54:32 user John kerry
 wrote:
  Hi Leiten,
 
  I have added new files under and written below :
  vi target/linux/ar71xx/base-files/etc/uci-defaults/wireless

 Use index in prefix of filename to set order of execution, so it'll be
 like '99-wireless'.

 
  #!/bin/sh
  #
  # Copyright (c) 2013 The Linux Foundation. All rights reserved.
  # Copyright (C) 2011 OpenWrt.org
  #
 
  [ -e /etc/config/wireless ]  exit 0

 Here is the problem. When uci-defaults invoke scripts there's already
 preconfiguration done and /etc/config/wireless already exists, so your
 script just exit at this point. Remove this line.

 
  touch /etc/config/wireless
 
  uci set wireless.@wifi-device[0].disabled=0;
  uci set system.@system[0].hostname=test_ap
  uci set wireless.@wifi-iface[0].mode=ap
  uci set wireless.@wifi-iface[0].ssid=CD-2.4D
  uci set wireless.@wifi-iface[0].encryption=none
  uci set wireless.@wifi-iface[0].wds=1
  uci set wireless.radio0.disabled=0
 
  uci commit wireless
 
  exit 0
 
  and compile the source code using make V=s but still not changed
 default
  settings.
 
  Please help me to make it works.
 
  Thanks,
 
 
  On Sat, Aug 1, 2015 at 4:38 PM, N.Leiten nicklei...@gmail.com wrote:
 
   You can also use uci-defaults mechanism for your purpose. Just put
   script in base-files/etc/uci-defaults and set your preferrable
   parameters with uci and don't forget to 'exit 0' at the end of
 script,
   in elsecase it'll be run every time at boot ruining changes.
  
   2015-07-31 12:08 GMT+03:00 John kerry kerry9...@gmail.com:
Hi,
   
I am working on Ar71xx openWRT Luci project. By default the Wi-Fi
 is
disabled and SSID is OpenWrt. I need to change the default
 settings.
Could anyone help me to change the default settings.
   
   
Best Regards,
John
   
___
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




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


Re: [OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-08-02 Thread John kerry
Hi All,

I created separate files directory and added network and wireless files and
its working everything but still i am not able to use encryption wpa2.
Below is the my script.
config wifi-device  wifi0
option type qcawifi
option channel  auto
option macaddr  00:03:7f:42:06:61
option hwmode   11ng
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0

config wifi-iface
option device   wifi0
option network  lan
option mode ap
option ssid CD-1
option encryption psk2
option key  CD-1

M I doing anything wrong?

Thanks,

On Mon, Aug 3, 2015 at 6:40 AM, David Lang da...@lang.hm wrote:

 to make the config be there after a factory reset, you need to put the
 changes into the image that you build.

 you already did this for /etc/config/network, do the same thing for
 /etc/config/wireless

 David Lang


 On Sun, 2 Aug 2015, John kerry wrote:

 Hi Leiten,

 I have one issue, after upgrading this firmware it will load wireless
 configuration with this changes, actually it should load when i do factory
 reset.

 Thanks,

 On Sun, Aug 2, 2015 at 3:45 PM, John kerry kerry9...@gmail.com wrote:

 Hi Leiten,

 Thank you so much, Its working :)

 On Sun, Aug 2, 2015 at 3:12 PM, N.Leiten nicklei...@gmail.com wrote:

 Hi,

 Don't answer to my e-mail only, you need to add openwrt-devel maillist
 to
 CC or just answer to CC, in each case I'll receive message but also
 everyone could see all discussion.

 In email dated Воскресенье - 02 августа 2015 12:54:32 user John kerry
 wrote:

 Hi Leiten,

 I have added new files under and written below :
 vi target/linux/ar71xx/base-files/etc/uci-defaults/wireless


 Use index in prefix of filename to set order of execution, so it'll be
 like '99-wireless'.


 #!/bin/sh
 #
 # Copyright (c) 2013 The Linux Foundation. All rights reserved.
 # Copyright (C) 2011 OpenWrt.org
 #

 [ -e /etc/config/wireless ]  exit 0


 Here is the problem. When uci-defaults invoke scripts there's already
 preconfiguration done and /etc/config/wireless already exists, so your
 script just exit at this point. Remove this line.


 touch /etc/config/wireless

 uci set wireless.@wifi-device[0].disabled=0;
 uci set system.@system[0].hostname=test_ap
 uci set wireless.@wifi-iface[0].mode=ap
 uci set wireless.@wifi-iface[0].ssid=CD-2.4D
 uci set wireless.@wifi-iface[0].encryption=none
 uci set wireless.@wifi-iface[0].wds=1
 uci set wireless.radio0.disabled=0

 uci commit wireless

 exit 0

 and compile the source code using make V=s but still not changed
 default
 settings.

 Please help me to make it works.

 Thanks,


 On Sat, Aug 1, 2015 at 4:38 PM, N.Leiten nicklei...@gmail.com wrote:

 You can also use uci-defaults mechanism for your purpose. Just put
 script in base-files/etc/uci-defaults and set your preferrable
 parameters with uci and don't forget to 'exit 0' at the end of script,
 in elsecase it'll be run every time at boot ruining changes.

 2015-07-31 12:08 GMT+03:00 John kerry kerry9...@gmail.com:

 Hi,

 I am working on Ar71xx openWRT Luci project. By default the Wi-Fi is
 disabled and SSID is OpenWrt. I need to change the default settings.
 Could anyone help me to change the default settings.


 Best Regards,
 John

 ___
 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




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


[OpenWrt-Devel] Change OpenWrt Wifi default settings

2015-07-31 Thread John kerry
Hi,

I am working on Ar71xx openWRT Luci project. By default the Wi-Fi is
disabled and SSID is OpenWrt. I need to change the default settings.
Could anyone help me to change the default settings.


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


[OpenWrt-Devel] OpenWRT default settings

2015-07-30 Thread John kerry
Hi Everyone,
I am working on openWRT Luci, able to change the settings in the file under
overlay and settings will get change, but when i do factory reset from GUI,
All the changes i have done in script file gone. So i need to know from
which this all factory reset configuration is loading so that i will change
it that file my default configuration.

So that after factory reset it should with my default settings.

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


[OpenWrt-Devel] AR71xx openWRT Default config file

2015-07-30 Thread John kerry
Hi ,
I am working on openWRT Luci, able to change the settings in the file under
overlay and settings will get change, but when i do factory reset from GUI,
All the changes i have done in script file gone. So i need to know from
which this all factory reset configuration is loading so that i will change
it that file my default configuration.

So that after factory reset it should with my default settings.

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


[OpenWrt-Devel] openwrt-ar71xx GUI

2015-07-29 Thread John kerry
Hi,


I am working on openwrt-ar71xx. After upload the image file the GUI will be
access on some IP address. Now I want to change the GUI, Could anyone tell
how I can change the GUI, i means to say which file shall I modify.


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


[OpenWrt-Devel] GUI user name and pass

2015-07-24 Thread John kerry
Hi,

There is one issue, normally whenever i open GUI its ask for user name and
password, again close the browser and open GUI it ask for UN and Password,
but there is problem when i do factory reset it stop asking UN and Password
for GUI anymore. Please help us to solve this urgently.

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


[OpenWrt-Devel] IPTables/NAT

2015-07-09 Thread John kerry
Hi,

I have to enable NAT with a MASQUERADING target,
and to block the GUI from WAN have to server bind only the bridge address.
Could anyone tell me how i can do it in the GUI itself.

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


[OpenWrt-Devel] [OpenWrt] [LUCI] ar71xx: GUI changes

2015-07-08 Thread John kerry
Hi  Everyone,

I am working on openWRT Luci, I need to create the GUI in such way that WAN
connection is either using wireless or RJ45 using a slide switch.

Could anyone please help me how i can change the GUI based on the above.
Which part of the code i need to change.

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


[OpenWrt-Devel] IPtables/NAT

2015-07-05 Thread John kerry
Hi ,

Hope you are doing great. I am working on Atheros QSDK. i am able to
compile the source code successfully and able to upgrade the firmware using
openWRT Luci GUI too. The OpenWRT being a linux distro for embedded
platform already has IPtables implemented. Before compiling the source code
i have to do a make menuconfig and enable the netfilter module in
networking. This would enable IPtables and compile it. Is my undersatnding
correct?

Could you please guide me to write the Iptables rule. Basically i have to
write the rules for iptables/NAT for the following condition.
Router mode with NAT and iptables, the web page access to be available only
to LAN (WiFi/Wired).
I have one LAN and one WAN Connection, the LAN ip set to some static IP to
access the GUI.

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