Re: [OpenWrt-Devel] [PATCH] build: generate_package_index: use 'sha256sum' in favor of 'openssl sha256'

2013-10-09 Thread Steven Barth

Hi Bastian,

I recently added openssl as a generic build dependency for OpenWrt as 
part of the new package signing infrastructure thus I don't think using 
openssl sha256 is problematic.


Can you give an example please where there is an openssl without sha256 
support?



Thanks,

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


Re: [OpenWrt-Devel] [PATCH] build: generate_package_index: use 'sha256sum' in favor of 'openssl sha256'

2013-10-09 Thread Bastian Bittorf
* Etienne Champetier etienne.champet...@free.fr [09.10.2013 09:09]:
 I've read here 
 http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
 that it's better to use command -v or hash instead of which

interesting, but
http://www.cyberciti.biz/faq/unix-linux-shell-find-out-posixcommand-exists-or-not/

says in the comments:

According to The Open Group Base Specifications, `command -v` is not
completely portable and `type -P` is not portable either:

i'am even unsure of 'hash', because it's an builtin.

And 'which' is also poorly defined: at least i can find
the definition for the exitcode under ubuntu 'man which'.

i'am lost - any other links for pro or contra?

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


[OpenWrt-Devel] [ramips] How to write pinctrl node?

2013-10-09 Thread Jiapeng Li
r38026 change the gpio initial node to pinctrl. I want to enable uartf for
HLK-RM04 device, so i add a uartf_pins: uartf node to the pinctrl node.
+ uartf_pins: uartf {
+ uartf {
+ ralink,group = uartf;
+ ralink,function = gpio uartf;
+ };
+ };
This node can enable uartf function of RT5350, but after add this node i
can't export gpio in the command line.

root@OpenWrt:/sys/class/gpio# echo 1  export
[ 1056.70] rt2880-pinmux pinctrl.1: pin 1 is not set to gpio mux
[ 1056.72] rt2880-pinmux pinctrl.1: request() failed for pin 1
[ 1056.73] rt2880-pinmux pinctrl.1: pin-1 (pio:1) status -22
ash: write error: Invalid argument

I am suspecting if the dts file of mine is wrong.

Index: target/linux/ramips/dts/HLKRM04.dts
===
--- target/linux/ramips/dts/HLKRM04.dts (revision 0)
+++ target/linux/ramips/dts/HLKRM04.dts (working copy)
@@ -0,0 +1,101 @@
+/dts-v1/;
+
+/include/ rt5350.dtsi
+
+/ {
+ compatible = HLKRM04, ralink,rt5350-soc;
+ model = HILINK HLK-RM04;
+
+ palmbus@1000 {
+ spi@b00 {
+ status = okay;
+ m25p80@0 {
+ #address-cells = 1;
+ #size-cells = 1;
+ compatible = s25fl064k;
+ reg = 0 0;
+ linux,modalias = m25p80, s25fl064k;
+ spi-max-frequency = 1000;
+
+ partition@0 {
+ label = u-boot;
+ reg = 0x0 0x3;
+ read-only;
+ };
+
+ partition@3 {
+ label = u-boot-env;
+ reg = 0x3 0x1;
+ read-only;
+ };
+
+ factory: partition@4 {
+ label = factory;
+ reg = 0x4 0x1;
+ read-only;
+ };
+
+ partition@5 {
+ label = firmware;
+ reg = 0x5 0xFb;
+ };
+ };
+ };
+
+ uartlite@c00 {
+ status = okay;
+ };
+
+ uart@500 {
+ status = okay;
+ };
+ };
+
+ pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = i2c, jtag, rgmii, mdio;
+ ralink,function = gpio;
+ };
+ };
+
+ uartf_pins: uartf {
+ uartf {
+ ralink,group = uartf;
+ ralink,function = gpio uartf;
+ };
+ };
+ };
+
+ esw@1011 {
+ status = okay;
+ };
+
+ ehci@101c {
+ status = okay;
+ };
+
+ ohci@101c1000 {
+ status = okay;
+ };
+
+ gpio-keys-polled {
+ compatible = gpio-keys-polled;
+ #address-cells = 1;
+ #size-cells = 0;
+ poll-interval = 20;
+ wps {
+ label = reset;
+ gpios = gpio0 14 1;
+ linux,code = 0x198;
+ };
+ };
+
+ gpio-leds {
+ compatible = gpio-leds;
+ power {
+ label = hlk-rm04:red:power;
+ gpios = gpio0 0 1;
+ };
+ };
+};
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] build: generate_package_index: use 'sha256sum' in favor of 'openssl sha256'

