summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README15
-rw-r--r--recipes-connectivity/lldpd/lldpd/lldpd.default3
-rw-r--r--recipes-connectivity/lldpd/lldpd/lldpd.init.d129
-rw-r--r--recipes-connectivity/lldpd/lldpd_%.bbappend1
-rw-r--r--recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb8
-rw-r--r--recipes-connectivity/lora/lora-gateway/lora-gateway-gpsd.patch219
-rw-r--r--recipes-connectivity/lora/lora-gateway/lora-gateway-spectral-scan-skip-fpga-reset.patch25
-rw-r--r--recipes-connectivity/lora/lora-logging.bb2
-rw-r--r--recipes-connectivity/lora/lora-logging/lora-logging.logrotate.conf4
-rw-r--r--recipes-connectivity/lora/lora-network-server_2.3.3.bb48
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb8
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic128
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic128
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic128
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic112
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic128
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic128
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic112
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic128
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-dedup-rx.patch66
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch86
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-gpsd.patch9
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-jit-queue-increase-peek-and-remove-sort-from-dequeue.patch36
-rw-r--r--recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch99
-rw-r--r--recipes-connectivity/openssh/openssh/init153
-rw-r--r--recipes-connectivity/openssh/openssh/openssh-8.1p1-add-test-support-for-busybox.patch48
-rw-r--r--recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-cipher.patch13
-rw-r--r--recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-pkcs11.patch52
-rwxr-xr-xrecipes-connectivity/openssh/openssh/run-ptest44
-rw-r--r--recipes-connectivity/openssh/openssh/ssh_config48
-rw-r--r--recipes-connectivity/openssh/openssh/sshd11
-rw-r--r--recipes-connectivity/openssh/openssh/sshd.socket10
-rw-r--r--recipes-connectivity/openssh/openssh/sshd@.service13
-rw-r--r--recipes-connectivity/openssh/openssh/sshd_config132
-rw-r--r--recipes-connectivity/openssh/openssh/sshdgenkeys.service22
-rw-r--r--recipes-connectivity/openssh/openssh/volatiles.99_sshd2
-rw-r--r--recipes-connectivity/openssh/openssh_8.1p1.bb160
-rw-r--r--recipes-core/busybox/busybox_%.bbappend3
-rwxr-xr-xrecipes-core/busybox/files/ifplugd.init2
-rw-r--r--recipes-core/busybox/files/ifplugd.patch20
-rw-r--r--recipes-core/busybox/ifplugd-disable_1.0.bb28
-rw-r--r--recipes-core/images/mlinux-base-image.bb1
-rw-r--r--recipes-core/images/mlinux-basetest-image.bb9
-rw-r--r--recipes-core/images/mlinux-minimal-image.bb3
-rw-r--r--recipes-core/images/mlinux-mths-image.bb8
-rw-r--r--recipes-core/images/mlinux-mtrv1-image.bb4
-rw-r--r--recipes-core/images/mlinux-rs9113-factory-image.bb2
-rw-r--r--recipes-core/images/mlinux-rs9113-mtrv1-image.bb74
-rw-r--r--recipes-core/images/mlinux-sdk.bb2
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn119
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-apn110
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-cell-fw149
-rw-r--r--recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-radio-ready (renamed from recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready)0
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-router (renamed from recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-router)0
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-dhcpd (renamed from recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-dhcpd)0
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade (renamed from recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-firmware-upgrade)0
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-set-apn117
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-apn161
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-cell-fw211
-rwxr-xr-xrecipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-wifi-ap (renamed from recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-wifi-ap)0
-rw-r--r--recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb (renamed from recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb)2
-rw-r--r--recipes-core/multitech/commissioning_1.0.0.bb33
-rw-r--r--recipes-core/multitech/config/99_radio24
-rwxr-xr-xrecipes-core/multitech/config/chat_wrapper205
-rw-r--r--recipes-core/multitech/config/chat_wrapper.default20
-rw-r--r--recipes-core/multitech/config/config-mths/default/bluetooth8
-rw-r--r--recipes-core/multitech/config/config-mths/default/dnsmasq27
-rw-r--r--recipes-core/multitech/config/config-mths/default/hostapd11
-rw-r--r--recipes-core/multitech/config/config-mths/default/ntpd36
-rw-r--r--recipes-core/multitech/config/config-mths/default/rs911314
-rw-r--r--recipes-core/multitech/config/config-mths/default/usb-gadget6
-rw-r--r--recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf12
-rw-r--r--recipes-core/multitech/config/config-mths/hostapd.conf1996
-rwxr-xr-xrecipes-core/multitech/config/config-mths/ifplugd/ifplugd.action30
-rw-r--r--recipes-core/multitech/config/config-mths/ifplugd/usb0.conf2
-rw-r--r--recipes-core/multitech/config/config-mths/ifplugd/usb1.conf2
-rw-r--r--recipes-core/multitech/config/config-mths/modprobe.d/cfg80211.conf7
-rw-r--r--recipes-core/multitech/config/config-mths/modprobe.d/mts-io.conf1
-rw-r--r--recipes-core/multitech/config/config-mths/network/interfaces.mths12
-rw-r--r--recipes-core/multitech/config/ppp/peers/README.fwswitch (renamed from recipes-core/multitech/config/ppp/peers/README.lna3)9
-rw-r--r--recipes-core/multitech/config/ppp/peers/gsm2
-rw-r--r--recipes-core/multitech/config/ppp/peers/gsm_chat29
-rw-r--r--recipes-core/multitech/config/ppp/peers/l4e111
-rw-r--r--recipes-core/multitech/config/ppp/peers/l4e1_chat43
-rw-r--r--recipes-core/multitech/config/ppp/peers/l4n111
l---------recipes-core/multitech/config/ppp/peers/l4n1_chat1
-rw-r--r--recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz67
-rw-r--r--recipes-core/multitech/config/ppp/peers/l4n1_chat_vz44
-rw-r--r--recipes-core/multitech/config/ppp/peers/lap32
-rw-r--r--recipes-core/multitech/config/ppp/peers/lap3_chat26
-rw-r--r--recipes-core/multitech/config/ppp/peers/leu12
-rw-r--r--recipes-core/multitech/config/ppp/peers/leu1_chat23
-rw-r--r--recipes-core/multitech/config/ppp/peers/lna32
-rw-r--r--recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz36
-rw-r--r--recipes-core/multitech/config/ppp/peers/lsp32
-rw-r--r--recipes-core/multitech/config_2.1.bb40
-rw-r--r--recipes-core/multitech/config_2.3.bb95
-rw-r--r--recipes-core/sysvinit/files/start_getty_open6
-rw-r--r--recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend23
-rw-r--r--recipes-core/useradd/useradd.bb12
-rw-r--r--recipes-extended/multitech/sms-utils_1.0.6.bb (renamed from recipes-extended/multitech/sms-utils_1.0.5.bb)0
-rw-r--r--recipes-extended/sudo/files/sudo.pam6
-rw-r--r--recipes-extended/sudo/sudo.inc52
-rw-r--r--recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch34
-rw-r--r--recipes-extended/sudo/sudo_1.8.27.bb45
-rw-r--r--recipes-navigation/gpsd/gpsd/gpsd-default8
-rw-r--r--recipes-support/multitech/jsparser/Makefile69
-rw-r--r--recipes-support/multitech/libmts-io/Makefile73
-rw-r--r--recipes-support/multitech/libmts-io_1.0.18.bb30
-rw-r--r--recipes-support/multitech/libmts-io_1.0.19.bb (renamed from recipes-support/multitech/libmts-io_1.0.13.bb)0
-rw-r--r--recipes-support/multitech/radio-cmd_0.4.bb22
-rw-r--r--recipes-support/multitech/radio-cmd_0.6.bb (renamed from recipes-support/multitech/radio-cmd_0.2.bb)0
-rw-r--r--recipes-support/multitech/radio-query_0.8.bb (renamed from recipes-support/multitech/radio-query_0.7.bb)0
-rw-r--r--recipes-support/ntp/files/ntpd-init.patch31
-rw-r--r--recipes-support/ntp/ntp_%.bbappend4
-rwxr-xr-xscripts/build-feed-extras.sh6
116 files changed, 5229 insertions, 1566 deletions
diff --git a/README b/README
index 3753058..55b5a5b 100644
--- a/README
+++ b/README
@@ -3,29 +3,29 @@ MultiTech mLinux distribution OpenEmbedded layer
This layer depends on:
URI: git://git.openembedded.org/openembedded-core
-branch: daisy
+branch: morty
revision: HEAD
Numerous layers in:
URI: git://git.openembedded.org/meta-openembedded
-branch: daisy
+branch: morty
revision: HEAD
MultiTech hardware layer:
URI: git://git.multitech.net/meta-multitech
-branch: daisy
+branch: morty
revision: HEAD
URI: git://github.com/woglinde/meta-java.git
-branch: master
-revision: f4c4649
+branch: thud
+revision: a265b31
URI: git://git.yoctoproject.org/meta-mono
-branch: daisy
+branch: morty
revision: HEAD
URI: git://github.com/imyller/meta-nodejs.git
-branch: master
+branch: morty
revision: HEAD
------------
@@ -36,3 +36,4 @@ mLinux should be built using the mlinux integration repo at git://git.multitech.
or using the downloadable tarball. See http://www.multitech.net for instructions and
downloads.
+This is mLinux 5.x.y, based on Yocto-Morty and Atmel Linux 4.9.
diff --git a/recipes-connectivity/lldpd/lldpd/lldpd.default b/recipes-connectivity/lldpd/lldpd/lldpd.default
new file mode 100644
index 0000000..b33facf
--- /dev/null
+++ b/recipes-connectivity/lldpd/lldpd/lldpd.default
@@ -0,0 +1,3 @@
+ENABLED="no"
+# Uncomment to start SNMP subagent and enable CDP, SONMP and EDP protocol
+#DAEMON_ARGS="-x -c -s -e"
diff --git a/recipes-connectivity/lldpd/lldpd/lldpd.init.d b/recipes-connectivity/lldpd/lldpd/lldpd.init.d
new file mode 100644
index 0000000..d071e1b
--- /dev/null
+++ b/recipes-connectivity/lldpd/lldpd/lldpd.init.d
@@ -0,0 +1,129 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: lldpd
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: LLDP daemon
+# Description: lldpd is a 802.1AB implementation, a L2 network
+# discovery protocol. It also supports CDP, EDP and
+# various other protocols.
+### END INIT INFO
+
+# Do NOT "set -e"
+
+log_daemon_msg() {
+ echo $*
+}
+
+log_end_msg() {
+ if [ $1 -eq 0 ]; then
+ success $*
+ else
+ failure $*
+ fi
+}
+
+log_failure_msg() {
+ echo $*
+}
+
+log_success_msg() {
+ echo $*
+}
+
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="LLDP daemon"
+NAME=lldpd
+DAEMON=/usr/sbin/$NAME
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+CHROOT=/var/run/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+[ "$ENABLED" == "yes" ] || exit 0
+
+# LSB log_* functions
+. /etc/init.d/functions
+
+do_start()
+{
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+ $DAEMON_ARGS \
+ || return 2
+}
+
+do_stop()
+{
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+ [ "$?" = 2 ] && return 2
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+do_reload() {
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+ return 0
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ reload)
+ log_daemon_msg "Reloading $DESC" "$NAME"
+ do_reload
+ log_end_msg $?
+ ;;
+ restart|force-reload)
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ status)
+ status_of_proc $DAEMON $NAME -p $PIDFILE && exit 0 || exit $?
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/recipes-connectivity/lldpd/lldpd_%.bbappend b/recipes-connectivity/lldpd/lldpd_%.bbappend
new file mode 100644
index 0000000..72d991c
--- /dev/null
+++ b/recipes-connectivity/lldpd/lldpd_%.bbappend
@@ -0,0 +1 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb b/recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb
index 21a1eec..511a8b3 100644
--- a/recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb
+++ b/recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb
@@ -6,9 +6,9 @@ LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://mlinux4/LICENSE.TXT;md5=86776875df1423114abfcec938f3e565"
DEPENDS = ""
# Source revision
-PSR = "r3"
+PSR = "r4"
# Recipe revision
-PR = "r5"
+PR = "r6"
SRCREV = "v${PV}"
SRC_URI = "http://multitech.net/downloads/lora-packet-forwarder-geolocation_arm926ejste_${PV}-${PSR}.tar.gz \
@@ -16,8 +16,8 @@ SRC_URI = "http://multitech.net/downloads/lora-packet-forwarder-geolocation_arm9
file://config_64ch.json \
"
-SRC_URI[md5sum] = "70cce8e2c7a790d68aebe66e93302ee6"
-SRC_URI[sha256sum] = "6e09e265bb22a5370bbfb8e80b9aac5e1b7bd2b5f867e55eddea6cb2685a72b4"
+SRC_URI[md5sum] = "542f02198a3258ca2ad4e549524e3ddc"
+SRC_URI[sha256sum] = "8176f5f55f96b7a72946cfb51743a8ea4f88a4033e54009e7bcf8f03077d248e"
S = "${WORKDIR}"
diff --git a/recipes-connectivity/lora/lora-gateway/lora-gateway-gpsd.patch b/recipes-connectivity/lora/lora-gateway/lora-gateway-gpsd.patch
index 471cd82..08d566c 100644
--- a/recipes-connectivity/lora/lora-gateway/lora-gateway-gpsd.patch
+++ b/recipes-connectivity/lora/lora-gateway/lora-gateway-gpsd.patch
@@ -73,10 +73,18 @@ index 6dbd30b..59b2d37 100644
/**
@brief Parse messages coming from the GPS system (or other GNSS)
diff --git a/libloragw/src/loragw_gps.c b/libloragw/src/loragw_gps.c
-index c0e0ded..d3d1ca1 100644
+index c0e0ded..f4774be 100644
--- a/libloragw/src/loragw_gps.c
+++ b/libloragw/src/loragw_gps.c
-@@ -251,109 +251,22 @@ int str_chop(char *s, int buff_size, char separator, int *idx_ary, int max_idx)
+@@ -84,6 +84,7 @@ static double gps_mlo = 0.0; /* minutes of longitude */
+ static char gps_olo = 0; /* orientation (E-W) of longitude */
+ static short gps_alt = 0; /* altitude */
+ static bool gps_pos_ok = false;
++static bool gps_lock_ok = false;
+
+ static char gps_mod = 'N'; /* GPS mode (N no fix, A autonomous, D differential) */
+ static short gps_sat = 0; /* number of satellites used for fix */
+@@ -251,109 +252,22 @@ int str_chop(char *s, int buff_size, char separator, int *idx_ary, int max_idx)
/* -------------------------------------------------------------------------- */
/* --- PUBLIC FUNCTIONS DEFINITION ------------------------------------------ */
@@ -91,17 +99,27 @@ index c0e0ded..d3d1ca1 100644
- 0x01, 0x20, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, /* Enable NAV-TIMEGPS output on serial */
- 0x32, 0x94 }; /* Checksum */
- ssize_t num_written;
--
++int lgw_gps_enable(struct gps_data_t *gpsdata, struct fixsource_t *source) {
+
- /* check input parameters */
- CHECK_NULL(tty_path);
- CHECK_NULL(fd_ptr);
--
++ unsigned int flags;
++ fd_set fds;
++ flags = WATCH_ENABLE;
++ flags |= WATCH_RAW;
++ flags |= WATCH_NMEA;
++ gpsd_source_spec(NULL, source);
+
- /* open TTY device */
- gps_tty_dev = open(tty_path, O_RDWR | O_NOCTTY);
- if (gps_tty_dev <= 0) {
- DEBUG_MSG("ERROR: TTY PORT FAIL TO OPEN, CHECK PATH AND ACCESS RIGHTS\n");
-- return LGW_GPS_ERROR;
-- }
++ if (gps_open(source->server, source->port, gpsdata) != 0) {
++ DEBUG_MSG("gpspipe: could not connect to gpsd %s:%s, %s(%d)\n",
++ source->server, source->port, gps_errstr(errno), errno);
+ return LGW_GPS_ERROR;
+ }
- *fd_ptr = gps_tty_dev;
-
- /* manage the different GPS modules families */
@@ -115,7 +133,7 @@ index c0e0ded..d3d1ca1 100644
- /* see lgw_parse_ubx() function for details */
- DEBUG_MSG("WARNING: this version of GPS module may not be supported\n");
- }
--
+
- /* manage the target bitrate */
- if (target_brate != 0) {
- DEBUG_MSG("WARNING: target_brate parameter ignored for now\n"); // TODO
@@ -173,22 +191,10 @@ index c0e0ded..d3d1ca1 100644
- i = tcsetattr(gps_tty_dev, TCSANOW, &ttyopt);
- if (i != 0){
- DEBUG_MSG("ERROR: IMPOSSIBLE TO UPDATE TTY PORT CONFIGURATION\n");
-+int lgw_gps_enable(struct gps_data_t *gpsdata, struct fixsource_t *source) {
-+
-+ unsigned int flags;
-+ fd_set fds;
-+ flags = WATCH_ENABLE;
-+ flags |= WATCH_RAW;
-+ flags |= WATCH_NMEA;
-+ gpsd_source_spec(NULL, source);
-+
-+ if (gps_open(source->server, source->port, gpsdata) != 0) {
-+ DEBUG_MSG("gpspipe: could not connect to gpsd %s:%s, %s(%d)\n",
-+ source->server, source->port, gps_errstr(errno), errno);
- return LGW_GPS_ERROR;
- }
+- return LGW_GPS_ERROR;
+- }
- tcflush(gps_tty_dev, TCIOFLUSH);
-
+-
- /* Send UBX CFG NAV-TIMEGPS message to tell GPS module to output native GPS time */
- /* This is a binary message, serial port has to be properly configured to handle this */
- num_written = write (gps_tty_dev, ubx_cmd_timegps, UBX_MSG_NAVTIMEGPS_LEN);
@@ -199,7 +205,7 @@ index c0e0ded..d3d1ca1 100644
/* get timezone info */
tzset();
-@@ -368,20 +281,13 @@ int lgw_gps_enable(char *tty_path, char *gps_family, speed_t target_brate, int *
+@@ -368,20 +282,13 @@ int lgw_gps_enable(char *tty_path, char *gps_family, speed_t target_brate, int *
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
@@ -225,7 +231,44 @@ index c0e0ded..d3d1ca1 100644
return LGW_GPS_ERROR;
}
-@@ -526,7 +432,7 @@ enum gps_msg lgw_parse_nmea(const char *serial_buff, int buff_size) {
+@@ -457,7 +364,8 @@ enum gps_msg lgw_parse_ubx(const char *serial_buff, size_t buff_size, size_t *ms
+ gps_week = (uint8_t)serial_buff[14];
+ gps_week |= (uint8_t)serial_buff[15] << 8; /* GPS week number */
+
+- gps_time_ok = true;
++
++
+ #if 0
+ /* For debug */
+ {
+@@ -472,11 +380,24 @@ enum gps_msg lgw_parse_ubx(const char *serial_buff, size_t buff_size, size_t *ms
+ printf(" GPS time = %02d:%02d:%02d\n", ubx_gps_hou, ubx_gps_min, ubx_gps_sec);
+ }
+ #endif
+- } else { /* valid */
++ if (gps_lock_ok)
++ gps_time_ok = true;
++
++ return UBX_NAV_TIMEGPS;
++ } else {
+ gps_time_ok = false;
++ return INVALID;
++ }
++ } else if ((serial_buff[2] == 0x01) && (serial_buff[3] == 0x04)) {
++ if (serial_buff[10] == 0x0F && serial_buff[11] == 0x27
++ && serial_buff[10] == 0x0F && serial_buff[11] == 0x27
++ && serial_buff[10] == 0x0F && serial_buff[11] == 0x27
++ && serial_buff[10] == 0x0F && serial_buff[11] == 0x27) {
++ gps_time_ok = false;
++ gps_lock_ok = false;
+ }
+
+- return UBX_NAV_TIMEGPS;
++ return UBX_NAV_TIMEUTC;
+ } else if ((serial_buff[2] == 0x05) && (serial_buff[3] == 0x00)) {
+ DEBUG_MSG("NOTE: UBX ACK-NAK received\n");
+ return IGNORED;
+@@ -526,7 +447,7 @@ enum gps_msg lgw_parse_nmea(const char *serial_buff, int buff_size) {
} else if (!validate_nmea_checksum(serial_buff, buff_size)) {
DEBUG_MSG("Warning: invalid NMEA sentence (bad checksum)\n");
return INVALID;
@@ -234,7 +277,7 @@ index c0e0ded..d3d1ca1 100644
/*
NMEA sentence format: $xxRMC,time,status,lat,NS,long,EW,spd,cog,date,mv,mvEW,posMode*cs<CR><LF>
Valid fix: $GPRMC,083559.34,A,4717.11437,N,00833.91522,E,0.004,77.52,091202,,,A*00
-@@ -535,19 +441,19 @@ enum gps_msg lgw_parse_nmea(const char *serial_buff, int buff_size) {
+@@ -535,33 +456,32 @@ enum gps_msg lgw_parse_nmea(const char *serial_buff, int buff_size) {
memcpy(parser_buf, serial_buff, buff_size);
parser_buf[buff_size] = '\0';
nb_fields = str_chop(parser_buf, buff_size, ',', str_index, ARRAY_SIZE(str_index));
@@ -255,9 +298,17 @@ index c0e0ded..d3d1ca1 100644
- if ((i == 4) && (j == 3)) {
+ if ((i == 3) && (j == 3)) {
if ((gps_mod == 'A') || (gps_mod == 'D')) {
- gps_time_ok = true;
+- gps_time_ok = true;
++ gps_lock_ok = true;
DEBUG_MSG("Note: Valid RMC sentence, GPS locked, date: 20%02d-%02d-%02dT%02d:%02d:%06.3fZ\n", gps_yea, gps_mon, gps_day, gps_hou, gps_min, gps_fra + (float)gps_sec);
-@@ -561,7 +467,7 @@ enum gps_msg lgw_parse_nmea(const char *serial_buff, int buff_size) {
+ } else {
+- gps_time_ok = false;
++ gps_lock_ok = false;
+ DEBUG_MSG("Note: Valid RMC sentence, no satellite fix, estimated date: 20%02d-%02d-%02dT%02d:%02d:%06.3fZ\n", gps_yea, gps_mon, gps_day, gps_hou, gps_min, gps_fra + (float)gps_sec);
+ }
+ } else {
+ /* could not get a valid hour AND date */
+- gps_time_ok = false;
DEBUG_MSG("Note: Valid RMC sentence, mode %c, no date\n", gps_mod);
}
return NMEA_RMC;
@@ -266,6 +317,120 @@ index c0e0ded..d3d1ca1 100644
/*
NMEA sentence format: $xxGGA,time,lat,NS,long,EW,quality,numSV,HDOP,alt,M,sep,M,diffAge,diffStation*cs<CR><LF>
Valid fix: $GPGGA,092725.00,4717.11399,N,00833.91590,E,1,08,1.01,499.6,M,48.0,M,,*5B
+@@ -587,6 +507,8 @@ enum gps_msg lgw_parse_nmea(const char *serial_buff, int buff_size) {
+ } else {
+ /* could not get a valid latitude, longitude AND altitude */
+ gps_pos_ok = false;
++ gps_time_ok = false;
++ gps_lock_ok = false;
+ DEBUG_MSG("Note: Valid GGA sentence, %d sat, no coordinates\n", gps_sat);
+ }
+ return NMEA_GGA;
+@@ -662,72 +580,60 @@ int lgw_gps_get(struct timespec *utc, struct timespec *gps_time, struct coord_s
+ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+ int lgw_gps_sync(struct tref *ref, uint32_t count_us, struct timespec utc, struct timespec gps_time) {
++ bool update = false;
+ double cnt_diff; /* internal concentrator time difference (in seconds) */
+ double utc_diff; /* UTC time difference (in seconds) */
+- double slope; /* time slope between new reference and old reference (for sanity check) */
+-
+- bool aber_n0; /* is the update value for synchronization aberrant or not ? */
+- static bool aber_min1 = false; /* keep track of whether value at sync N-1 was aberrant or not */
+- static bool aber_min2 = false; /* keep track of whether value at sync N-2 was aberrant or not */
++ double slope = 1.0; /* time slope between new reference and old reference (for sanity check) */
++ static bool calibrating = true;
+
+ CHECK_NULL(ref);
+
+ /* calculate the slope */
+
+- cnt_diff = (double)(count_us - ref->count_us) / (double)(TS_CPS); /* uncorrected by xtal_err */
+- utc_diff = (double)(utc.tv_sec - (ref->utc).tv_sec) + (1E-9 * (double)(utc.tv_nsec - (ref->utc).tv_nsec));
++ if (ref->systime != 0) {
++
++ cnt_diff = (double)(count_us - ref->count_us) / (double)(TS_CPS); /* uncorrected by xtal_err */
++ utc_diff = (double)(utc.tv_sec - (ref->utc).tv_sec) + (1E-9 * (double)(utc.tv_nsec - (ref->utc).tv_nsec));
+
+- /* detect aberrant points by measuring if slope limits are exceeded */
+- if (utc_diff != 0) { // prevent divide by zero
+- slope = cnt_diff/utc_diff;
+- if ((slope > PLUS_10PPM) || (slope < MINUS_10PPM)) {
+- DEBUG_MSG("Warning: correction range exceeded\n");
+- aber_n0 = true;
++ if (cnt_diff != 0 && utc_diff != 0) { // prevent divide by zero
++ slope = cnt_diff/utc_diff;
+ } else {
+- aber_n0 = false;
++ slope = 0.0;
++ }
++
++ if (gps_lock_ok && gps_time_ok && cnt_diff > 1.5) {
++ update = true;
++ }
++
++ update = (slope >= MINUS_10PPM && slope <= PLUS_10PPM);
++
++ if (!calibrating && utc_diff < 10.0) {
++ return LGW_GPS_ERROR;
+ }
++
++ if (calibrating && !update && utc_diff > 1.5) {
++ update = true;
++ } else if (update) {
++ calibrating = false;
++ }
++
+ } else {
+- DEBUG_MSG("Warning: aberrant UTC value for synchronization\n");
+- aber_n0 = true;
++ update = true;
++ slope = 0.0;
+ }
+
+- /* watch if the 3 latest sync point were aberrant or not */
+- if (aber_n0 == false) {
+- /* value no aberrant -> sync with smoothed slope */
+- ref->systime = time(NULL);
++ if (update || calibrating) {
++ ref->systime = time(NULL);
+ ref->count_us = count_us;
+ ref->utc.tv_sec = utc.tv_sec;
+ ref->utc.tv_nsec = utc.tv_nsec;
+ ref->gps.tv_sec = gps_time.tv_sec;
+ ref->gps.tv_nsec = gps_time.tv_nsec;
+ ref->xtal_err = slope;
+- aber_min2 = aber_min1;
+- aber_min1 = aber_n0;
+ return LGW_GPS_SUCCESS;
+- } else if (aber_n0 && aber_min1 && aber_min2) {
+- /* 3 successive aberrant values -> sync reset (keep xtal_err) */
+- ref->systime = time(NULL);
+- ref->count_us = count_us;
+- ref->utc.tv_sec = utc.tv_sec;
+- ref->utc.tv_nsec = utc.tv_nsec;
+- ref->gps.tv_sec = gps_time.tv_sec;
+- ref->gps.tv_nsec = gps_time.tv_nsec;
+- /* reset xtal_err only if the present value is out of range */
+- if ((ref->xtal_err > PLUS_10PPM) || (ref->xtal_err < MINUS_10PPM)) {
+- ref->xtal_err = 1.0;
+- }
+- DEBUG_MSG("Warning: 3 successive aberrant sync attempts, sync reset\n");
+- aber_min2 = aber_min1;
+- aber_min1 = aber_n0;
+- return LGW_GPS_SUCCESS;
+- } else {
+- /* only 1 or 2 successive aberrant values -> ignore and return an error */
+- aber_min2 = aber_min1;
+- aber_min1 = aber_n0;
+- return LGW_GPS_ERROR;
+ }
+
+- return LGW_GPS_SUCCESS;
++ return LGW_GPS_ERROR;
+ }
+
+ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
diff --git a/libloragw/tst/test_loragw_gps.c b/libloragw/tst/test_loragw_gps.c
index a4164a3..e4b1546 100644
--- a/libloragw/tst/test_loragw_gps.c
diff --git a/recipes-connectivity/lora/lora-gateway/lora-gateway-spectral-scan-skip-fpga-reset.patch b/recipes-connectivity/lora/lora-gateway/lora-gateway-spectral-scan-skip-fpga-reset.patch
index e4a8b2b..0b53fd0 100644
--- a/recipes-connectivity/lora/lora-gateway/lora-gateway-spectral-scan-skip-fpga-reset.patch
+++ b/recipes-connectivity/lora/lora-gateway/lora-gateway-spectral-scan-skip-fpga-reset.patch
@@ -1,5 +1,5 @@
diff --git a/util_spectral_scan/src/util_spectral_scan.c b/util_spectral_scan/src/util_spectral_scan.c
-index d2aecda..f070f4b 100644
+index d2aecda..cbc8377 100644
--- a/util_spectral_scan/src/util_spectral_scan.c
+++ b/util_spectral_scan/src/util_spectral_scan.c
@@ -30,6 +30,7 @@ Maintainer: Michael Coracin
@@ -53,7 +53,27 @@ index d2aecda..f070f4b 100644
if(x != 0) {
printf("ERROR: Failed to connect to FPGA\n");
return EXIT_FAILURE;
-@@ -382,6 +398,10 @@ int main( int argc, char ** argv )
+@@ -324,6 +340,9 @@ int main( int argc, char ** argv )
+ do {
+ wait_ms(10);
+ lgw_fpga_reg_r(LGW_FPGA_STATUS, &reg_val);
++ if (shutdown_signal_recv) {
++ break;
++ }
+ }
+ while((TAKE_N_BITS_FROM((uint8_t)reg_val, 0, 5)) != 1); /* Clear has started */
+
+@@ -346,6 +365,9 @@ int main( int argc, char ** argv )
+ do {
+ wait_ms(1000);
+ lgw_fpga_reg_r(LGW_FPGA_STATUS, &reg_val);
++ if (shutdown_signal_recv) {
++ break;
++ }
+ }
+ while((TAKE_N_BITS_FROM((uint8_t)reg_val, 5, 1)) != 1);
+
+@@ -382,6 +404,10 @@ int main( int argc, char ** argv )
}
fprintf(log_file, "\n");
printf("\n");
@@ -63,3 +83,4 @@ index d2aecda..f070f4b 100644
+ }
}
fclose(log_file);
+
diff --git a/recipes-connectivity/lora/lora-logging.bb b/recipes-connectivity/lora/lora-logging.bb
index 201c0cc..752b63b 100644
--- a/recipes-connectivity/lora/lora-logging.bb
+++ b/recipes-connectivity/lora/lora-logging.bb
@@ -4,7 +4,7 @@ SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
DEPENDS = ""
-PR = "r2"
+PR = "r3"
RDEPENDS_${PN} += "logrotate bash"
SRC_URI = "file://lora-logging.logrotate.conf \
diff --git a/recipes-connectivity/lora/lora-logging/lora-logging.logrotate.conf b/recipes-connectivity/lora/lora-logging/lora-logging.logrotate.conf
index f425c00..5f26561 100644
--- a/recipes-connectivity/lora/lora-logging/lora-logging.logrotate.conf
+++ b/recipes-connectivity/lora/lora-logging/lora-logging.logrotate.conf
@@ -5,6 +5,8 @@
copytruncate
missingok
postrotate
- killall -SIGHUP lora-network-server
+ set -e;
+ /usr/bin/killall -HUP lora_pkt_fwd || true;
+ /usr/bin/killall -HUP lora-network-server || true;
endscript
}
diff --git a/recipes-connectivity/lora/lora-network-server_2.3.3.bb b/recipes-connectivity/lora/lora-network-server_2.3.3.bb
new file mode 100644
index 0000000..8b75ea6
--- /dev/null
+++ b/recipes-connectivity/lora/lora-network-server_2.3.3.bb
@@ -0,0 +1,48 @@
+DESCRIPTION = "MultiTech LoRa Network Server"
+PRIORITY = "optional"
+SECTION = "console/utils"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2b9a30a3082ddccd2c695a4dbeeab80d"
+DEPENDS = "jsoncpp libmts mosquitto sqlite3 curl gnutls"
+RDEPENDS_${PN} += "lora-packet-forwarder logrotate bash lora-logging"
+PR = "r0"
+CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server"
+
+SRC_URI = "http://multitech.net/downloads/lora-network-server_${PV}.tar.gz \
+ file://lora-network-server.init \
+ file://lora-network-server.default \
+ "
+
+SRC_URI[md5sum] = "b0bc859e1f60b1a92b06c4bb97f70109"
+SRC_URI[sha256sum] = "f8ba944a024531dbf58f2de462cb7ccfb5e3cb8d8dedb51077e7719f32f9adc4"
+
+# binaries are already stripped, so suppress warning
+INSANE_SKIP_${PN} = "already-stripped"
+
+S = "${WORKDIR}"
+
+LORA_DIR = "/opt/lora"
+
+do_compile() {
+}
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "lora-network-server"
+INITSCRIPT_PARAMS = "defaults 80 30"
+
+do_install() {
+ install -d ${D}${LORA_DIR}
+ install -m 0755 lora-network-server-arm926ejste-mlinux-5.2 ${D}${LORA_DIR}/lora-network-server
+ install -m 0755 lora-v21-keygen-arm926ejste-mlinux-5.2 ${D}${LORA_DIR}/lora-v21-keygen
+ install -m 0644 config/lora-network-server.conf.sample ${D}${LORA_DIR}/lora-network-server.conf.sample
+ install -m 0644 config/lora-network-server.conf.full ${D}${LORA_DIR}/lora-network-server.conf.full
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/lora-network-server.default ${D}${sysconfdir}/default/lora-network-server
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/lora-network-server.init ${D}${sysconfdir}/init.d/lora-network-server
+}
+
+FILES_${PN} += "${LORA_DIR}"
+FILES_${PN}-dbg += "${LORA_DIR}/.debug"
diff --git a/recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb b/recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb
index 193fcf7..b42bd31 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb
+++ b/recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb
@@ -7,9 +7,9 @@ LIC_FILES_CHKSUM = "file://mlinux4/LICENSE.TXT;md5=86776875df1423114abfcec938f3e
DEPENDS ?= "lora-gateway-geolocation logrotate lora-logging"
RDEPENDS_${PN} += "bash"
# Source revision
-PSR = "r3"
+PSR = "r4"
# Recipe revision
-PR = "r5"
+PR = "r6"
SRCREV = "v${PV}"
@@ -26,8 +26,8 @@ SRC_URI = "http://multitech.net/downloads/lora-packet-forwarder-geolocation_arm9
file://global_conf.json.MTAC_LORA_2_1_test_single_antenna_64ch_64x1_EU868 \
file://global_conf.json.MTAC_LORA_2_1_test_single_antenna_64ch_8x8_EU868 \
"
-SRC_URI[md5sum] = "70cce8e2c7a790d68aebe66e93302ee6"
-SRC_URI[sha256sum] = "6e09e265bb22a5370bbfb8e80b9aac5e1b7bd2b5f867e55eddea6cb2685a72b4"
+SRC_URI[md5sum] = "542f02198a3258ca2ad4e549524e3ddc"
+SRC_URI[sha256sum] = "8176f5f55f96b7a72946cfb51743a8ea4f88a4033e54009e7bcf8f03077d248e"
S = "${WORKDIR}"
B = "${S}"
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic
index 3148a88..6c14d3c 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic
+++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic
@@ -113,118 +113,22 @@
"tx_enable": false,
"type": "SX1257"
},
- "tx_lut_0" :
- {
- "dig_gain" : 2,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -6
- },
- "tx_lut_1" :
- {
- "dig_gain" : 0,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -3
- },
- "tx_lut_10" :
- {
- "dig_gain" : 0,
- "mix_gain" : 10,
- "pa_gain" : 2,
- "rf_power" : 16
- },
- "tx_lut_11" :
- {
- "dig_gain" : 0,
- "mix_gain" : 14,
- "pa_gain" : 2,
- "rf_power" : 20
- },
- "tx_lut_12" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 3,
- "rf_power" : 23
- },
- "tx_lut_13" :
- {
- "dig_gain" : 3,
- "mix_gain" : 13,
- "pa_gain" : 3,
- "rf_power" : 25
- },
- "tx_lut_14" :
- {
- "dig_gain" : 0,
- "mix_gain" : 12,
- "pa_gain" : 3,
- "rf_power" : 26
- },
- "tx_lut_15" :
- {
- "dig_gain" : 2,
- "mix_gain" : 15,
- "pa_gain" : 3,
- "rf_power" : 27
- },
- "tx_lut_2" :
- {
- "dig_gain" : 2,
- "mix_gain" : 13,
- "pa_gain" : 0,
- "rf_power" : 0
- },
- "tx_lut_3" :
- {
- "dig_gain" : 3,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 3
- },
- "tx_lut_4" :
- {
- "dig_gain" : 2,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 6
- },
- "tx_lut_5" :
- {
- "dig_gain" : 3,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 10
- },
- "tx_lut_6" :
- {
- "dig_gain" : 0,
- "mix_gain" : 13,
- "pa_gain" : 1,
- "rf_power" : 11
- },
- "tx_lut_7" :
- {
- "dig_gain" : 0,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 12
- },
- "tx_lut_8" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 2,
- "rf_power" : 13
- },
- "tx_lut_9" :
- {
- "dig_gain" : 3,
- "mix_gain" : 12,
- "pa_gain" : 2,
- "rf_power" : 14
- }
+ "tx_lut_0":{"dig_gain":2,"mix_gain":15,"pa_gain":1,"rf_power":10},
+ "tx_lut_1":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":11},
+ "tx_lut_2":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":12},
+ "tx_lut_3":{"dig_gain":0,"mix_gain":10,"pa_gain":2,"rf_power":13},
+ "tx_lut_4":{"dig_gain":3,"mix_gain":14,"pa_gain":2,"rf_power":14},
+ "tx_lut_5":{"dig_gain":1,"mix_gain":12,"pa_gain":2,"rf_power":15},
+ "tx_lut_6":{"dig_gain":0,"mix_gain":12,"pa_gain":2,"rf_power":16},
+ "tx_lut_7":{"dig_gain":2,"mix_gain":14,"pa_gain":2,"rf_power":17},
+ "tx_lut_8":{"dig_gain":2,"mix_gain":15,"pa_gain":2,"rf_power":18},
+ "tx_lut_9":{"dig_gain":1,"mix_gain":15,"pa_gain":2,"rf_power":19},
+ "tx_lut_10":{"dig_gain":0,"mix_gain":9,"pa_gain":3,"rf_power":20},
+ "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":21},
+ "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":22},
+ "tx_lut_13":{"dig_gain":0,"mix_gain":11,"pa_gain":3,"rf_power":23},
+ "tx_lut_14":{"dig_gain":2,"mix_gain":14,"pa_gain":3,"rf_power":24},
+ "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":25}
},
"gateway_conf": {
"gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>",
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic
index 2755bb4..3731a2d 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic
+++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic
@@ -81,118 +81,22 @@
"tx_enable": false,
"type": "SX1257"
},
- "tx_lut_0" :
- {
- "dig_gain" : 2,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -6
- },
- "tx_lut_1" :
- {
- "dig_gain" : 0,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -3
- },
- "tx_lut_10" :
- {
- "dig_gain" : 0,
- "mix_gain" : 10,
- "pa_gain" : 2,
- "rf_power" : 16
- },
- "tx_lut_11" :
- {
- "dig_gain" : 0,
- "mix_gain" : 14,
- "pa_gain" : 2,
- "rf_power" : 20
- },
- "tx_lut_12" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 3,
- "rf_power" : 23
- },
- "tx_lut_13" :
- {
- "dig_gain" : 3,
- "mix_gain" : 13,
- "pa_gain" : 3,
- "rf_power" : 25
- },
- "tx_lut_14" :
- {
- "dig_gain" : 0,
- "mix_gain" : 12,
- "pa_gain" : 3,
- "rf_power" : 26
- },
- "tx_lut_15" :
- {
- "dig_gain" : 2,
- "mix_gain" : 15,
- "pa_gain" : 3,
- "rf_power" : 27
- },
- "tx_lut_2" :
- {
- "dig_gain" : 2,
- "mix_gain" : 13,
- "pa_gain" : 0,
- "rf_power" : 0
- },
- "tx_lut_3" :
- {
- "dig_gain" : 3,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 3
- },
- "tx_lut_4" :
- {
- "dig_gain" : 2,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 6
- },
- "tx_lut_5" :
- {
- "dig_gain" : 3,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 10
- },
- "tx_lut_6" :
- {
- "dig_gain" : 0,
- "mix_gain" : 13,
- "pa_gain" : 1,
- "rf_power" : 11
- },
- "tx_lut_7" :
- {
- "dig_gain" : 0,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 12
- },
- "tx_lut_8" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 2,
- "rf_power" : 13
- },
- "tx_lut_9" :
- {
- "dig_gain" : 3,
- "mix_gain" : 12,
- "pa_gain" : 2,
- "rf_power" : 14
- }
+ "tx_lut_0":{"dig_gain":2,"mix_gain":15,"pa_gain":1,"rf_power":10},
+ "tx_lut_1":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":11},
+ "tx_lut_2":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":12},
+ "tx_lut_3":{"dig_gain":0,"mix_gain":10,"pa_gain":2,"rf_power":13},
+ "tx_lut_4":{"dig_gain":3,"mix_gain":14,"pa_gain":2,"rf_power":14},
+ "tx_lut_5":{"dig_gain":1,"mix_gain":12,"pa_gain":2,"rf_power":15},
+ "tx_lut_6":{"dig_gain":0,"mix_gain":12,"pa_gain":2,"rf_power":16},
+ "tx_lut_7":{"dig_gain":2,"mix_gain":14,"pa_gain":2,"rf_power":17},
+ "tx_lut_8":{"dig_gain":2,"mix_gain":15,"pa_gain":2,"rf_power":18},
+ "tx_lut_9":{"dig_gain":1,"mix_gain":15,"pa_gain":2,"rf_power":19},
+ "tx_lut_10":{"dig_gain":0,"mix_gain":9,"pa_gain":3,"rf_power":20},
+ "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":21},
+ "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":22},
+ "tx_lut_13":{"dig_gain":0,"mix_gain":11,"pa_gain":3,"rf_power":23},
+ "tx_lut_14":{"dig_gain":2,"mix_gain":14,"pa_gain":3,"rf_power":24},
+ "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":25}
},
"gateway_conf": {
"gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>",
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic
index 81c381c..c2a284e 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic
+++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic
@@ -79,118 +79,22 @@
"tx_delay_1ch_us": 4000000,
"tx_delay_2ch_us": 4000000
},
- "tx_lut_0" :
- {
- "dig_gain" : 2,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -6
- },
- "tx_lut_1" :
- {
- "dig_gain" : 0,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -3
- },
- "tx_lut_10" :
- {
- "dig_gain" : 0,
- "mix_gain" : 10,
- "pa_gain" : 2,
- "rf_power" : 16
- },
- "tx_lut_11" :
- {
- "dig_gain" : 0,
- "mix_gain" : 14,
- "pa_gain" : 2,
- "rf_power" : 20
- },
- "tx_lut_12" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 3,
- "rf_power" : 23
- },
- "tx_lut_13" :
- {
- "dig_gain" : 3,
- "mix_gain" : 13,
- "pa_gain" : 3,
- "rf_power" : 25
- },
- "tx_lut_14" :
- {
- "dig_gain" : 0,
- "mix_gain" : 12,
- "pa_gain" : 3,
- "rf_power" : 26
- },
- "tx_lut_15" :
- {
- "dig_gain" : 2,
- "mix_gain" : 15,
- "pa_gain" : 3,
- "rf_power" : 27
- },
- "tx_lut_2" :
- {
- "dig_gain" : 2,
- "mix_gain" : 13,
- "pa_gain" : 0,
- "rf_power" : 0
- },
- "tx_lut_3" :
- {
- "dig_gain" : 3,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 3
- },
- "tx_lut_4" :
- {
- "dig_gain" : 2,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 6
- },
- "tx_lut_5" :
- {
- "dig_gain" : 3,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 10
- },
- "tx_lut_6" :
- {
- "dig_gain" : 0,
- "mix_gain" : 13,
- "pa_gain" : 1,
- "rf_power" : 11
- },
- "tx_lut_7" :
- {
- "dig_gain" : 0,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 12
- },
- "tx_lut_8" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 2,
- "rf_power" : 13
- },
- "tx_lut_9" :
- {
- "dig_gain" : 3,
- "mix_gain" : 12,
- "pa_gain" : 2,
- "rf_power" : 14
- }
+ "tx_lut_0":{"dig_gain":2,"mix_gain":15,"pa_gain":1,"rf_power":10},
+ "tx_lut_1":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":11},
+ "tx_lut_2":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":12},
+ "tx_lut_3":{"dig_gain":0,"mix_gain":10,"pa_gain":2,"rf_power":13},
+ "tx_lut_4":{"dig_gain":3,"mix_gain":14,"pa_gain":2,"rf_power":14},
+ "tx_lut_5":{"dig_gain":1,"mix_gain":12,"pa_gain":2,"rf_power":15},
+ "tx_lut_6":{"dig_gain":0,"mix_gain":12,"pa_gain":2,"rf_power":16},
+ "tx_lut_7":{"dig_gain":2,"mix_gain":14,"pa_gain":2,"rf_power":17},
+ "tx_lut_8":{"dig_gain":2,"mix_gain":15,"pa_gain":2,"rf_power":18},
+ "tx_lut_9":{"dig_gain":1,"mix_gain":15,"pa_gain":2,"rf_power":19},
+ "tx_lut_10":{"dig_gain":0,"mix_gain":9,"pa_gain":3,"rf_power":20},
+ "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":21},
+ "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":22},
+ "tx_lut_13":{"dig_gain":0,"mix_gain":11,"pa_gain":3,"rf_power":23},
+ "tx_lut_14":{"dig_gain":2,"mix_gain":14,"pa_gain":3,"rf_power":24},
+ "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":25}
},
"gateway_conf": {
"forward_crc_disabled": false,
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic
index c0edcd3..710a228 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic
+++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic
@@ -82,102 +82,22 @@
"bandwidth": 125000,
"datarate": 50000
},
- "tx_lut_0": {
- "pa_gain": 0,
- "mix_gain": 9,
- "rf_power": -6,
- "dig_gain": 1
- },
- "tx_lut_1": {
- "pa_gain": 0,
- "mix_gain": 12,
- "rf_power": -3,
- "dig_gain": 1
- },
- "tx_lut_2": {
- "pa_gain": 1,
- "mix_gain": 8,
- "rf_power": 0,
- "dig_gain": 2
- },
- "tx_lut_3": {
- "pa_gain": 1,
- "mix_gain": 11,
- "rf_power": 3,
- "dig_gain": 3
- },
- "tx_lut_4": {
- "pa_gain": 1,
- "mix_gain": 10,
- "rf_power": 6,
- "dig_gain": 0
- },
- "tx_lut_5": {
- "pa_gain": 2,
- "mix_gain": 11,
- "rf_power": 10,
- "dig_gain": 3
- },
- "tx_lut_6": {
- "pa_gain": 2,
- "mix_gain": 9,
- "rf_power": 11,
- "dig_gain": 1
- },
- "tx_lut_7": {
- "pa_gain": 2,
- "mix_gain": 9,
- "rf_power": 12,
- "dig_gain": 0
- },
- "tx_lut_8": {
- "pa_gain": 2,
- "mix_gain": 11,
- "rf_power": 13,
- "dig_gain": 2
- },
- "tx_lut_9": {
- "pa_gain": 2,
- "mix_gain": 11,
- "rf_power": 14,
- "dig_gain": 1
- },
- "tx_lut_10": {
- "pa_gain": 2,
- "mix_gain": 12,
- "rf_power": 16,
- "dig_gain": 0
- },
- "tx_lut_11": {
- "pa_gain": 3,
- "mix_gain": 10,
- "rf_power": 20,
- "dig_gain": 3
- },
- "tx_lut_12": {
- "pa_gain": 3,
- "mix_gain": 9,
- "rf_power": 23,
- "dig_gain": 0
- },
- "tx_lut_13": {
- "pa_gain": 3,
- "mix_gain": 12,
- "rf_power": 25,
- "dig_gain": 2
- },
- "tx_lut_14": {
- "pa_gain": 3,
- "mix_gain": 13,
- "rf_power": 26,
- "dig_gain": 0
- },
- "tx_lut_15": {
- "pa_gain": 3,
- "mix_gain": 15,
- "rf_power": 27,
- "dig_gain": 2
- }
+ "tx_lut_0":{"dig_gain":1,"mix_gain":10,"pa_gain":1,"rf_power":4},
+ "tx_lut_1":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":11},
+ "tx_lut_2":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":12},
+ "tx_lut_3":{"dig_gain":0,"mix_gain":10,"pa_gain":2,"rf_power":13},
+ "tx_lut_4":{"dig_gain":3,"mix_gain":14,"pa_gain":2,"rf_power":14},
+ "tx_lut_5":{"dig_gain":1,"mix_gain":12,"pa_gain":2,"rf_power":15},
+ "tx_lut_6":{"dig_gain":0,"mix_gain":12,"pa_gain":2,"rf_power":16},
+ "tx_lut_7":{"dig_gain":2,"mix_gain":14,"pa_gain":2,"rf_power":17},
+ "tx_lut_8":{"dig_gain":2,"mix_gain":15,"pa_gain":2,"rf_power":18},
+ "tx_lut_9":{"dig_gain":1,"mix_gain":15,"pa_gain":2,"rf_power":19},
+ "tx_lut_10":{"dig_gain":0,"mix_gain":9,"pa_gain":3,"rf_power":20},
+ "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":21},
+ "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":22},
+ "tx_lut_13":{"dig_gain":0,"mix_gain":11,"pa_gain":3,"rf_power":23},
+ "tx_lut_14":{"dig_gain":2,"mix_gain":14,"pa_gain":3,"rf_power":24},
+ "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":25}
},
"gateway_conf": {
"gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>",
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic
index 332b9bb..c45db75 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic
+++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic
@@ -82,118 +82,22 @@
"tx_enable": false,
"type": "SX1257"
},
- "tx_lut_0" :
- {
- "dig_gain" : 2,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -6
- },
- "tx_lut_1" :
- {
- "dig_gain" : 0,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -3
- },
- "tx_lut_10" :
- {
- "dig_gain" : 0,
- "mix_gain" : 10,
- "pa_gain" : 2,
- "rf_power" : 16
- },
- "tx_lut_11" :
- {
- "dig_gain" : 0,
- "mix_gain" : 14,
- "pa_gain" : 2,
- "rf_power" : 20
- },
- "tx_lut_12" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 3,
- "rf_power" : 23
- },
- "tx_lut_13" :
- {
- "dig_gain" : 3,
- "mix_gain" : 13,
- "pa_gain" : 3,
- "rf_power" : 25
- },
- "tx_lut_14" :
- {
- "dig_gain" : 0,
- "mix_gain" : 12,
- "pa_gain" : 3,
- "rf_power" : 26
- },
- "tx_lut_15" :
- {
- "dig_gain" : 2,
- "mix_gain" : 15,
- "pa_gain" : 3,
- "rf_power" : 27
- },
- "tx_lut_2" :
- {
- "dig_gain" : 2,
- "mix_gain" : 13,
- "pa_gain" : 0,
- "rf_power" : 0
- },
- "tx_lut_3" :
- {
- "dig_gain" : 3,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 3
- },
- "tx_lut_4" :
- {
- "dig_gain" : 2,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 6
- },
- "tx_lut_5" :
- {
- "dig_gain" : 3,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 10
- },
- "tx_lut_6" :
- {
- "dig_gain" : 0,
- "mix_gain" : 13,
- "pa_gain" : 1,
- "rf_power" : 11
- },
- "tx_lut_7" :
- {
- "dig_gain" : 0,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 12
- },
- "tx_lut_8" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 2,
- "rf_power" : 13
- },
- "tx_lut_9" :
- {
- "dig_gain" : 3,
- "mix_gain" : 12,
- "pa_gain" : 2,
- "rf_power" : 14
- }
+ "tx_lut_0":{"dig_gain":2,"mix_gain":15,"pa_gain":1,"rf_power":10},
+ "tx_lut_1":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":11},
+ "tx_lut_2":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":12},
+ "tx_lut_3":{"dig_gain":0,"mix_gain":10,"pa_gain":2,"rf_power":13},
+ "tx_lut_4":{"dig_gain":3,"mix_gain":14,"pa_gain":2,"rf_power":14},
+ "tx_lut_5":{"dig_gain":1,"mix_gain":12,"pa_gain":2,"rf_power":15},
+ "tx_lut_6":{"dig_gain":0,"mix_gain":12,"pa_gain":2,"rf_power":16},
+ "tx_lut_7":{"dig_gain":2,"mix_gain":14,"pa_gain":2,"rf_power":17},
+ "tx_lut_8":{"dig_gain":2,"mix_gain":15,"pa_gain":2,"rf_power":18},
+ "tx_lut_9":{"dig_gain":1,"mix_gain":15,"pa_gain":2,"rf_power":19},
+ "tx_lut_10":{"dig_gain":0,"mix_gain":9,"pa_gain":3,"rf_power":20},
+ "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":21},
+ "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":22},
+ "tx_lut_13":{"dig_gain":0,"mix_gain":11,"pa_gain":3,"rf_power":23},
+ "tx_lut_14":{"dig_gain":2,"mix_gain":14,"pa_gain":3,"rf_power":24},
+ "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":25}
},
"gateway_conf": {
"gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>",
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic
index fa7c520..9daa32e 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic
+++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic
@@ -112,118 +112,22 @@
"tx_enable": false,
"type": "SX1257"
},
- "tx_lut_0" :
- {
- "dig_gain" : 2,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -6
- },
- "tx_lut_1" :
- {
- "dig_gain" : 0,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -3
- },
- "tx_lut_10" :
- {
- "dig_gain" : 0,
- "mix_gain" : 10,
- "pa_gain" : 2,
- "rf_power" : 16
- },
- "tx_lut_11" :
- {
- "dig_gain" : 0,
- "mix_gain" : 14,
- "pa_gain" : 2,
- "rf_power" : 20
- },
- "tx_lut_12" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 3,
- "rf_power" : 23
- },
- "tx_lut_13" :
- {
- "dig_gain" : 3,
- "mix_gain" : 13,
- "pa_gain" : 3,
- "rf_power" : 25
- },
- "tx_lut_14" :
- {
- "dig_gain" : 0,
- "mix_gain" : 12,
- "pa_gain" : 3,
- "rf_power" : 26
- },
- "tx_lut_15" :
- {
- "dig_gain" : 2,
- "mix_gain" : 15,
- "pa_gain" : 3,
- "rf_power" : 27
- },
- "tx_lut_2" :
- {
- "dig_gain" : 2,
- "mix_gain" : 13,
- "pa_gain" : 0,
- "rf_power" : 0
- },
- "tx_lut_3" :
- {
- "dig_gain" : 3,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 3
- },
- "tx_lut_4" :
- {
- "dig_gain" : 2,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 6
- },
- "tx_lut_5" :
- {
- "dig_gain" : 3,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 10
- },
- "tx_lut_6" :
- {
- "dig_gain" : 0,
- "mix_gain" : 13,
- "pa_gain" : 1,
- "rf_power" : 11
- },
- "tx_lut_7" :
- {
- "dig_gain" : 0,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 12
- },
- "tx_lut_8" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 2,
- "rf_power" : 13
- },
- "tx_lut_9" :
- {
- "dig_gain" : 3,
- "mix_gain" : 12,
- "pa_gain" : 2,
- "rf_power" : 14
- }
+ "tx_lut_0":{"dig_gain":2,"mix_gain":15,"pa_gain":1,"rf_power":10},
+ "tx_lut_1":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":11},
+ "tx_lut_2":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":12},
+ "tx_lut_3":{"dig_gain":0,"mix_gain":10,"pa_gain":2,"rf_power":13},
+ "tx_lut_4":{"dig_gain":3,"mix_gain":14,"pa_gain":2,"rf_power":14},
+ "tx_lut_5":{"dig_gain":1,"mix_gain":12,"pa_gain":2,"rf_power":15},
+ "tx_lut_6":{"dig_gain":0,"mix_gain":12,"pa_gain":2,"rf_power":16},
+ "tx_lut_7":{"dig_gain":2,"mix_gain":14,"pa_gain":2,"rf_power":17},
+ "tx_lut_8":{"dig_gain":2,"mix_gain":15,"pa_gain":2,"rf_power":18},
+ "tx_lut_9":{"dig_gain":1,"mix_gain":15,"pa_gain":2,"rf_power":19},
+ "tx_lut_10":{"dig_gain":0,"mix_gain":9,"pa_gain":3,"rf_power":20},
+ "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":21},
+ "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":22},
+ "tx_lut_13":{"dig_gain":0,"mix_gain":11,"pa_gain":3,"rf_power":23},
+ "tx_lut_14":{"dig_gain":2,"mix_gain":14,"pa_gain":3,"rf_power":24},
+ "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":25}
},
"gateway_conf": {
"gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>",
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic
index a0636a7..d185858 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic
+++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic
@@ -82,102 +82,22 @@
"bandwidth": 125000,
"datarate": 50000
},
- "tx_lut_0": {
- "pa_gain": 0,
- "mix_gain": 9,
- "rf_power": -6,
- "dig_gain": 1
- },
- "tx_lut_1": {
- "pa_gain": 0,
- "mix_gain": 12,
- "rf_power": -3,
- "dig_gain": 1
- },
- "tx_lut_2": {
- "pa_gain": 1,
- "mix_gain": 8,
- "rf_power": 0,
- "dig_gain": 2
- },
- "tx_lut_3": {
- "pa_gain": 1,
- "mix_gain": 11,
- "rf_power": 3,
- "dig_gain": 3
- },
- "tx_lut_4": {
- "pa_gain": 1,
- "mix_gain": 10,
- "rf_power": 6,
- "dig_gain": 0
- },
- "tx_lut_5": {
- "pa_gain": 2,
- "mix_gain": 11,
- "rf_power": 10,
- "dig_gain": 3
- },
- "tx_lut_6": {
- "pa_gain": 2,
- "mix_gain": 9,
- "rf_power": 11,
- "dig_gain": 1
- },
- "tx_lut_7": {
- "pa_gain": 2,
- "mix_gain": 9,
- "rf_power": 12,
- "dig_gain": 0
- },
- "tx_lut_8": {
- "pa_gain": 2,
- "mix_gain": 11,
- "rf_power": 13,
- "dig_gain": 2
- },
- "tx_lut_9": {
- "pa_gain": 2,
- "mix_gain": 11,
- "rf_power": 14,
- "dig_gain": 1
- },
- "tx_lut_10": {
- "pa_gain": 2,
- "mix_gain": 12,
- "rf_power": 16,
- "dig_gain": 0
- },
- "tx_lut_11": {
- "pa_gain": 3,
- "mix_gain": 10,
- "rf_power": 20,
- "dig_gain": 3
- },
- "tx_lut_12": {
- "pa_gain": 3,
- "mix_gain": 9,
- "rf_power": 23,
- "dig_gain": 0
- },
- "tx_lut_13": {
- "pa_gain": 3,
- "mix_gain": 12,
- "rf_power": 25,
- "dig_gain": 2
- },
- "tx_lut_14": {
- "pa_gain": 3,
- "mix_gain": 13,
- "rf_power": 26,
- "dig_gain": 0
- },
- "tx_lut_15": {
- "pa_gain": 3,
- "mix_gain": 15,
- "rf_power": 27,
- "dig_gain": 2
- }
+ "tx_lut_0":{"dig_gain":2,"mix_gain":15,"pa_gain":1,"rf_power":10},
+ "tx_lut_1":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":11},
+ "tx_lut_2":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":12},
+ "tx_lut_3":{"dig_gain":0,"mix_gain":10,"pa_gain":2,"rf_power":13},
+ "tx_lut_4":{"dig_gain":3,"mix_gain":14,"pa_gain":2,"rf_power":14},
+ "tx_lut_5":{"dig_gain":1,"mix_gain":12,"pa_gain":2,"rf_power":15},
+ "tx_lut_6":{"dig_gain":0,"mix_gain":12,"pa_gain":2,"rf_power":16},
+ "tx_lut_7":{"dig_gain":2,"mix_gain":14,"pa_gain":2,"rf_power":17},
+ "tx_lut_8":{"dig_gain":2,"mix_gain":15,"pa_gain":2,"rf_power":18},
+ "tx_lut_9":{"dig_gain":1,"mix_gain":15,"pa_gain":2,"rf_power":19},
+ "tx_lut_10":{"dig_gain":0,"mix_gain":9,"pa_gain":3,"rf_power":20},
+ "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":21},
+ "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":22},
+ "tx_lut_13":{"dig_gain":0,"mix_gain":11,"pa_gain":3,"rf_power":23},
+ "tx_lut_14":{"dig_gain":2,"mix_gain":14,"pa_gain":3,"rf_power":24},
+ "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":25}
},
"gateway_conf": {
"gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>",
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic
index afcd070..dd39ac7 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic
+++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic
@@ -96,118 +96,22 @@
"tx_enable" : false,
"type" : "SX1257"
},
- "tx_lut_0" :
- {
- "dig_gain" : 2,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -6
- },
- "tx_lut_1" :
- {
- "dig_gain" : 0,
- "mix_gain" : 9,
- "pa_gain" : 0,
- "rf_power" : -3
- },
- "tx_lut_10" :
- {
- "dig_gain" : 0,
- "mix_gain" : 10,
- "pa_gain" : 2,
- "rf_power" : 16
- },
- "tx_lut_11" :
- {
- "dig_gain" : 0,
- "mix_gain" : 14,
- "pa_gain" : 2,
- "rf_power" : 20
- },
- "tx_lut_12" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 3,
- "rf_power" : 23
- },
- "tx_lut_13" :
- {
- "dig_gain" : 3,
- "mix_gain" : 13,
- "pa_gain" : 3,
- "rf_power" : 25
- },
- "tx_lut_14" :
- {
- "dig_gain" : 0,
- "mix_gain" : 12,
- "pa_gain" : 3,
- "rf_power" : 26
- },
- "tx_lut_15" :
- {
- "dig_gain" : 2,
- "mix_gain" : 15,
- "pa_gain" : 3,
- "rf_power" : 27
- },
- "tx_lut_2" :
- {
- "dig_gain" : 2,
- "mix_gain" : 13,
- "pa_gain" : 0,
- "rf_power" : 0
- },
- "tx_lut_3" :
- {
- "dig_gain" : 3,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 3
- },
- "tx_lut_4" :
- {
- "dig_gain" : 2,
- "mix_gain" : 10,
- "pa_gain" : 1,
- "rf_power" : 6
- },
- "tx_lut_5" :
- {
- "dig_gain" : 3,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 10
- },
- "tx_lut_6" :
- {
- "dig_gain" : 0,
- "mix_gain" : 13,
- "pa_gain" : 1,
- "rf_power" : 11
- },
- "tx_lut_7" :
- {
- "dig_gain" : 0,
- "mix_gain" : 15,
- "pa_gain" : 1,
- "rf_power" : 12
- },
- "tx_lut_8" :
- {
- "dig_gain" : 0,
- "mix_gain" : 8,
- "pa_gain" : 2,
- "rf_power" : 13
- },
- "tx_lut_9" :
- {
- "dig_gain" : 3,
- "mix_gain" : 12,
- "pa_gain" : 2,
- "rf_power" : 14
- }
+ "tx_lut_0":{"dig_gain":2,"mix_gain":15,"pa_gain":1,"rf_power":10},
+ "tx_lut_1":{"dig_gain":3,"mix_gain":8,"pa_gain":3,"rf_power":11},
+ "tx_lut_2":{"dig_gain":2,"mix_gain":11,"pa_gain":2,"rf_power":12},
+ "tx_lut_3":{"dig_gain":0,"mix_gain":10,"pa_gain":2,"rf_power":13},
+ "tx_lut_4":{"dig_gain":3,"mix_gain":14,"pa_gain":2,"rf_power":14},
+ "tx_lut_5":{"dig_gain":1,"mix_gain":12,"pa_gain":2,"rf_power":15},
+ "tx_lut_6":{"dig_gain":0,"mix_gain":12,"pa_gain":2,"rf_power":16},
+ "tx_lut_7":{"dig_gain":2,"mix_gain":14,"pa_gain":2,"rf_power":17},
+ "tx_lut_8":{"dig_gain":2,"mix_gain":15,"pa_gain":2,"rf_power":18},
+ "tx_lut_9":{"dig_gain":1,"mix_gain":15,"pa_gain":2,"rf_power":19},
+ "tx_lut_10":{"dig_gain":0,"mix_gain":9,"pa_gain":3,"rf_power":20},
+ "tx_lut_11":{"dig_gain":1,"mix_gain":10,"pa_gain":3,"rf_power":21},
+ "tx_lut_12":{"dig_gain":0,"mix_gain":10,"pa_gain":3,"rf_power":22},
+ "tx_lut_13":{"dig_gain":0,"mix_gain":11,"pa_gain":3,"rf_power":23},
+ "tx_lut_14":{"dig_gain":2,"mix_gain":14,"pa_gain":3,"rf_power":24},
+ "tx_lut_15":{"dig_gain":0,"mix_gain":15,"pa_gain":3,"rf_power":25}
},
"gateway_conf": {
"gateway_ID": "<WILL-BE-AUTO-REPLACED-WITH-LORA-EUI>",
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-dedup-rx.patch b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-dedup-rx.patch
new file mode 100644
index 0000000..c368033
--- /dev/null
+++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-dedup-rx.patch
@@ -0,0 +1,66 @@
+diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c
+index 801f28d..c35c64f 100644
+--- a/lora_pkt_fwd/src/lora_pkt_fwd.c
++++ b/lora_pkt_fwd/src/lora_pkt_fwd.c
+@@ -126,8 +126,9 @@ volatile bool quit_sig = false; /* 1 -> application terminates without shutting
+ static bool fwd_valid_pkt = true; /* packets with PAYLOAD CRC OK are forwarded */
+ static bool fwd_error_pkt = false; /* packets with PAYLOAD CRC ERROR are NOT forwarded */
+ static bool fwd_nocrc_pkt = false; /* packets with NO PAYLOAD CRC are NOT forwarded */
++static bool fwd_best_pkt = true; /* duplicate packets with low SNR are NOT forwarded */
+
+ /* network configuration variables */
+ static uint64_t lgwm = 0; /* Lora gateway MAC address */
+ static char serv_addr[64] = STR(DEFAULT_SERVER); /* address of the server (host name or IPv4/IPv6) */
+ static char serv_port_up[8] = STR(DEFAULT_PORT_UP); /* server port for upstream traffic */
+@@ -731,6 +742,12 @@ static int parse_gateway_configuration(const char * conf_file) {
+ }
+
+ /* packet filtering parameters */
++ val = json_object_get_value(conf_obj, "best_packet_filter");
++ if (json_value_get_type(val) == JSONBoolean) {
++ fwd_best_pkt = (bool)json_value_get_boolean(val);
++ }
++ MSG("INFO: duplicate packets received with low SNR will%s be forwarded\n", (!fwd_best_pkt ? "" : " NOT"));
++
+ val = json_object_get_value(conf_obj, "forward_crc_valid");
+ if (json_value_get_type(val) == JSONBoolean) {
+ fwd_valid_pkt = (bool)json_value_get_boolean(val);
+@@ -1536,6 +1562,38 @@ void thread_up(void) {
+ memcpy((void *)(buff_up + buff_index), (void *)"{\"rxpk\":[", 9);
+ buff_index += 9;
+
++ if (fwd_best_pkt && nb_pkt > 1) {
++ uint32_t check_addr = 0;
++ uint32_t check_mic = 0;
++ uint16_t check_fcnt = 0;
++ float check_snr = -30.0;
++
++ for (i=0; i < nb_pkt; ++i) {
++ p = &rxpkt[i];
++ if (p->size < 12)
++ continue;
++
++ memcpy(&check_addr, p->payload + 1, 4);
++ memcpy(&check_fcnt, p->payload + 6, 2);
++ memcpy(&check_mic, p->payload + p->size - 4, 4);
++
++ check_snr = p->snr;
++
++ for (j=0; j < nb_pkt; ++j) {
++ p = &rxpkt[j];
++
++ if (p->size >= 12
++ && memcmp(&check_addr, p->payload + 1, 4) == 0
++ && memcmp(&check_fcnt, p->payload + 6, 2) == 0
++ && memcmp(&check_mic, p->payload + p->size - 4, 4) == 0
++ && p->snr < check_snr) {
++ // set status of duplicate packets rx'd on wrong channel
++ p->status = 1;
++ }
++ }
++ }
++ }
++
+ /* serialize Lora packets metadata and payload */
+ pkt_in_dgram = 0;
+ for (i=0; i < nb_pkt; ++i) {
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch
new file mode 100644
index 0000000..b1790e7
--- /dev/null
+++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch
@@ -0,0 +1,86 @@
+diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c
+index 801f28d..7b63b8f 100644
+--- a/lora_pkt_fwd/src/lora_pkt_fwd.c
++++ b/lora_pkt_fwd/src/lora_pkt_fwd.c
+@@ -134,6 +134,12 @@ static char serv_port_up[8] = STR(DEFAULT_PORT_UP); /* server port for upstream traffic */
+ static char serv_port_down[8] = STR(DEFAULT_PORT_DW); /* server port for downstream traffic */
+ static int keepalive_time = DEFAULT_KEEPALIVE; /* send a PULL_DATA request every X seconds, negative = disabled */
+
++static bool duty_cycle_enabled = true;
++static uint32_t duty_cycle_time_avail = 0;
++static uint32_t duty_cycle_period = 3600; // seconds in one hour
++static double duty_cycle_ratio = 0.10; // 10%
++static uint32_t duty_cycle_time_max = 3600 * 0.10 * 1000u; // max time-on-air in window
++
+ /* statistics collection configuration variables */
+ static unsigned stat_interval = DEFAULT_STAT; /* time interval (in sec) at which statistics are collected and displayed */
+
+@@ -729,8 +746,32 @@ static int parse_gateway_configuration(const char * conf_file) {
+ push_timeout_half.tv_usec = 500 * (long int)json_value_get_number(val);
+ MSG("INFO: upstream PUSH_DATA time-out is configured to %u ms\n", (unsigned)(push_timeout_half.tv_usec / 500));
+ }
++
++ /* duty-cycle limiting */
++ val = json_object_get_value(conf_obj, "duty_cycle_enabled");
++ if (json_value_get_type(val) == JSONBoolean) {
++ duty_cycle_enabled = (bool)json_value_get_boolean(val);
++ }
++ MSG("INFO: duty cycle will%s be enforced\n", (duty_cycle_enabled ? "" : " NOT"));
++
++ if (duty_cycle_enabled) {
++ val = json_object_get_value(conf_obj, "duty_cycle_period");
++ if (val != NULL) {
++ duty_cycle_period = (unsigned)json_value_get_number(val);
++ }
++ MSG("INFO: duty cycle period %u s\n", (duty_cycle_period));
++
++ val = json_object_get_value(conf_obj, "duty_cycle_ratio");
++ if (val != NULL) {
++ duty_cycle_ratio = (double)json_value_get_number(val);
++ }
++ MSG("INFO: duty cycle %f %%\n", (duty_cycle_ratio * 100));
++
++ duty_cycle_time_max = duty_cycle_period * 1000u * duty_cycle_ratio;
++ }
++
+
+ /* packet filtering parameters */
+ val = json_object_get_value(conf_obj, "best_packet_filter");
+ if (json_value_get_type(val) == JSONBoolean) {
+ fwd_best_pkt = (bool)json_value_get_boolean(val);
+@@ -1349,6 +1406,8 @@ int main(void)
+ printf("# PUSH_DATA datagrams sent: %u (%u bytes)\n", cp_up_dgram_sent, cp_up_network_byte);
+ printf("# PUSH_DATA acknowledged: %.2f%%\n", 100.0 * up_ack_ratio);
+ printf("### [DOWNSTREAM] ###\n");
++ if (duty_cycle_enabled)
++ printf("# TIME ON AIR available: %u ms\n", duty_cycle_time_avail);
+ printf("# PULL_DATA sent: %u (%.2f%% acknowledged)\n", cp_dw_pull_sent, 100.0 * dw_ack_ratio);
+ printf("# PULL_RESP(onse) datagrams received: %u (%u bytes)\n", cp_dw_dgram_rcv, cp_dw_network_byte);
+ printf("# RF packets sent to concentrator: %u (%u bytes)\n", (cp_nb_tx_ok+cp_nb_tx_fail), cp_dw_payload_byte);
+
+@@ -2833,6 +2921,25 @@ void thread_valid(void) {
+ while (!exit_sig && !quit_sig) {
+ wait_ms(1000);
+
++ if (duty_cycle_enabled) {
++ static struct timespec last = { 0, 0 };
++ struct timespec now;
++ clock_gettime(CLOCK_MONOTONIC, &now);
++
++ if (last.tv_sec != 0) {
++ // uint64(now.tv_sec) * 1000 + now.tv_nsec / 1000000
++
++ duty_cycle_time_avail += difftimespec(now, last) * 1000u * duty_cycle_ratio;
++
++ if (duty_cycle_time_avail > duty_cycle_time_max) {
++ duty_cycle_time_avail = duty_cycle_time_max;
++ }
++ }
++
++ last = now;
++ }
++
++
+ /* calculate when the time reference was last updated */
+ pthread_mutex_lock(&mx_timeref);
+ gps_ref_age = (long)difftime(time(NULL), time_reference_gps.systime);
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-gpsd.patch b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-gpsd.patch
index 1c3c698..02bef12 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-gpsd.patch
+++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-gpsd.patch
@@ -115,6 +115,15 @@ index 801f28d..6bca482 100644
if (i == LGW_HAL_SUCCESS) {
MSG("INFO: GPS closed successfully\n");
} else {
+@@ -2683,7 +2731,7 @@ static void gps_process_sync(void) {
+ i = lgw_gps_sync(&time_reference_gps, trig_tstamp, utc, gps_time);
+ pthread_mutex_unlock(&mx_timeref);
+ if (i != LGW_GPS_SUCCESS) {
+- MSG("WARNING: [gps] GPS out of sync, keeping previous time reference\n");
++// MSG("WARNING: [gps] GPS out of sync, keeping previous time reference\n");
+ }
+ }
+
@@ -2691,7 +2695,7 @@ static void gps_process_coords(void) {
/* position variable */
struct coord_s coord;
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-jit-queue-increase-peek-and-remove-sort-from-dequeue.patch b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-jit-queue-increase-peek-and-remove-sort-from-dequeue.patch
new file mode 100644
index 0000000..2b0aaf4
--- /dev/null
+++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-jit-queue-increase-peek-and-remove-sort-from-dequeue.patch
@@ -0,0 +1,36 @@
+diff --git a/lora_pkt_fwd/src/jitqueue.c b/lora_pkt_fwd/src/jitqueue.c
+index dbde8d2..f1b547b 100644
+--- a/lora_pkt_fwd/src/jitqueue.c
++++ b/lora_pkt_fwd/src/jitqueue.c
+@@ -37,6 +37,7 @@ Maintainer: Michael Coracin
+ #define TX_MARGIN_DELAY 1000 /* Packet overlap margin in microseconds */
+ /* TODO: How much margin should we take? */
+ #define TX_JIT_DELAY 30000 /* Pre-delay to program packet for TX in microseconds */
++#define TX_PEEK_DELAY 60000 /* Look ahead time for TX in microseconds */
+ #define TX_MAX_ADVANCE_DELAY ((JIT_NUM_BEACON_IN_QUEUE + 1) * 128 * 1E6) /* Maximum advance delay accepted for a TX packet, compared to current time */
+
+ #define BEACON_GUARD 3000000 /* Interval where no ping slot can be placed,
+@@ -352,12 +353,12 @@ enum jit_error_e jit_dequeue(struct jit_queue_s *queue, int index, struct lgw_pk
+ memset(&(queue->nodes[queue->num_pkt]), 0, sizeof(struct jit_node_s));
+
+ /* Sort queue in ascending order of packet timestamp */
+- jit_sort_queue(queue);
++ // jit_sort_queue(queue);
+
+ /* Done */
+ pthread_mutex_unlock(&mx_jit_queue);
+
+- jit_print_queue(queue, false, DEBUG_JIT);
++ // jit_print_queue(queue, false, DEBUG_JIT);
+
+ MSG_DEBUG(DEBUG_JIT, "dequeued packet with count_us=%u from index %d\n", packet->count_us, index);
+
+@@ -427,7 +428,7 @@ enum jit_error_e jit_peek(struct jit_queue_s *queue, struct timeval *time, int *
+ * Warning: unsigned arithmetic (handle roll-over)
+ * t_packet < t_current + TX_JIT_DELAY
+ */
+- if ((queue->nodes[idx_highest_priority].pkt.count_us - time_us) < TX_JIT_DELAY) {
++ if ((queue->nodes[idx_highest_priority].pkt.count_us - time_us) < TX_PEEK_DELAY) {
+ *pkt_idx = idx_highest_priority;
+ MSG_DEBUG(DEBUG_JIT, "peek packet with count_us=%u at index %d\n",
+ queue->nodes[idx_highest_priority].pkt.count_us, idx_highest_priority);
diff --git a/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch b/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
new file mode 100644
index 0000000..7e043a2
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
@@ -0,0 +1,99 @@
+From 3328e98bcbf2930cd7eea3e6c92ad5dcbdf4794f Mon Sep 17 00:00:00 2001
+From: Yuanjie Huang <yuanjie.huang@windriver.com>
+Date: Wed, 24 Aug 2016 03:15:43 +0000
+Subject: [PATCH] Fix potential signed overflow in pointer arithmatic
+
+Pointer arithmatic results in implementation defined signed integer
+type, so that 's - src' in strlcpy and others may trigger signed overflow.
+In case of compilation by gcc or clang with -ftrapv option, the overflow
+would lead to program abort.
+
+Upstream-Status: Submitted [http://bugzilla.mindrot.org/show_bug.cgi?id=2608]
+
+Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+---
+ openbsd-compat/strlcat.c | 8 ++++++--
+ openbsd-compat/strlcpy.c | 8 ++++++--
+ openbsd-compat/strnlen.c | 8 ++++++--
+ 3 files changed, 18 insertions(+), 6 deletions(-)
+
+diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c
+index bcc1b61..e758ebf 100644
+--- a/openbsd-compat/strlcat.c
++++ b/openbsd-compat/strlcat.c
+@@ -23,6 +23,7 @@
+
+ #include <sys/types.h>
+ #include <string.h>
++#include <stdint.h>
+
+ /*
+ * Appends src to string dst of size siz (unlike strncat, siz is the
+@@ -55,8 +56,11 @@ strlcat(char *dst, const char *src, size_t siz)
+ s++;
+ }
+ *d = '\0';
+-
+- return(dlen + (s - src)); /* count does not include NUL */
++ /*
++ * Cast pointers to unsigned type before calculation, to avoid signed
++ * overflow when the string ends where the MSB has changed.
++ */
++ return (dlen + ((uintptr_t)s - (uintptr_t)src)); /* count does not include NUL */
+ }
+
+ #endif /* !HAVE_STRLCAT */
+diff --git a/openbsd-compat/strlcpy.c b/openbsd-compat/strlcpy.c
+index b4b1b60..b06f374 100644
+--- a/openbsd-compat/strlcpy.c
++++ b/openbsd-compat/strlcpy.c
+@@ -23,6 +23,7 @@
+
+ #include <sys/types.h>
+ #include <string.h>
++#include <stdint.h>
+
+ /*
+ * Copy src to string dst of size siz. At most siz-1 characters
+@@ -51,8 +52,11 @@ strlcpy(char *dst, const char *src, size_t siz)
+ while (*s++)
+ ;
+ }
+-
+- return(s - src - 1); /* count does not include NUL */
++ /*
++ * Cast pointers to unsigned type before calculation, to avoid signed
++ * overflow when the string ends where the MSB has changed.
++ */
++ return ((uintptr_t)s - (uintptr_t)src - 1); /* count does not include NUL */
+ }
+
+ #endif /* !HAVE_STRLCPY */
+diff --git a/openbsd-compat/strnlen.c b/openbsd-compat/strnlen.c
+index 93d5155..9b8de5d 100644
+--- a/openbsd-compat/strnlen.c
++++ b/openbsd-compat/strnlen.c
+@@ -23,6 +23,7 @@
+ #include <sys/types.h>
+
+ #include <string.h>
++#include <stdint.h>
+
+ size_t
+ strnlen(const char *str, size_t maxlen)
+@@ -31,7 +32,10 @@ strnlen(const char *str, size_t maxlen)
+
+ for (cp = str; maxlen != 0 && *cp != '\0'; cp++, maxlen--)
+ ;
+-
+- return (size_t)(cp - str);
++ /*
++ * Cast pointers to unsigned type before calculation, to avoid signed
++ * overflow when the string ends where the MSB has changed.
++ */
++ return (size_t)((uintptr_t)cp - (uintptr_t)str);
+ }
+ #endif
+--
+1.9.1
+
diff --git a/recipes-connectivity/openssh/openssh/init b/recipes-connectivity/openssh/openssh/init
new file mode 100644
index 0000000..386628a
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/init
@@ -0,0 +1,153 @@
+#! /bin/sh
+set -e
+
+PIDFILE=/var/run/sshd.pid
+
+# source function library
+. /etc/init.d/functions
+
+# /etc/init.d/ssh: start and stop the OpenBSD "secure shell" daemon
+
+test -x /usr/sbin/sshd || exit 0
+( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0
+
+# /etc/default/ssh may set SYSCONFDIR and SSHD_OPTS
+if test -f /etc/default/ssh; then
+ . /etc/default/ssh
+fi
+
+[ -z "$SYSCONFDIR" ] && SYSCONFDIR=/etc/ssh
+mkdir -p $SYSCONFDIR
+
+parse_sshd_opts() {
+ set -- ${SSHD_OPTS} --
+ sshd_config=/etc/ssh/sshd_config
+ while true ; do
+ case "$1" in
+ -f*) if [ "$1" = "-f" ] ; then
+ sshd_config="$2"
+ shift
+ else
+ sshd_config="${1#-f}"
+ fi
+ shift
+ ;;
+ --) shift; break;;
+ *) shift;;
+ esac
+ done
+}
+
+check_for_no_start() {
+ # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists
+ if [ -e $SYSCONFDIR/sshd_not_to_be_run ]; then
+ echo "OpenBSD Secure Shell server not in use ($SYSCONFDIR/sshd_not_to_be_run)"
+ exit 0
+ fi
+}
+
+check_privsep_dir() {
+ # Create the PrivSep empty dir if necessary
+ if [ ! -d /var/run/sshd ]; then
+ mkdir /var/run/sshd
+ chmod 0755 /var/run/sshd
+ fi
+}
+
+check_config() {
+ /usr/sbin/sshd -t $SSHD_OPTS || exit 1
+}
+
+check_keys() {
+ # parse location of keys
+ local HOST_KEY_RSA
+ local HOST_KEY_DSA
+ local HOST_KEY_ECDSA
+ local HOST_KEY_ED25519
+
+ parse_sshd_opts
+ HOST_KEY_RSA=$(grep ^HostKey "${sshd_config}" | grep _rsa_ | tail -1 | awk ' { print $2 } ')
+ [ -z "${HOST_KEY_RSA}" ] && HOST_KEY_RSA=$(grep HostKey "${sshd_config}" | grep _rsa_ | tail -1 | awk ' { print $2 } ')
+ [ -z "${HOST_KEY_RSA}" ] && HOST_KEY_RSA=$SYSCONFDIR/ssh_host_rsa_key
+ HOST_KEY_DSA=$(grep ^HostKey "${sshd_config}" | grep _dsa_ | tail -1 | awk ' { print $2 } ')
+ [ -z "${HOST_KEY_DSA}" ] && HOST_KEY_DSA=$(grep HostKey "${sshd_config}" | grep _dsa_ | tail -1 | awk ' { print $2 } ')
+ [ -z "${HOST_KEY_DSA}" ] && HOST_KEY_DSA=$SYSCONFDIR/ssh_host_dsa_key
+ HOST_KEY_ECDSA=$(grep ^HostKey "${sshd_config}" | grep _ecdsa_ | tail -1 | awk ' { print $2 } ')
+ [ -z "${HOST_KEY_ECDSA}" ] && HOST_KEY_ECDSA=$(grep HostKey "${sshd_config}" | grep _ecdsa_ | tail -1 | awk ' { print $2 } ')
+ [ -z "${HOST_KEY_ECDSA}" ] && HOST_KEY_ECDSA=$SYSCONFDIR/ssh_host_ecdsa_key
+ HOST_KEY_ED25519=$(grep ^HostKey "${sshd_config}" | grep _ed25519_ | tail -1 | awk ' { print $2 } ')
+ [ -z "${HOST_KEY_ED25519}" ] && HOST_KEY_ED25519=$(grep HostKey "${sshd_config}" | grep _ed25519_ | tail -1 | awk ' { print $2 } ')
+ [ -z "${HOST_KEY_ED25519}" ] && HOST_KEY_ED25519=$SYSCONFDIR/ssh_host_ed25519_key
+
+ # create keys if necessary
+ if [ ! -f $HOST_KEY_RSA ]; then
+ echo " generating ssh RSA key..."
+ mkdir -p $(dirname $HOST_KEY_RSA)
+ ssh-keygen -q -f $HOST_KEY_RSA -N '' -t rsa
+ fi
+ if [ ! -f $HOST_KEY_ECDSA ]; then
+ echo " generating ssh ECDSA key..."
+ mkdir -p $(dirname $HOST_KEY_ECDSA)
+ ssh-keygen -q -f $HOST_KEY_ECDSA -N '' -t ecdsa
+ fi
+ if [ ! -f $HOST_KEY_DSA ]; then
+ echo " generating ssh DSA key..."
+ mkdir -p $(dirname $HOST_KEY_DSA)
+ ssh-keygen -q -f $HOST_KEY_DSA -N '' -t dsa
+ fi
+ if [ ! -f $HOST_KEY_ED25519 ]; then
+ echo " generating ssh ED25519 key..."
+ mkdir -p $(dirname $HOST_KEY_ED25519)
+ ssh-keygen -q -f $HOST_KEY_ED25519 -N '' -t ed25519
+ fi
+}
+
+export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
+
+case "$1" in
+ start)
+ check_for_no_start
+ echo "Starting OpenBSD Secure Shell server: sshd"
+ check_keys
+ check_privsep_dir
+ start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS
+ echo "done."
+ ;;
+ stop)
+ echo -n "Stopping OpenBSD Secure Shell server: sshd"
+ start-stop-daemon -K -p $PIDFILE -x /usr/sbin/sshd
+ echo "."
+ ;;
+
+ reload|force-reload)
+ check_for_no_start
+ check_keys
+ check_config
+ echo -n "Reloading OpenBSD Secure Shell server's configuration"
+ start-stop-daemon -K -p $PIDFILE -s 1 -x /usr/sbin/sshd
+ echo "."
+ ;;
+
+ restart)
+ check_keys
+ check_config
+ echo -n "Restarting OpenBSD Secure Shell server: sshd"
+ start-stop-daemon -K -p $PIDFILE --oknodo -x /usr/sbin/sshd
+ check_for_no_start
+ check_privsep_dir
+ sleep 2
+ start-stop-daemon -S -p $PIDFILE -x /usr/sbin/sshd -- $SSHD_OPTS
+ echo "."
+ ;;
+
+ status)
+ status /usr/sbin/sshd
+ exit $?
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/ssh {start|stop|status|reload|force-reload|restart}"
+ exit 1
+esac
+
+exit 0
diff --git a/recipes-connectivity/openssh/openssh/openssh-8.1p1-add-test-support-for-busybox.patch b/recipes-connectivity/openssh/openssh/openssh-8.1p1-add-test-support-for-busybox.patch
new file mode 100644
index 0000000..d6fbd3b
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/openssh-8.1p1-add-test-support-for-busybox.patch
@@ -0,0 +1,48 @@
+diff -ruN a/regress/cipher-speed.sh b/regress/cipher-speed.sh
+--- a/regress/cipher-speed.sh 2019-12-03 13:16:36.091896387 -0600
++++ b/regress/cipher-speed.sh 2019-12-03 13:28:29.726275955 -0600
+@@ -17,7 +17,7 @@
+ printf "%-60s" "$c/$m:"
+ ( ${SSH} -o 'compression no' \
+ -F $OBJ/ssh_proxy -m $m -c $c somehost \
+- exec sh -c \'"dd of=/dev/null obs=32k"\' \
++ exec sh -c \'"dd of=/dev/null bs=32k"\' \
+ < ${DATA} ) 2>&1 | getbytes
+
+ if [ $? -ne 0 ]; then
+diff -ruN a/regress/key-options.sh b/regress/key-options.sh
+--- a/regress/key-options.sh 2019-12-03 13:24:44.164243780 -0600
++++ b/regress/key-options.sh 2019-12-03 13:33:14.447235791 -0600
+@@ -84,7 +84,7 @@
+ fi
+
+ sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys
+- from=`head -1 $authkeys | cut -f1 -d ' '`
++ from=`head -n 1 $authkeys | cut -f1 -d ' '`
+ verbose "key option $from"
+ r=`${SSH} -q -F $OBJ/ssh_proxy somehost 'echo true'`
+ if [ "$r" = "true" ]; then
+diff -ruN a/regress/transfer.sh b/regress/transfer.sh
+--- a/regress/transfer.sh 2019-12-03 13:16:58.342857354 -0600
++++ b/regress/transfer.sh 2019-12-03 13:29:08.733267753 -0600
+@@ -13,7 +13,7 @@
+ for s in 10 100 1k 32k 64k 128k 256k; do
+ trace "dd-size ${s}"
+ rm -f ${COPY}
+- dd if=$DATA obs=${s} 2> /dev/null | \
++ dd if=$DATA bs=${s} 2> /dev/null | \
+ ${SSH} -q -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
+ if [ $? -ne 0 ]; then
+ fail "ssh cat $DATA failed"
+diff -ruN a/regress/yes-head.sh b/regress/yes-head.sh
+--- a/regress/yes-head.sh 2019-12-03 13:17:11.682259074 -0600
++++ b/regress/yes-head.sh 2019-12-03 13:32:47.699869866 -0600
+@@ -3,7 +3,7 @@
+
+ tid="yes pipe head"
+
+-lines=`${SSH} -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)`
++lines=`${SSH} -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -n 2000"' | (sleep 3 ; wc -l)`
+ if [ $? -ne 0 ]; then
+ fail "yes|head test failed"
+ lines = 0;
diff --git a/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-cipher.patch b/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-cipher.patch
new file mode 100644
index 0000000..507026c
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-cipher.patch
@@ -0,0 +1,13 @@
+--- a/cipher.c 2019-12-03 12:46:22.282290586 -0600
++++ b/cipher.c 2019-12-03 12:45:19.273805437 -0600
+@@ -158,8 +158,10 @@
+ u_int
+ cipher_seclen(const struct sshcipher *c)
+ {
++#ifndef OPENSSL_NO_DES
+ if (strcmp("3des-cbc", c->name) == 0)
+ return 14;
++#endif
+ return cipher_keylen(c);
+ }
+
diff --git a/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-pkcs11.patch b/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-pkcs11.patch
new file mode 100644
index 0000000..46b60b5
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-pkcs11.patch
@@ -0,0 +1,52 @@
+--- a/pkcs11.h 2019-12-03 12:52:10.920974412 -0600
++++ b/pkcs11.h 2019-12-03 12:56:56.383171416 -0600
+@@ -342,9 +342,11 @@
+ #define CKK_GENERIC_SECRET (0x10)
+ #define CKK_RC2 (0x11)
+ #define CKK_RC4 (0x12)
++#ifndef OPENSSL_NO_DES
+ #define CKK_DES (0x13)
+ #define CKK_DES2 (0x14)
+ #define CKK_DES3 (0x15)
++#endif /* OPENSSL_NO_DES */
+ #define CKK_CAST (0x16)
+ #define CKK_CAST3 (0x17)
+ #define CKK_CAST128 (0x18)
+@@ -512,6 +514,7 @@
+ #define CKM_RC2_CBC_PAD (0x105)
+ #define CKM_RC4_KEY_GEN (0x110)
+ #define CKM_RC4 (0x111)
++#ifndef OPENSSL_NO_DES
+ #define CKM_DES_KEY_GEN (0x120)
+ #define CKM_DES_ECB (0x121)
+ #define CKM_DES_CBC (0x122)
+@@ -525,6 +528,7 @@
+ #define CKM_DES3_MAC (0x134)
+ #define CKM_DES3_MAC_GENERAL (0x135)
+ #define CKM_DES3_CBC_PAD (0x136)
++#endif /* OPENSSL_NO_DES */
+ #define CKM_CDMF_KEY_GEN (0x140)
+ #define CKM_CDMF_ECB (0x141)
+ #define CKM_CDMF_CBC (0x142)
+@@ -610,8 +614,10 @@
+ #define CKM_MD5_KEY_DERIVATION (0x390)
+ #define CKM_MD2_KEY_DERIVATION (0x391)
+ #define CKM_SHA1_KEY_DERIVATION (0x392)
++#ifndef OPENSSL_NO_DES
+ #define CKM_PBE_MD2_DES_CBC (0x3a0)
+ #define CKM_PBE_MD5_DES_CBC (0x3a1)
++#endif /* OPENSSL_NO_DES */
+ #define CKM_PBE_MD5_CAST_CBC (0x3a2)
+ #define CKM_PBE_MD5_CAST3_CBC (0x3a3)
+ #define CKM_PBE_MD5_CAST5_CBC (0x3a4)
+@@ -620,8 +626,10 @@
+ #define CKM_PBE_SHA1_CAST128_CBC (0x3a5)
+ #define CKM_PBE_SHA1_RC4_128 (0x3a6)
+ #define CKM_PBE_SHA1_RC4_40 (0x3a7)
++#ifndef OPENSSL_NO_DES
+ #define CKM_PBE_SHA1_DES3_EDE_CBC (0x3a8)
+ #define CKM_PBE_SHA1_DES2_EDE_CBC (0x3a9)
++#endif /* OPENSSL_NO_DES */
+ #define CKM_PBE_SHA1_RC2_128_CBC (0x3aa)
+ #define CKM_PBE_SHA1_RC2_40_CBC (0x3ab)
+ #define CKM_PKCS5_PBKD2 (0x3b0)
diff --git a/recipes-connectivity/openssh/openssh/run-ptest b/recipes-connectivity/openssh/openssh/run-ptest
new file mode 100755
index 0000000..36a3d2a
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/run-ptest
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+export TEST_SHELL=sh
+
+cd regress
+sed -i "/\t\tagent-ptrace /d" Makefile
+make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
+ | sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
+
+SSHAGENT=`which ssh-agent`
+GDB=`which gdb`
+
+if [ -z "${SSHAGENT}" -o -z "${GDB}" ]; then
+ echo "SKIP: agent-ptrace"
+ exit
+fi
+
+useradd openssh-test
+
+eval `su -c "${SSHAGENT} -s" openssh-test` > /dev/null
+r=$?
+if [ $r -ne 0 ]; then
+ echo "FAIL: could not start ssh-agent: exit code $r"
+else
+ su -c "gdb -p ${SSH_AGENT_PID}" openssh-test > /tmp/gdb.out 2>&1 << EOF
+ quit
+EOF
+ r=$?
+ if [ $r -ne 0 ]; then
+ echo "gdb failed: exit code $r"
+ fi
+ egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task ' >/dev/null /tmp/gdb.out
+ r=$?
+ rm -f /tmp/gdb.out
+ if [ $r -ne 0 ]; then
+ echo "FAIL: ptrace agent"
+ else
+ echo "PASS: ptrace agent"
+ fi
+
+ ${SSHAGENT} -k > /dev/null
+fi
+userdel openssh-test
+
diff --git a/recipes-connectivity/openssh/openssh/ssh_config b/recipes-connectivity/openssh/openssh/ssh_config
new file mode 100644
index 0000000..9e91915
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/ssh_config
@@ -0,0 +1,48 @@
+# $OpenBSD: ssh_config,v 1.28 2013/09/16 11:35:43 sthen Exp $
+
+# This is the ssh client system-wide configuration file. See
+# ssh_config(5) for more information. This file provides defaults for
+# users, and the values can be changed in per-user configuration files
+# or on the command line.
+
+# Configuration data is parsed as follows:
+# 1. command line options
+# 2. user-specific file
+# 3. system-wide file
+# Any configuration value is only changed the first time it is set.
+# Thus, host-specific definitions should be at the beginning of the
+# configuration file, and defaults at the end.
+
+# Site-wide defaults for some commonly used options. For a comprehensive
+# list of available options, their meanings and defaults, please see the
+# ssh_config(5) man page.
+
+Host *
+ ForwardAgent yes
+ ForwardX11 yes
+# RhostsRSAAuthentication no
+# RSAAuthentication yes
+# PasswordAuthentication yes
+# HostbasedAuthentication no
+# GSSAPIAuthentication no
+# GSSAPIDelegateCredentials no
+# BatchMode no
+# CheckHostIP yes
+# AddressFamily any
+# ConnectTimeout 0
+# StrictHostKeyChecking ask
+# IdentityFile ~/.ssh/identity
+# IdentityFile ~/.ssh/id_rsa
+# IdentityFile ~/.ssh/id_dsa
+# Port 22
+# Protocol 2,1
+# Cipher 3des
+# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
+# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
+# EscapeChar ~
+# Tunnel no
+# TunnelDevice any:any
+# PermitLocalCommand no
+# VisualHostKey no
+# ProxyCommand ssh -q -W %h:%p gateway.example.com
+# RekeyLimit 1G 1h
diff --git a/recipes-connectivity/openssh/openssh/sshd b/recipes-connectivity/openssh/openssh/sshd
new file mode 100644
index 0000000..182650b
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/sshd
@@ -0,0 +1,11 @@
+#%PAM-1.0
+
+auth include common-auth
+account required pam_nologin.so
+account include common-account
+password include common-password
+session optional pam_keyinit.so force revoke
+session optional pam_radauth.so
+session include common-session
+session required pam_loginuid.so
+
diff --git a/recipes-connectivity/openssh/openssh/sshd.socket b/recipes-connectivity/openssh/openssh/sshd.socket
new file mode 100644
index 0000000..12c39b2
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/sshd.socket
@@ -0,0 +1,10 @@
+[Unit]
+Conflicts=sshd.service
+
+[Socket]
+ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd
+ListenStream=22
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/recipes-connectivity/openssh/openssh/sshd@.service b/recipes-connectivity/openssh/openssh/sshd@.service
new file mode 100644
index 0000000..9d83dfb
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/sshd@.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenSSH Per-Connection Daemon
+Wants=sshdgenkeys.service
+After=sshdgenkeys.service
+
+[Service]
+Environment="SSHD_OPTS="
+EnvironmentFile=-/etc/default/ssh
+ExecStart=-@SBINDIR@/sshd -i $SSHD_OPTS
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+StandardInput=socket
+StandardError=syslog
+KillMode=process
diff --git a/recipes-connectivity/openssh/openssh/sshd_config b/recipes-connectivity/openssh/openssh/sshd_config
new file mode 100644
index 0000000..31fe5d9
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/sshd_config
@@ -0,0 +1,132 @@
+# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options change a
+# default value.
+
+#Port 22
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+# The default requires explicit activation of protocol 1
+Protocol 2
+
+# HostKey for protocol version 1
+#HostKey /etc/ssh/ssh_host_key
+# HostKeys for protocol version 2
+#HostKey /etc/ssh/ssh_host_rsa_key
+#HostKey /etc/ssh/ssh_host_dsa_key
+#HostKey /etc/ssh/ssh_host_ecdsa_key
+#HostKey /etc/ssh/ssh_host_ed25519_key
+
+# Lifetime and size of ephemeral version 1 server key
+#KeyRegenerationInterval 1h
+#ServerKeyBits 1024
+
+# Ciphers and keying
+#RekeyLimit default none
+
+# Logging
+# obsoletes QuietMode and FascistLogging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+#PermitRootLogin yes
+#StrictModes yes
+#MaxAuthTries 6
+#MaxSessions 10
+
+#RSAAuthentication yes
+#PubkeyAuthentication yes
+
+# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
+# but this is overridden so installations will only check .ssh/authorized_keys
+AuthorizedKeysFile .ssh/authorized_keys
+
+#AuthorizedPrincipalsFile none
+
+#AuthorizedKeysCommand none
+#AuthorizedKeysCommandUser nobody
+
+# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+#RhostsRSAAuthentication no
+# similar for protocol version 2
+#HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# RhostsRSAAuthentication and HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+#IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+#PasswordAuthentication yes
+#PermitEmptyPasswords no
+
+# Change to no to disable s/key passwords
+ChallengeResponseAuthentication no
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the ChallengeResponseAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via ChallengeResponseAuthentication may bypass
+# the setting of "PermitRootLogin without-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and ChallengeResponseAuthentication to 'no'.
+#UsePAM no
+
+#AllowAgentForwarding yes
+#AllowTcpForwarding yes
+#GatewayPorts no
+#X11Forwarding no
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+#PermitTTY yes
+#PrintMotd yes
+#PrintLastLog yes
+#TCPKeepAlive yes
+#UseLogin no
+#PermitUserEnvironment no
+Compression no
+ClientAliveInterval 15
+ClientAliveCountMax 4
+#UseDNS yes
+#PidFile /var/run/sshd.pid
+#MaxStartups 10:30:100
+#PermitTunnel no
+#ChrootDirectory none
+#VersionAddendum none
+
+# no default banner path
+#Banner none
+
+# override default of no subsystems
+Subsystem sftp /usr/libexec/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# PermitTTY no
+# ForceCommand cvs server
diff --git a/recipes-connectivity/openssh/openssh/sshdgenkeys.service b/recipes-connectivity/openssh/openssh/sshdgenkeys.service
new file mode 100644
index 0000000..148e6ad
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/sshdgenkeys.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=OpenSSH Key Generation
+RequiresMountsFor=/var /run
+ConditionPathExists=!/var/run/ssh/ssh_host_rsa_key
+ConditionPathExists=!/var/run/ssh/ssh_host_dsa_key
+ConditionPathExists=!/var/run/ssh/ssh_host_ecdsa_key
+ConditionPathExists=!/var/run/ssh/ssh_host_ed25519_key
+ConditionPathExists=!/etc/ssh/ssh_host_rsa_key
+ConditionPathExists=!/etc/ssh/ssh_host_dsa_key
+ConditionPathExists=!/etc/ssh/ssh_host_ecdsa_key
+ConditionPathExists=!/etc/ssh/ssh_host_ed25519_key
+
+[Service]
+Environment="SYSCONFDIR=/etc/ssh"
+EnvironmentFile=-/etc/default/ssh
+ExecStart=@BASE_BINDIR@/mkdir -p $SYSCONFDIR
+ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' -t rsa
+ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' -t dsa
+ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' -t ecdsa
+ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ed25519_key -N '' -t ed25519
+Type=oneshot
+RemainAfterExit=yes
diff --git a/recipes-connectivity/openssh/openssh/volatiles.99_sshd b/recipes-connectivity/openssh/openssh/volatiles.99_sshd
new file mode 100644
index 0000000..a0d2af3
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/volatiles.99_sshd
@@ -0,0 +1,2 @@
+d root root 0755 /var/run/sshd none
+f root root 0644 /var/log/lastlog none
diff --git a/recipes-connectivity/openssh/openssh_8.1p1.bb b/recipes-connectivity/openssh/openssh_8.1p1.bb
new file mode 100644
index 0000000..5bfd8e3
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh_8.1p1.bb
@@ -0,0 +1,160 @@
+SUMMARY = "A suite of security-related network utilities based on \
+the SSH protocol including the ssh client and sshd server"
+DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
+Ssh (Secure Shell) is a program for logging into a remote machine \
+and for executing commands on a remote machine."
+HOMEPAGE = "http://www.openssh.com/"
+SECTION = "console/network"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=18d9e5a8b3dd1790d73502f50426d4d3"
+
+DEPENDS = "zlib openssl"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
+ file://sshd_config \
+ file://ssh_config \
+ file://init \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://sshd.socket \
+ file://sshd@.service \
+ file://sshdgenkeys.service \
+ file://volatiles.99_sshd \
+ file://openssh-8.1p1-add-test-support-for-busybox.patch \
+ file://run-ptest \
+ file://openssh-8.1p1-conditional-compile-des-in-cipher.patch \
+ file://openssh-8.1p1-conditional-compile-des-in-pkcs11.patch \
+ file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
+ "
+
+PAM_SRC_URI = "file://sshd"
+
+SRC_URI[md5sum] = "513694343631a99841e815306806edf0"
+SRC_URI[sha256sum] = "02f5dbef3835d0753556f973cd57b4c19b6b1f6cd24c03445e23ac77ca1b93ff"
+
+inherit useradd update-rc.d update-alternatives systemd
+
+USERADD_PACKAGES = "${PN}-sshd"
+USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
+INITSCRIPT_PACKAGES = "${PN}-sshd"
+INITSCRIPT_NAME_${PN}-sshd = "sshd"
+INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
+
+SYSTEMD_PACKAGES = "${PN}-sshd"
+SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
+
+inherit autotools-brokensep ptest
+
+# LFS support:
+CFLAGS += "-D__FILE_OFFSET_BITS=64"
+
+# login path is hardcoded in sshd
+EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+ --without-zlib-version-check \
+ --with-privsep-path=/var/run/sshd \
+ --sysconfdir=${sysconfdir}/ssh \
+ --with-xauth=/usr/bin/xauth \
+ --disable-strip \
+ "
+
+# Since we do not depend on libbsd, we do not want configure to use it
+# just because it finds libutil.h. But, specifying --disable-libutil
+# causes compile errors, so...
+CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no"
+
+# passwd path is hardcoded in sshd
+CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
+
+# We don't want to depend on libblockfile
+CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no"
+
+do_configure_prepend () {
+ export LD="${CC}"
+ install -m 0644 ${WORKDIR}/sshd_config ${B}/
+ install -m 0644 ${WORKDIR}/ssh_config ${B}/
+ if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
+ cp aclocal.m4 acinclude.m4
+ fi
+}
+
+do_compile_ptest() {
+ # skip regress/unittests/ binaries: this will silently skip
+ # unittests in run-ptests which is good because they are so slow.
+ oe_runmake regress/modpipe regress/setuid-allowed regress/netcat
+}
+
+do_install_append () {
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+ install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
+ sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config
+ fi
+
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
+ sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config
+ fi
+
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
+ rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
+ rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
+ install -d ${D}/${sysconfdir}/default/volatiles
+ install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
+ install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir}
+
+ # Create config files for read-only rootfs
+ install -d ${D}${sysconfdir}/ssh
+ install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
+ sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+
+ install -d ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@BINDIR@,${bindir},g' \
+ ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service
+}
+
+do_install_ptest () {
+ sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh
+ cp -r regress ${D}${PTEST_PATH}
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
+FILES_${PN}-scp = "${bindir}/scp.${BPN}"
+FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
+FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
+FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
+FILES_${PN}-sftp = "${bindir}/sftp"
+FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
+FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
+FILES_${PN}-keygen = "${bindir}/ssh-keygen"
+
+RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
+RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
+RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
+
+RPROVIDES_${PN}-ssh = "ssh"
+RPROVIDES_${PN}-sshd = "sshd"
+
+RCONFLICTS_${PN} = "dropbear"
+RCONFLICTS_${PN}-sshd = "dropbear"
+RCONFLICTS_${PN}-keygen = "ssh-keygen"
+
+CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
+CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
+
+ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE_${PN}-scp = "scp"
+ALTERNATIVE_${PN}-ssh = "ssh"
+
+do_rm_work () {
+}
diff --git a/recipes-core/busybox/busybox_%.bbappend b/recipes-core/busybox/busybox_%.bbappend
index ca0d56b..142f08c 100644
--- a/recipes-core/busybox/busybox_%.bbappend
+++ b/recipes-core/busybox/busybox_%.bbappend
@@ -1,4 +1,4 @@
-PR .= ".mlinux3"
+PR .= ".mlinux4"
PACKAGES =+ "busybox-ifplugd"
FILESEXTRAPATHS_prepend := ":${THISDIR}/files:"
RDEPENDS_${PN} += "bash"
@@ -17,6 +17,7 @@ SRC_URI += "file://udhcpd.conf.example \
file://ifplugd.init \
file://eth0.conf \
file://eth1.conf.example \
+ file://ifplugd.patch \
"
do_install_append () {
diff --git a/recipes-core/busybox/files/ifplugd.init b/recipes-core/busybox/files/ifplugd.init
index 87f2408..418b088 100755
--- a/recipes-core/busybox/files/ifplugd.init
+++ b/recipes-core/busybox/files/ifplugd.init
@@ -9,7 +9,7 @@
startdaemon(){
# Start the application
echo -n "Starting ifplugd: "
- CONFS=($(find /etc/ifplugd -name '*.conf'))
+ CONFS=($(find -L /etc/ifplugd -name '*.conf'))
((i=0))
logger -p daemon.info "Found ${#CONFS[@]} Configurations"
while ((i < ${#CONFS[@]})) ; do
diff --git a/recipes-core/busybox/files/ifplugd.patch b/recipes-core/busybox/files/ifplugd.patch
new file mode 100644
index 0000000..839a8a2
--- /dev/null
+++ b/recipes-core/busybox/files/ifplugd.patch
@@ -0,0 +1,20 @@
+#
+# This patch is found here:
+# http://lists.busybox.net/pipermail/busybox/2018-March/086328.html
+# Basically ifplugd will not stay up if the driver is loading.
+# This is particularly apparent with gadget.
+diff -arNu a/networking/ifplugd.c b/networking/ifplugd.c
+--- a/networking/ifplugd.c 2019-05-28 18:11:43.836982315 -0500
++++ b/networking/ifplugd.c 2019-05-28 18:13:13.088979672 -0500
+@@ -358,8 +358,10 @@
+ ifrequest.ifr_flags |= IFF_UP;
+ /* Let user know we mess up with interface */
+ bb_error_msg("upping interface");
+- if (network_ioctl(SIOCSIFFLAGS, &ifrequest, "setting interface flags") < 0)
++ if (network_ioctl(SIOCSIFFLAGS, &ifrequest, "setting interface flags") < 0) {
++ if (errno != ENODEV && errno != EADDRNOTAVAIL)
+ xfunc_die();
++ }
+ }
+
+ #if 0 /* why do we mess with IP addr? It's not our business */
diff --git a/recipes-core/busybox/ifplugd-disable_1.0.bb b/recipes-core/busybox/ifplugd-disable_1.0.bb
index 3d75d2d..3037e23 100644
--- a/recipes-core/busybox/ifplugd-disable_1.0.bb
+++ b/recipes-core/busybox/ifplugd-disable_1.0.bb
@@ -5,17 +5,41 @@ PACKAGE_ARCH = "all"
RDEPENDS_ifplugd-disable = "busybox-ifplugd"
ALLOW_EMPTY_ifplugd-disable = "1"
-PR = "r1"
+PR = "r2"
+# Mount root rw to disable/enable ifplugd.
+# Mount root ro when we are done.
+# This makes the Yocto Police happy.
pkg_prerm_${PN}() {
+ro=0
+if [ -z "$D" ] ; then
+ if egrep -q '[[:space:]]/[[:space:]].*[[:space:]]ro,' /proc/mounts ; then
+ ro=1
+ mount -o remount,rw /
+ fi
+fi
sed -i 's/^ENABLED="no"/ENABLED="yes"/i' $D${sysconfdir}/default/ifplugd
+if [ $ro -eq 1 ] ; then
+ mount -o remount,ro /
+fi
}
+
pkg_postinst_${PN}() {
+ro=0
+if [ -z "$D" ] ; then
+ if egrep -q '[[:space:]]/[[:space:]].*[[:space:]]ro,' /proc/mounts ; then
+ ro=1
+ mount -o remount,rw /
+ fi
+fi
sed -i 's/^ENABLED="yes"/ENABLED="no"/i' $D${sysconfdir}/default/ifplugd
if [ -f $D/var/config/default/ifplugd ]; then
sed -i 's/^ENABLED="yes"/ENABLED="no"/i' $D/var/config/default/ifplugd
else
- cp $D/etc/default/ifplugd $D/var/config/default/ifplugd
+ cp $D${sysconfdir}/default/ifplugd $D/var/config/default/ifplugd
+fi
+if [ $ro -eq 1 ] ; then
+ mount -o remount,ro /
fi
}
diff --git a/recipes-core/images/mlinux-base-image.bb b/recipes-core/images/mlinux-base-image.bb
index c5ad887..38e246a 100644
--- a/recipes-core/images/mlinux-base-image.bb
+++ b/recipes-core/images/mlinux-base-image.bb
@@ -15,6 +15,7 @@ NETWORKING_FEATURES_append = " \
openssl \
rsync \
iperf3 \
+ lldpd \
mii-diag \
tcpdump \
netcat \
diff --git a/recipes-core/images/mlinux-basetest-image.bb b/recipes-core/images/mlinux-basetest-image.bb
new file mode 100644
index 0000000..807b16e
--- /dev/null
+++ b/recipes-core/images/mlinux-basetest-image.bb
@@ -0,0 +1,9 @@
+# Conduit 0.0 or 0.1 without RS9113
+DESCRIPTION = "mLinux base test image"
+LICENSE = "MIT"
+
+require mlinux-base-image.bb
+
+# Open console for test image
+CONSOLE = "sysvinit-inittab-start-open"
+
diff --git a/recipes-core/images/mlinux-minimal-image.bb b/recipes-core/images/mlinux-minimal-image.bb
index 8b8afa9..41829ec 100644
--- a/recipes-core/images/mlinux-minimal-image.bb
+++ b/recipes-core/images/mlinux-minimal-image.bb
@@ -67,11 +67,14 @@ MULTITECH_BB = ""
UPGRADE_FEATURES = ""
UPGRADE_FEATURES_mtbsp-at91 = "mtd-utils-static"
+CONSOLE = "sysvinit-inittab-start"
+
IMAGE_INSTALL = "${CORE_FEATURES} \
${NETWORKING_FEATURES} \
${UPGRADE_FEATURES} \
${MULTITECH_FEATURES} \
${MULTITECH_MTAC} \
${MULTITECH_BB} \
+ ${CONSOLE} \
"
diff --git a/recipes-core/images/mlinux-mths-image.bb b/recipes-core/images/mlinux-mths-image.bb
new file mode 100644
index 0000000..9a90eea
--- /dev/null
+++ b/recipes-core/images/mlinux-mths-image.bb
@@ -0,0 +1,8 @@
+# Factory testing image for MTHS.
+# config-mths is needed for factory
+# reset.
+require mlinux-rs9113-mtrv1-image.bb
+DESCRIPTION = "MTHS images for Factory Testing"
+
+# Extra stuff to install
+IMAGE_INSTALL += "config-mths dnsmasq"
diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb
index 0aaf875..ff9af34 100644
--- a/recipes-core/images/mlinux-mtrv1-image.bb
+++ b/recipes-core/images/mlinux-mtrv1-image.bb
@@ -29,7 +29,7 @@ WIFI_FEATURES = " \
hostapd \
"
-BLUETOOTH_FEATURES = "bluez5"
+BLUETOOTH_FEATURES = "bluez5 bluez5-pand"
# Add all timezones available
# ntpdate will sync time every 30 min by default via cron
@@ -54,7 +54,7 @@ MULTITECH_FEATURES_append = " \
jsparser \
"
-MISC_FEATURES = "minicom lrzsz nano"
+MISC_FEATURES = "minicom lrzsz nano pps-tools"
# Extra stuff to install
IMAGE_INSTALL_append = " kernel-module-rs9113 rs9113-util rs9113-autostart"
diff --git a/recipes-core/images/mlinux-rs9113-factory-image.bb b/recipes-core/images/mlinux-rs9113-factory-image.bb
index f351132..40a4610 100644
--- a/recipes-core/images/mlinux-rs9113-factory-image.bb
+++ b/recipes-core/images/mlinux-rs9113-factory-image.bb
@@ -2,4 +2,4 @@ require mlinux-factory-image.bb
DESCRIPTION = "mLinux factory image with rs9113 drivers"
# Extra stuff to install
-IMAGE_INSTALL_append = " dnsmasq bluez5-noinst-tools python-dbus kernel-module-rs9113 rs9113-autostart rs9113-util"
+IMAGE_INSTALL_append = " dnsmasq bluez5-noinst-tools python-dbus kernel-module-rs9113 rs9113-autostart rs9113-util rs9113-misc rs9113-utils-extra"
diff --git a/recipes-core/images/mlinux-rs9113-mtrv1-image.bb b/recipes-core/images/mlinux-rs9113-mtrv1-image.bb
new file mode 100644
index 0000000..553d9cb
--- /dev/null
+++ b/recipes-core/images/mlinux-rs9113-mtrv1-image.bb
@@ -0,0 +1,74 @@
+require mtr-modules.inc
+DESCRIPTION = "mLinux base mtr image"
+LICENSE = "MIT"
+
+require mlinux-minimal-image.bb
+MULTITECH_MTAC = ""
+
+FILESYSTEM_FEATURES = "dosfstools \
+ cifs-utils \
+ lsof \
+ "
+
+NETWORKING_FEATURES += "bridge-utils \
+ dnsmasq \
+ inetutils-ftp \
+ openssl \
+ rsync \
+ iperf \
+ iperf3 \
+ mii-diag \
+ tcpdump \
+ netcat \
+ wget \
+ strongswan \
+ busybox-ifplugd \
+ "
+
+WIFI_FEATURES = " \
+ libnl \
+ wpa-supplicant \
+ wireless-tools \
+ iw \
+ hostap-daemon hostap-utils \
+ "
+
+BLUETOOTH_FEATURES = "bluez5 bluez5-pand"
+
+# Add all timezones available
+# ntpdate will sync time every 30 min by default via cron
+TIME_FEATURES = "tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic \
+ tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \
+ tzdata-misc \
+ cronie \
+ ntpdate \
+ "
+
+# u-boot-linux-utils: U-Boot environment access from Linux
+# mlinux-scripts: sample scripts for setting up Conduit for various tasks
+# reset-handler: default reset button handler
+# radio-cmd: supports cellular radio activation and other configuration commands
+# radio-query: queries cellular radio for common info (IMEI, RSSI, etc)
+# jsparser: command line tool to parse JSON files
+MULTITECH_FEATURES += " \
+ u-boot-linux-utils \
+ mlinux-scripts \
+ reset-handler \
+ radio-cmd radio-query \
+ jsparser \
+ "
+
+MISC_FEATURES = "minicom lrzsz nano pps-tools"
+
+# Extra stuff to install
+IMAGE_INSTALL += "kernel-module-rs9113 rs9113rf rs9113-util rs9113-utils-extra rs9113-misc rs9113-autostart"
+IMAGE_INSTALL += "gpsd libgps libgps24 ntp ntp-utils gpspipe gps-utils"
+IMAGE_INSTALL += "lxfp"
+
+IMAGE_INSTALL += " \
+ ${WIFI_FEATURES} \
+ ${BLUETOOTH_FEATURES} \
+ ${FILESYSTEM_FEATURES} \
+ ${TIME_FEATURES} \
+ ${MISC_FEATURES} \
+ "
diff --git a/recipes-core/images/mlinux-sdk.bb b/recipes-core/images/mlinux-sdk.bb
index fa6f811..abdadbf 100644
--- a/recipes-core/images/mlinux-sdk.bb
+++ b/recipes-core/images/mlinux-sdk.bb
@@ -2,4 +2,4 @@
require mlinux-factory-image.bb
DESCRIPTION = "mLinux SDK"
-IMAGE_INSTALL_append = " boost"
+IMAGE_INSTALL_append = " boost i2c-tools"
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn
deleted file mode 100755
index 317a3d7..0000000
--- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/bash
-
-# Copyright (C) 2014,2017 Multi-Tech Systems
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-gsm_chat_file=/etc/ppp/peers/gsm_chat
-lvw2_chat_file=/etc/ppp/peers/lvw2_chat
-leu1_chat_file=/etc/ppp/peers/leu1_chat
-lna3_chat_file=/etc/ppp/peers/lna3_chat_non_vz
-lna3_chat_link=/etc/ppp/peers/lna3_chat
-lna3_readme=/etc/ppp/peers/README.lna3
-lap3_chat_file=/etc/ppp/peers/lap3_chat
-lsp3_chat_file=/etc/ppp/peers/lsp3_chat
-
-function usage {
- echo "Usage: $(basename $0) [--] APN"
- echo "Or $(basename $0) -c to clear the APN line"
- echo "-- is requied if the APN begins with -"
- exit 1
-}
-
-
-((clear=0))
-if (($# < 1)); then
- usage
-fi
-if [[ $1 == "--" ]] ; then
- apn=$2
-elif [[ $1 == "-c" ]] ; then
- clear=1
-elif [[ $1 =~ ^- ]] ; then
- usage
-else
- apn=$1
-fi
-
-radioproduct=$(/usr/sbin/mts-io-sysfs show product-id) # LNA3?
-
-if (($? != 0)) ; then
- echo "Radio is not ready or not found and cannot determine the type"
- exit 1
-fi
-
-# Disable the LNA3 chat script
-if ! [[ -L $lna3_chat_link ]] || [[ $(basename $(readlink -f $lna3_chat_link)) != README.lna3 ]] ; then
- ln -sf "${lna3_readme}" "${lna3_chat_link}"
- echo Disabling LNA3 chat script.
-fi
-
-if ((clear != 1)) ; then
- if sed -r -i "s/^(#comment by mlinux-set-apn )*OK\s+'AT\+CGDCONT=([0-9]*),\"([^\"]*)\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=\2,\"\3\",\"${apn}\"'/" $gsm_chat_file ; then
- echo "Set APN to \"${apn}\" in $gsm_chat_file"
- else
- echo "Failed to set APN in $gsm_chat_file"
- fi
- echo "Not allowed to set APN for $lsp3_chat_file"
- echo "Not allowed to set APN for $lvw2_chat_file"
- # We cannot set the APN for a Verizon modem
- # sed -r -i "s/^(#comment by mlinux-set-apn )*OK\s+'AT\+CGDCONT=3,\"IPV4V6\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=3,\"IPV4V6\",\"${apn}\"'/" $lvw2_chat_file
- if sed -r -i "s/^(#comment by mlinux-set-apn )*OK\s+'AT\+CGDCONT=([0-9]*),\"([^\"]*)\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=\2,\"\3\",\"${apn}\"'/" $leu1_chat_file ; then
- echo "Set APN to \"${apn}\" in $leu1_chat_file"
- else
- echo "Failed to set APN in $leu1_chat_file"
- fi
- if sed -r -i "s/^(#comment by mlinux-set-apn )*OK\s+'AT\+CGDCONT=([0-9]*),\"([^\"]*)\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=\2,\"\3\",\"${apn}\"'/" $lna3_chat_file ; then
- echo "Set APN to \"${apn}\" in $lna3_chat_file"
- else
- echo "Failed to set APN in $lna3_chat_file"
- fi
- if sed -r -i "s/^(#comment by mlinux-set-apn )*OK\s+'AT\+CGDCONT=([0-9]*),\"([^\"]*)\",\"[^\"]*\"'$/OK 'AT\+CGDCONT=\2,\"\3\",\"${apn}\"'/" $lap3_chat_file ; then
- echo "Set APN to \"${apn}\" in $lap3_chat_file"
- else
- echo "Failed to set APN in $lap3_chat_file"
- fi
-else
- if sed -r -i "s/^(OK\s+'AT\+CGDCONT=[0-9]*,\"[^\"]*\",\"[^\"]*\"'$)/#comment by mlinux-set-apn \1/" $gsm_chat_file ; then
- echo "Commented out APN in $gsm_chat_file"
- else
- echo "Failed to comment out APN in $gsm_chat_file"
- fi
- # Not setting APN in lvw2 is OK, since Verizon should not have an APN in a chat file.
- if sed -r -i "s/^(OK\s+'AT\+CGDCONT=[0-9]*,\"[^\"]*\",\"[^\"]*\"'$)/#comment by mlinux-set-apn \1/" $lvw2_chat_file ; then
- echo "Commented out APN in $lvw2_chat_file"
- fi
- if sed -r -i "s/^(OK\s+'AT\+CGDCONT=[0-9]*,\"[^\"]*\",\"[^\"]*\"'$)/#comment by mlinux-set-apn \1/" $leu1_chat_file ; then
- echo "Commented out APN in $leu1_chat_file"
- else
- echo "Failed to comment out APN in $leu1_chat_file"
- fi
- if sed -r -i "s/^(OK\s+'AT\+CGDCONT=[0-9]*,\"[^\"]*\",\"[^\"]*\"'$)/#comment by mlinux-set-apn \1/" $lna3_chat_file ; then
- echo "Commented out APN in $lna3_chat_file"
- else
- echo "Failed to comment out APN in $lna3_chat_file"
- fi
- if sed -r -i "s/^(OK\s+'AT\+CGDCONT=[0-9]*,\"[^\"]*\",\"[^\"]*\"'$)/#comment by mlinux-set-apn \1/" $lap3_chat_file ; then
- echo "Commented out APN in $lap3_chat_file"
- else
- echo "Failed to comment out APN in $lap3_chat_file"
- fi
-fi
-
-exit 0
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-apn b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-apn
deleted file mode 100755
index 535ab17..0000000
--- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-apn
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/bin/bash
-
-# Copyright (C) 2014, 2017 Multi-Tech Systems
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-lna3_chat_file[0]=/etc/ppp/peers/lna3_chat_non_vz
-lna3_chat_file[1]=/etc/ppp/peers/lna3_chat_vz
-lna3_chat_link=/etc/ppp/peers/lna3_chat
-
-function setchat {
- fw=$1
- silent=$2
- if ((${#lna3_chat_file[$fw]} == 0)) ; then
- >&2 echo "Invalid firmware SKU $fw"
- return 1
- else
- canon_src=$(readlink -f "${lna3_chat_file[$fw]}")
- canon_dest=$(readlink -f "${lna3_chat_link}")
- if [[ ${canon_src} != ${canon_dest} ]] ; then
- if ((silent == 0)) ; then
- echo "Setting chat script to ${lna3_chat_file[$fw]}"
- fi
- ln -sf "${lna3_chat_file[$fw]}" "${lna3_chat_link}"
- fi
- fi
-}
-
-function usage {
- >&2 echo "$(basename $0) [firmware image SKU]"
- >&2 echo "The firmware image SKU is optional."
- >&2 echo "If not specified, the image SKU will be determined"
- >&2 echo "from the SIM, and automatically switched with the"
- >&2 echo "APN. Current valid SKU's are 0 and 1"
- >&2 echo "Only LE910-NA1 is supported on product-ids containing string -LNA3-"
- exit 1
-}
-
-function not_ready {
- >&2 echo "Radio is not ready"
- >&2 echo "Try executing mlinux-switch-apn once the radio is ready"
- exit 1
-}
-productid=$(/usr/sbin/mts-io-sysfs show product-id)
-if ! [[ $productid =~ -LNA3- ]] ; then
- echo "Firmware switch is supported only on LE910-NA1 models with product-id containing -LNA3-."
- usage
- exit 1
-fi
-
-if (($# > 0)) ; then
- fw="$1"
- if [[ fw =~ ^[0-9]+$ ]] ; then
- if ((fw < 0)) || ((fw > 1)) ; then
- usage
- fi
- else
- if ((fw > 1)) || ((fw < 0)) ; then
- >&2 echo "Invalid firmware SKU value"
- usage
- fi
- fi
- echo "Switching chat script to firmware SKU $fw"
- setchat $fw 0
- exit $?
-else
- if ! /usr/sbin/mlinux-cell-radio-ready ; then
- >&2 echo Radio is not ready
- >&2 echo Try again later
- exit 1
- fi
- MODEL=$(radio-query --model)
- if (($? != 0)) ; then
- >&2echo "Assume no radio on this device."
- usage
- exit 1
- fi
- if [[ $MODEL != LE910-NA1 ]] ; then
- >&2 echo "Firmware switch is supported only on LE910-NA1 models with product-id containing -LNA3-."
- usage
- fi
-
- if fwreply=$(/usr/sbin/mlinux-switch-cell-fw -1); then
- if [[ $fwreply =~ Cellular[[:space:]]+radio[[:space:]]+firmware[[:space:]]+has[[:space:]]+(already[[:space:]]+)been[[:space:]]+switched[[:space:]]+to[[:space:]]+([^[:space:]]*)[[:space:]]+image\. ]] ; then
- fw=${BASH_REMATCH[2]}
- setchat $fw 0
- else
- fw=$(radio-query --active-firmware)
- if (($? == 0)) ; then
- setchat $fw 0
- fi
- fi
- fi
-fi \ No newline at end of file
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-cell-fw b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-cell-fw
deleted file mode 100755
index 9edacac..0000000
--- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-cell-fw
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/bin/bash
-lna3_chat_link=/etc/ppp/peers/lna3_chat
-lna3_readme=/etc/ppp/peers/README.lna3
-function usage {
->&2 echo "\
-Usage: $0 <image_id> [timeout]
- image_id <0|1|-1> : for dual FW image SKU-s, the id of the image to switch to
- (LTE910-NA1 is the only supported radio for now).
- -1 is based on SIM
- timeout : wait time for radio to come up if set (default : 15 sec)
-
-"
- exit 1
-}
-
-if [ $# -gt 2 ] ; then
- usage
-fi
-
-#
-# Load args (don't wait for the radio by default)
-#
-FWIMAGE=$1
-if ((FWIMAGE < -2)) || ((FWIMAGE > 1)) ; then
- usage
-fi
-if ! >&2 /usr/sbin/mlinux-cell-radio-ready ; then
- [ "$VERBOSE" ] && >&2 echo Radio is not ready
- [ "$VERBOSE" ] && >&2 echo Try again later
- exit 1
-fi
-if ((FWIMAGE == -1)) ; then
- iccid=$(radio-query --iccid)
- if (($? == 0)); then
- if ((${#iccid} == 0)) ; then
- [ "$VERBOSE" ] && >&2 echo "No carrier. Maybe no SIM?"
- [ "$VERBOSE" ] && >&2 echo "ERROR: Cannot decide on firmware"
- exit 1
- fi
- if [[ "$iccid" =~ ^89148.* ]] ; then
- ((FWIMAGE=1))
- else
- ((FWIMAGE=0))
- fi
- else
- >&2 echo "Cannot get ICCID from SIM"
- >&2 echo "Try again later"
- exit 1
- fi
-fi
-
-
-TIMEOUT=${2:-15}
-if [ "$VERBOSE" != "yes" ]; then
- VERBOSE=""
-fi
-
-[ "$VERBOSE" ] && >&2 echo -n "Switching the radio firmware image: "
-
-#
-# Check if the radio present
-#
-MODEL=$(radio-query --model)
-if [ $? -ne 0 ]; then
- [ "$VERBOSE" ] && >&2 echo "Assume no radio on this device."
- exit 0
-fi
-
-#
-# Applicable for LTE910-NA1 with dual FW images only
-#
-productid=$(/usr/sbin/mts-io-sysfs show product-id)
-if [[ $MODEL != LE910-NA1 ]] || ! [[ $productid =~ -LNA3- ]] ; then
- [ "$VERBOSE" ] && >&2 echo "Firmware switch is supported only on LE910-NA1 models with product-id containing -LNA3-."
- exit 0
-fi
-
-#
-# Check if firmware switch is required
-#
-FWACTIVE=$(radio-query --active-firmware)
-if [ $? -ne 0 ] || [ "$FWACTIVE" == "" ]; then
- [ "$VERBOSE" ] && >&2 echo "The $MODEL radio does not support firmware switching."
- exit 0
-fi
-
-if (( FWACTIVE == FWIMAGE )); then
- echo "Cellular radio firmware has already been switched to $FWIMAGE image."
- exit 0
-fi
-
-# Disable the LNA3 chat script in case of failure.
-if ! [[ -L $lna3_chat_link ]] || [[ $(basename $(readlink -f $lna3_chat_link)) != README.lna3 ]] ; then
- ln -sf "${lna3_readme}" "${lna3_chat_link}"
- echo "Chat script is now disabled."
-fi
-
-#
-# Switch the firmware
-#
-RESULT=$(radio-cmd --set-active-firmware "$FWIMAGE")
-if [ $? -ne 0 ]; then
- [ "$VERBOSE" ] && >&2 echo "$RESULT"
- exit 1
-fi
-
-
-#
-# Exit if no TIMEOUT set
-#
-# This is somewhat dangerous in that we assume the radio
-# will switch.
-if ((TIMEOUT == 0)) ; then
- if ((FWIMAGE == 0)) ; then
- [ "$VERBOSE" ] && >&2 echo "Use mlinux-switch-apn to switch the APN when the radio is ready, before dialing"
- exit 0
- fi
-fi
-#
-#
-# Wait for the radio to be ready before continuing
-#
-COUNTER=0
-
-[ "$VERBOSE" ] && echo -n "Wait..."
-
-#
-# Give it some time
-#
-sleep 5
-
-while [ $COUNTER -lt $TIMEOUT ]; do
- MODEL=$(radio-query --model)
- if [ $? -eq 0 ]; then
- echo "Cellular radio firmware has been switched to $FWIMAGE image."
- exit 0
- fi
-
- let COUNTER=COUNTER+1
-
- [ "$VERBOSE" ] && echo -n "."
-
- sleep 1
-done
-
->&2 echo "Cellular radio is not ready."
->&2 echo "When it becomes ready, invoke /usr/sbin/mlinux-switch-apn"
->&2 echo "to set the APN"
-exit 1
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-radio-ready
index 42c5cdc..42c5cdc 100644
--- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready
+++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-radio-ready
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-router b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-router
index 1607c32..1607c32 100755
--- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-router
+++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-router
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-dhcpd b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-dhcpd
index 976b138..976b138 100755
--- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-dhcpd
+++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-dhcpd
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-firmware-upgrade b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade
index a377309..a377309 100755
--- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-firmware-upgrade
+++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-set-apn b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-set-apn
new file mode 100755
index 0000000..ebe8096
--- /dev/null
+++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-set-apn
@@ -0,0 +1,117 @@
+#!/bin/bash
+
+# Copyright (C) 2014,2017,2019 Multi-Tech Systems
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+noapn_modems=(lvw2 lsp3 cdma)
+
+# Comment out AT+CGDCONT= statement
+remove_apn_sedcmd="s/^(OK[[:space:]]+'|#MT[[:space:]]+)(AT\+CGDCONT=[0-9]+[^\']*)'*/#comment by mlinux-set-apn \2/"
+
+
+
+function usage {
+ echo "Usage: $(basename $0) [--] APN"
+ echo "Or $(basename $0) -c to clear the APN line"
+ echo "-- is requied if the APN begins with -"
+ exit 1
+}
+
+
+((clear=0))
+if (($# < 1)); then
+ usage
+fi
+if [[ $1 == "--" ]] ; then
+ apn=$2
+elif [[ $1 == "-c" ]] ; then
+ clear=1
+elif [[ $1 =~ ^- ]] ; then
+ usage
+else
+ apn=$1
+fi
+
+
+set_apn_sedcmd="s/^(#comment by mlinux-set-apn )*(OK[[:space:]]+'|#MT[[:space:]]+)*AT\+CGDCONT=([0-9]+),\"([^\"]*)\",\"[^\"]*\".*/#MT AT\+CGDCONT=\3,\"\4\",\"${apn}\"/"
+
+
+
+getmodem()
+{
+ radioproduct=$(/usr/sbin/mts-io-sysfs show product-id) # LNA3?
+ if (($? != 0)) ; then
+ echo "Radio is not ready or not found and cannot determine the type"
+ exit 1
+ fi
+ if [[ $radioproduct =~ [^-]*-([^-]*)- ]] ; then
+ echo "${BASH_REMATCH[1]}"
+ fi
+}
+function findItem
+{
+ local s check="$1"
+ shift
+ for s ; do [[ "$s" == "$check" ]] && return 0; done
+ return 1
+}
+
+
+cd /var/config/ppp/peers
+if ((clear != 1)) ; then
+ for f in $noapn ; do
+ echo "Not allowed to set APN for $f"
+ done
+
+ for f in *_chat *_chat_non_vz ; do
+ if [[ -L $f ]] ; then
+ continue
+ fi
+ [[ $f =~ ([^_]*) ]]
+ m=${BASH_REMATCH[1]}
+ if findItem "$m" "${noapn_modems[@]}" ; then
+ continue
+ fi
+
+ if sed -r -i "${set_apn_sedcmd}" ${f}; then
+ echo "Set APN to \"${apn}\" in ${f}"
+ if ! grep -q /usr/libexec/ppp/chat_wrapper ${m} ; then
+ sed -i "s?connect '/usr/sbin/chat?connect '/usr/libexec/ppp/chat_wrapper /usr/sbin/chat?" ${m}
+ fi
+ else
+ echo "Failed to set APN in $f_chat"
+ fi
+ done
+else
+ for f in *_chat *_chat_non_vz ; do
+ if sed -i -r "${remove_apn_sedcmd}" $f ; then
+ echo "Commented out APN in $f"
+ else
+ if [[ $f =~ ([^_]*) ]] ; then
+ m=${BASH_REMATCH[1]}
+ if ! findItem "$m" "${noapn_modems[@]}" ; then
+ echo "Failed to remove APN setting in $f"
+ fi
+ fi
+ fi
+ done
+fi
+
+exit 0
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-apn b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-apn
new file mode 100755
index 0000000..be056eb
--- /dev/null
+++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-apn
@@ -0,0 +1,161 @@
+#!/bin/bash
+
+# Copyright (C) 2014, 2017, 2019 Multi-Tech Systems
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+MTMODEMS=(LNA3 L4N1)
+MODEMS=(LE910-NA1 LE910C4-NF)
+
+function getactivefirmware
+{
+ /usr/bin/radio-query ${RADIOOPTION} --active-firmware
+# FW=$(/usr/bin/radio-cmd ${RADIOOPTION} 'AT#FWSWITCH?' 2>/dev/null)
+# if (($? != 0)) ; then
+# >&2 echo "FW Query failed"
+# return 1
+# fi
+# [[ $FW =~ \#FWSWITCH:[[:space:]]*([^,]*) ]]
+# echo "${BASH_REMATCH[1]}"
+}
+
+# See if string is in array of strings
+# parm 1 String
+# parm 2 Arrays of strings
+function findItem {
+ local s check="$1"
+ shift
+ for s ; do
+ [[ "$s" == "$check" ]] && return 0;
+ done
+ return 1
+}
+
+function usage {
+ >&2 echo "$(basename $0) [firmware image SKU]"
+ >&2 echo "The firmware image SKU is optional."
+ >&2 echo "If not specified, the image SKU will be determined"
+ >&2 echo "from the SIM, and automatically switched with the"
+ >&2 echo "APN. Current valid SKU's are 0, 1 and 2"
+ exit 1
+}
+
+function setchat {
+ m=$1
+ m=${m,,}
+ fw=$2
+ silent=$3
+ case $fw in
+ 0)
+ ending="non_vz"
+ ;;
+ 1)
+ ending="vz"
+ ;;
+ 2)
+ # Currently L4N1 only
+ ending="non_vz"
+ ;;
+ *)
+ >&2 echo 'Invalid firmware number $fw'
+ usage
+ exit 1
+ ;;
+ esac
+ source="/etc/ppp/peers/${m}_chat_${ending}"
+ target="/etc/ppp/peers/${m}_chat"
+ canon_src=$(readlink -f "${source}")
+ canon_target=$(readlink -f "${target}")
+ if [[ ${canon_src} != ${canon_target} ]] ; then
+ if ((silent == 0)) ; then
+ echo "Setting chat script to ${source}"
+ fi
+ ln -sf "${source}" "${target}"
+ fi
+}
+
+function not_ready {
+ >&2 echo "Radio is not ready"
+ >&2 echo "Try executing mlinux-switch-apn once the radio is ready"
+ exit 1
+}
+
+productid=$(/usr/sbin/mts-io-sysfs show product-id)
+if [[ $productid =~ [^-]*-([^-]*)- ]] ; then
+ mymtmodem="${BASH_REMATCH[1],,}"
+else
+ >&2 echo "Cannot find the modem in the $productid string"
+ exit 1
+fi
+
+if ! findItem "${mymtmodem^^}" "${MTMODEMS[@]}" ; then
+ echo "Firmware switch is not supported on ${mymtmodem}."
+ usage
+ exit 1
+fi
+
+if (($# > 0)) ; then
+ fw="$1"
+ if [[ $fw =~ ^[0-9]+$ ]] ; then
+ echo fw is $fw
+ if ((fw < 0)) || ((fw > 2)) ; then
+ usage
+ fi
+ else
+ >&2 echo "Invalid firmware SKU value"
+ usage
+ fi
+ echo "Switching chat script to firmware SKU $fw"
+ setchat $mymtmodem $fw 0
+ exit $?
+else
+ if ! /usr/sbin/mlinux-cell-radio-ready ; then
+ >&2 echo Radio is not ready
+ >&2 echo Try again later
+ exit 1
+ fi
+ MODEL=$(radio-query ${RADIOOPTION} --model 2>&1)
+ result=$?
+ if [[ $MODEL =~ [Ee][Rr][Rr][Oo][Rr] ]] ; then
+ RADIOOPTION="${RADIOOPTION2}"
+ MODEL=$(radio-query ${RADIOOPTION} --model 2>&1)
+ result=$?
+ fi
+ if ((result != 0)) ; then
+ >&2echo "No radio on this device."
+ usage
+ exit 1
+ fi
+ if ! findItem $MODEL "${MODEMS[@]}" ; then
+ >&2 echo "Firmware switch is supported only on ${MODEMS[@]} and this modem is $MODEL"
+ usage
+ fi
+
+ if fwreply=$(/usr/sbin/mlinux-switch-cell-fw -1); then
+ if [[ $fwreply =~ Cellular[[:space:]]+radio[[:space:]]+firmware[[:space:]]+has[[:space:]]+(already[[:space:]]+)*been[[:space:]]+switched[[:space:]]+to[[:space:]]+([^[:space:]]*)[[:space:]]+image\. ]] ; then
+ fw=${BASH_REMATCH[2]}
+ setchat "${mymtmodem}" $fw 0
+ else
+ fw=$(getactivefirmware)
+ if (($? == 0)) ; then
+ setchat "${mymtmodem}" $fw 0
+ fi
+ fi
+ fi
+fi \ No newline at end of file
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-cell-fw b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-cell-fw
new file mode 100755
index 0000000..4065ccb
--- /dev/null
+++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-cell-fw
@@ -0,0 +1,211 @@
+#!/bin/bash
+# This script assumes Verizon SIMS ICCID start with 89148 and is firmware 1.
+# This script assumes T-Mobile SIMS start with 8901260 and is firmware 2.
+
+fwsw_modems=(LE910-NA1 LE910C4-NF)
+mt_modems=(lna3 l4n1)
+readme=/etc/ppp/peers/README.fwswitch
+function setactivefirmware
+{
+ radio-cmd ${RADIOOPTION} --set-active-firmware $1
+# RESULT=$(radio-cmd ${RADIOOPTION} 'AT#FWSWITCH='$1',1' 2>&1)
+# if (($? != 0)) ; then
+# >&2 echo "FW Set failed"
+# return 1
+# fi
+# if [[ $RESULT =~ [Ee][Rr][Rr][Oo][Rr] ]] ; then
+# >&2 echo "FW Set failed"
+# return 1
+# fi
+}
+
+function getactivefirmware
+{
+ /usr/bin/radio-query ${RADIOOPTION} --active-firmware
+# FW=$(/usr/bin/radio-cmd ${RADIOOPTION} 'AT#FWSWITCH?' 2>/dev/null)
+# if (($? != 0)) ; then
+# >&2 echo "FW Query failed"
+# return 1
+# fi
+# [[ $FW =~ \#FWSWITCH:[[:space:]]*([^,]*) ]]
+# echo "${BASH_REMATCH[1]}"
+}
+
+# See if string is in array of strings
+# parm 1 String
+# parm 2 Arrays of strings
+function findItem {
+ local s check="$1"
+ shift
+ for s ; do
+ [[ "$s" == "$check" ]] && return 0;
+ done
+ return 1
+}
+
+
+function usage {
+>&2 echo "
+Usage: $0 <image_id> [timeout]
+ image_id <0|1|2|-1> : for dual FW image SKU-s, the id of the image to switch to
+ -1 is based on SIM
+ timeout : wait time for radio to come up if set (default : 15 sec)
+
+"
+ exit 1
+}
+
+if [ $# -gt 2 ] ; then
+ usage
+fi
+
+#
+# Check if the radio present
+#
+MODEL=$(radio-query ${RADIOOPTION} --model 2>&1)
+result=$?
+if [[ $MCONTEXT =~ [Ee][Rr][Rr][Oo][Rr] ]] ; then
+ RADIOOPTION="${RADIOOPTION2}"
+ MODEL=$(radio-query ${RADIOOPTION} --model 2>&1)
+ result=$?
+fi
+
+if ((result != 0)) ; then
+ [ "$VERBOSE" ] && >&2 echo "Assume no radio on this device."
+ exit 0
+fi
+
+#
+# Load args (don't wait for the radio by default)
+#
+FWIMAGE=$1
+if ((FWIMAGE < -2)) || ((FWIMAGE > 2)) ; then
+ usage
+fi
+if ! >&2 /usr/sbin/mlinux-cell-radio-ready ; then
+ [ "$VERBOSE" ] && >&2 echo Radio is not ready
+ [ "$VERBOSE" ] && >&2 echo Try again later
+ exit 1
+fi
+if ((FWIMAGE == -1)) ; then
+ iccid=$(radio-query ${RADIOOPTION} --iccid)
+ if (($? == 0)); then
+ if ((${#iccid} == 0)) ; then
+ [ "$VERBOSE" ] && >&2 echo "No carrier. Maybe no SIM?"
+ [ "$VERBOSE" ] && >&2 echo "ERROR: Cannot decide on firmware"
+ exit 1
+ fi
+ if [[ $iccid =~ ^89148.* ]] ; then
+ # Verizon
+ logger -s -t mlinux-sw-firmware -p daemon.info "Assuming $iccid is a Verizon SIM ICCID using Firmware 1"
+ ((FWIMAGE=1))
+ elif [[ $iccid =~ ^8901260.* ]] ; then
+ # T-Mobile
+ logger -s -t mlinux-sw-firmware -p daemon.info "Assuming $iccid is a T-Mobile SIM ICCID using Firmware 2"
+ ((FWMAGE=2))
+ if [[ $MODEL == LE910-NA1 ]] ; then # Assume LNA3 has no firmware image 2
+ ((FWIMAGE=0))
+ fi
+ else
+ # Everybody else
+ logger -s -t mlinux-sw-firmware -p daemon.info "Assuming $iccid is a possibly AT&T SIM using Firmware 0"
+ ((FWIMAGE=0))
+ fi
+ else
+ >&2 echo "Cannot get ICCID from SIM"
+ >&2 echo "Try again later"
+ exit 1
+ fi
+fi
+
+
+TIMEOUT=${2:-15}
+if [ "$VERBOSE" != "yes" ]; then
+ VERBOSE=""
+fi
+
+[ "$VERBOSE" ] && >&2 echo -n "Switching the radio firmware image: "
+
+#
+# Applicable for LTE910-NA1 and LE910C4-NF with dual FW images only
+#
+if ! findItem "$MODEL" "${fwsw_modems[@]}" ; then
+ echo "Firmware switch is not supported on ${MODEL}."
+ exit 1
+fi
+
+#
+# Check if firmware switch is required
+#
+FWACTIVE=$(getactivefirmware)
+if [ $? -ne 0 ] || [ "$FWACTIVE" == "" ]; then
+ [ "$VERBOSE" ] && >&2 echo "The $MODEL radio does not support firmware switching."
+ exit 0
+fi
+
+if (( FWACTIVE == FWIMAGE )); then
+ echo "Cellular radio firmware has already been switched to $FWIMAGE image."
+ exit 0
+fi
+
+# Disable the LNA3 chat script in case of failure.
+for f in $mt_modems ; do
+ linkf=/etc/ppp/peers/${f}_chat
+ if ! [[ -L ${linkf} ]] || [[ $(basename $(readlink -f ${linkf})) != ${readme} ]] ; then
+ ln -sf "${readme}" "${linkf}"
+ echo "Chat script is now disabled."
+ fi
+done
+
+#
+# Switch the firmware
+#
+RESULT=$(setactivefirmware "$FWIMAGE")
+if [ $? -ne 0 ]; then
+ [ "$VERBOSE" ] && >&2 echo "$RESULT"
+ exit 1
+fi
+
+
+#
+# Exit if no TIMEOUT set
+#
+# This is somewhat dangerous in that we assume the radio
+# will switch.
+if ((TIMEOUT == 0)) ; then
+ if ((FWIMAGE == 0)) ; then
+ [ "$VERBOSE" ] && >&2 echo "Use mlinux-switch-apn to switch the APN when the radio is ready, before dialing"
+ exit 0
+ fi
+fi
+#
+#
+# Wait for the radio to be ready before continuing
+#
+COUNTER=0
+
+[ "$VERBOSE" ] && echo -n "Wait..."
+
+#
+# Give it some time
+#
+sleep 5
+
+while [ $COUNTER -lt $TIMEOUT ]; do
+ MODEL=$(radio-query ${RADIOOPTION} --model)
+ if [ $? -eq 0 ]; then
+ echo "Cellular radio firmware has been switched to $FWIMAGE image."
+ exit 0
+ fi
+
+ let COUNTER=COUNTER+1
+
+ [ "$VERBOSE" ] && echo -n "."
+
+ sleep 1
+done
+
+>&2 echo "Cellular radio is not ready."
+>&2 echo "When it becomes ready, invoke /usr/sbin/mlinux-switch-apn"
+>&2 echo "to set the APN"
+exit 1
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-wifi-ap b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-wifi-ap
index ddbec95..ddbec95 100755
--- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-wifi-ap
+++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-wifi-ap
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb b/recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb
index 0dfd740..05c1b84 100644
--- a/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb
+++ b/recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb
@@ -2,6 +2,6 @@ DESCRIPTION = "Scripts to easily get started with common mLinux use cases"
require mlinux-scripts.inc
-PR = "r5"
+PR = "r1"
S = "${WORKDIR}/mlinux-scripts-${PV}"
diff --git a/recipes-core/multitech/commissioning_1.0.0.bb b/recipes-core/multitech/commissioning_1.0.0.bb
new file mode 100644
index 0000000..22369dc
--- /dev/null
+++ b/recipes-core/multitech/commissioning_1.0.0.bb
@@ -0,0 +1,33 @@
+inherit update-rc.d
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=593c81e8a2bd8b4c4e310d8792372b13"
+
+PACKAGE_ARCH = "all"
+
+RDEPENDS_${PN} += "lighttpd lighttpd-module-fastcgi lighttpd-module-redirect bash"
+RDEPENDS_${PN}-php-fpm += "php-fpm ${PN}"
+PACKAGES =+ "${PN}-php-fpm"
+INITSCRIPT_PACKAGES = "${PN} ${PN}-php-fpm"
+INITSCRIPT_NAME_${PN} = "commission"
+INITSCRIPT_PARAMS_${PN} = "start 9 2 3 4 5 ."
+INITSCRIPT_NAME_${PN}-php-fpm = "commission-php-fpm"
+INITSCRIPT_PARAMS_${PN}-php-fpm = "start 9 2 3 4 5 ."
+
+PR = "r1"
+SRCREV = "${PV}"
+
+FILES_${PN}-php-fpm = "/etc/init.d/commission-php-fpm"
+FILES_${PN} += "/www/"
+
+SRC_URI = "git://git@${MTS_INTERNAL_GIT}/mirrors/commissioning.git;protocol=ssh"
+
+S = "${WORKDIR}/git"
+do_install() {
+ cp -a ${S}/${sysconfdir}/ ${D}/
+ cp -a ${S}/www/ ${D}/
+ cp -a ${S}/${prefix} ${D}/
+ chmod 755 ${D}/etc/init.d/*
+ chmod 755 ${D}/${libexecdir}/commission/*
+ chown -R root:root ${D}/
+}
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
+#deny_mac_file=/etc/hostapd.deny
+
+# IEEE 802.11 specifies two authentication algorithms. hostapd can be
+# configured to allow both of these or only one. Open system authentication
+# should be used with IEEE 802.1X.
+# Bit fields of allowed authentication algorithms:
+# bit 0 = Open System Authentication
+# bit 1 = Shared Key Authentication (requires WEP)
+auth_algs=3
+
+# Send empty SSID in beacons and ignore probe request frames that do not
+# specify full SSID, i.e., require stations to know SSID.
+# default: disabled (0)
+# 1 = send empty (length=0) SSID in beacon and ignore probe request for
+# broadcast SSID
+# 2 = clear SSID (ASCII 0), but keep the original length (this may be required
+# with some clients that do not support empty SSID) and ignore probe
+# requests for broadcast SSID
+ignore_broadcast_ssid=0
+
+# Do not reply to broadcast Probe Request frames from unassociated STA if there
+# is no room for additional stations (max_num_sta). This can be used to
+# discourage a STA from trying to associate with this AP if the association
+# would be rejected due to maximum STA limit.
+# Default: 0 (disabled)
+#no_probe_resp_if_max_sta=0
+
+# Additional vendor specific elements for Beacon and Probe Response frames
+# This parameter can be used to add additional vendor specific element(s) into
+# the end of the Beacon and Probe Response frames. The format for these
+# element(s) is a hexdump of the raw information elements (id+len+payload for
+# one or more elements)
+#vendor_elements=dd0411223301
+
+# Additional vendor specific elements for (Re)Association Response frames
+# This parameter can be used to add additional vendor specific element(s) into
+# the end of the (Re)Association Response frames. The format for these
+# element(s) is a hexdump of the raw information elements (id+len+payload for
+# one or more elements)
+#assocresp_elements=dd0411223301
+
+# TX queue parameters (EDCF / bursting)
+# tx_queue_<queue name>_<param>
+# queues: data0, data1, data2, data3, after_beacon, beacon
+# (data0 is the highest priority queue)
+# parameters:
+# aifs: AIFS (default 2)
+# cwmin: cwMin (1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191,
+# 16383, 32767)
+# cwmax: cwMax (same values as cwMin, cwMax >= cwMin)
+# burst: maximum length (in milliseconds with precision of up to 0.1 ms) for
+# bursting
+#
+# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e):
+# These parameters are used by the access point when transmitting frames
+# to the clients.
+#
+# Low priority / AC_BK = background
+#tx_queue_data3_aifs=7
+#tx_queue_data3_cwmin=15
+#tx_queue_data3_cwmax=1023
+#tx_queue_data3_burst=0
+# Note: for IEEE 802.11b mode: cWmin=31 cWmax=1023 burst=0
+#
+# Normal priority / AC_BE = best effort
+#tx_queue_data2_aifs=3
+#tx_queue_data2_cwmin=15
+#tx_queue_data2_cwmax=63
+#tx_queue_data2_burst=0
+# Note: for IEEE 802.11b mode: cWmin=31 cWmax=127 burst=0
+#
+# High priority / AC_VI = video
+#tx_queue_data1_aifs=1
+#tx_queue_data1_cwmin=7
+#tx_queue_data1_cwmax=15
+#tx_queue_data1_burst=3.0
+# Note: for IEEE 802.11b mode: cWmin=15 cWmax=31 burst=6.0
+#
+# Highest priority / AC_VO = voice
+#tx_queue_data0_aifs=1
+#tx_queue_data0_cwmin=3
+#tx_queue_data0_cwmax=7
+#tx_queue_data0_burst=1.5
+# Note: for IEEE 802.11b mode: cWmin=7 cWmax=15 burst=3.3
+
+# 802.1D Tag (= UP) to AC mappings
+# WMM specifies following mapping of data frames to different ACs. This mapping
+# can be configured using Linux QoS/tc and sch_pktpri.o module.
+# 802.1D Tag 802.1D Designation Access Category WMM Designation
+# 1 BK AC_BK Background
+# 2 - AC_BK Background
+# 0 BE AC_BE Best Effort
+# 3 EE AC_BE Best Effort
+# 4 CL AC_VI Video
+# 5 VI AC_VI Video
+# 6 VO AC_VO Voice
+# 7 NC AC_VO Voice
+# Data frames with no priority information: AC_BE
+# Management frames: AC_VO
+# PS-Poll frames: AC_BE
+
+# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e):
+# for 802.11a or 802.11g networks
+# These parameters are sent to WMM clients when they associate.
+# The parameters will be used by WMM clients for frames transmitted to the
+# access point.
+#
+# note - txop_limit is in units of 32microseconds
+# note - acm is admission control mandatory flag. 0 = admission control not
+# required, 1 = mandatory
+# note - Here cwMin and cmMax are in exponent form. The actual cw value used
+# will be (2^n)-1 where n is the value given here. The allowed range for these
+# wmm_ac_??_{cwmin,cwmax} is 0..15 with cwmax >= cwmin.
+#
+wmm_enabled=1
+#
+# WMM-PS Unscheduled Automatic Power Save Delivery [U-APSD]
+# Enable this flag if U-APSD supported outside hostapd (eg., Firmware/driver)
+#uapsd_advertisement_enabled=1
+#
+# Low priority / AC_BK = background
+wmm_ac_bk_cwmin=4
+wmm_ac_bk_cwmax=10
+wmm_ac_bk_aifs=7
+wmm_ac_bk_txop_limit=0
+wmm_ac_bk_acm=0
+# Note: for IEEE 802.11b mode: cWmin=5 cWmax=10
+#
+# Normal priority / AC_BE = best effort
+wmm_ac_be_aifs=3
+wmm_ac_be_cwmin=4
+wmm_ac_be_cwmax=10
+wmm_ac_be_txop_limit=0
+wmm_ac_be_acm=0
+# Note: for IEEE 802.11b mode: cWmin=5 cWmax=7
+#
+# High priority / AC_VI = video
+wmm_ac_vi_aifs=2
+wmm_ac_vi_cwmin=3
+wmm_ac_vi_cwmax=4
+wmm_ac_vi_txop_limit=94
+wmm_ac_vi_acm=0
+# Note: for IEEE 802.11b mode: cWmin=4 cWmax=5 txop_limit=188
+#
+# Highest priority / AC_VO = voice
+wmm_ac_vo_aifs=2
+wmm_ac_vo_cwmin=2
+wmm_ac_vo_cwmax=3
+wmm_ac_vo_txop_limit=47
+wmm_ac_vo_acm=0
+# Note: for IEEE 802.11b mode: cWmin=3 cWmax=4 burst=102
+
+# Static WEP key configuration
+#
+# The key number to use when transmitting.
+# It must be between 0 and 3, and the corresponding key must be set.
+# default: not set
+#wep_default_key=0
+# The WEP keys to use.
+# A key may be a quoted string or unquoted hexadecimal digits.
+# The key length should be 5, 13, or 16 characters, or 10, 26, or 32
+# digits, depending on whether 40-bit (64-bit), 104-bit (128-bit), or
+# 128-bit (152-bit) WEP is used.
+# Only the default key must be supplied; the others are optional.
+# default: not set
+#wep_key0=123456789a
+#wep_key1="vwxyz"
+#wep_key2=0102030405060708090a0b0c0d
+#wep_key3=".2.4.6.8.0.23"
+
+# Station inactivity limit
+#
+# If a station does not send anything in ap_max_inactivity seconds, an
+# empty data frame is sent to it in order to verify whether it is
+# still in range. If this frame is not ACKed, the station will be
+# disassociated and then deauthenticated. This feature is used to
+# clear station table of old entries when the STAs move out of the
+# range.
+#
+# The station can associate again with the AP if it is still in range;
+# this inactivity poll is just used as a nicer way of verifying
+# inactivity; i.e., client will not report broken connection because
+# disassociation frame is not sent immediately without first polling
+# the STA with a data frame.
+# default: 300 (i.e., 5 minutes)
+#ap_max_inactivity=300
+#
+# The inactivity polling can be disabled to disconnect stations based on
+# inactivity timeout so that idle stations are more likely to be disconnected
+# even if they are still in range of the AP. This can be done by setting
+# skip_inactivity_poll to 1 (default 0).
+#skip_inactivity_poll=0
+
+# Disassociate stations based on excessive transmission failures or other
+# indications of connection loss. This depends on the driver capabilities and
+# may not be available with all drivers.
+#disassoc_low_ack=1
+
+# Maximum allowed Listen Interval (how many Beacon periods STAs are allowed to
+# remain asleep). Default: 65535 (no limit apart from field size)
+#max_listen_interval=100
+
+# WDS (4-address frame) mode with per-station virtual interfaces
+# (only supported with driver=nl80211)
+# This mode allows associated stations to use 4-address frames to allow layer 2
+# bridging to be used.
+#wds_sta=1
+
+# If bridge parameter is set, the WDS STA interface will be added to the same
+# bridge by default. This can be overridden with the wds_bridge parameter to
+# use a separate bridge.
+#wds_bridge=wds-br0
+
+# Start the AP with beaconing disabled by default.
+#start_disabled=0
+
+# Client isolation can be used to prevent low-level bridging of frames between
+# associated stations in the BSS. By default, this bridging is allowed.
+#ap_isolate=1
+
+# BSS Load update period (in BUs)
+# This field is used to enable and configure adding a BSS Load element into
+# Beacon and Probe Response frames.
+#bss_load_update_period=50
+
+# Fixed BSS Load value for testing purposes
+# This field can be used to configure hostapd to add a fixed BSS Load element
+# into Beacon and Probe Response frames for testing purposes. The format is
+# <station count>:<channel utilization>:<available admission capacity>
+#bss_load_test=12:80:20000
+
+##### IEEE 802.11n related configuration ######################################
+
+# ieee80211n: Whether IEEE 802.11n (HT) is enabled
+# 0 = disabled (default)
+# 1 = enabled
+# Note: You will also need to enable WMM for full HT functionality.
+# Note: hw_mode=g (2.4 GHz) and hw_mode=a (5 GHz) is used to specify the band.
+#ieee80211n=1
+
+# ht_capab: HT capabilities (list of flags)
+# LDPC coding capability: [LDPC] = supported
+# Supported channel width set: [HT40-] = both 20 MHz and 40 MHz with secondary
+# channel below the primary channel; [HT40+] = both 20 MHz and 40 MHz
+# with secondary channel above the primary channel
+# (20 MHz only if neither is set)
+# Note: There are limits on which channels can be used with HT40- and
+# HT40+. Following table shows the channels that may be available for
+# HT40- and HT40+ use per IEEE 802.11n Annex J:
+# freq HT40- HT40+
+# 2.4 GHz 5-13 1-7 (1-9 in Europe/Japan)
+# 5 GHz 40,48,56,64 36,44,52,60
+# (depending on the location, not all of these channels may be available
+# for use)
+# Please note that 40 MHz channels may switch their primary and secondary
+# channels if needed or creation of 40 MHz channel maybe rejected based
+# on overlapping BSSes. These changes are done automatically when hostapd
+# is setting up the 40 MHz channel.
+# Spatial Multiplexing (SM) Power Save: [SMPS-STATIC] or [SMPS-DYNAMIC]
+# (SMPS disabled if neither is set)
+# HT-greenfield: [GF] (disabled if not set)
+# Short GI for 20 MHz: [SHORT-GI-20] (disabled if not set)
+# Short GI for 40 MHz: [SHORT-GI-40] (disabled if not set)
+# Tx STBC: [TX-STBC] (disabled if not set)
+# Rx STBC: [RX-STBC1] (one spatial stream), [RX-STBC12] (one or two spatial
+# streams), or [RX-STBC123] (one, two, or three spatial streams); Rx STBC
+# disabled if none of these set
+# HT-delayed Block Ack: [DELAYED-BA] (disabled if not set)
+# Maximum A-MSDU length: [MAX-AMSDU-7935] for 7935 octets (3839 octets if not
+# set)
+# DSSS/CCK Mode in 40 MHz: [DSSS_CCK-40] = allowed (not allowed if not set)
+# 40 MHz intolerant [40-INTOLERANT] (not advertised if not set)
+# L-SIG TXOP protection support: [LSIG-TXOP-PROT] (disabled if not set)
+#ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40]
+
+# Require stations to support HT PHY (reject association if they do not)
+#require_ht=1
+
+# If set non-zero, require stations to perform scans of overlapping
+# channels to test for stations which would be affected by 40 MHz traffic.
+# This parameter sets the interval in seconds between these scans. Setting this
+# to non-zero allows 2.4 GHz band AP to move dynamically to a 40 MHz channel if
+# no co-existence issues with neighboring devices are found.
+#obss_interval=0
+
+##### IEEE 802.11ac related configuration #####################################
+
+# ieee80211ac: Whether IEEE 802.11ac (VHT) is enabled
+# 0 = disabled (default)
+# 1 = enabled
+# Note: You will also need to enable WMM for full VHT functionality.
+# Note: hw_mode=a is used to specify that 5 GHz band is used with VHT.
+#ieee80211ac=1
+
+# vht_capab: VHT capabilities (list of flags)
+#
+# vht_max_mpdu_len: [MAX-MPDU-7991] [MAX-MPDU-11454]
+# Indicates maximum MPDU length
+# 0 = 3895 octets (default)
+# 1 = 7991 octets
+# 2 = 11454 octets
+# 3 = reserved
+#
+# supported_chan_width: [VHT160] [VHT160-80PLUS80]
+# Indicates supported Channel widths
+# 0 = 160 MHz & 80+80 channel widths are not supported (default)
+# 1 = 160 MHz channel width is supported
+# 2 = 160 MHz & 80+80 channel widths are supported
+# 3 = reserved
+#
+# Rx LDPC coding capability: [RXLDPC]
+# Indicates support for receiving LDPC coded pkts
+# 0 = Not supported (default)
+# 1 = Supported
+#
+# Short GI for 80 MHz: [SHORT-GI-80]
+# Indicates short GI support for reception of packets transmitted with TXVECTOR
+# params format equal to VHT and CBW = 80Mhz
+# 0 = Not supported (default)
+# 1 = Supported
+#
+# Short GI for 160 MHz: [SHORT-GI-160]
+# Indicates short GI support for reception of packets transmitted with TXVECTOR
+# params format equal to VHT and CBW = 160Mhz
+# 0 = Not supported (default)
+# 1 = Supported
+#
+# Tx STBC: [TX-STBC-2BY1]
+# Indicates support for the transmission of at least 2x1 STBC
+# 0 = Not supported (default)
+# 1 = Supported
+#
+# Rx STBC: [RX-STBC-1] [RX-STBC-12] [RX-STBC-123] [RX-STBC-1234]
+# Indicates support for the reception of PPDUs using STBC
+# 0 = Not supported (default)
+# 1 = support of one spatial stream
+# 2 = support of one and two spatial streams
+# 3 = support of one, two and three spatial streams
+# 4 = support of one, two, three and four spatial streams
+# 5,6,7 = reserved
+#
+# SU Beamformer Capable: [SU-BEAMFORMER]
+# Indicates support for operation as a single user beamformer
+# 0 = Not supported (default)
+# 1 = Supported
+#
+# SU Beamformee Capable: [SU-BEAMFORMEE]
+# Indicates support for operation as a single user beamformee
+# 0 = Not supported (default)
+# 1 = Supported
+#
+# Compressed Steering Number of Beamformer Antennas Supported:
+# [BF-ANTENNA-2] [BF-ANTENNA-3] [BF-ANTENNA-4]
+# Beamformee's capability indicating the maximum number of beamformer
+# antennas the beamformee can support when sending compressed beamforming
+# feedback
+# If SU beamformer capable, set to maximum value minus 1
+# else reserved (default)
+#
+# Number of Sounding Dimensions:
+# [SOUNDING-DIMENSION-2] [SOUNDING-DIMENSION-3] [SOUNDING-DIMENSION-4]
+# Beamformer's capability indicating the maximum value of the NUM_STS parameter
+# in the TXVECTOR of a VHT NDP
+# If SU beamformer capable, set to maximum value minus 1
+# else reserved (default)
+#
+# MU Beamformer Capable: [MU-BEAMFORMER]
+# Indicates support for operation as an MU beamformer
+# 0 = Not supported or sent by Non-AP STA (default)
+# 1 = Supported
+#
+# VHT TXOP PS: [VHT-TXOP-PS]
+# Indicates whether or not the AP supports VHT TXOP Power Save Mode
+# or whether or not the STA is in VHT TXOP Power Save mode
+# 0 = VHT AP doesn't support VHT TXOP PS mode (OR) VHT STA not in VHT TXOP PS
+# mode
+# 1 = VHT AP supports VHT TXOP PS mode (OR) VHT STA is in VHT TXOP power save
+# mode
+#
+# +HTC-VHT Capable: [HTC-VHT]
+# Indicates whether or not the STA supports receiving a VHT variant HT Control
+# field.
+# 0 = Not supported (default)
+# 1 = supported
+#
+# Maximum A-MPDU Length Exponent: [MAX-A-MPDU-LEN-EXP0]..[MAX-A-MPDU-LEN-EXP7]
+# Indicates the maximum length of A-MPDU pre-EOF padding that the STA can recv
+# This field is an integer in the range of 0 to 7.
+# The length defined by this field is equal to
+# 2 pow(13 + Maximum A-MPDU Length Exponent) -1 octets
+#
+# VHT Link Adaptation Capable: [VHT-LINK-ADAPT2] [VHT-LINK-ADAPT3]
+# Indicates whether or not the STA supports link adaptation using VHT variant
+# HT Control field
+# If +HTC-VHTcapable is 1
+# 0 = (no feedback) if the STA does not provide VHT MFB (default)
+# 1 = reserved
+# 2 = (Unsolicited) if the STA provides only unsolicited VHT MFB
+# 3 = (Both) if the STA can provide VHT MFB in response to VHT MRQ and if the
+# STA provides unsolicited VHT MFB
+# Reserved if +HTC-VHTcapable is 0
+#
+# Rx Antenna Pattern Consistency: [RX-ANTENNA-PATTERN]
+# Indicates the possibility of Rx antenna pattern change
+# 0 = Rx antenna pattern might change during the lifetime of an association
+# 1 = Rx antenna pattern does not change during the lifetime of an association
+#
+# Tx Antenna Pattern Consistency: [TX-ANTENNA-PATTERN]
+# Indicates the possibility of Tx antenna pattern change
+# 0 = Tx antenna pattern might change during the lifetime of an association
+# 1 = Tx antenna pattern does not change during the lifetime of an association
+#vht_capab=[SHORT-GI-80][HTC-VHT]
+#
+# Require stations to support VHT PHY (reject association if they do not)
+#require_vht=1
+
+# 0 = 20 or 40 MHz operating Channel width
+# 1 = 80 MHz channel width
+# 2 = 160 MHz channel width
+# 3 = 80+80 MHz channel width
+#vht_oper_chwidth=1
+#
+# center freq = 5 GHz + (5 * index)
+# So index 42 gives center freq 5.210 GHz
+# which is channel 42 in 5G band
+#
+#vht_oper_centr_freq_seg0_idx=42
+#
+# center freq = 5 GHz + (5 * index)
+# So index 159 gives center freq 5.795 GHz
+# which is channel 159 in 5G band
+#
+#vht_oper_centr_freq_seg1_idx=159
+
+# Workaround to use station's nsts capability in (Re)Association Response frame
+# This may be needed with some deployed devices as an interoperability
+# workaround for beamforming if the AP's capability is greater than the
+# station's capability. This is disabled by default and can be enabled by
+# setting use_sta_nsts=1.
+#use_sta_nsts=0
+
+##### IEEE 802.1X-2004 related configuration ##################################
+
+# Require IEEE 802.1X authorization
+#ieee8021x=1
+
+# IEEE 802.1X/EAPOL version
+# hostapd is implemented based on IEEE Std 802.1X-2004 which defines EAPOL
+# version 2. However, there are many client implementations that do not handle
+# the new version number correctly (they seem to drop the frames completely).
+# In order to make hostapd interoperate with these clients, the version number
+# can be set to the older version (1) with this configuration value.
+#eapol_version=2
+
+# Optional displayable message sent with EAP Request-Identity. The first \0
+# in this string will be converted to ASCII-0 (nul). This can be used to
+# separate network info (comma separated list of attribute=value pairs); see,
+# e.g., RFC 4284.
+#eap_message=hello
+#eap_message=hello\0networkid=netw,nasid=foo,portid=0,NAIRealms=example.com
+
+# WEP rekeying (disabled if key lengths are not set or are set to 0)
+# Key lengths for default/broadcast and individual/unicast keys:
+# 5 = 40-bit WEP (also known as 64-bit WEP with 40 secret bits)
+# 13 = 104-bit WEP (also known as 128-bit WEP with 104 secret bits)
+#wep_key_len_broadcast=5
+#wep_key_len_unicast=5
+# Rekeying period in seconds. 0 = do not rekey (i.e., set keys only once)
+#wep_rekey_period=300
+
+# EAPOL-Key index workaround (set bit7) for WinXP Supplicant (needed only if
+# only broadcast keys are used)
+eapol_key_index_workaround=0
+
+# EAP reauthentication period in seconds (default: 3600 seconds; 0 = disable
+# reauthentication).
+#eap_reauth_period=3600
+
+# Use PAE group address (01:80:c2:00:00:03) instead of individual target
+# address when sending EAPOL frames with driver=wired. This is the most common
+# mechanism used in wired authentication, but it also requires that the port
+# is only used by one station.
+#use_pae_group_addr=1
+
+# EAP Re-authentication Protocol (ERP) authenticator (RFC 6696)
+#
+# Whether to initiate EAP authentication with EAP-Initiate/Re-auth-Start before
+# EAP-Identity/Request
+#erp_send_reauth_start=1
+#
+# Domain name for EAP-Initiate/Re-auth-Start. Omitted from the message if not
+# set (no local ER server). This is also used by the integrated EAP server if
+# ERP is enabled (eap_server_erp=1).
+#erp_domain=example.com
+
+##### Integrated EAP server ###################################################
+
+# Optionally, hostapd can be configured to use an integrated EAP server
+# to process EAP authentication locally without need for an external RADIUS
+# server. This functionality can be used both as a local authentication server
+# for IEEE 802.1X/EAPOL and as a RADIUS server for other devices.
+
+# Use integrated EAP server instead of external RADIUS authentication
+# server. This is also needed if hostapd is configured to act as a RADIUS
+# authentication server.
+eap_server=0
+
+# Path for EAP server user database
+# If SQLite support is included, this can be set to "sqlite:/path/to/sqlite.db"
+# to use SQLite database instead of a text file.
+#eap_user_file=/etc/hostapd.eap_user
+
+# CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
+#ca_cert=/etc/hostapd.ca.pem
+
+# Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
+#server_cert=/etc/hostapd.server.pem
+
+# Private key matching with the server certificate for EAP-TLS/PEAP/TTLS
+# This may point to the same file as server_cert if both certificate and key
+# are included in a single file. PKCS#12 (PFX) file (.p12/.pfx) can also be
+# used by commenting out server_cert and specifying the PFX file as the
+# private_key.
+#private_key=/etc/hostapd.server.prv
+
+# Passphrase for private key
+#private_key_passwd=secret passphrase
+
+# Server identity
+# EAP methods that provide mechanism for authenticated server identity delivery
+# use this value. If not set, "hostapd" is used as a default.
+#server_id=server.example.com
+
+# Enable CRL verification.
+# Note: hostapd does not yet support CRL downloading based on CDP. Thus, a
+# valid CRL signed by the CA is required to be included in the ca_cert file.
+# This can be done by using PEM format for CA certificate and CRL and
+# concatenating these into one file. Whenever CRL changes, hostapd needs to be
+# restarted to take the new CRL into use.
+# 0 = do not verify CRLs (default)
+# 1 = check the CRL of the user certificate
+# 2 = check all CRLs in the certificate path
+#check_crl=1
+
+# TLS Session Lifetime in seconds
+# This can be used to allow TLS sessions to be cached and resumed with an
+# abbreviated handshake when using EAP-TLS/TTLS/PEAP.
+# (default: 0 = session caching and resumption disabled)
+#tls_session_lifetime=3600
+
+# Cached OCSP stapling response (DER encoded)
+# If set, this file is sent as a certificate status response by the EAP server
+# if the EAP peer requests certificate status in the ClientHello message.
+# This cache file can be updated, e.g., by running following command
+# periodically to get an update from the OCSP responder:
+# openssl ocsp \
+# -no_nonce \
+# -CAfile /etc/hostapd.ca.pem \
+# -issuer /etc/hostapd.ca.pem \
+# -cert /etc/hostapd.server.pem \
+# -url http://ocsp.example.com:8888/ \
+# -respout /tmp/ocsp-cache.der
+#ocsp_stapling_response=/tmp/ocsp-cache.der
+
+# Cached OCSP stapling response list (DER encoded OCSPResponseList)
+# This is similar to ocsp_stapling_response, but the extended version defined in
+# RFC 6961 to allow multiple OCSP responses to be provided.
+#ocsp_stapling_response_multi=/tmp/ocsp-multi-cache.der
+
+# dh_file: File path to DH/DSA parameters file (in PEM format)
+# This is an optional configuration file for setting parameters for an
+# ephemeral DH key exchange. In most cases, the default RSA authentication does
+# not use this configuration. However, it is possible setup RSA to use
+# ephemeral DH key exchange. In addition, ciphers with DSA keys always use
+# ephemeral DH keys. This can be used to achieve forward secrecy. If the file
+# is in DSA parameters format, it will be automatically converted into DH
+# params. This parameter is required if anonymous EAP-FAST is used.
+# You can generate DH parameters file with OpenSSL, e.g.,
+# "openssl dhparam -out /etc/hostapd.dh.pem 2048"
+#dh_file=/etc/hostapd.dh.pem
+
+# OpenSSL cipher string
+#
+# This is an OpenSSL specific configuration option for configuring the default
+# ciphers. If not set, "DEFAULT:!EXP:!LOW" is used as the default.
+# See https://www.openssl.org/docs/apps/ciphers.html for OpenSSL documentation
+# on cipher suite configuration. This is applicable only if hostapd is built to
+# use OpenSSL.
+#openssl_ciphers=DEFAULT:!EXP:!LOW
+
+# Fragment size for EAP methods
+#fragment_size=1400
+
+# Finite cyclic group for EAP-pwd. Number maps to group of domain parameters
+# using the IANA repository for IKE (RFC 2409).
+#pwd_group=19
+
+# Configuration data for EAP-SIM database/authentication gateway interface.
+# This is a text string in implementation specific format. The example
+# implementation in eap_sim_db.c uses this as the UNIX domain socket name for
+# the HLR/AuC gateway (e.g., hlr_auc_gw). In this case, the path uses "unix:"
+# prefix. If hostapd is built with SQLite support (CONFIG_SQLITE=y in .config),
+# database file can be described with an optional db=<path> parameter.
+#eap_sim_db=unix:/tmp/hlr_auc_gw.sock
+#eap_sim_db=unix:/tmp/hlr_auc_gw.sock db=/tmp/hostapd.db
+
+# EAP-SIM DB request timeout
+# This parameter sets the maximum time to wait for a database request response.
+# The parameter value is in seconds.
+#eap_sim_db_timeout=1
+
+# Encryption key for EAP-FAST PAC-Opaque values. This key must be a secret,
+# random value. It is configured as a 16-octet value in hex format. It can be
+# generated, e.g., with the following command:
+# od -tx1 -v -N16 /dev/random | colrm 1 8 | tr -d ' '
+#pac_opaque_encr_key=000102030405060708090a0b0c0d0e0f
+
+# EAP-FAST authority identity (A-ID)
+# A-ID indicates the identity of the authority that issues PACs. The A-ID
+# should be unique across all issuing servers. In theory, this is a variable
+# length field, but due to some existing implementations requiring A-ID to be
+# 16 octets in length, it is strongly recommended to use that length for the
+# field to provid interoperability with deployed peer implementations. This
+# field is configured in hex format.
+#eap_fast_a_id=101112131415161718191a1b1c1d1e1f
+
+# EAP-FAST authority identifier information (A-ID-Info)
+# This is a user-friendly name for the A-ID. For example, the enterprise name
+# and server name in a human-readable format. This field is encoded as UTF-8.
+#eap_fast_a_id_info=test server
+
+# Enable/disable different EAP-FAST provisioning modes:
+#0 = provisioning disabled
+#1 = only anonymous provisioning allowed
+#2 = only authenticated provisioning allowed
+#3 = both provisioning modes allowed (default)
+#eap_fast_prov=3
+
+# EAP-FAST PAC-Key lifetime in seconds (hard limit)
+#pac_key_lifetime=604800
+
+# EAP-FAST PAC-Key refresh time in seconds (soft limit on remaining hard
+# limit). The server will generate a new PAC-Key when this number of seconds
+# (or fewer) of the lifetime remains.
+#pac_key_refresh_time=86400
+
+# EAP-SIM and EAP-AKA protected success/failure indication using AT_RESULT_IND
+# (default: 0 = disabled).
+#eap_sim_aka_result_ind=1
+
+# Trusted Network Connect (TNC)
+# If enabled, TNC validation will be required before the peer is allowed to
+# connect. Note: This is only used with EAP-TTLS and EAP-FAST. If any other
+# EAP method is enabled, the peer will be allowed to connect without TNC.
+#tnc=1
+
+# EAP Re-authentication Protocol (ERP) - RFC 6696
+#
+# Whether to enable ERP on the EAP server.
+#eap_server_erp=1
+
+##### IEEE 802.11f - Inter-Access Point Protocol (IAPP) #######################
+
+# Interface to be used for IAPP broadcast packets
+#iapp_interface=eth0
+
+
+##### RADIUS client configuration #############################################
+# for IEEE 802.1X with external Authentication Server, IEEE 802.11
+# authentication with external ACL for MAC addresses, and accounting
+
+# The own IP address of the access point (used as NAS-IP-Address)
+own_ip_addr=127.0.0.1
+
+# NAS-Identifier string for RADIUS messages. When used, this should be unique
+# to the NAS within the scope of the RADIUS server. Please note that hostapd
+# uses a separate RADIUS client for each BSS and as such, a unique
+# nas_identifier value should be configured separately for each BSS. This is
+# particularly important for cases where RADIUS accounting is used
+# (Accounting-On/Off messages are interpreted as clearing all ongoing sessions
+# and that may get interpreted as applying to all BSSes if the same
+# NAS-Identifier value is used.) For example, a fully qualified domain name
+# prefixed with a unique identifier of the BSS (e.g., BSSID) can be used here.
+#
+# When using IEEE 802.11r, nas_identifier must be set and must be between 1 and
+# 48 octets long.
+#
+# It is mandatory to configure either own_ip_addr or nas_identifier to be
+# compliant with the RADIUS protocol. When using RADIUS accounting, it is
+# strongly recommended that nas_identifier is set to a unique value for each
+# BSS.
+#nas_identifier=ap.example.com
+
+# RADIUS client forced local IP address for the access point
+# Normally the local IP address is determined automatically based on configured
+# IP addresses, but this field can be used to force a specific address to be
+# used, e.g., when the device has multiple IP addresses.
+#radius_client_addr=127.0.0.1
+
+# RADIUS authentication server
+#auth_server_addr=127.0.0.1
+#auth_server_port=1812
+#auth_server_shared_secret=secret
+
+# RADIUS accounting server
+#acct_server_addr=127.0.0.1
+#acct_server_port=1813
+#acct_server_shared_secret=secret
+
+# Secondary RADIUS servers; to be used if primary one does not reply to
+# RADIUS packets. These are optional and there can be more than one secondary
+# server listed.
+#auth_server_addr=127.0.0.2
+#auth_server_port=1812
+#auth_server_shared_secret=secret2
+#
+#acct_server_addr=127.0.0.2
+#acct_server_port=1813
+#acct_server_shared_secret=secret2
+
+# Retry interval for trying to return to the primary RADIUS server (in
+# seconds). RADIUS client code will automatically try to use the next server
+# when the current server is not replying to requests. If this interval is set,
+# primary server will be retried after configured amount of time even if the
+# currently used secondary server is still working.
+#radius_retry_primary_interval=600
+
+
+# Interim accounting update interval
+# If this is set (larger than 0) and acct_server is configured, hostapd will
+# send interim accounting updates every N seconds. Note: if set, this overrides
+# possible Acct-Interim-Interval attribute in Access-Accept message. Thus, this
+# value should not be configured in hostapd.conf, if RADIUS server is used to
+# control the interim interval.
+# This value should not be less 600 (10 minutes) and must not be less than
+# 60 (1 minute).
+#radius_acct_interim_interval=600
+
+# Request Chargeable-User-Identity (RFC 4372)
+# This parameter can be used to configure hostapd to request CUI from the
+# RADIUS server by including Chargeable-User-Identity attribute into
+# Access-Request packets.
+#radius_request_cui=1
+
+# Dynamic VLAN mode; allow RADIUS authentication server to decide which VLAN
+# is used for the stations. This information is parsed from following RADIUS
+# attributes based on RFC 3580 and RFC 2868: Tunnel-Type (value 13 = VLAN),
+# Tunnel-Medium-Type (value 6 = IEEE 802), Tunnel-Private-Group-ID (value
+# VLANID as a string). Optionally, the local MAC ACL list (accept_mac_file) can
+# be used to set static client MAC address to VLAN ID mapping.
+# 0 = disabled (default)
+# 1 = option; use default interface if RADIUS server does not include VLAN ID
+# 2 = required; reject authentication if RADIUS server does not include VLAN ID
+#dynamic_vlan=0
+
+# Per-Station AP_VLAN interface mode
+# If enabled, each station is assigned its own AP_VLAN interface.
+# This implies per-station group keying and ebtables filtering of inter-STA
+# traffic (when passed through the AP).
+# If the sta is not assigned to any VLAN, then its AP_VLAN interface will be
+# added to the bridge given by the "bridge" configuration option (see above).
+# Otherwise, it will be added to the per-VLAN bridge.
+# 0 = disabled (default)
+# 1 = enabled
+#per_sta_vif=0
+
+# VLAN interface list for dynamic VLAN mode is read from a separate text file.
+# This list is used to map VLAN ID from the RADIUS server to a network
+# interface. Each station is bound to one interface in the same way as with
+# multiple BSSIDs or SSIDs. Each line in this text file is defining a new
+# interface and the line must include VLAN ID and interface name separated by
+# white space (space or tab).
+# If no entries are provided by this file, the station is statically mapped
+# to <bss-iface>.<vlan-id> interfaces.
+#vlan_file=/etc/hostapd.vlan
+
+# Interface where 802.1q tagged packets should appear when a RADIUS server is
+# used to determine which VLAN a station is on. hostapd creates a bridge for
+# each VLAN. Then hostapd adds a VLAN interface (associated with the interface
+# indicated by 'vlan_tagged_interface') and the appropriate wireless interface
+# to the bridge.
+#vlan_tagged_interface=eth0
+
+# Bridge (prefix) to add the wifi and the tagged interface to. This gets the
+# VLAN ID appended. It defaults to brvlan%d if no tagged interface is given
+# and br%s.%d if a tagged interface is given, provided %s = tagged interface
+# and %d = VLAN ID.
+#vlan_bridge=brvlan
+
+# When hostapd creates a VLAN interface on vlan_tagged_interfaces, it needs
+# to know how to name it.
+# 0 = vlan<XXX>, e.g., vlan1
+# 1 = <vlan_tagged_interface>.<XXX>, e.g. eth0.1
+#vlan_naming=0
+
+# Arbitrary RADIUS attributes can be added into Access-Request and
+# Accounting-Request packets by specifying the contents of the attributes with
+# the following configuration parameters. There can be multiple of these to
+# add multiple attributes. These parameters can also be used to override some
+# of the attributes added automatically by hostapd.
+# Format: <attr_id>[:<syntax:value>]
+# attr_id: RADIUS attribute type (e.g., 26 = Vendor-Specific)
+# syntax: s = string (UTF-8), d = integer, x = octet string
+# value: attribute value in format indicated by the syntax
+# If syntax and value parts are omitted, a null value (single 0x00 octet) is
+# used.
+#
+# Additional Access-Request attributes
+# radius_auth_req_attr=<attr_id>[:<syntax:value>]
+# Examples:
+# Operator-Name = "Operator"
+#radius_auth_req_attr=126:s:Operator
+# Service-Type = Framed (2)
+#radius_auth_req_attr=6:d:2
+# Connect-Info = "testing" (this overrides the automatically generated value)
+#radius_auth_req_attr=77:s:testing
+# Same Connect-Info value set as a hexdump
+#radius_auth_req_attr=77:x:74657374696e67
+
+#
+# Additional Accounting-Request attributes
+# radius_acct_req_attr=<attr_id>[:<syntax:value>]
+# Examples:
+# Operator-Name = "Operator"
+#radius_acct_req_attr=126:s:Operator
+
+# Dynamic Authorization Extensions (RFC 5176)
+# This mechanism can be used to allow dynamic changes to user session based on
+# commands from a RADIUS server (or some other disconnect client that has the
+# needed session information). For example, Disconnect message can be used to
+# request an associated station to be disconnected.
+#
+# This is disabled by default. Set radius_das_port to non-zero UDP port
+# number to enable.
+#radius_das_port=3799
+#
+# DAS client (the host that can send Disconnect/CoA requests) and shared secret
+#radius_das_client=192.168.1.123 shared secret here
+#
+# DAS Event-Timestamp time window in seconds
+#radius_das_time_window=300
+#
+# DAS require Event-Timestamp
+#radius_das_require_event_timestamp=1
+#
+# DAS require Message-Authenticator
+#radius_das_require_message_authenticator=1
+
+##### RADIUS authentication server configuration ##############################
+
+# hostapd can be used as a RADIUS authentication server for other hosts. This
+# requires that the integrated EAP server is also enabled and both
+# authentication services are sharing the same configuration.
+
+# File name of the RADIUS clients configuration for the RADIUS server. If this
+# commented out, RADIUS server is disabled.
+#radius_server_clients=/etc/hostapd.radius_clients
+
+# The UDP port number for the RADIUS authentication server
+#radius_server_auth_port=1812
+
+# The UDP port number for the RADIUS accounting server
+# Commenting this out or setting this to 0 can be used to disable RADIUS
+# accounting while still enabling RADIUS authentication.
+#radius_server_acct_port=1813
+
+# Use IPv6 with RADIUS server (IPv4 will also be supported using IPv6 API)
+#radius_server_ipv6=1
+
+
+##### WPA/IEEE 802.11i configuration ##########################################
+
+# Enable WPA. Setting this variable configures the AP to require WPA (either
+# WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either
+# wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK.
+# Instead of wpa_psk / wpa_passphrase, wpa_psk_radius might suffice.
+# For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys),
+# RADIUS authentication server must be configured, and WPA-EAP must be included
+# in wpa_key_mgmt.
+# This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0)
+# and/or WPA2 (full IEEE 802.11i/RSN):
+# bit0 = WPA
+# bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled)
+#wpa=1
+
+# WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit
+# secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase
+# (8..63 characters) that will be converted to PSK. This conversion uses SSID
+# so the PSK changes when ASCII passphrase is used and the SSID is changed.
+# wpa_psk (dot11RSNAConfigPSKValue)
+# wpa_passphrase (dot11RSNAConfigPSKPassPhrase)
+#wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
+#wpa_passphrase=secret passphrase
+
+# Optionally, WPA PSKs can be read from a separate text file (containing list
+# of (PSK,MAC address) pairs. This allows more than one PSK to be configured.
+# Use absolute path name to make sure that the files can be read on SIGHUP
+# configuration reloads.
+#wpa_psk_file=/etc/hostapd.wpa_psk
+
+# Optionally, WPA passphrase can be received from RADIUS authentication server
+# This requires macaddr_acl to be set to 2 (RADIUS)
+# 0 = disabled (default)
+# 1 = optional; use default passphrase/psk if RADIUS server does not include
+# Tunnel-Password
+# 2 = required; reject authentication if RADIUS server does not include
+# Tunnel-Password
+#wpa_psk_radius=0
+
+# Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The
+# entries are separated with a space. WPA-PSK-SHA256 and WPA-EAP-SHA256 can be
+# added to enable SHA256-based stronger algorithms.
+# (dot11RSNAConfigAuthenticationSuitesTable)
+#wpa_key_mgmt=WPA-PSK WPA-EAP
+
+# Set of accepted cipher suites (encryption algorithms) for pairwise keys
+# (unicast packets). This is a space separated list of algorithms:
+# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0]
+# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0]
+# Group cipher suite (encryption algorithm for broadcast and multicast frames)
+# is automatically selected based on this configuration. If only CCMP is
+# allowed as the pairwise cipher, group cipher will also be CCMP. Otherwise,
+# TKIP will be used as the group cipher.
+# (dot11RSNAConfigPairwiseCiphersTable)
+# Pairwise cipher for WPA (v1) (default: TKIP)
+#wpa_pairwise=TKIP CCMP
+# Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value)
+#rsn_pairwise=CCMP
+
+# Time interval for rekeying GTK (broadcast/multicast encryption keys) in
+# seconds. (dot11RSNAConfigGroupRekeyTime)
+#wpa_group_rekey=600
+
+# Rekey GTK when any STA that possesses the current GTK is leaving the BSS.
+# (dot11RSNAConfigGroupRekeyStrict)
+#wpa_strict_rekey=1
+
+# Time interval for rekeying GMK (master key used internally to generate GTKs
+# (in seconds).
+#wpa_gmk_rekey=86400
+
+# Maximum lifetime for PTK in seconds. This can be used to enforce rekeying of
+# PTK to mitigate some attacks against TKIP deficiencies.
+#wpa_ptk_rekey=600
+
+# Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up
+# roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN
+# authentication and key handshake before actually associating with a new AP.
+# (dot11RSNAPreauthenticationEnabled)
+#rsn_preauth=1
+#
+# Space separated list of interfaces from which pre-authentication frames are
+# accepted (e.g., 'eth0' or 'eth0 wlan0wds0'. This list should include all
+# interface that are used for connections to other APs. This could include
+# wired interfaces and WDS links. The normal wireless data interface towards
+# associated stations (e.g., wlan0) should not be added, since
+# pre-authentication is only used with APs other than the currently associated
+# one.
+#rsn_preauth_interfaces=eth0
+
+# peerkey: Whether PeerKey negotiation for direct links (IEEE 802.11e) is
+# allowed. This is only used with RSN/WPA2.
+# 0 = disabled (default)
+# 1 = enabled
+#peerkey=1
+
+# ieee80211w: Whether management frame protection (MFP) is enabled
+# 0 = disabled (default)
+# 1 = optional
+# 2 = required
+#ieee80211w=0
+
+# Group management cipher suite
+# Default: AES-128-CMAC (BIP)
+# Other options (depending on driver support):
+# BIP-GMAC-128
+# BIP-GMAC-256
+# BIP-CMAC-256
+# Note: All the stations connecting to the BSS will also need to support the
+# selected cipher. The default AES-128-CMAC is the only option that is commonly
+# available in deployed devices.
+#group_mgmt_cipher=AES-128-CMAC
+
+# Association SA Query maximum timeout (in TU = 1.024 ms; for MFP)
+# (maximum time to wait for a SA Query response)
+# dot11AssociationSAQueryMaximumTimeout, 1...4294967295
+#assoc_sa_query_max_timeout=1000
+
+# Association SA Query retry timeout (in TU = 1.024 ms; for MFP)
+# (time between two subsequent SA Query requests)
+# dot11AssociationSAQueryRetryTimeout, 1...4294967295
+#assoc_sa_query_retry_timeout=201
+
+# disable_pmksa_caching: Disable PMKSA caching
+# This parameter can be used to disable caching of PMKSA created through EAP
+# authentication. RSN preauthentication may still end up using PMKSA caching if
+# it is enabled (rsn_preauth=1).
+# 0 = PMKSA caching enabled (default)
+# 1 = PMKSA caching disabled
+#disable_pmksa_caching=0
+
+# okc: Opportunistic Key Caching (aka Proactive Key Caching)
+# Allow PMK cache to be shared opportunistically among configured interfaces
+# and BSSes (i.e., all configurations within a single hostapd process).
+# 0 = disabled (default)
+# 1 = enabled
+#okc=1
+
+# SAE threshold for anti-clogging mechanism (dot11RSNASAEAntiCloggingThreshold)
+# This parameter defines how many open SAE instances can be in progress at the
+# same time before the anti-clogging mechanism is taken into use.
+#sae_anti_clogging_threshold=5
+
+# Enabled SAE finite cyclic groups
+# SAE implementation are required to support group 19 (ECC group defined over a
+# 256-bit prime order field). All groups that are supported by the
+# implementation are enabled by default. This configuration parameter can be
+# used to specify a limited set of allowed groups. The group values are listed
+# in the IANA registry:
+# http://www.iana.org/assignments/ipsec-registry/ipsec-registry.xml#ipsec-registry-9
+#sae_groups=19 20 21 25 26
+
+##### IEEE 802.11r configuration ##############################################
+
+# Mobility Domain identifier (dot11FTMobilityDomainID, MDID)
+# MDID is used to indicate a group of APs (within an ESS, i.e., sharing the
+# same SSID) between which a STA can use Fast BSS Transition.
+# 2-octet identifier as a hex string.
+#mobility_domain=a1b2
+
+# PMK-R0 Key Holder identifier (dot11FTR0KeyHolderID)
+# 1 to 48 octet identifier.
+# This is configured with nas_identifier (see RADIUS client section above).
+
+# Default lifetime of the PMK-RO in minutes; range 1..65535
+# (dot11FTR0KeyLifetime)
+#r0_key_lifetime=10000
+
+# PMK-R1 Key Holder identifier (dot11FTR1KeyHolderID)
+# 6-octet identifier as a hex string.
+# Defaults to BSSID.
+#r1_key_holder=000102030405
+
+# Reassociation deadline in time units (TUs / 1.024 ms; range 1000..65535)
+# (dot11FTReassociationDeadline)
+#reassociation_deadline=1000
+
+# List of R0KHs in the same Mobility Domain
+# format: <MAC address> <NAS Identifier> <128-bit key as hex string>
+# This list is used to map R0KH-ID (NAS Identifier) to a destination MAC
+# address when requesting PMK-R1 key from the R0KH that the STA used during the
+# Initial Mobility Domain Association.
+#r0kh=02:01:02:03:04:05 r0kh-1.example.com 000102030405060708090a0b0c0d0e0f
+#r0kh=02:01:02:03:04:06 r0kh-2.example.com 00112233445566778899aabbccddeeff
+# And so on.. One line per R0KH.
+
+# List of R1KHs in the same Mobility Domain
+# format: <MAC address> <R1KH-ID> <128-bit key as hex string>
+# This list is used to map R1KH-ID to a destination MAC address when sending
+# PMK-R1 key from the R0KH. This is also the list of authorized R1KHs in the MD
+# that can request PMK-R1 keys.
+#r1kh=02:01:02:03:04:05 02:11:22:33:44:55 000102030405060708090a0b0c0d0e0f
+#r1kh=02:01:02:03:04:06 02:11:22:33:44:66 00112233445566778899aabbccddeeff
+# And so on.. One line per R1KH.
+
+# Whether PMK-R1 push is enabled at R0KH
+# 0 = do not push PMK-R1 to all configured R1KHs (default)
+# 1 = push PMK-R1 to all configured R1KHs whenever a new PMK-R0 is derived
+#pmk_r1_push=1
+
+# Whether to enable FT-over-DS
+# 0 = FT-over-DS disabled
+# 1 = FT-over-DS enabled (default)
+#ft_over_ds=1
+
+##### Neighbor table ##########################################################
+# Maximum number of entries kept in AP table (either for neigbor table or for
+# detecting Overlapping Legacy BSS Condition). The oldest entry will be
+# removed when adding a new entry that would make the list grow over this
+# limit. Note! WFA certification for IEEE 802.11g requires that OLBC is
+# enabled, so this field should not be set to 0 when using IEEE 802.11g.
+# default: 255
+#ap_table_max_size=255
+
+# Number of seconds of no frames received after which entries may be deleted
+# from the AP table. Since passive scanning is not usually performed frequently
+# this should not be set to very small value. In addition, there is no
+# guarantee that every scan cycle will receive beacon frames from the
+# neighboring APs.
+# default: 60
+#ap_table_expiration_time=3600
+
+# Maximum number of stations to track on the operating channel
+# This can be used to detect dualband capable stations before they have
+# associated, e.g., to provide guidance on which colocated BSS to use.
+# Default: 0 (disabled)
+#track_sta_max_num=100
+
+# Maximum age of a station tracking entry in seconds
+# Default: 180
+#track_sta_max_age=180
+
+# Do not reply to group-addressed Probe Request from a station that was seen on
+# another radio.
+# Default: Disabled
+#
+# This can be used with enabled track_sta_max_num configuration on another
+# interface controlled by the same hostapd process to restrict Probe Request
+# frame handling from replying to group-addressed Probe Request frames from a
+# station that has been detected to be capable of operating on another band,
+# e.g., to try to reduce likelihood of the station selecting a 2.4 GHz BSS when
+# the AP operates both a 2.4 GHz and 5 GHz BSS concurrently.
+#
+# Note: Enabling this can cause connectivity issues and increase latency for
+# discovering the AP.
+#no_probe_resp_if_seen_on=wlan1
+
+# Reject authentication from a station that was seen on another radio.
+# Default: Disabled
+#
+# This can be used with enabled track_sta_max_num configuration on another
+# interface controlled by the same hostapd process to reject authentication
+# attempts from a station that has been detected to be capable of operating on
+# another band, e.g., to try to reduce likelihood of the station selecting a
+# 2.4 GHz BSS when the AP operates both a 2.4 GHz and 5 GHz BSS concurrently.
+#
+# Note: Enabling this can cause connectivity issues and increase latency for
+# connecting with the AP.
+#no_auth_if_seen_on=wlan1
+
+##### Wi-Fi Protected Setup (WPS) #############################################
+
+# WPS state
+# 0 = WPS disabled (default)
+# 1 = WPS enabled, not configured
+# 2 = WPS enabled, configured
+#wps_state=2
+
+# Whether to manage this interface independently from other WPS interfaces
+# By default, a single hostapd process applies WPS operations to all configured
+# interfaces. This parameter can be used to disable that behavior for a subset
+# of interfaces. If this is set to non-zero for an interface, WPS commands
+# issued on that interface do not apply to other interfaces and WPS operations
+# performed on other interfaces do not affect this interface.
+#wps_independent=0
+
+# AP can be configured into a locked state where new WPS Registrar are not
+# accepted, but previously authorized Registrars (including the internal one)
+# can continue to add new Enrollees.
+#ap_setup_locked=1
+
+# Universally Unique IDentifier (UUID; see RFC 4122) of the device
+# This value is used as the UUID for the internal WPS Registrar. If the AP
+# is also using UPnP, this value should be set to the device's UPnP UUID.
+# If not configured, UUID will be generated based on the local MAC address.
+#uuid=12345678-9abc-def0-1234-56789abcdef0
+
+# Note: If wpa_psk_file is set, WPS is used to generate random, per-device PSKs
+# that will be appended to the wpa_psk_file. If wpa_psk_file is not set, the
+# default PSK (wpa_psk/wpa_passphrase) will be delivered to Enrollees. Use of
+# per-device PSKs is recommended as the more secure option (i.e., make sure to
+# set wpa_psk_file when using WPS with WPA-PSK).
+
+# When an Enrollee requests access to the network with PIN method, the Enrollee
+# PIN will need to be entered for the Registrar. PIN request notifications are
+# sent to hostapd ctrl_iface monitor. In addition, they can be written to a
+# text file that could be used, e.g., to populate the AP administration UI with
+# pending PIN requests. If the following variable is set, the PIN requests will
+# be written to the configured file.
+#wps_pin_requests=/var/run/hostapd_wps_pin_requests
+
+# Device Name
+# User-friendly description of device; up to 32 octets encoded in UTF-8
+#device_name=Wireless AP
+
+# Manufacturer
+# The manufacturer of the device (up to 64 ASCII characters)
+#manufacturer=Company
+
+# Model Name
+# Model of the device (up to 32 ASCII characters)
+#model_name=WAP
+
+# Model Number
+# Additional device description (up to 32 ASCII characters)
+#model_number=123
+
+# Serial Number
+# Serial number of the device (up to 32 characters)
+#serial_number=12345
+
+# Primary Device Type
+# Used format: <categ>-<OUI>-<subcateg>
+# categ = Category as an integer value
+# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for
+# default WPS OUI
+# subcateg = OUI-specific Sub Category as an integer value
+# Examples:
+# 1-0050F204-1 (Computer / PC)
+# 1-0050F204-2 (Computer / Server)
+# 5-0050F204-1 (Storage / NAS)
+# 6-0050F204-1 (Network Infrastructure / AP)
+#device_type=6-0050F204-1
+
+# OS Version
+# 4-octet operating system version number (hex string)
+#os_version=01020300
+
+# Config Methods
+# List of the supported configuration methods
+# Available methods: usba ethernet label display ext_nfc_token int_nfc_token
+# nfc_interface push_button keypad virtual_display physical_display
+# virtual_push_button physical_push_button
+#config_methods=label virtual_display virtual_push_button keypad
+
+# WPS capability discovery workaround for PBC with Windows 7
+# Windows 7 uses incorrect way of figuring out AP's WPS capabilities by acting
+# as a Registrar and using M1 from the AP. The config methods attribute in that
+# message is supposed to indicate only the configuration method supported by
+# the AP in Enrollee role, i.e., to add an external Registrar. For that case,
+# PBC shall not be used and as such, the PushButton config method is removed
+# from M1 by default. If pbc_in_m1=1 is included in the configuration file,
+# the PushButton config method is left in M1 (if included in config_methods
+# parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from a label
+# in the AP).
+#pbc_in_m1=1
+
+# Static access point PIN for initial configuration and adding Registrars
+# If not set, hostapd will not allow external WPS Registrars to control the
+# access point. The AP PIN can also be set at runtime with hostapd_cli
+# wps_ap_pin command. Use of temporary (enabled by user action) and random
+# AP PIN is much more secure than configuring a static AP PIN here. As such,
+# use of the ap_pin parameter is not recommended if the AP device has means for
+# displaying a random PIN.
+#ap_pin=12345670
+
+# Skip building of automatic WPS credential
+# This can be used to allow the automatically generated Credential attribute to
+# be replaced with pre-configured Credential(s).
+#skip_cred_build=1
+
+# Additional Credential attribute(s)
+# This option can be used to add pre-configured Credential attributes into M8
+# message when acting as a Registrar. If skip_cred_build=1, this data will also
+# be able to override the Credential attribute that would have otherwise been
+# automatically generated based on network configuration. This configuration
+# option points to an external file that much contain the WPS Credential
+# attribute(s) as binary data.
+#extra_cred=hostapd.cred
+
+# Credential processing
+# 0 = process received credentials internally (default)
+# 1 = do not process received credentials; just pass them over ctrl_iface to
+# external program(s)
+# 2 = process received credentials internally and pass them over ctrl_iface
+# to external program(s)
+# Note: With wps_cred_processing=1, skip_cred_build should be set to 1 and
+# extra_cred be used to provide the Credential data for Enrollees.
+#
+# wps_cred_processing=1 will disabled automatic updates of hostapd.conf file
+# both for Credential processing and for marking AP Setup Locked based on
+# validation failures of AP PIN. An external program is responsible on updating
+# the configuration appropriately in this case.
+#wps_cred_processing=0
+
+# AP Settings Attributes for M7
+# By default, hostapd generates the AP Settings Attributes for M7 based on the
+# current configuration. It is possible to override this by providing a file
+# with pre-configured attributes. This is similar to extra_cred file format,
+# but the AP Settings attributes are not encapsulated in a Credential
+# attribute.
+#ap_settings=hostapd.ap_settings
+
+# WPS UPnP interface
+# If set, support for external Registrars is enabled.
+#upnp_iface=br0
+
+# Friendly Name (required for UPnP)
+# Short description for end use. Should be less than 64 characters.
+#friendly_name=WPS Access Point
+
+# Manufacturer URL (optional for UPnP)
+#manufacturer_url=http://www.example.com/
+
+# Model Description (recommended for UPnP)
+# Long description for end user. Should be less than 128 characters.
+#model_description=Wireless Access Point
+
+# Model URL (optional for UPnP)
+#model_url=http://www.example.com/model/
+
+# Universal Product Code (optional for UPnP)
+# 12-digit, all-numeric code that identifies the consumer package.
+#upc=123456789012
+
+# WPS RF Bands (a = 5G, b = 2.4G, g = 2.4G, ag = dual band, ad = 60 GHz)
+# This value should be set according to RF band(s) supported by the AP if
+# hw_mode is not set. For dual band dual concurrent devices, this needs to be
+# set to ag to allow both RF bands to be advertized.
+#wps_rf_bands=ag
+
+# NFC password token for WPS
+# These parameters can be used to configure a fixed NFC password token for the
+# AP. This can be generated, e.g., with nfc_pw_token from wpa_supplicant. When
+# these parameters are used, the AP is assumed to be deployed with a NFC tag
+# that includes the matching NFC password token (e.g., written based on the
+# NDEF record from nfc_pw_token).
+#
+#wps_nfc_dev_pw_id: Device Password ID (16..65535)
+#wps_nfc_dh_pubkey: Hexdump of DH Public Key
+#wps_nfc_dh_privkey: Hexdump of DH Private Key
+#wps_nfc_dev_pw: Hexdump of Device Password
+
+##### Wi-Fi Direct (P2P) ######################################################
+
+# Enable P2P Device management
+#manage_p2p=1
+
+# Allow cross connection
+#allow_cross_connection=1
+
+#### TDLS (IEEE 802.11z-2010) #################################################
+
+# Prohibit use of TDLS in this BSS
+#tdls_prohibit=1
+
+# Prohibit use of TDLS Channel Switching in this BSS
+#tdls_prohibit_chan_switch=1
+
+##### IEEE 802.11v-2011 #######################################################
+
+# Time advertisement
+# 0 = disabled (default)
+# 2 = UTC time at which the TSF timer is 0
+#time_advertisement=2
+
+# Local time zone as specified in 8.3 of IEEE Std 1003.1-2004:
+# stdoffset[dst[offset][,start[/time],end[/time]]]
+#time_zone=EST5
+
+# WNM-Sleep Mode (extended sleep mode for stations)
+# 0 = disabled (default)
+# 1 = enabled (allow stations to use WNM-Sleep Mode)
+#wnm_sleep_mode=1
+
+# BSS Transition Management
+# 0 = disabled (default)
+# 1 = enabled
+#bss_transition=1
+
+# Proxy ARP
+# 0 = disabled (default)
+# 1 = enabled
+#proxy_arp=1
+
+# IPv6 Neighbor Advertisement multicast-to-unicast conversion
+# This can be used with Proxy ARP to allow multicast NAs to be forwarded to
+# associated STAs using link layer unicast delivery.
+# 0 = disabled (default)
+# 1 = enabled
+#na_mcast_to_ucast=0
+
+##### IEEE 802.11u-2011 #######################################################
+
+# Enable Interworking service
+#interworking=1
+
+# Access Network Type
+# 0 = Private network
+# 1 = Private network with guest access
+# 2 = Chargeable public network
+# 3 = Free public network
+# 4 = Personal device network
+# 5 = Emergency services only network
+# 14 = Test or experimental
+# 15 = Wildcard
+#access_network_type=0
+
+# Whether the network provides connectivity to the Internet
+# 0 = Unspecified
+# 1 = Network provides connectivity to the Internet
+#internet=1
+
+# Additional Step Required for Access
+# Note: This is only used with open network, i.e., ASRA shall ne set to 0 if
+# RSN is used.
+#asra=0
+
+# Emergency services reachable
+#esr=0
+
+# Unauthenticated emergency service accessible
+#uesa=0
+
+# Venue Info (optional)
+# The available values are defined in IEEE Std 802.11u-2011, 7.3.1.34.
+# Example values (group,type):
+# 0,0 = Unspecified
+# 1,7 = Convention Center
+# 1,13 = Coffee Shop
+# 2,0 = Unspecified Business
+# 7,1 Private Residence
+#venue_group=7
+#venue_type=1
+
+# Homogeneous ESS identifier (optional; dot11HESSID)
+# If set, this shall be identifical to one of the BSSIDs in the homogeneous
+# ESS and this shall be set to the same value across all BSSs in homogeneous
+# ESS.
+#hessid=02:03:04:05:06:07
+
+# Roaming Consortium List
+# Arbitrary number of Roaming Consortium OIs can be configured with each line
+# adding a new OI to the list. The first three entries are available through
+# Beacon and Probe Response frames. Any additional entry will be available only
+# through ANQP queries. Each OI is between 3 and 15 octets and is configured as
+# a hexstring.
+#roaming_consortium=021122
+#roaming_consortium=2233445566
+
+# Venue Name information
+# This parameter can be used to configure one or more Venue Name Duples for
+# Venue Name ANQP information. Each entry has a two or three character language
+# code (ISO-639) separated by colon from the venue name string.
+# Note that venue_group and venue_type have to be set for Venue Name
+# information to be complete.
+#venue_name=eng:Example venue
+#venue_name=fin:Esimerkkipaikka
+# Alternative format for language:value strings:
+# (double quoted string, printf-escaped string)
+#venue_name=P"eng:Example\nvenue"
+
+# Network Authentication Type
+# This parameter indicates what type of network authentication is used in the
+# network.
+# format: <network auth type indicator (1-octet hex str)> [redirect URL]
+# Network Authentication Type Indicator values:
+# 00 = Acceptance of terms and conditions
+# 01 = On-line enrollment supported
+# 02 = http/https redirection
+# 03 = DNS redirection
+#network_auth_type=00
+#network_auth_type=02http://www.example.com/redirect/me/here/
+
+# IP Address Type Availability
+# format: <1-octet encoded value as hex str>
+# (ipv4_type & 0x3f) << 2 | (ipv6_type & 0x3)
+# ipv4_type:
+# 0 = Address type not available
+# 1 = Public IPv4 address available
+# 2 = Port-restricted IPv4 address available
+# 3 = Single NATed private IPv4 address available
+# 4 = Double NATed private IPv4 address available
+# 5 = Port-restricted IPv4 address and single NATed IPv4 address available
+# 6 = Port-restricted IPv4 address and double NATed IPv4 address available
+# 7 = Availability of the address type is not known
+# ipv6_type:
+# 0 = Address type not available
+# 1 = Address type available
+# 2 = Availability of the address type not known
+#ipaddr_type_availability=14
+
+# Domain Name
+# format: <variable-octet str>[,<variable-octet str>]
+#domain_name=example.com,another.example.com,yet-another.example.com
+
+# 3GPP Cellular Network information
+# format: <MCC1,MNC1>[;<MCC2,MNC2>][;...]
+#anqp_3gpp_cell_net=244,91;310,026;234,56
+
+# NAI Realm information
+# One or more realm can be advertised. Each nai_realm line adds a new realm to
+# the set. These parameters provide information for stations using Interworking
+# network selection to allow automatic connection to a network based on
+# credentials.
+# format: <encoding>,<NAI Realm(s)>[,<EAP Method 1>][,<EAP Method 2>][,...]
+# encoding:
+# 0 = Realm formatted in accordance with IETF RFC 4282
+# 1 = UTF-8 formatted character string that is not formatted in
+# accordance with IETF RFC 4282
+# NAI Realm(s): Semi-colon delimited NAI Realm(s)
+# EAP Method: <EAP Method>[:<[AuthParam1:Val1]>][<[AuthParam2:Val2]>][...]
+# EAP Method types, see:
+# http://www.iana.org/assignments/eap-numbers/eap-numbers.xhtml#eap-numbers-4
+# AuthParam (Table 8-188 in IEEE Std 802.11-2012):
+# ID 2 = Non-EAP Inner Authentication Type
+# 1 = PAP, 2 = CHAP, 3 = MSCHAP, 4 = MSCHAPV2
+# ID 3 = Inner authentication EAP Method Type
+# ID 5 = Credential Type
+# 1 = SIM, 2 = USIM, 3 = NFC Secure Element, 4 = Hardware Token,
+# 5 = Softoken, 6 = Certificate, 7 = username/password, 9 = Anonymous,
+# 10 = Vendor Specific
+#nai_realm=0,example.com;example.net
+# EAP methods EAP-TLS with certificate and EAP-TTLS/MSCHAPv2 with
+# username/password
+#nai_realm=0,example.org,13[5:6],21[2:4][5:7]
+
+# Arbitrary ANQP-element configuration
+# Additional ANQP-elements with arbitrary values can be defined by specifying
+# their contents in raw format as a hexdump of the payload. Note that these
+# values will override ANQP-element contents that may have been specified in the
+# more higher layer configuration parameters listed above.
+# format: anqp_elem=<InfoID>:<hexdump of payload>
+# For example, AP Geospatial Location ANQP-element with unknown location:
+#anqp_elem=265:0000
+# For example, AP Civic Location ANQP-element with unknown location:
+#anqp_elem=266:000000
+
+# GAS Address 3 behavior
+# 0 = P2P specification (Address3 = AP BSSID) workaround enabled by default
+# based on GAS request Address3
+# 1 = IEEE 802.11 standard compliant regardless of GAS request Address3
+# 2 = Force non-compliant behavior (Address3 = AP BSSID for all cases)
+#gas_address3=0
+
+# QoS Map Set configuration
+#
+# Comma delimited QoS Map Set in decimal values
+# (see IEEE Std 802.11-2012, 8.4.2.97)
+#
+# format:
+# [<DSCP Exceptions[DSCP,UP]>,]<UP 0 range[low,high]>,...<UP 7 range[low,high]>
+#
+# There can be up to 21 optional DSCP Exceptions which are pairs of DSCP Value
+# (0..63 or 255) and User Priority (0..7). This is followed by eight DSCP Range
+# descriptions with DSCP Low Value and DSCP High Value pairs (0..63 or 255) for
+# each UP starting from 0. If both low and high value are set to 255, the
+# corresponding UP is not used.
+#
+# default: not set
+#qos_map_set=53,2,22,6,8,15,0,7,255,255,16,31,32,39,255,255,40,47,255,255
+
+##### Hotspot 2.0 #############################################################
+
+# Enable Hotspot 2.0 support
+#hs20=1
+
+# Disable Downstream Group-Addressed Forwarding (DGAF)
+# This can be used to configure a network where no group-addressed frames are
+# allowed. The AP will not forward any group-address frames to the stations and
+# random GTKs are issued for each station to prevent associated stations from
+# forging such frames to other stations in the BSS.
+#disable_dgaf=1
+
+# OSU Server-Only Authenticated L2 Encryption Network
+#osen=1
+
+# ANQP Domain ID (0..65535)
+# An identifier for a set of APs in an ESS that share the same common ANQP
+# information. 0 = Some of the ANQP information is unique to this AP (default).
+#anqp_domain_id=1234
+
+# Deauthentication request timeout
+# If the RADIUS server indicates that the station is not allowed to connect to
+# the BSS/ESS, the AP can allow the station some time to download a
+# notification page (URL included in the message). This parameter sets that
+# timeout in seconds.
+#hs20_deauth_req_timeout=60
+
+# Operator Friendly Name
+# This parameter can be used to configure one or more Operator Friendly Name
+# Duples. Each entry has a two or three character language code (ISO-639)
+# separated by colon from the operator friendly name string.
+#hs20_oper_friendly_name=eng:Example operator
+#hs20_oper_friendly_name=fin:Esimerkkioperaattori
+
+# Connection Capability
+# This can be used to advertise what type of IP traffic can be sent through the
+# hotspot (e.g., due to firewall allowing/blocking protocols/ports).
+# format: <IP Protocol>:<Port Number>:<Status>
+# IP Protocol: 1 = ICMP, 6 = TCP, 17 = UDP
+# Port Number: 0..65535
+# Status: 0 = Closed, 1 = Open, 2 = Unknown
+# Each hs20_conn_capab line is added to the list of advertised tuples.
+#hs20_conn_capab=1:0:2
+#hs20_conn_capab=6:22:1
+#hs20_conn_capab=17:5060:0
+
+# WAN Metrics
+# format: <WAN Info>:<DL Speed>:<UL Speed>:<DL Load>:<UL Load>:<LMD>
+# WAN Info: B0-B1: Link Status, B2: Symmetric Link, B3: At Capabity
+# (encoded as two hex digits)
+# Link Status: 1 = Link up, 2 = Link down, 3 = Link in test state
+# Downlink Speed: Estimate of WAN backhaul link current downlink speed in kbps;
+# 1..4294967295; 0 = unknown
+# Uplink Speed: Estimate of WAN backhaul link current uplink speed in kbps
+# 1..4294967295; 0 = unknown
+# Downlink Load: Current load of downlink WAN connection (scaled to 255 = 100%)
+# Uplink Load: Current load of uplink WAN connection (scaled to 255 = 100%)
+# Load Measurement Duration: Duration for measuring downlink/uplink load in
+# tenths of a second (1..65535); 0 if load cannot be determined
+#hs20_wan_metrics=01:8000:1000:80:240:3000
+
+# Operating Class Indication
+# List of operating classes the BSSes in this ESS use. The Global operating
+# classes in Table E-4 of IEEE Std 802.11-2012 Annex E define the values that
+# can be used in this.
+# format: hexdump of operating class octets
+# for example, operating classes 81 (2.4 GHz channels 1-13) and 115 (5 GHz
+# channels 36-48):
+#hs20_operating_class=5173
+
+# OSU icons
+# <Icon Width>:<Icon Height>:<Language code>:<Icon Type>:<Name>:<file path>
+#hs20_icon=32:32:eng:image/png:icon32:/tmp/icon32.png
+#hs20_icon=64:64:eng:image/png:icon64:/tmp/icon64.png
+
+# OSU SSID (see ssid2 for format description)
+# This is the SSID used for all OSU connections to all the listed OSU Providers.
+#osu_ssid="example"
+
+# OSU Providers
+# One or more sets of following parameter. Each OSU provider is started by the
+# mandatory osu_server_uri item. The other parameters add information for the
+# last added OSU provider.
+#
+#osu_server_uri=https://example.com/osu/
+#osu_friendly_name=eng:Example operator
+#osu_friendly_name=fin:Esimerkkipalveluntarjoaja
+#osu_nai=anonymous@example.com
+#osu_method_list=1 0
+#osu_icon=icon32
+#osu_icon=icon64
+#osu_service_desc=eng:Example services
+#osu_service_desc=fin:Esimerkkipalveluja
+#
+#osu_server_uri=...
+
+##### Fast Session Transfer (FST) support #####################################
+#
+# The options in this section are only available when the build configuration
+# option CONFIG_FST is set while compiling hostapd. They allow this interface
+# to be a part of FST setup.
+#
+# FST is the transfer of a session from a channel to another channel, in the
+# same or different frequency bands.
+#
+# For detals, see IEEE Std 802.11ad-2012.
+
+# Identifier of an FST Group the interface belongs to.
+#fst_group_id=bond0
+
+# Interface priority within the FST Group.
+# Announcing a higher priority for an interface means declaring it more
+# preferable for FST switch.
+# fst_priority is in 1..255 range with 1 being the lowest priority.
+#fst_priority=100
+
+# Default LLT value for this interface in milliseconds. The value used in case
+# no value provided during session setup. Default is 50 ms.
+# fst_llt is in 1..4294967 range (due to spec limitation, see 10.32.2.2
+# Transitioning between states).
+#fst_llt=100
+
+##### Radio measurements / location ###########################################
+
+# The content of a LCI measurement subelement
+#lci=<Hexdump of binary data of the LCI report>
+
+# The content of a location civic measurement subelement
+#civic=<Hexdump of binary data of the location civic report>
+
+# Enable neighbor report via radio measurements
+#rrm_neighbor_report=1
+
+# Publish fine timing measurement (FTM) responder functionality
+# This parameter only controls publishing via Extended Capabilities element.
+# Actual functionality is managed outside hostapd.
+#ftm_responder=0
+
+# Publish fine timing measurement (FTM) initiator functionality
+# This parameter only controls publishing via Extended Capabilities element.
+# Actual functionality is managed outside hostapd.
+#ftm_initiator=0
+
+##### TESTING OPTIONS #########################################################
+#
+# The options in this section are only available when the build configuration
+# option CONFIG_TESTING_OPTIONS is set while compiling hostapd. They allow
+# testing some scenarios that are otherwise difficult to reproduce.
+#
+# Ignore probe requests sent to hostapd with the given probability, must be a
+# floating point number in the range [0, 1).
+#ignore_probe_probability=0.0
+#
+# Ignore authentication frames with the given probability
+#ignore_auth_probability=0.0
+#
+# Ignore association requests with the given probability
+#ignore_assoc_probability=0.0
+#
+# Ignore reassociation requests with the given probability
+#ignore_reassoc_probability=0.0
+#
+# Corrupt Key MIC in GTK rekey EAPOL-Key frames with the given probability
+#corrupt_gtk_rekey_mic_probability=0.0
+#
+# Include only ECSA IE without CSA IE where possible
+# (channel switch operating class is needed)
+#ecsa_ie_only=0
+
+##### Multiple BSSID support ##################################################
+#
+# Above configuration is using the default interface (wlan#, or multi-SSID VLAN
+# interfaces). Other BSSIDs can be added by using separator 'bss' with
+# default interface name to be allocated for the data packets of the new BSS.
+#
+# hostapd will generate BSSID mask based on the BSSIDs that are
+# configured. hostapd will verify that dev_addr & MASK == dev_addr. If this is
+# not the case, the MAC address of the radio must be changed before starting
+# hostapd (ifconfig wlan0 hw ether <MAC addr>). If a BSSID is configured for
+# every secondary BSS, this limitation is not applied at hostapd and other
+# masks may be used if the driver supports them (e.g., swap the locally
+# administered bit)
+#
+# BSSIDs are assigned in order to each BSS, unless an explicit BSSID is
+# specified using the 'bssid' parameter.
+# If an explicit BSSID is specified, it must be chosen such that it:
+# - results in a valid MASK that covers it and the dev_addr
+# - is not the same as the MAC address of the radio
+# - is not the same as any other explicitly specified BSSID
+#
+# Alternatively, the 'use_driver_iface_addr' parameter can be used to request
+# hostapd to use the driver auto-generated interface address (e.g., to use the
+# exact MAC addresses allocated to the device).
+#
+# Not all drivers support multiple BSSes. The exact mechanism for determining
+# the driver capabilities is driver specific. With the current (i.e., a recent
+# kernel) drivers using nl80211, this information can be checked with "iw list"
+# (search for "valid interface combinations").
+#
+# Please note that hostapd uses some of the values configured for the first BSS
+# as the defaults for the following BSSes. However, it is recommended that all
+# BSSes include explicit configuration of all relevant configuration items.
+#
+#bss=wlan0_0
+#ssid=test2
+# most of the above items can be used here (apart from radio interface specific
+# items, like channel)
+
+#bss=wlan0_1
+#bssid=00:13:10:95:fe:0b
+# ...
diff --git a/recipes-core/multitech/config/config-mths/ifplugd/ifplugd.action b/recipes-core/multitech/config/config-mths/ifplugd/ifplugd.action
new file mode 100755
index 0000000..e7184c7
--- /dev/null
+++ b/recipes-core/multitech/config/config-mths/ifplugd/ifplugd.action
@@ -0,0 +1,30 @@
+#!/bin/sh
+# $Id: ifplugd.action 99 2004-02-08 20:17:59Z lennart $
+
+# This file is part of ifplugd.
+#
+# ifplugd is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# ifplugd is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with ifplugd; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+set -e
+
+if [ -z "$1" ] || [ -z "$2" ] ; then
+ echo "Wrong arguments" > /dev/stderr
+ exit 1
+fi
+
+[ "$2" = "up" ] && exec /sbin/ifup $1
+[ "$2" = "down" ] && exec /sbin/ifdown $1
+
+exit 0
diff --git a/recipes-core/multitech/config/config-mths/ifplugd/usb0.conf b/recipes-core/multitech/config/config-mths/ifplugd/usb0.conf
new file mode 100644
index 0000000..2fa70b3
--- /dev/null
+++ b/recipes-core/multitech/config/config-mths/ifplugd/usb0.conf
@@ -0,0 +1,2 @@
+INTERFACE="usb0"
+ARGS="-M -fI -i ${INTERFACE} -u 0 -d 10 -r /etc/ifplugd/ifplugd.action"
diff --git a/recipes-core/multitech/config/config-mths/ifplugd/usb1.conf b/recipes-core/multitech/config/config-mths/ifplugd/usb1.conf
new file mode 100644
index 0000000..df70933
--- /dev/null
+++ b/recipes-core/multitech/config/config-mths/ifplugd/usb1.conf
@@ -0,0 +1,2 @@
+INTERFACE="usb1"
+ARGS="-M -fI -i ${INTERFACE} -u 0 -d 10 -r /etc/ifplugd/ifplugd.action"
diff --git a/recipes-core/multitech/config/config-mths/modprobe.d/cfg80211.conf b/recipes-core/multitech/config/config-mths/modprobe.d/cfg80211.conf
new file mode 100644
index 0000000..4b6d264
--- /dev/null
+++ b/recipes-core/multitech/config/config-mths/modprobe.d/cfg80211.conf
@@ -0,0 +1,7 @@
+# IEEE 802.11 Regulatory Domain for cfg80211 driver
+# AU -- Australia
+# AT -- Austria
+# BE -- Belgium
+# US -- USA
+# 00 -- World
+options cfg80211 ieee80211_regdom=00
diff --git a/recipes-core/multitech/config/config-mths/modprobe.d/mts-io.conf b/recipes-core/multitech/config/config-mths/modprobe.d/mts-io.conf
new file mode 100644
index 0000000..7421ac4
--- /dev/null
+++ b/recipes-core/multitech/config/config-mths/modprobe.d/mts-io.conf
@@ -0,0 +1 @@
+blacklist mts-io
diff --git a/recipes-core/multitech/config/config-mths/network/interfaces.mths b/recipes-core/multitech/config/config-mths/network/interfaces.mths
new file mode 100644
index 0000000..2463e0a
--- /dev/null
+++ b/recipes-core/multitech/config/config-mths/network/interfaces.mths
@@ -0,0 +1,12 @@
+auto wifi1
+iface wifi1 inet static
+address 10.0.0.1
+netmask 255.0.0.0
+pre-up bash -c '([[ -d /sys/class/net/wifi1 ]] || /opt/rs9113/onebox_util rpine0 create_vap wifi1 ap)'
+
+# Gadget USB
+auto usb0
+iface usb0 inet static
+address 192.168.3.1
+netmask 255.255.255.0
+
diff --git a/recipes-core/multitech/config/ppp/peers/README.lna3 b/recipes-core/multitech/config/ppp/peers/README.fwswitch
index 3e6e5fb..47ef5ef 100644
--- a/recipes-core/multitech/config/ppp/peers/README.lna3
+++ b/recipes-core/multitech/config/ppp/peers/README.fwswitch
@@ -1,4 +1,4 @@
-LNA3 firmware/SIM switching instructions
+LNA3/L4N1 firmware/SIM switching instructions
To automatically set the APN, bring up the system
with the desired SIM installed (AT&T or Verizon).
@@ -50,11 +50,12 @@ Put the desired SIM into the device.
The default APN is "phone" for the LNA3.
-Set the APN using:
+Set the APN using (does nothing for Sprint or Verizon chat scripts):
-kkk # mlinux-set-apn "YOURAPN"
+# mlinux-set-apn "YOURAPN"
-Do not put a "AT+CGDCONT" in the lna3_chat_vz script. It will cause trouble.
+Do not put a "AT+CGDCONT" in the lna3_chat_vz script or
+l4n1_chat_vz script. It will cause trouble.
To pick a firmware based on the
diff --git a/recipes-core/multitech/config/ppp/peers/gsm b/recipes-core/multitech/config/ppp/peers/gsm
index d23957e..4fc4361 100644
--- a/recipes-core/multitech/config/ppp/peers/gsm
+++ b/recipes-core/multitech/config/ppp/peers/gsm
@@ -8,4 +8,4 @@ ipcp-restart 10
noauth
crtscts
novj
-connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/gsm_chat'
+connect '/usr/libexec/ppp/chat_wrapper /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/gsm_chat'
diff --git a/recipes-core/multitech/config/ppp/peers/gsm_chat b/recipes-core/multitech/config/ppp/peers/gsm_chat
index 5e18e05..d952a89 100644
--- a/recipes-core/multitech/config/ppp/peers/gsm_chat
+++ b/recipes-core/multitech/config/ppp/peers/gsm_chat
@@ -12,11 +12,32 @@ OK 'ATZ'
OK 'AT+CSQ'
# ----------------------------------
# Set the APN for your provider here
+# Note that a comment starting with
+# #MT AT+CGDCONT=
+# will be interpretted by
+# /usr/libexec/ppp/chat_wrapper
+# as the intended context
+# setting. Make the context number
+# (after the =) match the
+# dialer number context.
+# If the context changes, ppp/chat_wrapper
+# handles disconnecting the modem
+# from the network during the update,
+# which is required
+# by some modem firmware.
+# The chat script will be executed
+# after the ppp/chat_wrapper script
+# re-registers the modem.
+# The context will only be set if the
+# modem settings do not match the
+# settings here.
+# Lines starting with # MT are ignored.
# ----------------------------------
-#OK 'AT+CGDCONT=1,"IP","proxy"'
-#OK 'AT+CGDCONT=1,"IP","ISP.CINGULAR"'
-#OK 'AT+CGDCONT=1,"IP","internet2.voicestream.com"'
-OK 'AT+CGDCONT=1,"IP","internet"'
+# MT AT+CGDCONT=1,"IP","proxy"
+# MT AT+CGDCONT=1,"IP","ISP.CINGULAR"
+# MT AT+CGDCONT=1,"IP","internet2.voicestream.com"
+#MT AT+CGDCONT=1,"IP","internet"
+OK 'AT+CGDCONT?'
SAY "Dialing...\n"
#OK 'ATD*99#'
OK 'ATD*99***1#'
diff --git a/recipes-core/multitech/config/ppp/peers/l4e1 b/recipes-core/multitech/config/ppp/peers/l4e1
new file mode 100644
index 0000000..9638398
--- /dev/null
+++ b/recipes-core/multitech/config/ppp/peers/l4e1
@@ -0,0 +1,11 @@
+linkname ppp0
+230400
+defaultroute
+replacedefaultroute
+usepeerdns
+ipcp-max-failure 10
+ipcp-restart 10
+noauth
+crtscts
+novj
+connect '/usr/libexec/ppp/chat_wrapper /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/l4e1_chat'
diff --git a/recipes-core/multitech/config/ppp/peers/l4e1_chat b/recipes-core/multitech/config/ppp/peers/l4e1_chat
new file mode 100644
index 0000000..bb95881
--- /dev/null
+++ b/recipes-core/multitech/config/ppp/peers/l4e1_chat
@@ -0,0 +1,43 @@
+SAY "L4E1 chat\n"
+ECHO OFF
+ABORT 'NO DIAL TONE'
+ABORT 'NO DIALTONE'
+ABORT 'NO ANSWER'
+ABORT 'NO CARRIER'
+ABORT 'DELAYED'
+ABORT 'VOICE'
+ABORT 'BUSY'
+'' 'AT'
+OK 'ATZ'
+OK 'AT+CSQ'
+# ----------------------------------
+# Set the APN for your provider here
+# Note that a comment starting with
+# #MT AT+CGDCONT=
+# will be interpretted by
+# /usr/libexec/ppp/chat_wrapper
+# as the intended context
+# setting. Make the context number
+# (after the =) match the
+# dialer number context.
+# If the context changes, ppp/chat_wrapper
+# handles disconnecting the modem
+# from the network during the update,
+# which is required
+# by some modem firmware.
+# The chat script will be executed
+# after the ppp/chat_wrapper script
+# re-registers the modem.
+# The context will only be set if the
+# modem settings do not match the
+# settings here.
+# Lines starting with # MT are ignored.
+# ----------------------------------
+#MT AT+CGDCONT=1,"IP","internet"
+OK 'AT+CGDCONT?'
+SAY "Dialing...\n"
+OK 'ATD*99***1#'
+SAY "Waiting for CONNECT...\n"
+TIMEOUT 120
+CONNECT ''
+SAY "Connected\n"
diff --git a/recipes-core/multitech/config/ppp/peers/l4n1 b/recipes-core/multitech/config/ppp/peers/l4n1
new file mode 100644
index 0000000..5c011e0
--- /dev/null
+++ b/recipes-core/multitech/config/ppp/peers/l4n1
@@ -0,0 +1,11 @@
+linkname ppp0
+230400
+defaultroute
+replacedefaultroute
+usepeerdns
+ipcp-max-failure 10
+ipcp-restart 10
+noauth
+crtscts
+novj
+connect '/usr/libexec/ppp/chat_wrapper /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/l4n1_chat'
diff --git a/recipes-core/multitech/config/ppp/peers/l4n1_chat b/recipes-core/multitech/config/ppp/peers/l4n1_chat
new file mode 120000
index 0000000..36db4e2
--- /dev/null
+++ b/recipes-core/multitech/config/ppp/peers/l4n1_chat
@@ -0,0 +1 @@
+l4n1_chat_non_vz \ No newline at end of file
diff --git a/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz b/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz
new file mode 100644
index 0000000..76f3aae
--- /dev/null
+++ b/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz
@@ -0,0 +1,67 @@
+#----------------------------------------
+# Do NOT use this CHAT script with
+# Verizon wireless. It will bind
+# this SIM and device to the wrong
+# APN.
+#
+# mlinux-set-apn can be used to set
+# the APN.
+#
+# mlinux-switch-cell-fw can be used
+# to switch the firmware settings
+# and set the correct CHAT script.
+#
+# # mlinux-set-apn "APN"
+#
+# And to switch the firmware to Verizon:
+# # mlinux-switch-cell-fw 1
+#
+# And to switch to AT&T:
+# # mlinux-switch-cell-fw 0
+#----------------------------------------
+SAY "L4N1 chat not for Verizon\n"
+ECHO OFF
+ABORT 'NO DIAL TONE'
+ABORT 'NO DIALTONE'
+ABORT 'NO ANSWER'
+ABORT 'NO CARRIER'
+ABORT 'DELAYED'
+ABORT 'VOICE'
+ABORT 'BUSY'
+'' 'AT'
+OK 'ATZ'
+OK 'AT+CSQ'
+# ----------------------------------
+# Set the APN for your provider here
+# Note that a comment starting with
+# #MT AT+CGDCONT=
+# will be interpretted by
+# /usr/libexec/ppp/chat_wrapper
+# as the intended context
+# setting. Make the context number
+# (after the =) match the
+# dialer number context.
+# If the context changes, ppp/chat_wrapper
+# handles disconnecting the modem
+# from the network during the update,
+# which is required
+# by some modem firmware.
+# The chat script will be executed
+# after the ppp/chat_wrapper script
+# re-registers the modem.
+# The context will only be set if the
+# modem settings do not match the
+# settings here.
+# Lines starting with # MT are ignored.
+# ----------------------------------
+# MT AT+CGDCONT=1,"IP","proxy"
+# MT AT+CGDCONT=1,"IP","ISP.CINGULAR"
+# MT AT+CGDCONT=1,"IP","internet2.voicestream.com"
+#MT AT+CGDCONT=1,"IP","phone"
+OK 'AT+CGDCONT?'
+SAY "Dialing...\n"
+OK 'ATD*99***1#'
+SAY "Waiting for CONNECT...\n"
+TIMEOUT 120
+CONNECT ''
+SAY "Connected\n"
diff --git a/recipes-core/multitech/config/ppp/peers/l4n1_chat_vz b/recipes-core/multitech/config/ppp/peers/l4n1_chat_vz
new file mode 100644
index 0000000..1bc3652
--- /dev/null
+++ b/recipes-core/multitech/config/ppp/peers/l4n1_chat_vz
@@ -0,0 +1,44 @@
+#----------------------------
+# This chat script has no
+# APN because Verizon
+# requires the chat script
+# not set the APN.
+# This is because Verizon
+# pushes the APN from their
+# network. Image 1 on an
+# LNA3 product is used
+# with a Verizon SIM.
+#----------------------------
+SAY "L4N1 chat Verizon\n"
+ECHO OFF
+ABORT 'NO DIAL TONE'
+ABORT 'NO DIALTONE'
+ABORT 'NO ANSWER'
+ABORT 'NO CARRIER'
+ABORT 'DELAYED'
+ABORT 'VOICE'
+ABORT 'BUSY'
+'' 'AT'
+OK 'ATZ'
+OK 'AT+CSQ'
+# -----------------------------------------
+# Do not enter the AT+CGDCONT, because it
+# will cause
+# a fault for a Verizon SIM and will push
+# the new APN to the network, which will
+# cause failures.
+# To switch the firmware to Verizon:
+# mlinux-switch-cell-fw 1
+# And to switch to AT&T (non-Verizon):
+# mlinux-switch-cell-fw 0
+# -----------------------------------------
+# Log APN (current context) for
+# diagnostic purposes
+#-----------------------------------
+OK 'AT+CGDCONT?'
+SAY "Dialing...\n"
+OK 'ATD*99***3#'
+SAY "Waiting for CONNECT...\n"
+TIMEOUT 120
+CONNECT ''
+SAY "Connected\n"
diff --git a/recipes-core/multitech/config/ppp/peers/lap3 b/recipes-core/multitech/config/ppp/peers/lap3
index bac08a1..ddd75a5 100644
--- a/recipes-core/multitech/config/ppp/peers/lap3
+++ b/recipes-core/multitech/config/ppp/peers/lap3
@@ -8,4 +8,4 @@ ipcp-restart 10
noauth
crtscts
novj
-connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/lap3_chat'
+connect '/usr/libexec/ppp/chat_wrapper /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/lap3_chat'
diff --git a/recipes-core/multitech/config/ppp/peers/lap3_chat b/recipes-core/multitech/config/ppp/peers/lap3_chat
index bc5ebcf..0f7adf6 100644
--- a/recipes-core/multitech/config/ppp/peers/lap3_chat
+++ b/recipes-core/multitech/config/ppp/peers/lap3_chat
@@ -1,4 +1,4 @@
-SAY "LSP3 chat\n"
+SAY "LAP3 chat\n"
ECHO OFF
ABORT 'NO DIAL TONE'
ABORT 'NO DIALTONE'
@@ -10,6 +10,30 @@ ABORT 'BUSY'
'' 'AT'
OK 'ATZ'
OK 'AT+CSQ'
+# ----------------------------------
+# Set the APN for your provider here
+# Note that a comment starting with
+# #MT AT+CGDCONT=
+# will be interpretted by
+# /usr/libexec/ppp/chat_wrapper
+# as the intended context
+# setting. Make the context number
+# (after the =) match the
+# dialer number context.
+# If the context changes, ppp/chat_wrapper
+# handles disconnecting the modem
+# from the network during the update,
+# which is required
+# by some modem firmware.
+# The chat script will be executed
+# after the ppp/chat_wrapper script
+# re-registers the modem.
+# The context will only be set if the
+# modem settings do not match the
+# settings here.
+# Lines starting with # MT are ignored.
+# ----------------------------------
+#MT AT+CGDCONT=1,"IP","internet"
OK 'AT+CGDCONT?'
SAY "Dialing...\n"
OK 'ATD*99***1#'
diff --git a/recipes-core/multitech/config/ppp/peers/leu1 b/recipes-core/multitech/config/ppp/peers/leu1
index 993b33a..5a3baec 100644
--- a/recipes-core/multitech/config/ppp/peers/leu1
+++ b/recipes-core/multitech/config/ppp/peers/leu1
@@ -8,4 +8,4 @@ ipcp-restart 10
noauth
crtscts
novj
-connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/leu1_chat'
+connect '/usr/libexec/ppp/chat_wrapper /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/leu1_chat'
diff --git a/recipes-core/multitech/config/ppp/peers/leu1_chat b/recipes-core/multitech/config/ppp/peers/leu1_chat
index 23faf0e..6aef877 100644
--- a/recipes-core/multitech/config/ppp/peers/leu1_chat
+++ b/recipes-core/multitech/config/ppp/peers/leu1_chat
@@ -12,8 +12,29 @@ OK 'ATZ'
OK 'AT+CSQ'
# ----------------------------------
# Set the APN for your provider here
+# Note that a comment starting with
+# #MT AT+CGDCONT=
+# will be interpretted by
+# /usr/libexec/ppp/chat_wrapper
+# as the intended context
+# setting. Make the context number
+# (after the =) match the
+# dialer number context.
+# If the context changes, ppp/chat_wrapper
+# handles disconnecting the modem
+# from the network during the update,
+# which is required
+# by some modem firmware.
+# The chat script will be executed
+# after the ppp/chat_wrapper script
+# re-registers the modem.
+# The context will only be set if the
+# modem settings do not match the
+# settings here.
+# Lines starting with # MT are ignored.
# ----------------------------------
-OK 'AT+CGDCONT=1,"IP","internet"'
+#MT AT+CGDCONT=1,"IP","internet"
+OK 'AT+CGDCONT?'
SAY "Dialing...\n"
OK 'ATD*99***1#'
SAY "Waiting for CONNECT...\n"
diff --git a/recipes-core/multitech/config/ppp/peers/lna3 b/recipes-core/multitech/config/ppp/peers/lna3
index bd84569..4f6a628 100644
--- a/recipes-core/multitech/config/ppp/peers/lna3
+++ b/recipes-core/multitech/config/ppp/peers/lna3
@@ -8,4 +8,4 @@ ipcp-restart 10
noauth
crtscts
novj
-connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/lna3_chat'
+connect '/usr/libexec/ppp/chat_wrapper /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/lna3_chat'
diff --git a/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz b/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz
index 1e9740a..a3da519 100644
--- a/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz
+++ b/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz
@@ -31,13 +31,35 @@ ABORT 'BUSY'
'' 'AT'
OK 'ATZ'
OK 'AT+CSQ'
-#-------------------------------------------
-# Set the non-Verizon APN on the next line
-#-------------------------------------------
-#OK 'AT+CGDCONT=3,"IP","proxy"'
-#OK 'AT+CGDCONT=3,"IP","ISP.CINGULAR"'
-#OK 'AT+CGDCONT=3,"IP","internet2.voicestream.com"'
-OK 'AT+CGDCONT=3,"IP","phone"'
+# ----------------------------------
+# Set the APN for your provider here
+# Note that a comment starting with
+# #MT AT+CGDCONT=
+# will be interpretted by
+# /usr/libexec/ppp/chat_wrapper
+# as the intended context
+# setting. Make the context number
+# (after the =) match the
+# dialer number context.
+# If the context changes, ppp/chat_wrapper
+# handles disconnecting the modem
+# from the network during the update,
+# which is required
+# by some modem firmware.
+# The chat script will be executed
+# after the ppp/chat_wrapper script
+# re-registers the modem.
+# The context will only be set if the
+# modem settings do not match the
+# settings here.
+# Lines starting with # MT are ignored.
+# ----------------------------------
+# MT AT+CGDCONT=3,"IP","proxy"
+# MT AT+CGDCONT=3,"IP","ISP.CINGULAR"
+# MT AT+CGDCONT=3,"IP","internet2.voicestream.com"
+#MT AT+CGDCONT=3,"IP","phone"
+OK 'AT+CGDCONT?'
+OK 'AT+COPS=0'
SAY "Dialing...\n"
OK 'ATD*99***3#'
SAY "Waiting for CONNECT...\n"
diff --git a/recipes-core/multitech/config/ppp/peers/lsp3 b/recipes-core/multitech/config/ppp/peers/lsp3
index 072477b..50433ab 100644
--- a/recipes-core/multitech/config/ppp/peers/lsp3
+++ b/recipes-core/multitech/config/ppp/peers/lsp3
@@ -8,4 +8,4 @@ ipcp-restart 10
noauth
crtscts
novj
-connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/lsp3_chat'
+connect '/usr/libexec/ppp/chat_wrapper /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/lsp3_chat'
diff --git a/recipes-core/multitech/config_2.1.bb b/recipes-core/multitech/config_2.1.bb
deleted file mode 100644
index ed93e64..0000000
--- a/recipes-core/multitech/config_2.1.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-DESCRIPTION = "Provides default system config files and /var/config fs"
-SECTION = "base"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
-PR = "r4"
-
-inherit update-rc.d
-
-INITSCRIPT_NAME = "config"
-INITSCRIPT_PARAMS = "start 31 S ."
-
-SRC_URI = "\
- file://network \
- file://ppp \
- file://config.init \
-"
-
-CONFIGFILES = "network ppp"
-
-fakeroot do_install () {
- cd ${WORKDIR}
-
- # default config files
- rm -f defaults.tar.gz
- chown root:root -R ${CONFIGFILES}
- tar czf defaults.tar.gz ${CONFIGFILES}
- install -d ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/defaults.tar.gz ${D}${sysconfdir}/defaults.tar.gz
-
- # save root password for resetting to defaults
- echo -n '${ROOT_PASSWORD_HASH}' > ${D}${sysconfdir}/default_pass
- chmod 400 ${D}${sysconfdir}/default_pass
-
- # init script
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/config.init ${D}${sysconfdir}/init.d/config
-}
-
-FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass"
-FILES_${PN} += "${sysconfdir}/init.d/config"
diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb
new file mode 100644
index 0000000..629cd72
--- /dev/null
+++ b/recipes-core/multitech/config_2.3.bb
@@ -0,0 +1,95 @@
+DESCRIPTION = "Provides default system config files and /var/config fs"
+SECTION = "base"
+LICENSE = "MIT"
+RDEPENDS_${PN} += "bash"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+PR = "r7"
+PACKAGES =+ "${PN}-mths"
+inherit update-rc.d
+inherit allarch
+
+INITSCRIPT_NAME = "config"
+INITSCRIPT_PARAMS = "start 31 S ."
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/config:"
+FILESEXTRAPATHS_prepend_${PN} := "${THISDIR}/mths_config:"
+
+SRC_URI = "\
+ file://network \
+ file://ppp \
+ file://config.init \
+ file://config-mths \
+ file://chat_wrapper \
+ file://chat_wrapper.default \
+ file://99_radio \
+"
+
+RDEPENDS_${PN}-mths += "${PN}"
+
+CONFFILES_${PN} += "${sysconfdir}/defaults.tar.gz"
+CONFIGFILES = "network/interfaces ppp"
+
+CONFIGFILES_MTHS = "config-mths"
+
+fakeroot do_install () {
+ cd ${WORKDIR}
+
+ # default config files
+ rm -f defaults.tar.gz
+ chown root:root -R ${CONFIGFILES}
+ tar czf defaults.tar.gz ${CONFIGFILES}
+ install -d ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/defaults.tar.gz ${D}${sysconfdir}/defaults.tar.gz
+
+ # save root password for resetting to defaults
+ echo -n '${ROOT_PASSWORD_HASH}' > ${D}${sysconfdir}/default_pass
+ chmod 400 ${D}${sysconfdir}/default_pass
+
+ # init script
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/config.init ${D}${sysconfdir}/init.d/config
+
+ # mths adjustments
+ tar -C ${CONFIGFILES_MTHS} -czf defaults-mths.tar.gz .
+ install -m 0644 ${WORKDIR}/defaults-mths.tar.gz ${D}${sysconfdir}/defaults-mths.tar.gz
+
+ install -d ${D}${sysconfdir}/default
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -d ${D}${libexecdir}/ppp
+ install -m 0755 ${WORKDIR}/chat_wrapper ${D}${libexecdir}/ppp/
+ install -m 0644 ${WORKDIR}/chat_wrapper.default ${D}${sysconfdir}/default/chat_wrapper
+ install -m 0644 ${WORKDIR}/99_radio ${D}${sysconfdir}/default/volatiles
+}
+
+FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass"
+FILES_${PN} += "${sysconfdir}/init.d/config ${sysconfdir}/default ${libexecdir}/ppp/chat_wrapper"
+FILES_${PN} += "${sysconfdir}/default/volatiles"
+
+FILES_${PN}-mths = "${sysconfdir}/defaults-mths.tar.gz"
+
+# Create the hotspot version of defaults.tar.gz
+pkg_postinst_${PN}-mths() {
+ X=$D/tmp/mths
+ mkdir -p $X
+ export X
+ (
+
+ set -x
+ if tar -tf $D${sysconfdir}/defaults.tar.gz | grep dnsmasq ; then
+ :
+ else
+ tb=$X/tarball # Tarball directory
+ mkdir $tb
+ tar -C $tb -xf $D/etc/defaults.tar.gz
+ tar -C $tb -xf $D/etc/defaults-mths.tar.gz
+ if ! grep '^auto wifi1' $tb/network/interfaces ; then
+ cat $tb/network/interfaces $tb/network/interfaces.mths >$tb/network/interfaces.new
+ mv $tb/network/interfaces $tb/network/interfaces.old
+ mv $tb/network/interfaces.new $tb/network/interfaces
+ fi
+ tar -C $tb -cf $D/etc/defaults.tar.gz .
+ fi
+ ) >$X/postinsttrace.txt 2>&1
+ # Comment out the final line for a trace.
+ rm -rf $X
+}
diff --git a/recipes-core/sysvinit/files/start_getty_open b/recipes-core/sysvinit/files/start_getty_open
new file mode 100644
index 0000000..3afce00
--- /dev/null
+++ b/recipes-core/sysvinit/files/start_getty_open
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Open console for testing
+if [ -c /dev/$2 ]
+then
+ /sbin/getty -L $1 $2 xterm -n -l /bin/bash
+fi
diff --git a/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend b/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend
index 6c79846..be33f10 100644
--- a/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend
+++ b/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend
@@ -1,2 +1,25 @@
# enable gadget serial console for supported hardware
+SUMMARY_${PN}-start-open = "Open debug console for development only"
+SUMMARY_${PN}-start = "Production console"
SERIAL_CONSOLES_append_mtcdt = " 115200;ttyGS0"
+PACKAGES =+ "${PN}-start ${PN}-start-open"
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI += "file://start_getty_open"
+
+FILES_${PN} = "${sysconfdir}/inittab"
+FILES_${PN}-start = "${base_bindir}/start_getty"
+FILES_${PN}-start-open = "${base_bindir}/start_getty_open"
+RCONFLICTS_${PN}-start = "${PN}-start-open"
+RCONFLICTS_${PN}-start-open = "${PN}-start"
+RDEPENDS_${PN}-start-open = "${PN}"
+
+do_install_append() {
+ install -m 0755 ${WORKDIR}/start_getty_open ${D}${base_bindir}/start_getty_open
+}
+pkg_postinst_${PN}-start-open() {
+ sed -i 's?^S0:.*?S0:12345:respawn:/bin/start_getty_open 115200 ttyS0?' $D/etc/inittab
+}
+
+pkg_prerm_${PN}-start-open() {
+ sed -i 's?^S0:.*?S0:12345:respawn:/bin/start_getty 115200 ttyS0?' $D/etc/inittab
+}
diff --git a/recipes-core/useradd/useradd.bb b/recipes-core/useradd/useradd.bb
index 7a026e3..29d6508 100644
--- a/recipes-core/useradd/useradd.bb
+++ b/recipes-core/useradd/useradd.bb
@@ -1,7 +1,7 @@
SUMMARY = "Add mtadm user"
DESCRIPTION = "Add mtadm user for security purposes"
SECTION = "mtadm"
-PR = "r1"
+PR = "r4"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
@@ -30,7 +30,7 @@ GROUPADD_PARAM_${PN} = "-r -g 27 sudo"
# useradd command. Multiple users can be created by separating
# the commands with a semicolon. Here we'll create two users,
# user1 and user2:
-USERADD_PARAM_${PN} = "-u 50 -G sudo,disk -m -r -s /bin/bash ${user}"
+USERADD_PARAM_${PN} = "-u 50 -G sudo,disk,dialout -m -r -s /bin/bash ${user}"
do_install () {
# If the recipe doesn't have a file, the ipk
@@ -41,8 +41,6 @@ do_install () {
chown mtadm:mtadm ${D}/${FILES_${PN}}
}
-
-
# Prevents do_package failures with:
# debugsources.list: No such file or directory:
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
@@ -55,5 +53,11 @@ pkg_postinst_${PN} () {
echo 'PATH='${Sub} >>$D/${home}/.profile
echo 'export PATH' >>$D/${home}/.profile
fi
+ # If doing an update, we need to add mtadm to dialout.
+ # If the admin has been changed, then the user must
+ # do something himself.
+ if [[ -z $D ]] ; then
+ sudo groupmems -a mtadm -g dialout || true
+ fi
}
diff --git a/recipes-extended/multitech/sms-utils_1.0.5.bb b/recipes-extended/multitech/sms-utils_1.0.6.bb
index f796b24..f796b24 100644
--- a/recipes-extended/multitech/sms-utils_1.0.5.bb
+++ b/recipes-extended/multitech/sms-utils_1.0.6.bb
diff --git a/recipes-extended/sudo/files/sudo.pam b/recipes-extended/sudo/files/sudo.pam
new file mode 100644
index 0000000..515eab0
--- /dev/null
+++ b/recipes-extended/sudo/files/sudo.pam
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth include common-auth
+account include common-account
+password include common-password
+session optional pam_keyinit.so revoke
+session required pam_limits.so
diff --git a/recipes-extended/sudo/sudo.inc b/recipes-extended/sudo/sudo.inc
new file mode 100644
index 0000000..51748b1
--- /dev/null
+++ b/recipes-extended/sudo/sudo.inc
@@ -0,0 +1,52 @@
+SUMMARY = "Provide limited super user privileges to specific users"
+DESCRIPTION = "Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments."
+HOMEPAGE = "http://www.sudo.ws"
+BUGTRACKER = "http://www.sudo.ws/bugs/"
+SECTION = "admin"
+LICENSE = "ISC & BSD & Zlib"
+LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=6c76b73603ac7763ab0516ebfbe67b42 \
+ file://plugins/sudoers/redblack.c;beginline=1;endline=46;md5=4a162fc04b86b03f5632180fe6076cda \
+ file://lib/util/reallocarray.c;beginline=3;endline=16;md5=85b0905b795d4d58bf2e00635649eec6 \
+ file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \
+ file://lib/util/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
+ file://lib/util/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \
+ file://lib/util/snprintf.c;beginline=6;endline=34;md5=c82c1b3a5c32e08545c9ec5d71e41e50 \
+ file://include/sudo_queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
+ file://lib/util/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a \
+ file://lib/util/arc4random.c;beginline=3;endline=20;md5=15bdc89c1b003fa4d7353e6296ebfd68 \
+ file://lib/util/arc4random_uniform.c;beginline=3;endline=17;md5=31e630ac814d692fd0ab7a942659b46f \
+ file://lib/util/getentropy.c;beginline=1;endline=19;md5=9f1a275ecd44cc264a2a4d5e06a75292 \
+ "
+
+inherit autotools
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+PACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel"
+
+CONFFILES_${PN} = "${sysconfdir}/sudoers"
+
+EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor"
+
+EXTRA_OECONF_append_libc-musl = " --disable-hardening "
+
+# mksigname/mksiglist are used on build host to generate source files
+do_compile_prepend () {
+ echo "JAK: Correct sudo.inc"
+ # Remove build host references from sudo_usage.h
+ sed -i \
+ -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's,--build=${BUILD_SYS},,g' \
+ -e 's,--host=${HOST_SYS},,g' \
+ ${B}/src/sudo_usage.h
+ oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}" -C lib/util mksigname mksiglist
+}
+
+# Explicitly create ${localstatedir}/lib before do_install to ensure
+# the directory is accessible by all users. Otherwise the mkinstalldirs
+# script (from sudo) will recursively create ${localstatedir}/lib/sudo
+# and then chmod each directory with 0700 permissions, which isn't what
+# we want (i.e, users would not be able to access /var/lib).
+do_install_prepend (){
+ mkdir -p ${D}/${localstatedir}/lib
+}
diff --git a/recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch b/recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch
new file mode 100644
index 0000000..eb36cd4
--- /dev/null
+++ b/recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch
@@ -0,0 +1,34 @@
+From 386e2c2fa2ab2e02ef71c268a57205139be329ab Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 31 Aug 2015 07:07:49 +0000
+Subject: [PATCH] Include sys/types.h for id_t definition
+
+/sudo_util.h:219:14: error: unknown type name 'id_t'
+ __dso_public id_t sudo_strtoid_v1(const char *str, const char *sep,
+ char **endp, const char **errstr);
+ ^
+ make[1]: *** [preserve_fds.o] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ include/sudo_util.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/sudo_util.h b/include/sudo_util.h
+index 89c9f89..ac0855a 100644
+--- a/include/sudo_util.h
++++ b/include/sudo_util.h
+@@ -17,6 +17,8 @@
+ #ifndef SUDO_UTIL_H
+ #define SUDO_UTIL_H
+
++#include <sys/types.h>
++
+ #ifdef HAVE_STDBOOL_H
+ # include <stdbool.h>
+ #else
+--
+2.5.1
+
diff --git a/recipes-extended/sudo/sudo_1.8.27.bb b/recipes-extended/sudo/sudo_1.8.27.bb
new file mode 100644
index 0000000..8f0a144
--- /dev/null
+++ b/recipes-extended/sudo/sudo_1.8.27.bb
@@ -0,0 +1,45 @@
+require sudo.inc
+
+SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://0001-Include-sys-types.h-for-id_t-definition.patch \
+ "
+
+PAM_SRC_URI = "file://sudo.pam"
+
+SRC_URI[md5sum] = "b5c184b13b6b5de32af630af2fd013fd"
+SRC_URI[sha256sum] = "7beb68b94471ef56d8a1036dbcdc09a7b58a949a68ffce48b83f837dd33e2ec0"
+
+DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
+
+EXTRA_OECONF += " \
+ ac_cv_type_rsize_t=no \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
+ "
+
+do_install_append () {
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+ install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
+ fi
+ if ${@bb.utils.contains('PACKAGECONFIG', 'pam-wheel', 'true', 'false', d)} ; then
+ echo 'auth required pam_wheel.so use_uid' >>${D}${sysconfdir}/pam.d/sudo
+ sed -i 's/# \(%wheel ALL=(ALL) ALL\)/\1/' ${D}${sysconfdir}/sudoers
+ fi
+
+ chmod 4111 ${D}${bindir}/sudo
+ chmod 0440 ${D}${sysconfdir}/sudoers
+
+ # Explicitly remove the /run directory to avoid QA error
+ rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo
+}
+
+FILES_${PN} += "${libdir}/tmpfiles.d"
+FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
+ ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
+
+
+
+
+
diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default
index 7dd5372..fa67fd1 100644
--- a/recipes-navigation/gpsd/gpsd/gpsd-default
+++ b/recipes-navigation/gpsd/gpsd/gpsd-default
@@ -52,6 +52,14 @@ GPSFIX="3"
# should not need to change the baud rate.
#
function SET_GPS_SPEED {
+if [[ $(mts-io-sysfs show hw-version) =~ ^MTHS- ]] ; then
+ if gpsctl -t 'u-blox' -D 5 -x '\x06\x41\x00\x00\x03\x1F\x90\x47\x4F\xB1\xFF\xFF\xEA\xFF' $GPS_LINE ; then
+ logger -s -t 'gpsd info' -p daemon.info "GPS LNA set high"
+ else
+ logger -s -t 'gpsd info' -p daemon.alert "ERROR: GPS LNA not set"
+ fi
+fi
+
if [[ $(cat /run/config/gpstype) == u-blox ]] ; then
# Set the baud rate. Works better with ntp at a higher baud rate.
if ! gpsctl -T 20 -t 'u-blox' -s $GPS_BAUD -b -f $GPS_LINE ; then
diff --git a/recipes-support/multitech/jsparser/Makefile b/recipes-support/multitech/jsparser/Makefile
deleted file mode 100644
index 8fe64f6..0000000
--- a/recipes-support/multitech/jsparser/Makefile
+++ /dev/null
@@ -1,69 +0,0 @@
-
-includedir ?= /usr/include
-libdir ?= /usr/lib
-
-LIBS := -lmts -ljsoncpp -lrt
-
-OBJS += \
-Version.o \
-main.o
-
-CPP_DEPS += \
-Version.d \
-main.d
-
-all: postbuild
-
-prebuild:
- @echo PRE-BUILD
- @echo 'Removing previous version components started'
- -$(RM) Version.o
- -$(RM) Version.d
- -$(RM) Version.cpp
- @echo 'Removing previous version components complete'
- @echo ' '
-
-postbuild: mainbuild
- @echo POST-BUILD
- @echo ' '
-
-mainbuild: prebuild
- @echo MAIN-BUILD
- @$(MAKE) --no-print-directory target
-
-target: $(OBJS)
- @echo 'Building target: $@'
- $(CXX) $(CFLAGS) $(LDFLAGS) -o jsparser $(OBJS) $(LIBS)
- @echo 'Finished building target: $@'
- @echo ' '
-
-Version.o: Version.cpp
- @echo 'Building file: $<'
- $(CXX) $(CFLAGS) -Iinclude -Wall -c -std=c++0x -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
- @echo 'Finished building: $<'
- @echo ' '
-
-Version.cpp:
- @echo 'Creating file: Version.cpp'
- /bin/echo -e "//Pre-Build Auto-Generated Source\n#include \"Version.h\"\n\nconst std::string Version::version(\"$(shell git describe)\");" > Version.cpp
- @echo 'Finished creating: Version.cpp'
- @echo ' '
-
-main.o: main.cpp
- @echo 'Building file: $<'
- $(CXX) $(CFLAGS) -I=$(includedir)/jsoncpp -Wall -c -std=c++0x -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
- @echo 'Finished building: $<'
- @echo ' '
-
-install:
- install -d $(DESTDIR)/usr/bin
- install -m 0755 jsparser $(DESTDIR)/usr/bin
-
-clean:
- -$(RM) $(OBJS) $(CPP_DEPS) jsparser
- -@echo ' '
-
-.PHONY: all clean dependents install target
-.SECONDARY:
-
-
diff --git a/recipes-support/multitech/libmts-io/Makefile b/recipes-support/multitech/libmts-io/Makefile
deleted file mode 100644
index dc37858..0000000
--- a/recipes-support/multitech/libmts-io/Makefile
+++ /dev/null
@@ -1,73 +0,0 @@
-include version
-
-APPNAME = libmts-io
-SONAME = $(APPNAME).so.$(VERSION)
-libdir ?= /usr/lib
-
-OBJS += \
- src/MTS_IO_TelitRadio.o \
- src/MTS_IO_EG95Radio.o \
- src/MTS_IO_QuectelRadio.o \
- src/MTS_IO_CdmaRadio.o \
- src/MTS_IO_CE910Radio.o \
- src/MTS_IO_CellularRadio.o \
- src/MTS_IO_ICellularRadio.o \
- src/MTS_IO_CellularRadioFactory.o \
- src/MTS_IO_Connection.o \
- src/MTS_IO_DE910Radio.o \
- src/MTS_IO_GE910Radio.o \
- src/MTS_IO_HE910Radio.o \
- src/MTS_IO_HE910DRadio.o \
- src/MTS_IO_HE910EUDRadio.o \
- src/MTS_IO_LE910JN1Radio.o \
- src/MTS_IO_LE866Radio.o \
- src/MTS_IO_LE866A1JSRadio.o \
- src/MTS_IO_LE910Radio.o \
- src/MTS_IO_LE910NAGRadio.o \
- src/MTS_IO_LE910C4NFRadio.o \
- src/MTS_IO_LE910NA1Radio.o \
- src/MTS_IO_LE910SVGRadio.o \
- src/MTS_IO_LE910EUGRadio.o \
- src/MTS_IO_LE910C4EURadio.o \
- src/MTS_IO_LE910EU1Radio.o \
- src/MTS_IO_LE910C1NSRadio.o \
- src/MTS_IO_LE910C1APRadio.o \
- src/MTS_IO_ME910C1NARadio.o \
- src/MTS_IO_ME910C1NVRadio.o \
- src/MTS_IO_ME910C1WWRadio.o \
- src/MTS_IO_ME910Radio.o \
- src/MTS_IO_LockFile.o \
- src/MTS_IO_MccMncTable.o \
- src/MTS_IO_SerialConnection.o
-
-CC := $(CXX)
-CXXFLAGS += -Wall -std=c++0x -fmessage-length=0 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden
-CPPFLAGS += -I=/usr/include/jsoncpp -Iinclude
-LDFLAGS += -s -shared -Wl,-soname,$(APPNAME).so.0
-
-.PHONY: all clean install
-
-all: $(APPNAME).a $(SONAME)
-
-$(APPNAME).a: $(OBJS)
- $(AR) -rs $@ $?
-
-$(SONAME): $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $+ $(LDLIBS)
-
-# Handle header dependencies
-DEPS = $(OBJS:.o=.d)
-CPPFLAGS += -MMD
--include $(DEPS)
-
-install:
- mkdir -p $(DESTDIR)$(libdir)
- mkdir -p $(DESTDIR)$(includedir)/mts
- install -m 0644 $(APPNAME).a $(SONAME) $(DESTDIR)$(libdir)/
- ln -sf $(SONAME) $(DESTDIR)$(libdir)/$(APPNAME).so.0
- ln -sf $(SONAME) $(DESTDIR)$(libdir)/$(APPNAME).so
- install -m 0644 include/mts/* $(DESTDIR)$(includedir)/mts/
-
-clean:
- $(RM) $(OBJS) $(APPNAME).a $(SONAME) $(DEPS)
-
diff --git a/recipes-support/multitech/libmts-io_1.0.18.bb b/recipes-support/multitech/libmts-io_1.0.18.bb
deleted file mode 100644
index cb788ca..0000000
--- a/recipes-support/multitech/libmts-io_1.0.18.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-DESCRIPTION = "MultiTech IO C++ Library"
-HOMEPAGE = "http://www.multitech.net/"
-LICENSE = "LGPL-2.1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS = "libmts jsoncpp cmake-native cppunit"
-BBCLASSEXTEND = "native nativesdk"
-
-PR = "r0"
-SRCREV = "${PV}"
-SRC_URI = "git://git.multitech.net/libmts-io;branch=master"
-
-S = "${WORKDIR}/git"
-
-do_compile() {
- oe_runmake
-}
-
-# build and run tests for native recipe
-do_compile_append_virtclass-native() {
- cd test
- cmake .
- oe_runmake
- ./TestRunnerClient
-}
-
-do_install() {
- oe_runmake install DESTDIR=${D}
-}
-
diff --git a/recipes-support/multitech/libmts-io_1.0.13.bb b/recipes-support/multitech/libmts-io_1.0.19.bb
index 34115be..34115be 100644
--- a/recipes-support/multitech/libmts-io_1.0.13.bb
+++ b/recipes-support/multitech/libmts-io_1.0.19.bb
diff --git a/recipes-support/multitech/radio-cmd_0.4.bb b/recipes-support/multitech/radio-cmd_0.4.bb
deleted file mode 100644
index 822f178..0000000
--- a/recipes-support/multitech/radio-cmd_0.4.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "MultiTech cellular radio command tool"
-HOMEPAGE = "http://www.multitech.net/"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
-RDEPENDS_${PN} += "jsoncpp"
-DEPENDS = "jsoncpp libmts libmts-io"
-
-PR = "r0"
-SRCREV = "${PV}"
-
-SRC_URI = "git://git.multitech.net/radio-cmd;branch=master"
-
-S = "${WORKDIR}/git"
-
-do_compile() {
- oe_runmake
-}
-
-do_install() {
- oe_runmake install DESTDIR=${D}
-}
-
diff --git a/recipes-support/multitech/radio-cmd_0.2.bb b/recipes-support/multitech/radio-cmd_0.6.bb
index b8e5b23..b8e5b23 100644
--- a/recipes-support/multitech/radio-cmd_0.2.bb
+++ b/recipes-support/multitech/radio-cmd_0.6.bb
diff --git a/recipes-support/multitech/radio-query_0.7.bb b/recipes-support/multitech/radio-query_0.8.bb
index 7ce0976..7ce0976 100644
--- a/recipes-support/multitech/radio-query_0.7.bb
+++ b/recipes-support/multitech/radio-query_0.8.bb
diff --git a/recipes-support/ntp/files/ntpd-init.patch b/recipes-support/ntp/files/ntpd-init.patch
index e3107e1..3f8129a 100644
--- a/recipes-support/ntp/files/ntpd-init.patch
+++ b/recipes-support/ntp/files/ntpd-init.patch
@@ -1,6 +1,6 @@
diff -Naru orig/ntpd new/ntpd
---- orig/ntpd 2019-03-18 10:49:41.255374972 -0500
-+++ new/ntpd 2019-03-18 11:36:56.635291031 -0500
+--- orig/ntpd 2019-12-20 15:28:43.002031942 -0600
++++ new/ntpd 2019-12-20 15:32:59.138024359 -0600
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
@@ -17,7 +17,28 @@ diff -Naru orig/ntpd new/ntpd
DAEMON=/usr/sbin/ntpd
PIDFILE=/var/run/ntpd.pid
-@@ -34,13 +36,40 @@
+@@ -22,6 +24,20 @@
+
+ # Source function library.
+ . /etc/init.d/functions
++has_gps=0
++if [[ -f /sys/devices/platform/mts-io/capability/gps ]] ; then
++ has_gps=$(cat /sys/devices/platform/mts-io/capability/gps)
++fi
++
++if (( has_gps == 0 )) ; then
++ if [[ -n ${CONFIGFILE_sha256} ]] ; then
++ NEWCONFIGFILE_sha256=$(sha256sum $CONFIGFILE)
++ if [[ $NEWCONFIGFILE_sha256 =~ $CONFIGFILE_sha256 ]] ; then
++ logger -p daemon.notice -s -t etc_ntpd "No GPS, need to configure /etc/ntp.conf"
++ exit 0
++ fi
++ fi
++fi
+
+ # Functions to do individual actions
+ settick(){
+@@ -34,13 +50,40 @@
}
}
startdaemon(){
@@ -30,7 +51,7 @@ diff -Naru orig/ntpd new/ntpd
- echo "done"
+ /usr/sbin/start-stop-daemon -N -20 --start -x /usr/sbin/ntpd --test -- -u ntp:ntp -p /var/run/ntp.pid "$@" \
+ || return 1
-+ if [[ -x /usr/sbin/gpsd_settime ]] && ((GPSD_REQUIRED == 1)) && (( $(/usr/sbin/mts-io-sysfs show capability/gps) == 1 )) && [[ -f "${GNSSRST}" ]]; then
++ if [[ -x /usr/sbin/gpsd_settime ]] && ((GPSD_REQUIRED == 1)) && (( has_gps == 1 )) && [[ -f "${GNSSRST}" ]]; then
+ . /etc/default/gpsd
+ [[ ${VERBOSE} != no ]] && logger -t 'etc_ntpd' -p daemon.info 'Have a GPS and it is required'
+ if ((SET_SYSTEM_CLOCK == 1)) && /usr/sbin/gpsd_settime ; then
@@ -65,7 +86,7 @@ diff -Naru orig/ntpd new/ntpd
}
stopdaemon(){
echo -n "Stopping ntpd: "
-@@ -50,8 +79,22 @@
+@@ -50,8 +93,22 @@
case "$1" in
start)
diff --git a/recipes-support/ntp/ntp_%.bbappend b/recipes-support/ntp/ntp_%.bbappend
index c69eff0..436164a 100644
--- a/recipes-support/ntp/ntp_%.bbappend
+++ b/recipes-support/ntp/ntp_%.bbappend
@@ -1,4 +1,4 @@
-PR .= ".mlinux5"
+PR .= ".mlinux6"
SRC_URI += " file://ntpd-default \
file://ntp.conf.patch;patchdir=.. \
@@ -23,6 +23,8 @@ do_install_append() {
touch ${drfile}
chmod 664 ${drfile}
chown -R ntp:ntp ${drdir}
+ tmp=$(sha256sum ${D}${sysconfdir}/ntp.conf | sed 's/ .*//')
+ echo "CONFIGFILE_sha256=${tmp}" >> ${D}${sysconfdir}/default/ntpd.default
}
pkg_postinst_${PN}_append() {
update-alternatives --install ${sysconfdir}/default/ntpd ntpd-defaults ${sysconfdir}/default/ntpd.default 10
diff --git a/scripts/build-feed-extras.sh b/scripts/build-feed-extras.sh
index 8a50f59..7e1d258 100755
--- a/scripts/build-feed-extras.sh
+++ b/scripts/build-feed-extras.sh
@@ -2,9 +2,9 @@
# Extra packages to build for mLinux feed
FS_PACKAGES="sshfs-fuse fuse-exfat exfat-utils"
-NET_PACKAGES="wget netcat ipsec-tools openvpn iftop dnsmasq strongswan stunnel tunctl ethtool openobex obexftp socat"
-UTIL_PACKAGES="logrotate fatrace stressapptest gawk rsyslog zip gnupg rrdtool"
-DEV_PACKAGES="strace mono gdb git vim python-pip python-pyopenssl python-pygobject openjdk-8 node-red strace python-gatt-server"
+NET_PACKAGES="wget netcat ipsec-tools openvpn iftop dnsmasq strongswan stunnel tunctl ethtool openobex obexftp socat openldap"
+UTIL_PACKAGES="logrotate fatrace stressapptest gawk rsyslog zip gnupg rrdtool i2c-tools"
+DEV_PACKAGES="strace mono gdb git vim python-pip python3-pip python-pyopenssl python-pygobject openjdk-8 node-red strace python-gatt-server"
SUP_PACKAGES="pps-tools setserial boost diffutils"
bitbake linux-firmware $FS_PACKAGES $NET_PACKAGES $UTIL_PACKAGES $DEV_PACKAGES $SUP_PACKAGES