From what I understood reading the
OpenWRT wireless documentation, phy and path are two attributes used to identify physical radio devices, "phy" is the common attribute which can be used on all drivers, while "path" is specific to the mac80211 driver.
The documentation says:
phy: Specifies the radio phy associated to this section. If present, it is usually autodetected and should not be changed. [bold red added by me]
path: Alternative to phy used to identify the device based paths in /sys/devices
Since the phy / path attribute is automatically detected and set by OpenWRT, in most cases we don't need to change it, and that's why the default value of the "phy" attribute in OpenWISP 2 is an empty string, which is then ignored by
netjsonconfig.
Therefore, this radio template:
{
"radios": [
{
"name": "radio0",
"protocol": "802.11n",
"phy": "",
"country": "IT",
"driver": "mac80211",
"disabled": false,
"tx_power": 10,
"channel": 3,
"channel_width": 20
}
]
}
Will be converted to UCI by
netjsonconfig in the following way:
config wifi-device 'radio0'
option channel '3'
option country 'IT'
option disabled '0'
option htmode 'HT20'
option hwmode '11g'
option txpower '10'
option type 'mac80211'
Notice there's no phy/path attribute.
When openwisp-config will merge this bit of configuration with the local one, the phy/path attribute which was autodetermined by OpenWRT won't be changed. So you can keep the general information in OpenWISP2 and delegate these hardware details entirely to OpenWRT.
Otherwise you can just set phy0 or phy1 (if your devices have a second radio) which are surely easier to fill in than the path attribute.
Federico
PS: thank you for your feedback and appreciation :-)