2013-10-09 Thread Bastian Bittorf
* Steven Barth cy...@openwrt.org [09.10.2013 09:45]:
 I recently added openssl as a generic build dependency for OpenWrt as
 part of the new package signing infrastructure thus I don't think
 using openssl sha256 is problematic.

it's not 'openssl' itself in my case, but the ability to handle 'sha256':

user@farm:~/openwrt$ openssl sha256 Makefile
openssl:Error: 'sha256' is an invalid command.

Standard commands
asn1parse  ca cipherscrlcrl2pkcs7  
dgst   dh dhparamdsadsaparam   
ec ecparamencengine errstr 
gendh  gendsa genrsa nseq   ocsp   
passwd pkcs12 pkcs7  pkcs8  prime  
rand   reqrsarsautl s_client   
s_server   s_time sess_idsmime  speed  
spkac  verify versionx509   

Message Digest commands (see the `dgst' command for more details)
md2md4md5rmd160 sha
sha1   

Cipher commands (see the `enc' command for more details)
aes-128-cbcaes-128-ecbaes-192-cbcaes-192-ecbaes-256-cbc
aes-256-ecbbase64 bf bf-cbc bf-cfb 
bf-ecb bf-ofb cast   cast-cbc   cast5-cbc  
cast5-cfb  cast5-ecb  cast5-ofb  desdes-cbc
des-cfbdes-ecbdes-ededes-ede-cbcdes-ede-cfb
des-ede-ofbdes-ede3   des-ede3-cbc   des-ede3-cfb   des-ede3-ofb   
des-ofbdes3   desx   rc2rc2-40-cbc 
rc2-64-cbc rc2-cbcrc2-cfbrc2-ecbrc2-ofb
rc4rc4-40 

user@farm:~/openwrt$ openssl
OpenSSL version
OpenSSL 0.9.8o 01 Jun 2010

ok, it's old - but installed 8-) bye, bastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Newbie needs help in building stable for newer hardware

2013-10-09 Thread Florian Effenberger
Hello,

I consider myself quite experienced with OpenWRT already, having
deployed a few devices, but sadly, I'm a totally development newbie -
so sorry if my question is maybe stupid. ;-)

I'd like to stick with OpenWRT stable for my deployments, to have the
same base system. The problem, however, is that my favorite device
(TP-Link WDR4300) is rapidly changing its hardware revision, making it
necessary to use trunk for newer models.

Is there an easy way to compile OpenWRT stable only with those
patchsets necessary to make it work with newer hardware revisions?
From what I recall, micro releases of OpenWRT stable often include
newer hardware revisions, without any other changes from trunk, so I
assume it must be possible in theory - lacking any practical
experience, however, I seek for your help. :-)

Thanks a lot, and keep up the good work - you folks rock!
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] build: generate_package_index: use 'sha256sum' in favor of 'openssl sha256'

2013-10-09 Thread Felix Fietkau
On 2013-10-09 9:48 AM, Bastian Bittorf wrote:
 * Steven Barth cy...@openwrt.org [09.10.2013 09:45]:
 I recently added openssl as a generic build dependency for OpenWrt as
 part of the new package signing infrastructure thus I don't think
 using openssl sha256 is problematic.
 
 it's not 'openssl' itself in my case, but the ability to handle 'sha256':
I think we should probably just put a self-contained utility in tools/
and use that instead of relying on different kinds of host tools.

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


Re: [OpenWrt-Devel] [PATCH] build: generate_package_index: use 'sha256sum' in favor of 'openssl sha256'

