Wireless autoconf » Historial » Revisió 7
Revisió 6 (Pau Escrich, 13-06-2011 18:00) → Revisió 7/15 (Pau Escrich, 13-06-2011 18:00)
h1. Wireless autoconf h2. Technical information (for developers) Wireless configuration for file: /etc/config/qmp These are the default parameters sharing all wireless interfaces <pre> config 'qmp' 'wireless' option 'driver' 'mac80211' option 'country' 'UZ' option 'bssid' '02:CA:FF:EE:BA:BE' </pre> driver can be `mac80211` for athXk, and `madwifi` for madwifi And these are the config parameters for each wifi interface. <pre> config 'wireless' option 'channel' '44' option 'mode' 'adhoc' option 'name' 'qmp' option 'mac' '00:80:48:6b:25:b5' config 'wireless' option 'channel' '10' option 'mode' 'ap' option 'name' 'qmp.cat-AP' option 'mac' '00:80:48:6b:25:b6' </pre> To apply this configuration to device, you must execute this commands: <pre> . /etc/qmp/qmp_wireless.sh qmp_configure_wifi </pre> This function takes the parameters from UCI and using the templates from: /etc/qmp/templates creates the openwrt wireless config Templates are named like that: wireless.mac80211.adhoc wireless.madwifi.ap Separed by dots, second name is the driver to use and third one is the mode. These templates looks like this: <pre> config wifi-device #QMP_DEVICE option type mac80211 option macaddr #QMP_MAC option channel #QMP_CHANNEL option diversity 0 # 0:off, 1:on option txantenna 0 # 0:auto, 1:main, 2:aux option rxantenna 0 # 0:auto, 1:main, 2:aux option country #QMP_COUNTRY option outdoor 1 # option txpower 1 config wifi-iface option device #QMP_DEVICE option mode adhoc option ssid #QMP_SSID option bssid #QMP_BSSID option encryption none </pre> As you can see, the special words starting witch #QMP will be replaced by UCI parameters. So you can play a little with templates. For example, there is a template named: `wireless.mac80211.adhoc-n`