Netjsonconfig always generates something in network when interfaces are
defined. If an interface in package network has proto "none" it does not do
much. It's done this way to keep the implementation simple and sane to
handle. Complexity can get out of control far too easily with systems like
OpenWISP.
Try with this:
{
"interfaces": [
{
"wireless": {
"network": [
"test"
],
"mode": "access_point",
"radio": "radio0",
"ssid": "test",
"hidden": false,
"wds": false,
"encryption": {
"protocol": "none"
},
"wmm": true,
"isolate": false
},
"type": "wireless",
"name": "test",
"mtu": 1500,
"network": "test"
}
]
}
Which generates:
package network
config interface 'test'
option ifname 'test'
option mtu '1500'
option proto 'none'
package wireless
config wifi-iface 'wifi_test'
option device 'radio0'
option hidden '0'
option ifname 'test'
option isolate '0'
option mode 'ap'
option network 'test'
option ssid 'test'
option wds '0'
option wmm '1'
On Wed, Mar 28, 2018 at 9:48 AM Yasen Atanasov <[email protected]> wrote:
> I was hoping to get a little insight with understanding where picies are
> stored and hol can i duplicate and modify one but ... :)
>
> The option with advanced mode is not what i've want. Because it creates a
> section in package network, and taht is waht i'm trying to avoid.
>
> The minimal uci config given for wireless interface is:
>
> package network
>
> config interface 'test'
> option auto '1'
> option enabled '1'
> option ifname 'test'
> option mtu '1500'
> option proto 'none'
>
> package wireless
>
> config wifi-iface 'wifi_test'
> option device 'radio'
> option disabled '0'
> option hidden '0'
> option ifname 'test'
> option isolate '0'
> option macfilter 'disable'
> option mode 'ap'
> option wds '0'
> option wmm '1'
>
> What i need is the things in "package wireless" . The option ifname should
> take its value from input string field, not by interface name.
> And I think this template should be called "wirless netwowrk" and probably
> should be in Radios section. JSON producing the above config is
>
> {
> "interfaces": [
> {
> "wireless": {
> "mode": "access_point",
> "rts_threshold": 0,
> "frag_threshold": 0,
> "radio": "radio",
> "ack_distance": 0,
> "ssid": "",
> "hidden": false,
> "wds": false,
> "encryption": {
> "protocol": "none"
> },
> "macfilter": "disable",
> "wmm": true,
> "maclist": [],
> "isolate": false,
> "network": []
> },
> "type": "wireless",
> "name": "test",
> "mtu": 1500,
> "disabled": false,
> "addresses": [],
> "autostart": true,
> "network": "",
> "mac": ""
> }
> ]
> }
>
> I have almost zero knowledge about json, and i'm prithee sure that i'm doing
> something wrong, but...
> Isupose the jason i want is something like this :
>
> {
> "wireless": {
> "mode": "access_point",
> "rts_threshold": 0,
> "frag_threshold": 0,
> "radio": "radio",
> "ack_distance": 0,
> "ssid": "",
> "hidden": false,
> "wds": false,
> "encryption": {
> "protocol": "none"
> },
> "macfilter": "disable",
> "wmm": true,
> "maclist": [],
> "isolate": false,
> },
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenWISP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.