2013-10-09 Thread Bastian Bittorf
* Felix Fietkau n...@openwrt.org [09.10.2013 19:54]:
  it's not 'openssl' itself in my case, but the ability to handle 'sha256':
 I think we should probably just put a self-contained utility in tools/
 and use that instead of relying on different kinds of host tools.

So selfcompiling a small tool on the host?

I'am unsure if this is needed, if we rely on
openssl-sha256 anyway? than it would be better to
check not only for the existence of 'openssl' but
for the ability to work with 'sha256'.

openssl is available for on all host platforms anyway.

if 'sha256' is not supportet (like on my install),
than the build should abort...

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


Re: [OpenWrt-Devel] [PATCH] build: generate_package_index: use 'sha256sum' in favor of 'openssl sha256'

2013-10-09 Thread Florian Fainelli
Le 9 oct. 2013 20:06, Bastian Bittorf bitt...@bluebottle.com a écrit :

 * Felix Fietkau n...@openwrt.org [09.10.2013 19:54]:
   it's not 'openssl' itself in my case, but the ability to handle
'sha256':
  I think we should probably just put a self-contained utility in tools/
  and use that instead of relying on different kinds of host tools.

 So selfcompiling a small tool on the host?

 I'am unsure if this is needed, if we rely on
 openssl-sha256 anyway? than it would be better to
 check not only for the existence of 'openssl' but
 for the ability to work with 'sha256'.

 openssl is available for on all host platforms anyway.

 if 'sha256' is not supportet (like on my install),
 than the build should abort...

PostgreSQL has a self-contained BSD licensed sh256 implementation here:

http://doxygen.postgresql.org/sha2_8c_source.html

which could possibly be wrapped to read from a file and output the hash on
stdout.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH][lantiq] Add support for Astoria ARV7510PW22

2013-10-09 Thread Álvaro Fernández Rojas
This board is pretty similar to ARV752DPW22.

Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git 
a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom 
b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 7ec8d6f..2d5e09d 100644
--- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -29,7 +29,7 @@ case $FIRMWARE in
 RT2860.eeprom )
local board=$(lantiq_board_id)
case $board in
-   ARV7525PW|ARV752DPW|ARV752DPW22)
+   ARV7510PW22|ARV7525PW|ARV752DPW|ARV752DPW22)
rt2x00_eeprom_extract board_config 1040 512
;;
*)
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network 
b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
index 2cf16f3..4f124fd 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
@@ -58,7 +58,7 @@ ACMP252|GIGASX76X)
;;
 
 # ar8316
