diff options
| author | Mykyta Dorokhin <mykyta.dorokhin@globallogic.com> | 2020-02-19 15:40:44 +0200 |
|---|---|---|
| committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-05-21 10:40:11 +0300 |
| commit | 19ca401463153a7694a320f543852412d74cbd8f (patch) | |
| tree | e3720d485786f1f2fc78c909fc2ad2f97829ab8d /recipes-core/multitech/config | |
| parent | ed016261befcdc421ae1ac5d28d21066b56f42f2 (diff) | |
| parent | 92cbb8fb30c624d3be98d6408d6ff7f03264a2c9 (diff) | |
| download | meta-mlinux-19ca401463153a7694a320f543852412d74cbd8f.tar.gz meta-mlinux-19ca401463153a7694a320f543852412d74cbd8f.tar.bz2 meta-mlinux-19ca401463153a7694a320f543852412d74cbd8f.zip | |
mpower-dev-thud: merge meta-mlinux:master (92cbb8fb Feb 11 2020) to meta-mlinux:multiarch5-thud (ed01626 Feb 3 2020)
Diffstat (limited to 'recipes-core/multitech/config')
33 files changed, 2701 insertions, 22 deletions
diff --git a/recipes-core/multitech/config/99_radio b/recipes-core/multitech/config/99_radio new file mode 100644 index 0000000..c2aa885 --- /dev/null +++ b/recipes-core/multitech/config/99_radio @@ -0,0 +1,24 @@ +# This configuration file lists filesystem objects that should get verified +# during startup and be created if missing. +# +# Every line must either be a comment starting with # +# or a definition of format: +# <type> <owner> <group> <mode> <path> <linksource> +# where the items are separated by whitespace ! +# +# <type> : d|f|l : (d)irectory|(f)ile|(l)ink +# +# A linking example: +# l root root 0777 /var/test /tmp/testfile +# f root root 0644 /var/test none +# +# Understanding links: +# When populate-volatile is to verify/create a directory or file, it will first +# check it's existence. If a link is found to exist in the place of the target, +# the path of the target is replaced with the target the link points to. +# Thus, if a link is in the place to be verified, the object will be created +# in the place the link points to instead. +# This explains the order of "link before object" as in the example above, where +# a link will be created at /var/test pointing to /tmp/testfile and due to this +# link the file defined as /var/test will actually be created as /tmp/testfile. +d root dialout 2775 /run/radio none diff --git a/recipes-core/multitech/config/chat_wrapper b/recipes-core/multitech/config/chat_wrapper new file mode 100755 index 0000000..f1fd30c --- /dev/null +++ b/recipes-core/multitech/config/chat_wrapper @@ -0,0 +1,205 @@ +#!/bin/bash + +# Rules for chat scripts +# No comments allowed at the end of AT+CGDCONT in chat script +# The last AT+CGDCONT= must use the same context as the dialer. +# If desired, The AT+CGDCONT may be prefixed by #MT[[:space:]]+ +# Example: +#MT AT+CGDCONT="IPV6","data","192.168.2.1",0,1,"EXTRA" +# +# If you do not use a comment, the entire AT+CGDCONT command +# must be surrounded by apostrophes. This command will be executed +# twice, once in the chat wrapper, and a 2nd time in the chat +# itself. +# +# The space after "#MT" may be any number including tabs. +# If #MT AT+CGDCONT= is found, only the last one is chosen. +# Any uncommented AT+CGDCONT= is then ignored. +# If there are not #MT AT+CGDCONT= lines, then any line without +# a comment chararacter before AT+CGDONT= is accepted, but only the +# last one in the file. + +NAME=chat_wrapper +CONFIG=/etc/default/${NAME} +function finish +{ + ${LOG} "Launch:" "$@" + exec "$@" + # NOTREACHED +} + +[[ -f $CONFIG ]] || exit 1 + +. ${CONFIG} + +: ${REGWAITTIME:=300} +: ${FINALWAIT:=5} + +: ${LOG:="/usr/bin/logger -t ${NAME} -p daemon.notice"} + +${LOG} Timeout is $REGWAITTIME, execute "$@" +((i=$#)) +chatscript="${!i}" +${LOG} Parsing chat script "$chatscript" + +# CONTEXT is last context string in chat script +CONTEXT=$(egrep "^#MT[[:space:]]+(AT\+CGDCONT=.*)" ${chatscript} | tail -1) +if ((${#CONTEXT} == 0)) ; then + CONTEXT=$(egrep "^[^#]+AT\+CGDCONT=" ${chatscript} | tail -1) + [[ $CONTEXT =~ \'(AT\+CGDCONT=([0-9]+)[^$\']+) ]] +else + [[ $CONTEXT =~ (AT\+CGDCONT=([0-9]+).*)$ ]] +fi + +# CONTEXTNUM is the context number that is configured in the dialer. +CONTEXT="${BASH_REMATCH[1]}" +if ((${#CONTEXT} == 0)) ; then + ${LOG} No context specifiction in the chat script + finish "$@" + # NOTREACHED +fi +((CONTEXTNUM=${BASH_REMATCH[2]})) + + +${LOG} "Using Context ${CONTEXTNUM} based on chat script: ${CONTEXT}" + +# At this point if there is no context number, we can skip everything else. + +# Get Modem's context settings +MCONTEXT=$(/usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+CGDCONT?' 2>&1 | tr -d '\r') +if [[ $MCONTEXT =~ [Ee][Rr][Rr][Oo][Rr] ]] ; then + RADIOOPTION="${RADIOOPTION2}" + MCONTEXT=$(/usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+CGDCONT?' 2>&1 | tr -d '\r') +fi + +if ! [[ $MCONTEXT =~ \+CGDCONT:[[:space:]]+${CONTEXTNUM},\"([^\"]*)\",\"([^\"]*)\",\"([^\"]*)\",([0-9]+),([0-9]+)([^$'\n']*) ]] ; then + logger -s -p daemon.error "No valid context in modem. Is it ready?" + echo "$MCONTEXT" | logger -s -p daemon.error +fi + +MPDP="${BASH_REMATCH[1]}" +MAPN="${BASH_REMATCH[2]}" +MADDR="${BASH_REMATCH[3]}" +MDCOMP="${BASH_REMATCH[4]}" +MHCOMP="${BASH_REMATCH[5]}" +MFULLBOAT="${BASH_REMATCH[6]}" + +[[ $CONTEXT =~ AT\+CGDCONT=${CONTEXTNUM},\"([^\"]*)\",\"([^\"]*)\"(,\"([^\"]*)\"(,([0-9]+)(,([0-9]+)(,[^\']*))*)*)* ]] +PDP="${BASH_REMATCH[1]}" +APN="${BASH_REMATCH[2]}" +ADDR="${BASH_REMATCH[4]}" # Optional +DCOMP="${BASH_REMATCH[6]}" # Optional +HCOMP="${BASH_REMATCH[8]}" # Optional +FULLBOAT="${BASH_REMATCH[9]}" # Optional + +# On some modems there are more parameters than others. +if [[ $MFULLBOAT != $FULLBOAT ]] ; then + ${LOG} "Only the first five context parameters are considered. The rest will be ignored." + ${LOG} "modem: \"$MFULLBOAT\"" + ${LOG} "chat script: \"$FULLBOAT\"" +fi + +if ((${#DCOMP} == 0)) ; then + ((DCOMP=0)) # Default +fi +if ((${#HCOMP} == 0)) ; then + ((HCOMP=0)) # Default +fi + +# Only update context on a mismatch between chat and modem. +if [[ $MPDP != $PDP ]] || [[ $MAPN != $APN ]] || \ + [[ $MADDR != $ADDR ]] || ((MDCOMP != DCOMP)) || \ + ((MHCOMP != HCOMP)) ; then + ${LOG} "Modem context $MPDP,$MAPN,$MADDR,$MDCOMP,$MHCOMP does not match chat script" + ${LOG} "Chat script context $PDP,$APN,$ADDR,$DCOMP,$HCOMP does not match the modem" + if [[ $MPDP != $PDP ]] ; then + ${LOG} "PDP mismatch" + fi + if [[ $MAPN != $APN ]] ; then + ${LOG} "APN mismatch" + fi + if [[ $MADDR != $ADDR ]] ; then + ${LOG} "ADDR mismatch" + fi + if [[ $MDCOMP != $DCOMP ]] ; then + ${LOG} "DCOMP mismatch" + fi + if [[ $MHCOMP != $HCOMP ]] ; then + ${LOG} "HCOMP mismatch" + fi + if [[ $MFULLBOAT != $FULLBOAT ]] ; then + ${LOG} "Final parameter mismatches ignored" + ${LOG} "Parameter 6 and up on the modem:" + ${LOG} "\"${MFULLBOAT}\"" + ${LOG} "Parameter 6 and up on the chat script:" + ${LOG} "\"${FULLBOAT}\"" + fi + ${LOG} "$MCONTEXT" + ${LOG} "Dropping registration with carrier to set context" + # Need to deregister + /usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+COPS=2' + # H5 radios do not like addresses that are empty with "" + if ((${#ADDR} == 0)) ; then + CMDSTR="AT+CGDCONT=${CONTEXTNUM},\"${PDP}\",\"${APN}\",,$DCOMP,${HCOMP}${FULLBOAT}" + else + CMDSTR="AT+CGDCONT=${CONTEXTNUM},\"${PDP}\",\"${APN}\",\"${ADDR}\",$DCOMP,${HCOMP}${FULLBOAT}" + fi + ${LOG} "Issued command /usr/bin/radio-cmd ${RADIOOPTION} -t10000 ..." + ${LOG} "... ${CMDSTR}" + + # If we fail to set the APN, sleep and try it again for up to 10 seconds. + result=1 + count=10 + while ((result != 0)) && ((count > 0)) ; do + ((count--)) || true + LOGMSG=$(/usr/bin/radio-cmd ${RADIOOPTION} -t10000 "${CMDSTR}" 2>&1) + result=$? + ${LOG} "Result ${result}, Got response ${LOGMSG}" + if [[ $LOGMSG =~ ERROR ]] ; then + result=1 + fi + sleep 1 + done + + # re-enable the modem to defaults. + /usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+COPS=0' + sleep 1 + + # Some older modems will not re-register after the COPS + # command if you do not reset them using CFUN. + /usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+CFUN=0' + /usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+CFUN=1' + + # Abort PPP if the Context is not correct. We don't want + # to cause the carrier to disable the account by dialing + # out with a bad APN. + if ((result != 0)) ; then + ${LOG} "AT+CGDCONT failed, aborting" + exit $result + fi + sleep 1 + ${LOG} "New context is set. Wait up to $REGWAITTIME seconds to register" + # Wait for registration + uptime=$(cat /proc/uptime) + [[ $uptime =~ ^([^\.]*) ]] + t0=${BASH_REMATCH[1]} + while ! [[ $(/usr/bin/radio-query ${RADIOOPTION} --netreg) =~ ^REGISTERED$ ]] ; do + sleep 5 + uptime=$(cat /proc/uptime) + [[ $uptime =~ ^([^\.]*) ]] + t1=${BASH_REMATCH[1]} + if ((t1-t0 > REGWAITTIME)) ; then + ${LOG} "$((t1-t0)) seconds has expired" + exit 1 + fi + done + uptime=$(cat /proc/uptime) + [[ $uptime =~ ^([^\.]*) ]] + t1=${BASH_REMATCH[1]} + ${LOG} "Re-registered in $((t1-t0)) seconds -- wait ${FINALWAIT} more seconds" + sleep $FINALWAIT +else + ${LOG} "Context $CONTEXTNUM matches and nothing to do." +fi +finish "$@" +# NOTREACHED diff --git a/recipes-core/multitech/config/chat_wrapper.default b/recipes-core/multitech/config/chat_wrapper.default new file mode 100644 index 0000000..a1b4e41 --- /dev/null +++ b/recipes-core/multitech/config/chat_wrapper.default @@ -0,0 +1,20 @@ +# The maximum time to wait for registration +# when changing the modem context parameters. +# This is ignored if the context is +# already set correctly in the modem. +REGWAITTIME=300 + +# The time to wait after registration +# when setting the context +# before attempting a PPP connection. +# This is ignored if the context is +# already set correctly in the modem. +FINALWAIT=5 + +# Option for radio-query, radio-cmd +# Used by /usr/libexec/ppp/chat_wrapper, +# mlinux-switch-apn, mlinux-switch-cell-fw +RADIOOPTION="-d /dev/modem_at1" + +# Device to use if RADIOOPTION fails: +RADIOOPTION2="-d /dev/modem_at0" diff --git a/recipes-core/multitech/config/config-mths/default/bluetooth b/recipes-core/multitech/config/config-mths/default/bluetooth new file mode 100644 index 0000000..ec46cfd --- /dev/null +++ b/recipes-core/multitech/config/config-mths/default/bluetooth @@ -0,0 +1,8 @@ +# Set to 1 to enable bluetooth daemon +BLUETOOTH_ENABLED=1 + +# Use the following to setup bluetooth usability +BLUETOOTHCTL_CMD="power on\ndiscoverable on\npairable on\n" + +#Compatilitity mode +#MOREOPTIONS="-C" diff --git a/recipes-core/multitech/config/config-mths/default/dnsmasq b/recipes-core/multitech/config/config-mths/default/dnsmasq new file mode 100644 index 0000000..129fda1 --- /dev/null +++ b/recipes-core/multitech/config/config-mths/default/dnsmasq @@ -0,0 +1,27 @@ +# MTHS dnsmasq +# and a hook to set up config files for MTHS +ENABLED="yes" + +# This configuration is for manufacturing test. +# Factory resets should not put back wifi defaults. +if [[ -f /var/config/.defaults2.tar.gz ]] ; then + rm /var/config/.defaults2.tar.gz +fi + +# Stop ntpd. ntpd default is in root. +sed -i 's/ENABLED="yes"/ENABLED="no"/' /etc/default/ntpd +# Use the ifplugd in /var/config +if ! [[ -L /etc/ifplugd ]] ; then + rm -rf /etc/ifplugd + ln -s /var/config/ifplugd /etc/ifplugd + # ifplugd is already started (and probably bombed) + # restart it. + /etc/init.d/ifplugd stop + /etc/init.d/ifplugd start +fi + +if ! [[ -L /etc/default/usb-gadget ]] && [[ -f /var/config/default/usb-gadget ]] ; then + rm -rf /etc/default/usb-gadget + ln -s /var/config/default/usb-gadget /etc/default/usb-gadget +fi + diff --git a/recipes-core/multitech/config/config-mths/default/hostapd b/recipes-core/multitech/config/config-mths/default/hostapd new file mode 100644 index 0000000..75c1c8a --- /dev/null +++ b/recipes-core/multitech/config/config-mths/default/hostapd @@ -0,0 +1,11 @@ +# set to "yes" to start hostapd on boot +START_ON_BOOT="yes" +DEVICEID=$(cat /sys/devices/platform/mts-io/device-id) +SSID="hs-${DEVICEID}" +CONF=/etc/hostapd.conf + +PREUP="ifdown wifi1 + ifup wifi1 + sed -ri 's/^ssid=.*/ssid=hs-'${DEVICEID}/ ${CONF} + logger -s -t hostapd -p daemon.alert 'hostapd SSID line is '${SSID}" + diff --git a/recipes-core/multitech/config/config-mths/default/ntpd b/recipes-core/multitech/config/config-mths/default/ntpd new file mode 100644 index 0000000..a0d3bcf --- /dev/null +++ b/recipes-core/multitech/config/config-mths/default/ntpd @@ -0,0 +1,36 @@ +ENABLED="no" + + +CONFIGFILE=/etc/ntp.conf + +# The GPSD_* parameters in this file are ignored +# if the uBlox GPS is not present. + +# Require a GPS lock/fix before starting NTP +# This is needed if we are not using NTP servers. +# NTP will not work with the GPS if the GPS is not +# locked before starting. +# See /etc/default/gpsd for the states required. +GPSD_REQUIRED=0 + +# Number of seconds between testing for a GPS +# lock prior to calling ntpd. +GPSD_WAIT_TIME=120 + +# Since the HW Clock could be off by a second or +# so, our GPS might get marked as a false ticker +# if we do not set the system clock to the GPS +# first. The current correct way to do this +# according to the ntp doc is ntpd -gq -c conffile +# which must be done before ntpd is started. +# conffile should exclude the local clock, so it is +# ignored while doing the initial sync. +# ntpd -gq apparently does not work with the GPS +# when tested with the clock more than one day off +# and no ntpd. The gps shared memory is never polled. +# +# If there is a uBlox GPS present, the time is +# read from the GPS to initialize the system time +# before NTP is started. +SET_SYSTEM_CLOCK=1 + diff --git a/recipes-core/multitech/config/config-mths/default/rs9113 b/recipes-core/multitech/config/config-mths/default/rs9113 new file mode 100644 index 0000000..2594625 --- /dev/null +++ b/recipes-core/multitech/config/config-mths/default/rs9113 @@ -0,0 +1,14 @@ +RS9113_LOAD=1 +RSI_ANTENNA_DIVERSITY=0 +COEX_MODE=6 +WLAN_RF_PWR_MODE=0x00 +BT_RF_PWR_MODE=0x00 +BT_RF_TX_POWER_MODE=0 +BT_RF_RX_POWER_MODE=0 +SET_COUNTRY_CODE=0 +ANT_SEL_VAL=2 +ONBOARD_ANT_SEL=1 +SET_RETRY_COUNT=15 +SLEEPTIME=100000 +INTSLEEPTIME=100000 + diff --git a/recipes-core/multitech/config/config-mths/default/usb-gadget b/recipes-core/multitech/config/config-mths/default/usb-gadget new file mode 100644 index 0000000..944ef8a --- /dev/null +++ b/recipes-core/multitech/config/config-mths/default/usb-gadget @@ -0,0 +1,6 @@ +# set to "no" to disable usb-gadget +ENABLED="yes" + +USB_MODE="networking" +MODULE_OPTIONS="" + diff --git a/recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf b/recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf new file mode 100644 index 0000000..47eb1c0 --- /dev/null +++ b/recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf @@ -0,0 +1,12 @@ +interface=wifi1 +dhcp-range=10.0.0.100,10.0.0.250,12h +dhcp-lease-max=200 +dhcp-leasefile=/var/config/dnsmasq_dhcp_wifi1.leases +dhcp-option=option:netmask,255.255.255.0 +dhcp-option=option:router,10.0.0.1 +dhcp-option=option:dns-server,10.0.0.1 +dhcp-authoritative +interface=usb0 +dhcp-range=192.168.3.100,192.168.3.250,12h +dhcp-option=option:router,192.168.3.1 +dhcp-option=option:dns-server,192.168.3.1 diff --git a/recipes-core/multitech/config/config-mths/hostapd.conf b/recipes-core/multitech/config/config-mths/hostapd.conf new file mode 100644 index 0000000..8acd72b --- /dev/null +++ b/recipes-core/multitech/config/config-mths/hostapd.conf @@ -0,0 +1,1996 @@ +##### hostapd configuration file ############################################## +# Empty lines and lines starting with # are ignored + +# AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for +# management frames with the Host AP driver); wlan0 with many nl80211 drivers +# Note: This attribute can be overridden by the values supplied with the '-i' +# command line parameter. +interface=wifi1 + +# In case of atheros and nl80211 driver interfaces, an additional +# configuration parameter, bridge, may be used to notify hostapd if the +# interface is included in a bridge. This parameter is not used with Host AP +# driver. If the bridge parameter is not set, the drivers will automatically +# figure out the bridge interface (assuming sysfs is enabled and mounted to +# /sys) and this parameter may not be needed. +# +# For nl80211, this parameter can be used to request the AP interface to be +# added to the bridge automatically (brctl may refuse to do this before hostapd +# has been started to change the interface mode). If needed, the bridge +# interface is also created. +#bridge=br0 + +# Driver interface type (hostap/wired/none/nl80211/bsd); +# default: hostap). nl80211 is used with all Linux mac80211 drivers. +# Use driver=none if building hostapd as a standalone RADIUS server that does +# not control any wireless/wired driver. +# driver=hostap + +# Driver interface parameters (mainly for development testing use) +# driver_params=<params> + +# hostapd event logger configuration +# +# Two output method: syslog and stdout (only usable if not forking to +# background). +# +# Module bitfield (ORed bitfield of modules that will be logged; -1 = all +# modules): +# bit 0 (1) = IEEE 802.11 +# bit 1 (2) = IEEE 802.1X +# bit 2 (4) = RADIUS +# bit 3 (8) = WPA +# bit 4 (16) = driver interface +# bit 5 (32) = IAPP +# bit 6 (64) = MLME +# +# Levels (minimum value for logged events): +# 0 = verbose debugging +# 1 = debugging +# 2 = informational messages +# 3 = notification +# 4 = warning +# +logger_syslog=-1 +logger_syslog_level=2 +logger_stdout=-1 +logger_stdout_level=2 + +# Interface for separate control program. If this is specified, hostapd +# will create this directory and a UNIX domain socket for listening to requests +# from external programs (CLI/GUI, etc.) for status information and +# configuration. The socket file will be named based on the interface name, so +# multiple hostapd processes/interfaces can be run at the same time if more +# than one interface is used. +# /var/run/hostapd is the recommended directory for sockets and by default, +# hostapd_cli will use it when trying to connect with hostapd. +ctrl_interface=/var/run/hostapd + +# Access control for the control interface can be configured by setting the +# directory to allow only members of a group to use sockets. This way, it is +# possible to run hostapd as root (since it needs to change network +# configuration and open raw sockets) and still allow GUI/CLI components to be +# run as non-root users. However, since the control interface can be used to +# change the network configuration, this access needs to be protected in many +# cases. By default, hostapd is configured to use gid 0 (root). If you +# want to allow non-root users to use the contron interface, add a new group +# and change this value to match with that group. Add users that should have +# control interface access to this group. +# +# This variable can be a group name or gid. +#ctrl_interface_group=wheel +ctrl_interface_group=0 + + +##### IEEE 802.11 related configuration ####################################### + +# SSID to be used in IEEE 802.11 management frames +ssid=hs- +# Alternative formats for configuring SSID +# (double quoted string, hexdump, printf-escaped string) +#ssid2="test" +#ssid2=74657374 +#ssid2=P"hello\nthere" + +# UTF-8 SSID: Whether the SSID is to be interpreted using UTF-8 encoding +#utf8_ssid=1 + +# Country code (ISO/IEC 3166-1). Used to set regulatory domain. +# Set as needed to indicate country in which device is operating. +# This can limit available channels and transmit power. +country_code=US + +# Enable IEEE 802.11d. This advertises the country_code and the set of allowed +# channels and transmit power levels based on the regulatory limits. The +# country_code setting must be configured with the correct country for +# IEEE 802.11d functions. +# (default: 0 = disabled) +#ieee80211d=1 + +# Enable IEEE 802.11h. This enables radar detection and DFS support if +# available. DFS support is required on outdoor 5 GHz channels in most countries +# of the world. This can be used only with ieee80211d=1. +# (default: 0 = disabled) +#ieee80211h=1 + +# Add Power Constraint element to Beacon and Probe Response frames +# This config option adds Power Constraint element when applicable and Country +# element is added. Power Constraint element is required by Transmit Power +# Control. This can be used only with ieee80211d=1. +# Valid values are 0..255. +#local_pwr_constraint=3 + +# Set Spectrum Management subfield in the Capability Information field. +# This config option forces the Spectrum Management bit to be set. When this +# option is not set, the value of the Spectrum Management bit depends on whether +# DFS or TPC is required by regulatory authorities. This can be used only with +# ieee80211d=1 and local_pwr_constraint configured. +#spectrum_mgmt_required=1 + +# Operation mode (a = IEEE 802.11a (5 GHz), b = IEEE 802.11b (2.4 GHz), +# g = IEEE 802.11g (2.4 GHz), ad = IEEE 802.11ad (60 GHz); a/g options are used +# with IEEE 802.11n (HT), too, to specify band). For IEEE 802.11ac (VHT), this +# needs to be set to hw_mode=a. When using ACS (see channel parameter), a +# special value "any" can be used to indicate that any support band can be used. +# This special case is currently supported only with drivers with which +# offloaded ACS is used. +# Default: IEEE 802.11b +hw_mode=g + +# Channel number (IEEE 802.11) +# (default: 0, i.e., not set) +# Please note that some drivers do not use this value from hostapd and the +# channel will need to be configured separately with iwconfig. +# +# If CONFIG_ACS build option is enabled, the channel can be selected +# automatically at run time by setting channel=acs_survey or channel=0, both of +# which will enable the ACS survey based algorithm. +channel=10 + +# ACS tuning - Automatic Channel Selection +# See: http://wireless.kernel.org/en/users/Documentation/acs +# +# You can customize the ACS survey algorithm with following variables: +# +# acs_num_scans requirement is 1..100 - number of scans to be performed that +# are used to trigger survey data gathering of an underlying device driver. +# Scans are passive and typically take a little over 100ms (depending on the +# driver) on each available channel for given hw_mode. Increasing this value +# means sacrificing startup time and gathering more data wrt channel +# interference that may help choosing a better channel. This can also help fine +# tune the ACS scan time in case a driver has different scan dwell times. +# +# acs_chan_bias is a space-separated list of <channel>:<bias> pairs. It can be +# used to increase (or decrease) the likelihood of a specific channel to be +# selected by the ACS algorithm. The total interference factor for each channel +# gets multiplied by the specified bias value before finding the channel with +# the lowest value. In other words, values between 0.0 and 1.0 can be used to +# make a channel more likely to be picked while values larger than 1.0 make the +# specified channel less likely to be picked. This can be used, e.g., to prefer +# the commonly used 2.4 GHz band channels 1, 6, and 11 (which is the default +# behavior on 2.4 GHz band if no acs_chan_bias parameter is specified). +# +# Defaults: +#acs_num_scans=5 +#acs_chan_bias=1:0.8 6:0.8 11:0.8 + +# Channel list restriction. This option allows hostapd to select one of the +# provided channels when a channel should be automatically selected. +# Channel list can be provided as range using hyphen ('-') or individual +# channels can be specified by space (' ') separated values +# Default: all channels allowed in selected hw_mode +#chanlist=100 104 108 112 116 +#chanlist=1 6 11-13 + +# Beacon interval in kus (1.024 ms) (default: 100; range 15..65535) +beacon_int=100 + +# DTIM (delivery traffic information message) period (range 1..255): +# number of beacons between DTIMs (1 = every beacon includes DTIM element) +# (default: 2) +dtim_period=2 + +# Maximum number of stations allowed in station table. New stations will be +# rejected after the station table is full. IEEE 802.11 has a limit of 2007 +# different association IDs, so this number should not be larger than that. +# (default: 2007) +max_num_sta=255 + +# RTS/CTS threshold; -1 = disabled (default); range -1..65535 +# If this field is not included in hostapd.conf, hostapd will not control +# RTS threshold and 'iwconfig wlan# rts <val>' can be used to set it. +rts_threshold=-1 + +# Fragmentation threshold; -1 = disabled (default); range -1, 256..2346 +# If this field is not included in hostapd.conf, hostapd will not control +# fragmentation threshold and 'iwconfig wlan# frag <val>' can be used to set +# it. +fragm_threshold=-1 + +# Rate configuration +# Default is to enable all rates supported by the hardware. This configuration +# item allows this list be filtered so that only the listed rates will be left +# in the list. If the list is empty, all rates are used. This list can have +# entries that are not in the list of rates the hardware supports (such entries +# are ignored). The entries in this list are in 100 kbps, i.e., 11 Mbps = 110. +# If this item is present, at least one rate have to be matching with the rates +# hardware supports. +# default: use the most common supported rate setting for the selected +# hw_mode (i.e., this line can be removed from configuration file in most +# cases) +#supported_rates=10 20 55 110 60 90 120 180 240 360 480 540 + +# Basic rate set configuration +# List of rates (in 100 kbps) that are included in the basic rate set. +# If this item is not included, usually reasonable default set is used. +#basic_rates=10 20 +#basic_rates=10 20 55 110 +#basic_rates=60 120 240 + +# Short Preamble +# This parameter can be used to enable optional use of short preamble for +# frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance. +# This applies only to IEEE 802.11b-compatible networks and this should only be +# enabled if the local hardware supports use of short preamble. If any of the +# associated STAs do not support short preamble, use of short preamble will be +# disabled (and enabled when such STAs disassociate) dynamically. +# 0 = do not allow use of short preamble (default) +# 1 = allow use of short preamble +#preamble=1 + +# Station MAC address -based authentication +# Please note that this kind of access control requires a driver that uses +# hostapd to take care of management frame processing and as such, this can be +# used with driver=hostap or driver=nl80211, but not with driver=atheros. +# 0 = accept unless in deny list +# 1 = deny unless in accept list +# 2 = use external RADIUS server (accept/deny lists are searched first) +macaddr_acl=0 + +# Accept/deny lists are read from separate files (containing list of +# MAC addresses, one per line). Use absolute path name to make sure that the +# files can be read on SIGHUP configuration reloads. +#accept_mac_file=/etc/hostapd.accept |