-ARV4519PW|ARV7518PW|ARV752DPW22)
+ARV4519PW|ARV7510PW22|ARV7518PW|ARV752DPW22)
ucidef_set_interface_lan eth0.1
ucidef_add_switch switch0 1 1
ucidef_add_switch_vlan switch0 1 0t 2 3 4 5
diff --git a/target/linux/lantiq/dts/ARV7510PW22.dts 
b/target/linux/lantiq/dts/ARV7510PW22.dts
new file mode 100644
index 000..0bddce7
--- /dev/null
+++ b/target/linux/lantiq/dts/ARV7510PW22.dts
@@ -0,0 +1,179 @@
+/dts-v1/;
+
+/include/ danube.dtsi
+
+/ {
+   model = ARV7510PW22 - Astoria Networks;
+
+   chosen {
+   bootargs = console=ttyLTQ0,115200 init=/etc/preinit;
+   };
+
+   memory@0 {
+   reg = 0x0 0x400;
+   };
+
+   sram@1F00 {
+   vmmc@107000 {
+   status = okay;
+   gpios = gpio 9 0;
+   };
+   };
+
+   fpi@1000 {
+   localbus@0 {
+   nor-boot@0 {
+   compatible = lantiq,nor;
+   bank-width = 2;
+   reg = 0 0x0 0x100;
+   #address-cells = 1;
+   #size-cells = 1;
+
+   partition@0 {
+   label = uboot;
+   reg = 0x0 0x4;
+   read-only;
+   };
+
+   partition@4 {
+   label = uboot_env;
+   reg = 0x4 0x2;
+   read-only;
+   };
+
+   partition@6 {
+   label = firmware;
+   reg = 0x6 0xf8;
+   };
+
+   partition@fe {
+   label = board_config;
+   reg = 0xfe 0x2;
+   read-only;
+   };
+   };
+
+   mac_addr {
+   compatible = lantiq,eth-mac;
+   reg = 0 0xfe0016 0x6;
+   mac-increment = 2;
+   };
+   };
+
+   gpio: pinmux@E100B10 {
+   pinctrl-names = default;
+   pinctrl-0 = state_default;
+
+   state_default: pinmux {
+   exin {
+   lantiq,groups = exin1;
+   lantiq,function = exin;
+   lantiq,pull = 2;
+   lantiq,output = 0;
+   };
+   pci_in {
+   lantiq,groups = req1, req2;
+   lantiq,function = pci;
+   lantiq,open-drain = 1;
+   lantiq,pull = 2;
+   lantiq,output = 0;
+   };
+   pci_out {
+   lantiq,groups = gnt1;
+   lantiq,function = pci;
+   lantiq,output = 1;
+   };
+   pci_rst {
+   lantiq,pins = io21;
+   lantiq,pull = 2;
+   lantiq,output = 1;
+   };
+

Re: [OpenWrt-Devel] [OpenWrt-Users] unknown network field 'beacon_int and wpa_supplicant

2013-10-09 Thread Ben West
I believe this problem appeared on or about r36682, which coincides with a
hostapd update to AA.  This suggests a regression in hostapd w/r/t/ to
beacon interval code.

I can confirm the same problem happens when attempting to specify
beacon_int on a single psk2-encrypted adhoc interface, not just with
multi-VAPs as with the original poster.  My test was on an Engenius
EOC-1650, atheros platform, running Attitude Adjustment r38347 that I
compiled.

The error quoted below goes away when I comment out the beacon_int line
in /etc/config/wireless.  Likewise, this wireless config, with the
beacon_int line, works just fine under Attitude Adjustment r36669, before
the hostapd update.

root@OpenWRT:~# wifi restart
command failed: Device or resource busy (-16)
Successfully initialized wpa_supplicant
Line 12: unknown network field 'beacon_interval'.
Line 33: failed to parse network block.
Failed to read or parse configuration '/var/run/wpa_supplicant-wlan0.conf'.
enable_mac80211(radio0): Failed to set up wpa_supplicant for interface wlan0

root@OpenWRT:~# cat /etc/config/wireless
config wifi-device  radio0
option type mac80211
option channel  4
option hwmode   11g
option macaddr  00:02:6F:XX:XX:XX
option beacon_int   337
option diversity 0
option disabled 0

config wifi-iface
option network 'mesh'
option mode 'adhoc'
option device 'radio0'
option ssid 'MyMesh'
option bssid '02:CA:FF:EE:BA:BF'
option hidden '0'
option encryption 'psk2'
option key 'blahblahblahblahblah'

root@OpenWRT:~# cat /var/run/wpa_supplicant-wlan0.conf
ctrl_interface=/var/run/wpa_supplicant-wlan0
ap_scan=2
network={
mode=1
scan_ssid=0
ssid=MyMesh
bssid=02:CA:FF:EE:BA:BF
key_mgmt=WPA-PSK
proto=RSN
frequency=2427
fixed_freq=1
beacon_interval=337

psk=blahblahblahblahblah

}

root@OpenWRT:~# cat /etc/openwrt_release
DISTRIB_ID=MyCustomWRT
DISTRIB_RELEASE=CustomV2.1
DISTRIB_REVISION=r38347
DISTRIB_CODENAME=pre-release
DISTRIB_TARGET=atheros/generic
DISTRIB_DESCRIPTION=My Custom Release

On Fri, Jun 28, 2013 at 9:07 PM, cmsv c...@wirelesspt.net wrote:

 Info:
 http://wiki.openwrt.org/doc/uci/wireless#wpa.enterprise.access.point


 configuration:

 /etc/config# cat wireless

 config wifi-device 'radio0'
 option type 'mac80211'
 option phy 'phy0'
 option hwmode '11ng'
 option noscan '1'
 option disabled '0'
 option diversity '0'
 option rxantenna '2'
 option txantenna '2'
 option txpower '20'
 option beacon_int '1000'
 option distance '2000'
 list ht_capab 'RX-HT40-SGI'
 list ht_capab 'TX-STBC'
 list ht_capab 'RX-STBC1'
 list ht_capab 'DSSS_CCK-40'
 option channel '1'
 option country 'PT'
 option htmode 'HT20'
 option beacon_int '1000'

 config wifi-iface
 option device 'radio0'
 option ifname 'wlan0'
 option network 'lan'
 option mode 'ap'
 option ssid 'test.net'
 option hidden '0'
 option encryption 'none'


 config wifi-iface
 option device 'radio0'
 option ifname 'adhoc0'
 option network 'mesh'
 option mode 'adhoc'
 option bssid '02:16:e8:6a:0b:1e'
 option ssid 'mesh.test'
 option hidden '0'
 option macfilter 'allow'
 option encryption 'psk2'
 option key '1234567890'

 Problem:

 wifi down
 wifi up
 command failed: Device or resource busy (-16)
 Configuration file: /var/run/hostapd-phy0.conf
 Using interface wlan0 with hwaddr 5f:e9:98:5c:3e:36 and ssid test.net

 Successfully initialized wpa_supplicant
 Line 12: unknown network field 'beacon_interval'.
 Line 33: failed to parse network block.

 Failed to read or parse configuration
 '/var/run/wpa_supplicant-adhoc0.conf'.
 enable_mac80211(radio0): Failed to set up wpa_supplicant for interface
 adhoc0


 Details:

 # cat /var/run/wpa_supplicant-adhoc0.conf
 ctrl_interface=/var/run/wpa_supplicant-adhoc0
 ap_scan=2
 network={
 mode=1
 scan_ssid=0
 ssid=mesh.test
 bssid=02:16:c8:6e:0f:1e
 key_mgmt=WPA-PSK
 proto=RSN
 frequency=2472
 fixed_freq=1
 beacon_interval=1000

 htmode=HT20

 psk=1234567890


 Linux version 3.3.8 (cmsv@net) (gcc version 4.6.3 20120201 (prerelease)
 (Linaro GCC 4.6-2012.02) ) #1 Thu Jun 27 22:23:26 EDT 2013
 DISTRIB_ID=OpenWrt
 DISTRIB_RELEASE=Attitude Adjustment
 DISTRIB_REVISION=r37034
 DISTRIB_CODENAME=attitude_adjustment
 DISTRIB_TARGET=ar71xx/generic
 DISTRIB_DESCRIPTION=OpenWrt Attitude Adjustment 12.09



 Conclusion:
 It does seem that wpa_supplicant is not compatible with option
 beacon_int . However if i remove this option from the configuration or
 specify it as option beacon_interval; then wpa_supplicant works for the
 specified interface.

 Is this a bug, incompatibility or something was not 

Re: [OpenWrt-Devel] [OpenWrt-Users] unknown network field 'beacon_int and wpa_supplicant

2013-10-09 Thread cmsv
Right now i tested with DISTRIB_REVISION=r38305

Successfully initialized wpa_supplicant
Line 12: unknown network field 'beacon_interval'.
Line 33: failed to parse network block.
Failed to read or parse configuration '/var/run/wpa_supplicant-adhoc0.conf'.
enable_mac80211(radio0): Failed to set up wpa_supplicant for interface
adhoc0

The problem remains for all or any beacon_int specified interface.

Do you know if it is not specified in the config if the driver sets it's
default value ? I wm wondering about possible consequences of not having
beacon_interval at all.



On 10/09/2013 07:17 PM, Ben West wrote:
 I believe this problem appeared on or about r36682, which coincides with
 a hostapd update to AA.  This suggests a regression in hostapd w/r/t/ to
 beacon interval code.
 
 I can confirm the same problem happens when attempting to specify
 beacon_int on a single psk2-encrypted adhoc interface, not just with
 multi-VAPs as with the original poster.  My test was on an Engenius
 EOC-1650, atheros platform, running Attitude Adjustment r38347 that I
 compiled.
 
 The error quoted below goes away when I comment out the beacon_int
 line in /etc/config/wireless.  Likewise, this wireless config, with the
 beacon_int line, works just fine under Attitude Adjustment r36669,
 before the hostapd update.
 
 root@OpenWRT:~# wifi restart
 command failed: Device or resource busy (-16)
 Successfully initialized wpa_supplicant
 Line 12: unknown network field 'beacon_interval'.
 Line 33: failed to parse network block.
 Failed to read or parse configuration '/var/run/wpa_supplicant-wlan0.conf'.
 enable_mac80211(radio0): Failed to set up wpa_supplicant for interface wlan0
 
 root@OpenWRT:~# cat /etc/config/wireless
 config wifi-device  radio0
 option type mac80211
 option channel  4
 option hwmode   11g
 option macaddr  00:02:6F:XX:XX:XX
 option beacon_int   337
 option diversity 0
 option disabled 0
 
 config wifi-iface
 option network 'mesh'
 option mode 'adhoc'
 option device 'radio0'
 option ssid 'MyMesh'
 option bssid '02:CA:FF:EE:BA:BF'
 option hidden '0'
 option encryption 'psk2'
 option key 'blahblahblahblahblah'
 
 root@OpenWRT:~# cat /var/run/wpa_supplicant-wlan0.conf
 ctrl_interface=/var/run/wpa_supplicant-wlan0
 ap_scan=2
 network={
 mode=1
 scan_ssid=0
 ssid=MyMesh
 bssid=02:CA:FF:EE:BA:BF
 key_mgmt=WPA-PSK
 proto=RSN
 frequency=2427
 fixed_freq=1
 beacon_interval=337

 psk=blahblahblahblahblah
   
 }
 
 root@OpenWRT:~# cat /etc/openwrt_release
 DISTRIB_ID=MyCustomWRT
 DISTRIB_RELEASE=CustomV2.1
 DISTRIB_REVISION=r38347
 DISTRIB_CODENAME=pre-release
 DISTRIB_TARGET=atheros/generic
 DISTRIB_DESCRIPTION=My Custom Release
 
 On Fri, Jun 28, 2013 at 9:07 PM, cmsv c...@wirelesspt.net
 mailto:c...@wirelesspt.net wrote:
 
 Info:
 http://wiki.openwrt.org/doc/uci/wireless#wpa.enterprise.access.point
 
 
 configuration:
 
 /etc/config# cat wireless
 
 config wifi-device 'radio0'
 option type 'mac80211'
 option phy 'phy0'
 option hwmode '11ng'
 option noscan '1'
 option disabled '0'
 option diversity '0'
 option rxantenna '2'
 option txantenna '2'
 option txpower '20'
 option beacon_int '1000'
 option distance '2000'
 list ht_capab 'RX-HT40-SGI'
 list ht_capab 'TX-STBC'
 list ht_capab 'RX-STBC1'
 list ht_capab 'DSSS_CCK-40'
 option channel '1'
 option country 'PT'
 option htmode 'HT20'
 option beacon_int '1000'
 
 config wifi-iface
 option device 'radio0'
 option ifname 'wlan0'
 option network 'lan'
 option mode 'ap'
 option ssid 'test.net http://test.net'
 option hidden '0'
 option encryption 'none'
 
 
 config wifi-iface
 option device 'radio0'
 option ifname 'adhoc0'
 option network 'mesh'
 option mode 'adhoc'
 option bssid '02:16:e8:6a:0b:1e'
 option ssid 'mesh.test'
 option hidden '0'
 option macfilter 'allow'
 option encryption 'psk2'
 option key '1234567890'
 
 Problem:
 
 wifi down
 wifi up
 command failed: Device or resource busy (-16)
 Configuration file: /var/run/hostapd-phy0.conf
 Using interface wlan0 with hwaddr 5f:e9:98:5c:3e:36 and ssid
 test.net http://test.net
 
 Successfully initialized wpa_supplicant
 Line 12: unknown network field 'beacon_interval'.
 Line 33: failed to parse network block.
 
 Failed to read or parse configuration
 '/var/run/wpa_supplicant-adhoc0.conf'.
 enable_mac80211(radio0): Failed to set up wpa_supplicant for interface
 adhoc0
 
 
 Details:
 
 # cat