From 531ad8e9d052432ccea10be13bea2a27b524c0e0 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 12 Nov 2018 09:27:28 -0600 Subject: Missed RS9113 factory image in rs9113 package rename --- recipes-core/images/mlinux-rs9113-factory-image.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/images/mlinux-rs9113-factory-image.bb b/recipes-core/images/mlinux-rs9113-factory-image.bb index 4abc8af..2109793 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 += "dnsmasq bluez5-noinst-tools python-dbus rs9113 " +IMAGE_INSTALL += "dnsmasq bluez5-noinst-tools python-dbus kernel-module-rs9113 rs9113-noarch rs9113-util" -- cgit v1.2.3 From b459a3553a559f65f40e2fec2e5b0120dbf2741b Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 14 Nov 2018 19:01:51 -0600 Subject: Allow negotiation for IPV6 in PPP --- recipes-core/multitech/config/ppp/options | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes-core/multitech/config/ppp/options b/recipes-core/multitech/config/ppp/options index 34654c1..3b69f47 100644 --- a/recipes-core/multitech/config/ppp/options +++ b/recipes-core/multitech/config/ppp/options @@ -20,3 +20,8 @@ logfile /dev/null lock +# Sprint modems in some cases require IPV6 to use IPV4. +# It probably doesn't hurt to try to get IPV6, even +# if the carrier doesn't support it. ++ipv6 +ipv6cp-use-ipaddr -- cgit v1.2.3 From bacff4f9a4a233f6215b6e685dd17fbccd5cda6c Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 19 Nov 2018 13:33:44 -0600 Subject: Add configfs for device tree overlay --- recipes-core/base-files/base-files/mlinux/fstab | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-core/base-files/base-files/mlinux/fstab b/recipes-core/base-files/base-files/mlinux/fstab index 01b5f38..8922faf 100644 --- a/recipes-core/base-files/base-files/mlinux/fstab +++ b/recipes-core/base-files/base-files/mlinux/fstab @@ -4,6 +4,7 @@ devpts /dev/pts devpts mode=0620,gid=5 0 0 usbdevfs /proc/bus/usb usbdevfs noauto 0 0 tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0 tmpfs /var/volatile tmpfs defaults 0 0 +configfs /sys/kernel/config configfs defaults 0 0 /dev/mtdblock6 /var/config jffs2 defaults 0 0 /dev/mtdblock7 /var/oem jffs2 defaults,ro 0 0 -- cgit v1.2.3 From e53d85df4589161ae42e85ef67f0c4e822a09026 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 18 Dec 2018 18:43:50 -0600 Subject: Add an MTR image recipe --- recipes-core/images/mlinux-mtr-image.bb | 68 +++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 recipes-core/images/mlinux-mtr-image.bb diff --git a/recipes-core/images/mlinux-mtr-image.bb b/recipes-core/images/mlinux-mtr-image.bb new file mode 100644 index 0000000..d791809 --- /dev/null +++ b/recipes-core/images/mlinux-mtr-image.bb @@ -0,0 +1,68 @@ +# Conduit 0.0 or 0.1 without RS9113 +DESCRIPTION = "mLinux base image" +LICENSE = "MIT" + +require mlinux-minimal-image.bb +MULTITECH_MTAC = "" + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES += "bridge-utils \ + inetutils-ftp \ + openssl \ + rsync \ + iperf \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +WIFI_FEATURES = " \ + libnl \ + wpa-supplicant \ + wireless-tools \ + iw \ + hostap-daemon hostap-utils \ + " + +BLUETOOTH_FEATURES = "bluez5" + +# 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" + +# Extra stuff to install +IMAGE_INSTALL += " \ + ${WIFI_FEATURES} \ + ${BLUETOOTH_FEATURES} \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + " -- cgit v1.2.3 From ee3b097f04efc421c3198e7985bb0b61acf3cdc8 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 20 Dec 2018 13:46:46 -0600 Subject: Remove mtac for now --- recipes-core/images/mlinux-minimal-image.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes-core/images/mlinux-minimal-image.bb b/recipes-core/images/mlinux-minimal-image.bb index 12ce401..241f1d9 100644 --- a/recipes-core/images/mlinux-minimal-image.bb +++ b/recipes-core/images/mlinux-minimal-image.bb @@ -46,7 +46,8 @@ MULTITECH_FEATURES = "kernel-module-mts-io \ set-rs485 \ radio-reset" -MULTITECH_MTAC = "kernel-module-mtac \ + +MULTITECH_MTAC_NOTREADY = "kernel-module-mtac \ kernel-module-mtac-eth \ kernel-module-mtac-gpiob \ kernel-module-mtac-lora \ @@ -54,6 +55,8 @@ MULTITECH_MTAC = "kernel-module-mtac \ kernel-module-mtac-pulse \ kernel-module-mtac-xdot" +MULTITECH_MTAC = "" + UPGRADE_FEATURES = "upgrade-reboot mtd-utils-static" IMAGE_INSTALL = "${CORE_FEATURES} \ -- cgit v1.2.3 From 1481ac00890bea8b4eb614d8c344e005501e3274 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 20 Dec 2018 13:49:47 -0600 Subject: Add a rulefile for mtrv1 --- recipes-core/udev/eudev/mtrv1/mtrv1.rules | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 recipes-core/udev/eudev/mtrv1/mtrv1.rules diff --git a/recipes-core/udev/eudev/mtrv1/mtrv1.rules b/recipes-core/udev/eudev/mtrv1/mtrv1.rules new file mode 100644 index 0000000..5d528e6 --- /dev/null +++ b/recipes-core/udev/eudev/mtrv1/mtrv1.rules @@ -0,0 +1,14 @@ +ACTION=="remove", GOTO="mlinux_end" +SUBSYSTEM!="tty", GOTO="mlinux_end" +KERNEL!="ttyXRUSB[0-9]*", GOTO="mlinux_end" + +SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" +ENV{ID_IFACE}=="", GOTO="mlinux_end" + +# Accessory Ports +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" + +LABEL="mlinux_end" -- cgit v1.2.3 From dca3935c32746b16dfd1b93b3ca0e963942b1954 Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Tue, 4 Dec 2018 16:23:41 -0600 Subject: Updated lpf package --- recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb | 6 +++--- .../lora/lora-packet-forwarder-geolocation_5.1.0.bb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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 6bd8110..424ea43 100644 --- a/recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb +++ b/recipes-connectivity/lora/lora-gateway-geolocation_5.1.0.bb @@ -6,7 +6,7 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://mlinux4/LICENSE.TXT;md5=86776875df1423114abfcec938f3e565" DEPENDS = "" # Source revision -PSR = "r2" +PSR = "r3" # Recipe revision PR = "r5" SRCREV = "v${PV}" @@ -16,8 +16,8 @@ SRC_URI = "http://multitech.net/downloads/lora-packet-forwarder-geolocation_arm9 file://config_64ch.json \ " -SRC_URI[md5sum] = "0b9b49db3cebfa25200911dde1f17d4c" -SRC_URI[sha256sum] = "e57c1b05ffdea8b3f26841424f010c0e30b7feaec1c5dd692548f0837052c6af" +SRC_URI[md5sum] = "70cce8e2c7a790d68aebe66e93302ee6" +SRC_URI[sha256sum] = "6e09e265bb22a5370bbfb8e80b9aac5e1b7bd2b5f867e55eddea6cb2685a72b4" S = "${WORKDIR}" 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 cf16007..6f70d05 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,7 +7,7 @@ LIC_FILES_CHKSUM = "file://mlinux4/LICENSE.TXT;md5=86776875df1423114abfcec938f3e DEPENDS ?= "lora-gateway-geolocation logrotate lora-logging" RDEPENDS_${PN} += "bash" # Source revision -PSR = "r2" +PSR = "r3" # Recipe revision PR = "r4" @@ -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] = "0b9b49db3cebfa25200911dde1f17d4c" -SRC_URI[sha256sum] = "e57c1b05ffdea8b3f26841424f010c0e30b7feaec1c5dd692548f0837052c6af" +SRC_URI[md5sum] = "70cce8e2c7a790d68aebe66e93302ee6" +SRC_URI[sha256sum] = "6e09e265bb22a5370bbfb8e80b9aac5e1b7bd2b5f867e55eddea6cb2685a72b4" S = "${WORKDIR}" B = "${S}" -- cgit v1.2.3 From 19d1ba11ba20705b3edb3bf797b6335b393cef98 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 11 Dec 2018 16:31:31 -0600 Subject: 5.1.0r3 LPF, Allow IPV6 in PPP by default, build issue with rs9113 image recipes --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 33238b9..d340bdb 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "4.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.1" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From c260c52ba659a14e9efbe7724eec16c866e71b6a Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 11 Dec 2018 18:38:13 -0600 Subject: Bump the package version for the new Russian Channel Plan --- recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6f70d05..34a18a1 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 @@ -9,7 +9,7 @@ RDEPENDS_${PN} += "bash" # Source revision PSR = "r3" # Recipe revision -PR = "r4" +PR = "r5" SRCREV = "v${PV}" -- cgit v1.2.3 From e38b0a5ce26d400f47d0d2012a137d5564e5e5a8 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 12 Dec 2018 09:40:20 -0600 Subject: PPP now allows IPV6, bump revision --- recipes-core/multitech/config_2.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/multitech/config_2.1.bb b/recipes-core/multitech/config_2.1.bb index a7dbed7..f21c009 100644 --- a/recipes-core/multitech/config_2.1.bb +++ b/recipes-core/multitech/config_2.1.bb @@ -2,7 +2,7 @@ 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 = "r2" +PR = "r3" inherit update-rc.d -- cgit v1.2.3 From 2d1077a105c311f8235fb6670562eb8180d084ee Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 20 Dec 2018 10:03:29 -0600 Subject: Use /dev/gps0 for all gps devices --- recipes-navigation/gpsd/gpsd/gpsd-default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index da697bc..98f998b 100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -3,7 +3,7 @@ GPSD_SOCKET="/var/run/gpsd.sock" GPSD_OPTIONS="-n -D 1" # Conduit 0.1 GPS devices -GPS_LINE=/dev/ttyXRUSB2 +GPS_LINE=/dev/gps0 # Highest speed permitted by uBlox. GPS_BAUD=115200 -- cgit v1.2.3 From 9d729757d4e1a0aaa821ee38237f3ab07b70a3a6 Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Mon, 31 Dec 2018 17:00:04 -0600 Subject: Added 2.1 and dual card support to lns init script --- .../lora-network-server/lora-network-server.init | 195 +++++++++++++++------ 1 file changed, 141 insertions(+), 54 deletions(-) diff --git a/recipes-connectivity/lora/lora-network-server/lora-network-server.init b/recipes-connectivity/lora/lora-network-server/lora-network-server.init index a55be0b..88ea271 100755 --- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init +++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init @@ -13,29 +13,41 @@ run_dir=/var/run/lora conf_dir=/var/config/lora conf_file=$conf_dir/lora-network-server.conf - net_server=/opt/lora/lora-network-server net_server_log=/var/log/lora-network-server.log net_server_pidfile=$run_dir/$NAME.pid - pkt_fwd=$run_dir/1/lora_pkt_fwd pkt_fwd_log=/var/log/lora-pkt-fwd-1.log pkt_fwd_pidfile=$run_dir/lora-pkt-fwd-1.pid +pkt_fwd_2=$run_dir/2/lora_pkt_fwd +pkt_fwd_2_log=/var/log/lora-pkt-fwd-2.log +pkt_fwd_2_pidfile=$run_dir/lora-pkt-fwd-2.pid port1=/sys/devices/platform/mts-io/ap1 port2=/sys/devices/platform/mts-io/ap2 - -lora_mtac_id="MTAC-LORA" lora_1_0_hw="MTAC-LORA-1.0" lora_1_5_h_hw="MTAC-LORA-1.5" +lora_2_1_hw="MTAC-LORA-2.1" + +lora_mtac_id="MTAC-LORA" lora_mtcap_id="MTCAP-LORA" lora_mtcap_id868="MTCAP-LORA-868" lora_mtcap_id915="MTCAP-LORA-915" +lora_mtac_g_id="MTAC-LORA-G" +lora_mtac_g16_id868="MTAC-LORA-G16-868" +lora_mtac_g16_id915="MTAC-LORA-G16-915" +lora_mtac_g64_id868="MTAC-LORA-G64-868" +lora_mtac_g64_id915="MTAC-LORA-G64-915" + +pkt_fwd_options="" +dual_cards_installed=false +gps_path="/dev/gps0" + read_lora_hw_info() { # product-id of first lora card lora_id=$(mts-io-sysfs show lora/product-id 2> /dev/null) @@ -43,62 +55,112 @@ read_lora_hw_info() { # remove all colons lora_eui_raw=${lora_eui//:} lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null) -} + if [ -d $port2 ] && [[ $(cat $port2/hw-version) =~ "LORA-1.5" ]]; then + # product-id of first lora card + lora_2_id=$(mts-io-sysfs show lora-2/product-id 2> /dev/null) + lora_2_hw=$(mts-io-sysfs show lora-2/hw-version 2> /dev/null) + lora_2_eui=$(mts-io-sysfs show lora-2/eui 2> /dev/null) + # remove all colons + lora_2_eui_raw=${lora_2_eui//:} + fi + if [ -d $port1 ] && [[ $(cat $port1/hw-version) =~ "LORA-1.5" ]] && [ -d $port2 ] && [[ $(cat $port2/hw-version) =~ "LORA-1.5" ]]; then + dual_cards_installed=true + fi +} hardware_found() { - # MTCDT only + if [[ "$lora_id" =~ "$lora_mtac_g_id" ]]; then + setup_mtcdt_2_1 + elif [[ "$lora_id" =~ "$lora_mtac_id" ]]; then + setup_mtcdt + elif [[ "$lora_id" =~ "$lora_mtcap_id" ]]; then + setup_mtcap + else + return 1 + fi +} + +setup_mtcdt_2_1() { + ln -sf /dev/spidev32766.2 /dev/spidev0.0 + + if [[ "$lora_id" = "$lora_mtac_g16_id868" ]]; then + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_2_1_loc_single_antenna_16ch_EU868 + elif [[ "$lora_id" = "$lora_mtac_g16_id915" ]]; then + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_2_1_loc_single_antenna_16ch_US915 + elif [[ "$lora_id" = "$lora_mtac_g16_id868" ]]; then + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_2_1_test_single_antenna_64ch_8x8_EU868 + elif [[ "$lora_id" = "$lora_mtac_g64_id915" ]]; then + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_2_1_loc_single_antenna_64ch_US915 + else + return 1 + fi + + set +e + diff $GLOBAL_CONF /opt/lora/global_conf.json 1>/dev/null + if [ $? -ne 0 ]; then + cp $GLOBAL_CONF /opt/lora/global_conf.json + fi + set -e + + ln -sf /opt/lora/pkt_forwarder $pkt_fwd + + pkt_fwd_options=" -g" +} + +setup_mtcdt() { if [ -d $port1 ] && [[ $(cat $port1/hw-version) = $lora_hw ]]; then ln -sf /dev/spidev32766.2 /dev/spidev0.0 elif [ -d $port2 ] && [[ $(cat $port2/hw-version) = $lora_hw ]]; then ln -sf /dev/spidev32765.2 /dev/spidev0.0 fi - - if [[ "$lora_id" =~ "$lora_mtac_id" ]]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_0 - if [ "$lora_hw" = "$lora_1_0_hw" ] && [[ ! "$lora_id" =~ .*-SPI ]]; then - ln -sf /opt/lora/basic_pkt_fwd-usb $pkt_fwd - else - if [ "$lora_hw" = "$lora_1_5_h_hw" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_5 - fi - ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd - fi - - diff $GLOBAL_CONF /opt/lora/global_conf.json &> /dev/null - if [ $? -ne 0 ]; then - cp $GLOBAL_CONF /opt/lora/global_conf.json - fi - - return 0 - elif [[ "$lora_id" =~ "$lora_mtcap_id" ]]; then - if [ "$lora_id" = "$lora_mtcap_id868" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.EU868 - elif [ "$lora_id" = "$lora_mtcap_id915" ]; then - GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.US915 - else - return 1 + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_0 + if [ "$lora_hw" = "$lora_1_0_hw" ] && [[ ! "$lora_id" =~ .*-SPI ]]; then + ln -sf /opt/lora/basic_pkt_fwd-usb $pkt_fwd + else + if [ "$lora_hw" = "$lora_1_5_h_hw" ]; then + GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_5 fi - ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd + ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd_2 + fi - diff $GLOBAL_CONF /opt/lora/global_conf.json &> /dev/null - if [ $? -ne 0 ]; then - cp $GLOBAL_CONF /opt/lora/global_conf.json - fi + # ignore error of diff command + set +e + diff $GLOBAL_CONF /opt/lora/global_conf.json 1>/dev/null + if [ $? -ne 0 ]; then + cp $GLOBAL_CONF /opt/lora/global_conf.json + fi + set -e + + return 0 +} - return 0 +setup_mtcap() { + if [ "$lora_id" = "$lora_mtcap_id868" ]; then + GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.EU868 + elif [ "$lora_id" = "$lora_mtcap_id915" ]; then + GLOBAL_CONF=/opt/lora/global_conf.json.MTCAP_LORA_1_5.US915 else - echo Lora hardware not detected return 1 fi -} + ln -sf /opt/lora/lora_pkt_fwd $pkt_fwd + + set +e + diff $GLOBAL_CONF /opt/lora/global_conf.json 1>/dev/null + if [ $? -ne 0 ]; then + cp $GLOBAL_CONF /opt/lora/global_conf.json + fi + set -e + + return 0 +} do_start() { # create run directory mkdir -p $run_dir/1 - rm -rf $run_dir/1/* + mkdir -p $run_dir/2 read_lora_hw_info @@ -109,23 +171,51 @@ do_start() { if hardware_found; then echo "Found $lora_id with $lora_hw hardware" + mts-io-sysfs store lora/reset 0 + if [ "$dual_cards_installed" == true ]; then + mts-io-sysfs store lora-2/reset 0 + fi + sleep 0.25 + mts-io-sysfs store lora/reset 1 + if [ "$dual_cards_installed" == true ]; then + mts-io-sysfs store lora-2/reset 1 + fi + sleep 0.25 else echo "$0: Lora hardware not detected" - exit 1 + # Use MAC Address for lora eui + lora_eui=$(mts-io-sysfs show mac-eth) + lora_eui=${lora_eui:0:8}":FF:FF"${lora_eui:8:16} + lora_hw=$lora_mtcap_id915 + lora_id=$lora_1_5_h_hw + no_lora_hw=true fi + + if [ "$dual_cards_installed" == "true" ]; then + lora_2_args="--lora-hw-2 $lora_2_hw --lora-prod-2 $lora_2_id --lora-eui-2 $lora_2_eui" + fi + echo -n "Starting $NAME: " # start network server - start-stop-daemon --start --background --make-pidfile \ - --pidfile $net_server_pidfile --startas /bin/bash -- -c "exec $net_server \ - -c $conf_file --lora-eui $lora_eui --lora-prod-1 $lora_id --lora-hw-1 $lora_hw \ + start-stop-daemon --start --background --make-pidfile \ + --pidfile $net_server_pidfile --startas /bin/bash -- -c "exec $angel $net_server \ + -c $conf_file --lora-eui $lora_eui --lora-hw-1 $lora_hw --lora-prod-1 $lora_id $lora_2_args \ --lora-path $run_dir \ - --noconsole -l $net_server_log >> $net_server_log 2>&1" - - sleep 4 - - # start packet forwarder - /usr/sbin/start-stop-daemon --chdir $run_dir/1 --background --start --make-pidfile \ - --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "exec $pkt_fwd " + --noconsole 2>&1" + + if [ "$no_lora_hw" != "true" ]; then + # start packet forwarder + sleep 2 + /usr/sbin/start-stop-daemon --chdir $run_dir/1 --start --background --make-pidfile \ + --pidfile $pkt_fwd_pidfile --startas /bin/bash \ + -- -c "exec $angel $pkt_fwd $pkt_fwd_options 2>&1 >> $pkt_fwd_log" + + if [ "$dual_cards_installed" == "true" ]; then + /usr/sbin/start-stop-daemon --chdir $run_dir/2 --start --background --make-pidfile \ + --pidfile $pkt_fwd_2_pidfile --startas /bin/bash \ + -- -c "exec $angel $pkt_fwd_2 $pkt_fwd_options 2>&1 >> $pkt_fwd_2_log" + fi + fi renice -n -20 -p $(pgrep lora-network-se) renice -n -20 -p $(pgrep $(basename $pkt_fwd)) @@ -163,9 +253,6 @@ function try_lock() { fi } - - - case "$1" in "start") try_lock -- cgit v1.2.3 From 12bdc2fb352839d00ea64a7bacf732deb18451af Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 3 Jan 2019 09:56:50 -0600 Subject: Fix BB_DONT_CACHE name, because the name changed in Open Embedded --- recipes-core/mlinux/mlinux-version.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/mlinux/mlinux-version.bb b/recipes-core/mlinux/mlinux-version.bb index f2debe1..85adfbb 100644 --- a/recipes-core/mlinux/mlinux-version.bb +++ b/recipes-core/mlinux/mlinux-version.bb @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda inherit mlinux_metadata_scm # always parse this file so PV can change automatically -__BB_DONT_CACHE = "1" +BB_DONT_CACHE = "1" PV = "${DISTRO_VERSION}_${MLINUX_METADATA_REVISION}" PR = "r2" -- cgit v1.2.3 From 75c999bd3ba33b2bce41a6364da0e0cc8f59d6e3 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 3 Jan 2019 10:49:27 -0600 Subject: Add nmea interval setup to venux-gps utility. --- .../multitech/venus-gps/fix_nmea_intervals.patch | 79 ++++++++++++++++++++++ recipes-extended/multitech/venus-gps_0.1.0.bb | 6 +- 2 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch diff --git a/recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch b/recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch new file mode 100644 index 0000000..41ce262 --- /dev/null +++ b/recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch @@ -0,0 +1,79 @@ +From 35e865bbe72085260bd48fdc65eba0887fe32360 Mon Sep 17 00:00:00 2001 +From: Serhii Voloshynov +Date: Thu, 3 Jan 2019 09:32:41 +0200 +Subject: [PATCH] fix setting of NMEA sentences intervals, add --quit parameter + +--- + src/venus_gps.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/src/venus_gps.c b/src/venus_gps.c +index 77c7e73..2f6bf44 100644 +--- a/src/venus_gps.c ++++ b/src/venus_gps.c +@@ -788,6 +788,8 @@ static void usage(FILE * out) + fprintf(out, " --gpzda 0-255 (default: 1) |\n"); + #endif + fprintf(out, " --gpvtg 0-255 (default: 1)\n"); ++ fprintf(out, "\n"); ++ fprintf(out, " --quit \n"); + fprintf(out, " }\n"); + fprintf(out, "\n"); + } +@@ -819,6 +821,7 @@ enum { + OPT_SERIAL_CLIENT, + OPT_ID_PREFIX, + OPT_ID, ++ OPT_QUIT + }; + + static char *short_options = "b:d:p:f"; +@@ -852,6 +855,7 @@ static struct option long_options[] = { + {"longitude", 1, 0, OPT_LONGITUDE}, + {"altitude", 1, 0, OPT_ALTITUDE}, + #endif ++ {"quit", 0, 0, OPT_QUIT}, + {"version", 0, NULL, OPT_VERSION}, + {"help", 0, NULL, OPT_HELP}, + {0, 0, 0, 0}, +@@ -864,6 +868,7 @@ int main(int argc, char *argv[]) + char *cp; + int option_index; + int tty; ++ int quit =0; + struct venus_msg msg; + + struct socket_client_args *sc; +@@ -883,6 +888,10 @@ int main(int argc, char *argv[]) + daemonize = 1; + break; + ++ case OPT_QUIT: ++ quit = 1; ++ break; ++ + case OPT_DEVICE: + device = optarg; + break; +@@ -1145,7 +1154,7 @@ int main(int argc, char *argv[]) + } + #endif + +- tmp = venus_conf_nmea(tty, 1, 1, 1, 1, 1, 1, 0, UPDATE_ATTR_SRAM); ++ tmp = venus_conf_nmea(tty, gpgga, gpgsa, gpgsv, gpgll, gprmc, gpvtg, 0, UPDATE_ATTR_SRAM); + if (tmp < 0) { + log_error("failed to configure nmea sentences"); + exit(1); +@@ -1158,6 +1167,9 @@ int main(int argc, char *argv[]) + } + + venus_close(tty); ++ if (quit) { ++ exit(0); ++ } + + sigset_t sigset; + sigemptyset(&sigset); +-- +2.7.4 + diff --git a/recipes-extended/multitech/venus-gps_0.1.0.bb b/recipes-extended/multitech/venus-gps_0.1.0.bb index a518297..55d7325 100644 --- a/recipes-extended/multitech/venus-gps_0.1.0.bb +++ b/recipes-extended/multitech/venus-gps_0.1.0.bb @@ -4,9 +4,11 @@ SECTION = "console/network" PRIORITY = "optional" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -PR = "r0" +PR = "r1" -SRC_URI = "git://git.multitech.net/venus-gps.git;protocol=git;tag=${PV}" +SRC_URI = "git://git.multitech.net/venus-gps.git;protocol=git;tag=${PV} \ + file://fix_nmea_intervals.patch \ + " S = "${WORKDIR}/git" inherit autotools -- cgit v1.2.3 From ca1ecd38c483b193cc722124d94b0d44067b6f58 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 3 Jan 2019 17:50:18 -0600 Subject: Fix mtrv1.rules for mtrv1 udev --- recipes-core/udev/eudev/mtrv1/mtrv1.rules | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes-core/udev/eudev/mtrv1/mtrv1.rules b/recipes-core/udev/eudev/mtrv1/mtrv1.rules index 5d528e6..239a846 100644 --- a/recipes-core/udev/eudev/mtrv1/mtrv1.rules +++ b/recipes-core/udev/eudev/mtrv1/mtrv1.rules @@ -1,14 +1,13 @@ ACTION=="remove", GOTO="mlinux_end" SUBSYSTEM!="tty", GOTO="mlinux_end" -KERNEL!="ttyXRUSB[0-9]*", GOTO="mlinux_end" +KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*|ttyXRUSB[0-9]*|ttyS*", GOTO="mlinux_end" SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" ENV{ID_IFACE}=="", GOTO="mlinux_end" -# Accessory Ports -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" +# mtr revA: bluetooth on exar chip (ACM0, iface 0) +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="bt" +# mtr revA: external serial on exar chip (ACM1, iface 2) +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ext_serial" LABEL="mlinux_end" -- cgit v1.2.3 From 797c9a7ac7b6ba4686b199298434aebd6eb08ca4 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 4 Jan 2019 15:10:22 -0600 Subject: Bumped the Level of mLinux to 5 --- conf/distro/mlinux.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index d340bdb..f9e197f 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" -DISTRO_BASE_VERSION = "4.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.1" +DISTRO_BASE_VERSION = "5.0" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev1" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 07bd3bc8fc173962abd5cae8f03f4ebe7da5f68a Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 4 Jan 2019 15:26:40 -0600 Subject: Rename the mtrv1 recipe to match what it creates --- recipes-core/images/mlinux-mtr-image.bb | 68 ------------------------------- recipes-core/images/mlinux-mtrv1-image.bb | 68 +++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 68 deletions(-) delete mode 100644 recipes-core/images/mlinux-mtr-image.bb create mode 100644 recipes-core/images/mlinux-mtrv1-image.bb diff --git a/recipes-core/images/mlinux-mtr-image.bb b/recipes-core/images/mlinux-mtr-image.bb deleted file mode 100644 index d791809..0000000 --- a/recipes-core/images/mlinux-mtr-image.bb +++ /dev/null @@ -1,68 +0,0 @@ -# Conduit 0.0 or 0.1 without RS9113 -DESCRIPTION = "mLinux base image" -LICENSE = "MIT" - -require mlinux-minimal-image.bb -MULTITECH_MTAC = "" - -FILESYSTEM_FEATURES = "dosfstools \ - cifs-utils \ - lsof \ - " - -NETWORKING_FEATURES += "bridge-utils \ - inetutils-ftp \ - openssl \ - rsync \ - iperf \ - mii-diag \ - tcpdump \ - netcat \ - wget \ - strongswan \ - busybox-ifplugd \ - " - -WIFI_FEATURES = " \ - libnl \ - wpa-supplicant \ - wireless-tools \ - iw \ - hostap-daemon hostap-utils \ - " - -BLUETOOTH_FEATURES = "bluez5" - -# 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" - -# Extra stuff to install -IMAGE_INSTALL += " \ - ${WIFI_FEATURES} \ - ${BLUETOOTH_FEATURES} \ - ${FILESYSTEM_FEATURES} \ - ${TIME_FEATURES} \ - ${MISC_FEATURES} \ - " diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb new file mode 100644 index 0000000..d791809 --- /dev/null +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -0,0 +1,68 @@ +# Conduit 0.0 or 0.1 without RS9113 +DESCRIPTION = "mLinux base image" +LICENSE = "MIT" + +require mlinux-minimal-image.bb +MULTITECH_MTAC = "" + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES += "bridge-utils \ + inetutils-ftp \ + openssl \ + rsync \ + iperf \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +WIFI_FEATURES = " \ + libnl \ + wpa-supplicant \ + wireless-tools \ + iw \ + hostap-daemon hostap-utils \ + " + +BLUETOOTH_FEATURES = "bluez5" + +# 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" + +# Extra stuff to install +IMAGE_INSTALL += " \ + ${WIFI_FEATURES} \ + ${BLUETOOTH_FEATURES} \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + " -- cgit v1.2.3 From 9e83b2bc9c6745cc4d1d570b58008dc5b007e316 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 7 Jan 2019 15:44:55 -0600 Subject: Set name of EXAR devices to ttyXRUSB* --- recipes-core/udev/eudev/mtcdt/mtcdt.rules | 11 +++++++---- recipes-core/udev/eudev/mtrv1/mtrv1.rules | 5 +++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/recipes-core/udev/eudev/mtcdt/mtcdt.rules b/recipes-core/udev/eudev/mtcdt/mtcdt.rules index 5d528e6..0066f3b 100644 --- a/recipes-core/udev/eudev/mtcdt/mtcdt.rules +++ b/recipes-core/udev/eudev/mtcdt/mtcdt.rules @@ -6,9 +6,12 @@ SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" ENV{ID_IFACE}=="", GOTO="mlinux_end" # Accessory Ports -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" +# ttyXRUSB is Vizzini driver name, for compatiblity. +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1", NAME="ttyXRUSB0" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1", NAME="ttyXRUSB0" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2", NAME="ttyXRUSB1" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2", NAME="ttyXRUSB1" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="04", NAME="ttyXRUSB2" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="06", NAME="ttyXRUSB3" LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtrv1/mtrv1.rules b/recipes-core/udev/eudev/mtrv1/mtrv1.rules index 239a846..0ca31f9 100644 --- a/recipes-core/udev/eudev/mtrv1/mtrv1.rules +++ b/recipes-core/udev/eudev/mtrv1/mtrv1.rules @@ -6,8 +6,9 @@ SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" ENV{ID_IFACE}=="", GOTO="mlinux_end" # mtr revA: bluetooth on exar chip (ACM0, iface 0) -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="bt" +# ttyXRUSB is Vizzini driver name, for compatiblity. +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", NAME="ttyXRUSB0", SYMLINK+="bt" # mtr revA: external serial on exar chip (ACM1, iface 2) -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ext_serial" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", NAME="ttyXRUSB1", SYMLINK+="ext_serial" LABEL="mlinux_end" -- cgit v1.2.3 From 8442d3472ca69426eff6439fe41f95db24b84419 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 7 Jan 2019 17:36:30 -0600 Subject: Bump dev relase number --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index f9e197f..aebf100 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev1" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev2" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 9f4ed4ca90622ad8c615777b8687ab768dab580d Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 8 Jan 2019 12:35:51 -0600 Subject: Kernel is inconsistent in applying NAME changes, so use SYMLINKS --- recipes-core/udev/eudev/mtcdt/mtcdt.rules | 12 ++++++------ recipes-core/udev/eudev/mtrv1/mtrv1.rules | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/recipes-core/udev/eudev/mtcdt/mtcdt.rules b/recipes-core/udev/eudev/mtcdt/mtcdt.rules index 0066f3b..d7ff3e1 100644 --- a/recipes-core/udev/eudev/mtcdt/mtcdt.rules +++ b/recipes-core/udev/eudev/mtcdt/mtcdt.rules @@ -7,11 +7,11 @@ ENV{ID_IFACE}=="", GOTO="mlinux_end" # Accessory Ports # ttyXRUSB is Vizzini driver name, for compatiblity. -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1", NAME="ttyXRUSB0" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1", NAME="ttyXRUSB0" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2", NAME="ttyXRUSB1" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2", NAME="ttyXRUSB1" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="04", NAME="ttyXRUSB2" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="06", NAME="ttyXRUSB3" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyXRUSB0", SYMLINK+="ttyAP1" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyXRUSB0", SYMLINK+="ttyAP1" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyXRUSB1", SYMLINK+="ttyAP2" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="02", SYMLINK+="ttyXRUSB1", SYMLINK+="ttyAP2" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="04", SYMLINK+="ttyXRUSB2" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="06", SYMLINK+="ttyXRUSB3" LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtrv1/mtrv1.rules b/recipes-core/udev/eudev/mtrv1/mtrv1.rules index 0ca31f9..7dc5479 100644 --- a/recipes-core/udev/eudev/mtrv1/mtrv1.rules +++ b/recipes-core/udev/eudev/mtrv1/mtrv1.rules @@ -7,8 +7,8 @@ ENV{ID_IFACE}=="", GOTO="mlinux_end" # mtr revA: bluetooth on exar chip (ACM0, iface 0) # ttyXRUSB is Vizzini driver name, for compatiblity. -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", NAME="ttyXRUSB0", SYMLINK+="bt" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyXRUSB0", SYMLINK+="bt" # mtr revA: external serial on exar chip (ACM1, iface 2) -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", NAME="ttyXRUSB1", SYMLINK+="ext_serial" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyXRUSB1", SYMLINK+="ext_serial" LABEL="mlinux_end" -- cgit v1.2.3 From 1ed245621f0df6b58fd285730951c73f2329f313 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 8 Jan 2019 13:31:25 -0600 Subject: Bump the level of eudev --- recipes-core/udev/eudev_%.bbappend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/udev/eudev_%.bbappend b/recipes-core/udev/eudev_%.bbappend index 5b9c16c..cde2f10 100644 --- a/recipes-core/udev/eudev_%.bbappend +++ b/recipes-core/udev/eudev_%.bbappend @@ -1,6 +1,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" -PR .= ".mlinux3" +PR .= ".mlinux4" # add custom rules for persistent modem device names SRC_URI += " file://cellular_radios.rules \ -- cgit v1.2.3 From 9f721011fd95701a76ee32a67e6f96e593e147a0 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 8 Jan 2019 16:37:35 -0600 Subject: Bump the mLinux version to dev3 (mtrv1 only). --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index aebf100..d3f7581 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev2" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev3" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From b7fab6c27436df37abf3f61fa2b3819ba67d939c Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 8 Jan 2019 17:47:05 -0600 Subject: Bluetooth is not /dev/TTYXRUSB0 on mtrv1 --- recipes-core/udev/eudev/mtrv1/mtrv1.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/udev/eudev/mtrv1/mtrv1.rules b/recipes-core/udev/eudev/mtrv1/mtrv1.rules index 7dc5479..620c77a 100644 --- a/recipes-core/udev/eudev/mtrv1/mtrv1.rules +++ b/recipes-core/udev/eudev/mtrv1/mtrv1.rules @@ -7,7 +7,7 @@ ENV{ID_IFACE}=="", GOTO="mlinux_end" # mtr revA: bluetooth on exar chip (ACM0, iface 0) # ttyXRUSB is Vizzini driver name, for compatiblity. -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyXRUSB0", SYMLINK+="bt" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyXRUSB0" # mtr revA: external serial on exar chip (ACM1, iface 2) ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyXRUSB1", SYMLINK+="ext_serial" -- cgit v1.2.3 From c8d025553a5f0995dea1ab105d94a2687e3ab645 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 8 Jan 2019 17:54:36 -0600 Subject: Bump level of mLinux --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index d3f7581..ea5f340 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev3" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev4" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 19f6d919b553ac74f955435c29ddac1c647ffe1c Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 9 Jan 2019 16:13:13 -0600 Subject: Move mtd-utils to meta-multitech --- recipes-devtools/mtd/mtd-utils-static_git.bb | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 recipes-devtools/mtd/mtd-utils-static_git.bb diff --git a/recipes-devtools/mtd/mtd-utils-static_git.bb b/recipes-devtools/mtd/mtd-utils-static_git.bb deleted file mode 100644 index 8f64be4..0000000 --- a/recipes-devtools/mtd/mtd-utils-static_git.bb +++ /dev/null @@ -1,17 +0,0 @@ -require recipes-devtools/mtd/mtd-utils_git.bb - -# search for files in original recipe location -FILESPATH .= ":${@bb.utils.which(BBPATH, 'recipes-devtools/mtd/mtd-utils', direction=True)}" - -PR = "r0" - -PACKAGES = "${PN} ${PN}-dbg" - -# build static version of nandwrite for flash upgrading -CFLAGS += "-static" - -do_install () { - install -d ${D}${bindir} - install -m 0755 ${S}/nandwrite ${D}${bindir}/nandwrite.static -} - -- cgit v1.2.3 From e1158185a0318f7e10d4c4e20ecc99a235a695bd Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 9 Jan 2019 16:34:34 -0600 Subject: Bump to dev5 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index ea5f340..3d09380 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev4" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev5" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From f3f55613e3ce328ee7c0f372b6cba83eaa7fb353 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 8 Jan 2019 11:43:53 -0600 Subject: Split out gpspipe into new package called gpspipe from gps-utils --- recipes-core/images/mlinux-factory-image.bb | 2 +- recipes-navigation/gpsd/gpsd_3.18.1.bb | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes-core/images/mlinux-factory-image.bb b/recipes-core/images/mlinux-factory-image.bb index b9930d5..c57f0a2 100644 --- a/recipes-core/images/mlinux-factory-image.bb +++ b/recipes-core/images/mlinux-factory-image.bb @@ -92,6 +92,6 @@ IMAGE_INSTALL += "pps-tools" IMAGE_INSTALL += "dnsmasq bluez5-pand bluez5-rfcomm" # When ntp is to use the GPS, gps-utils is required -IMAGE_INSTALL += "gpsd libgps ntp ntp-utils gps-utils gpsd-udev" +IMAGE_INSTALL += "gpsd libgps ntp ntp-utils gpspipe gps-utils gpsd-udev" IMAGE_INSTALL += "lxfp uvccapture" diff --git a/recipes-navigation/gpsd/gpsd_3.18.1.bb b/recipes-navigation/gpsd/gpsd_3.18.1.bb index ce7e099..5a64d3e 100644 --- a/recipes-navigation/gpsd/gpsd_3.18.1.bb +++ b/recipes-navigation/gpsd/gpsd_3.18.1.bb @@ -131,7 +131,7 @@ pkg_postrm_${PN}-conf() { update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default } -PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" +PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gpspipe gps-utils" # File does not exist: ${libdir}/libQgpsmm.prl FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ @@ -162,6 +162,9 @@ CONFFILES_${PN}-conf = "${sysconfdir}/default/gpsd.default" SUMMARY_${PN}-gpsctl = "Tool for tweaking GPS modes" FILES_${PN}-gpsctl = "${bindir}/gpsctl" +SUMMARY_gpspipe = "Tool to connectg to gpsd and retrieve sentences" +FILES_gpspipe = "${bindir}/gpspipe" + SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS" FILES_gps-utils = "${bindir}/*" RDEPENDS_gps-utils = "python-pygps" -- cgit v1.2.3 From 731f74f951863e82a324522771d64aacc8e1d620 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 10 Jan 2019 12:13:03 -0600 Subject: Bump version to dev6 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 3d09380..bd13d9f 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev5" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev6" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From d0915c504f9742b2044b30429a0b35f4428fdef7 Mon Sep 17 00:00:00 2001 From: Mike Nicholson Date: Thu, 10 Jan 2019 16:23:10 -0600 Subject: Restore MTAC compilation --- recipes-core/images/mlinux-minimal-image.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes-core/images/mlinux-minimal-image.bb b/recipes-core/images/mlinux-minimal-image.bb index 241f1d9..bbf7452 100644 --- a/recipes-core/images/mlinux-minimal-image.bb +++ b/recipes-core/images/mlinux-minimal-image.bb @@ -47,7 +47,7 @@ MULTITECH_FEATURES = "kernel-module-mts-io \ radio-reset" -MULTITECH_MTAC_NOTREADY = "kernel-module-mtac \ +MULTITECH_MTAC = "kernel-module-mtac \ kernel-module-mtac-eth \ kernel-module-mtac-gpiob \ kernel-module-mtac-lora \ @@ -55,8 +55,6 @@ MULTITECH_MTAC_NOTREADY = "kernel-module-mtac \ kernel-module-mtac-pulse \ kernel-module-mtac-xdot" -MULTITECH_MTAC = "" - UPGRADE_FEATURES = "upgrade-reboot mtd-utils-static" IMAGE_INSTALL = "${CORE_FEATURES} \ -- cgit v1.2.3 From b8e28900ae0ad4d3f3c47d0e043af061e1834d10 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 10 Jan 2019 17:58:08 -0600 Subject: Bump to dev7, with mtac in image --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index bd13d9f..604472a 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev6" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev7" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From e49a1faff41662f7099832d67e41fa2d83ffd20c Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 14 Jan 2019 14:19:59 -0600 Subject: Bump to dev8 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 604472a..202623f 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev7" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev8" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From fc2e72062df0bb1480ac63e0b9f4f34463cbb722 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 15 Jan 2019 11:57:56 -0600 Subject: Wrong kernel device name for symlinks --- recipes-core/udev/eudev/mtcdt/mtcdt.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/udev/eudev/mtcdt/mtcdt.rules b/recipes-core/udev/eudev/mtcdt/mtcdt.rules index d7ff3e1..95ac967 100644 --- a/recipes-core/udev/eudev/mtcdt/mtcdt.rules +++ b/recipes-core/udev/eudev/mtcdt/mtcdt.rules @@ -1,6 +1,6 @@ ACTION=="remove", GOTO="mlinux_end" SUBSYSTEM!="tty", GOTO="mlinux_end" -KERNEL!="ttyXRUSB[0-9]*", GOTO="mlinux_end" +KERNEL!="ttyACM[0-9]*", GOTO="mlinux_end" SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" ENV{ID_IFACE}=="", GOTO="mlinux_end" -- cgit v1.2.3 From 40be580b525607a46e7963d3a6f30f3273fee294 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 16 Jan 2019 11:05:39 -0600 Subject: defconfig changes for BT, and other drivers --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 202623f..358e134 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev8" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev9" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From a948e641418676d9dd9ded733c7843364d7d928f Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 16 Jan 2019 18:11:58 -0600 Subject: dev10 with more netfilter modules and pre-emption --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 358e134..244443a 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev9" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev10" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 9175c13c17b00903c8553476337fcb222c2e22a9 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 18 Jan 2019 11:37:23 -0600 Subject: Bump revision of mLinux --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 244443a..7b4a1c5 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev10" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev11" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From ebd273a5845830ab1af018e8f7c5c836a733ef7f Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 21 Jan 2019 12:53:28 -0600 Subject: Vizzini driver back in --- recipes-core/udev/eudev/mtcdt/mtcdt.rules | 10 ++++------ recipes-core/udev/eudev/mtrv1/mtrv1.rules | 3 +-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/recipes-core/udev/eudev/mtcdt/mtcdt.rules b/recipes-core/udev/eudev/mtcdt/mtcdt.rules index 95ac967..79434c3 100644 --- a/recipes-core/udev/eudev/mtcdt/mtcdt.rules +++ b/recipes-core/udev/eudev/mtcdt/mtcdt.rules @@ -7,11 +7,9 @@ ENV{ID_IFACE}=="", GOTO="mlinux_end" # Accessory Ports # ttyXRUSB is Vizzini driver name, for compatiblity. -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyXRUSB0", SYMLINK+="ttyAP1" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyXRUSB0", SYMLINK+="ttyAP1" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyXRUSB1", SYMLINK+="ttyAP2" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="02", SYMLINK+="ttyXRUSB1", SYMLINK+="ttyAP2" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="04", SYMLINK+="ttyXRUSB2" -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="06", SYMLINK+="ttyXRUSB3" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtrv1/mtrv1.rules b/recipes-core/udev/eudev/mtrv1/mtrv1.rules index 620c77a..c280402 100644 --- a/recipes-core/udev/eudev/mtrv1/mtrv1.rules +++ b/recipes-core/udev/eudev/mtrv1/mtrv1.rules @@ -7,8 +7,7 @@ ENV{ID_IFACE}=="", GOTO="mlinux_end" # mtr revA: bluetooth on exar chip (ACM0, iface 0) # ttyXRUSB is Vizzini driver name, for compatiblity. -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyXRUSB0" # mtr revA: external serial on exar chip (ACM1, iface 2) -ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyXRUSB1", SYMLINK+="ext_serial" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ext_serial" LABEL="mlinux_end" -- cgit v1.2.3 From b04ba7c5ff0df579ba89bb08c66b62705f3fb4e7 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 22 Jan 2019 11:13:01 -0600 Subject: Bump to dev12 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 7b4a1c5..021b30a 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev11" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev12" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From c6549f11ff1f4713bebd8d9a8c7e31b09c20f1d8 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 22 Jan 2019 17:46:08 -0600 Subject: Fix recipe issues that caused modules to not load --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 021b30a..98bf067 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev12" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev13" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From e66f3c5073d81bee53053fc4ed90eb8a2c343c30 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 24 Jan 2019 02:19:36 -0600 Subject: Bump to dev14 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 98bf067..f53ce3a 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev13" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev14" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 5f826405c054a5622ab6000bf5fa09ddc8920391 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 24 Jan 2019 12:57:50 -0600 Subject: Bump developer level. --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index f53ce3a..51c0553 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev14" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev15" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 36c58546b51095c9badfeafa62f7a151a783742c Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 25 Jan 2019 18:06:18 -0600 Subject: Fix SPI for LoRa. --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 51c0553..1a367b6 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev15" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev16" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From c10450ce39280ef5f931d8563c5da5de6bcb8c5d Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 28 Jan 2019 15:33:02 -0600 Subject: Restore the mtrv1 /dev/bt link, and add old mtr to udev. --- recipes-core/udev/eudev/mtr/mtr.rules | 13 +++++++++++++ recipes-core/udev/eudev/mtrv1/mtrv1.rules | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 recipes-core/udev/eudev/mtr/mtr.rules diff --git a/recipes-core/udev/eudev/mtr/mtr.rules b/recipes-core/udev/eudev/mtr/mtr.rules new file mode 100644 index 0000000..239a846 --- /dev/null +++ b/recipes-core/udev/eudev/mtr/mtr.rules @@ -0,0 +1,13 @@ +ACTION=="remove", GOTO="mlinux_end" +SUBSYSTEM!="tty", GOTO="mlinux_end" +KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*|ttyXRUSB[0-9]*|ttyS*", GOTO="mlinux_end" + +SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" +ENV{ID_IFACE}=="", GOTO="mlinux_end" + +# mtr revA: bluetooth on exar chip (ACM0, iface 0) +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="bt" +# mtr revA: external serial on exar chip (ACM1, iface 2) +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ext_serial" + +LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtrv1/mtrv1.rules b/recipes-core/udev/eudev/mtrv1/mtrv1.rules index c280402..239a846 100644 --- a/recipes-core/udev/eudev/mtrv1/mtrv1.rules +++ b/recipes-core/udev/eudev/mtrv1/mtrv1.rules @@ -6,7 +6,7 @@ SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" ENV{ID_IFACE}=="", GOTO="mlinux_end" # mtr revA: bluetooth on exar chip (ACM0, iface 0) -# ttyXRUSB is Vizzini driver name, for compatiblity. +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="bt" # mtr revA: external serial on exar chip (ACM1, iface 2) ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ext_serial" -- cgit v1.2.3 From 542dbdfe7bdbf62bdb531f925184cbc99b0d5bc8 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 29 Jan 2019 17:42:51 -0600 Subject: Bump the developer level of mLinux --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 1a367b6..ca7b26e 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev16" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev17" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 48ec456afaaccc22f24d8bb1a98d4fbd42d2b3e7 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 6 Feb 2019 13:28:07 -0600 Subject: Bump the developer revision --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index ca7b26e..8ce4c97 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev17" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev18" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From dc6c660149f3231a09b55b4042c66fb3dc0e06b6 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 6 Feb 2019 13:34:35 -0600 Subject: Add rs9113 drivers to mtrv1 --- recipes-core/images/mlinux-mtrv1-image.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb index d791809..1e1d72e 100644 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -1,5 +1,4 @@ -# Conduit 0.0 or 0.1 without RS9113 -DESCRIPTION = "mLinux base image" +DESCRIPTION = "mLinux base image with rs9113 drivers" LICENSE = "MIT" require mlinux-minimal-image.bb @@ -10,6 +9,8 @@ FILESYSTEM_FEATURES = "dosfstools \ lsof \ " +IMAGE_INSTALL += "kernel-module-rs9113 rs9113-noarch rs9113-util" + NETWORKING_FEATURES += "bridge-utils \ inetutils-ftp \ openssl \ -- cgit v1.2.3 From 6fd36b9d62b4cfe257509e58e90ce93f22aa7bba Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 8 Feb 2019 18:21:24 -0600 Subject: Create whitelist for MTCAP and MTR kernel modules. --- recipes-core/images/mlinux-base-image.bb | 7 +- recipes-core/images/mlinux-minimal-image.bb | 2 +- recipes-core/images/mlinux-mtcap-image.bb | 1 + recipes-core/images/mlinux-mtr-image.bb | 69 +++++++ recipes-core/images/mlinux-mtrv1-image.bb | 6 +- recipes-core/images/mtcap-modules.inc | 281 +++++++++++++++++++++++++++ recipes-core/images/mtr-base-modules.inc | 283 ++++++++++++++++++++++++++++ recipes-core/images/mtr-modules.inc | 7 + recipes-core/images/mtrv1-modules.inc | 6 + 9 files changed, 655 insertions(+), 7 deletions(-) create mode 100644 recipes-core/images/mlinux-mtr-image.bb create mode 100644 recipes-core/images/mtcap-modules.inc create mode 100644 recipes-core/images/mtr-base-modules.inc create mode 100644 recipes-core/images/mtr-modules.inc create mode 100644 recipes-core/images/mtrv1-modules.inc diff --git a/recipes-core/images/mlinux-base-image.bb b/recipes-core/images/mlinux-base-image.bb index fbe8049..0eb3592 100644 --- a/recipes-core/images/mlinux-base-image.bb +++ b/recipes-core/images/mlinux-base-image.bb @@ -59,9 +59,10 @@ MISC_FEATURES = "minicom lrzsz nano" # Extra stuff to install IMAGE_INSTALL += " \ - ${WIFI_FEATURES} \ - ${BLUETOOTH_FEATURES} \ - ${FILESYSTEM_FEATURES} \ + kernel-modules \ + ${WIFI_FEATURES} \ + ${BLUETOOTH_FEATURES} \ + ${FILESYSTEM_FEATURES} \ ${TIME_FEATURES} \ ${MISC_FEATURES} \ " diff --git a/recipes-core/images/mlinux-minimal-image.bb b/recipes-core/images/mlinux-minimal-image.bb index bbf7452..8090f57 100644 --- a/recipes-core/images/mlinux-minimal-image.bb +++ b/recipes-core/images/mlinux-minimal-image.bb @@ -11,7 +11,7 @@ CORE_FEATURES = "packagegroup-core-boot packagegroup-distro-base \ packagegroup-base-ext2 \ packagegroup-base-usbhost packagegroup-base-usbgadget \ udev-extraconf usb-gadget-mode \ - sysfsutils module-init-tools kernel-modules \ + sysfsutils module-init-tools \ bash procps mtd-utils mtd-utils-jffs2 \ openssh-sftp-server \ util-linux-mount util-linux-umount \ diff --git a/recipes-core/images/mlinux-mtcap-image.bb b/recipes-core/images/mlinux-mtcap-image.bb index 2c8f363..effef6d 100644 --- a/recipes-core/images/mlinux-mtcap-image.bb +++ b/recipes-core/images/mlinux-mtcap-image.bb @@ -1,6 +1,7 @@ DESCRIPTION = "mLinux Conduit Access Point image" require mlinux-minimal-image.bb +require mtcap-modules.inc # For now we don't put this in MTR or AEP # Password restrictions library from Redhat diff --git a/recipes-core/images/mlinux-mtr-image.bb b/recipes-core/images/mlinux-mtr-image.bb new file mode 100644 index 0000000..01ca695 --- /dev/null +++ b/recipes-core/images/mlinux-mtr-image.bb @@ -0,0 +1,69 @@ +# Conduit 0.0 or 0.1 without RS9113 +include mtr-modules.inc +DESCRIPTION = "mLinux base image" +LICENSE = "MIT" + +require mlinux-minimal-image.bb +MULTITECH_MTAC = "" + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES += "bridge-utils \ + inetutils-ftp \ + openssl \ + rsync \ + iperf \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +WIFI_FEATURES = " \ + libnl \ + wpa-supplicant \ + wireless-tools \ + iw \ + hostap-daemon hostap-utils \ + " + +BLUETOOTH_FEATURES = "bluez5" + +# 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" + +# Extra stuff to install +IMAGE_INSTALL += " \ + ${WIFI_FEATURES} \ + ${BLUETOOTH_FEATURES} \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + " diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb index 1e1d72e..8b1b97a 100644 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -1,4 +1,6 @@ -DESCRIPTION = "mLinux base image with rs9113 drivers" +# Conduit 0.0 or 0.1 without RS9113 +include mtrv1-modules.inc +DESCRIPTION = "mLinux base image" LICENSE = "MIT" require mlinux-minimal-image.bb @@ -9,8 +11,6 @@ FILESYSTEM_FEATURES = "dosfstools \ lsof \ " -IMAGE_INSTALL += "kernel-module-rs9113 rs9113-noarch rs9113-util" - NETWORKING_FEATURES += "bridge-utils \ inetutils-ftp \ openssl \ diff --git a/recipes-core/images/mtcap-modules.inc b/recipes-core/images/mtcap-modules.inc new file mode 100644 index 0000000..239c49b --- /dev/null +++ b/recipes-core/images/mtcap-modules.inc @@ -0,0 +1,281 @@ +IMAGE_INSTALL += " \ + kernel-module-8021q \ + kernel-module-af-alg \ + kernel-module-algif-hash \ + kernel-module-algif-skcipher \ + kernel-module-ansi-cprng \ + kernel-module-anubis \ + kernel-module-arc4 \ + kernel-module-asix \ + kernel-module-at24 \ + kernel-module-at91-udc \ + kernel-module-atmel-mci \ + kernel-module-atmel-usba-udc \ + kernel-module-ax88179-178a \ + kernel-module-bcm203x \ + kernel-module-bfusb \ + kernel-module-blowfish-common \ + kernel-module-blowfish-generic \ + kernel-module-bluetooth \ + kernel-module-bnep \ + kernel-module-bpa10x \ + kernel-module-bridge \ + kernel-module-br-netfilter \ + kernel-module-bsd-comp \ + kernel-module-btbcm \ + kernel-module-btintel \ + kernel-module-btmrvl \ + kernel-module-btmrvl-sdio \ + kernel-module-btqca \ + kernel-module-btsdio \ + kernel-module-cast5-generic \ + kernel-module-cast6-generic \ + kernel-module-cast-common \ + kernel-module-catc \ + kernel-module-ccm \ + kernel-module-cdc-acm \ + kernel-module-cdc-ether \ + kernel-module-cdc-ncm \ + kernel-module-cdc-subset \ + kernel-module-cdc-wdm \ + kernel-module-cfg80211 \ + kernel-module-cmac \ + kernel-module-cn \ + kernel-module-crc32c-generic \ + kernel-module-crc32-generic \ + kernel-module-ctr \ + kernel-module-cts \ + kernel-module-dm9000 \ + kernel-module-dm9601 \ + kernel-module-dm-log \ + kernel-module-dm-log-userspace \ + kernel-module-dm-mirror \ + kernel-module-dm-mod \ + kernel-module-dm-region-hash \ + kernel-module-dns-resolver \ + kernel-module-dummy \ + kernel-module-ecb \ + kernel-module-eeprom-93cx6 \ + kernel-module-encrypted-keys \ + kernel-module-ext4 \ + kernel-module-fcrypt \ + kernel-module-fscrypto \ + kernel-module-g-acm-ms \ + kernel-module-gadgetfs \ + kernel-module-garp \ + kernel-module-g-cdc \ + kernel-module-gcm \ + kernel-module-g-ether \ + kernel-module-gf128mul \ + kernel-module-ghash-generic \ + kernel-module-gluebi \ + kernel-module-g-mass-storage \ + kernel-module-g-serial \ + kernel-module-g-zero \ + kernel-module-hci-uart \ + kernel-module-hci-vhci \ + kernel-module-hidp \ + kernel-module-i2c-algo-bit \ + kernel-module-i2c-at91 \ + kernel-module-i2c-dev \ + kernel-module-i2c-gpio \ + kernel-module-i2c-slave-eeprom \ + kernel-module-ip6-gre \ + kernel-module-ip6table-filter \ + kernel-module-ip6table-mangle \ + kernel-module-ip6table-nat \ + kernel-module-ip6table-raw \ + kernel-module-ip6-tables \ + kernel-module-ip6t-ah \ + kernel-module-ip6t-eui64 \ + kernel-module-ip6t-frag \ + kernel-module-ip6t-hbh \ + kernel-module-ip6t-ipv6header \ + kernel-module-ip6t-masquerade \ + kernel-module-ip6t-mh \ + kernel-module-ip6t-npt \ + kernel-module-ip6t-reject \ + kernel-module-ip6t-rpfilter \ + kernel-module-ip6t-rt \ + kernel-module-ip6t-synproxy \ + kernel-module-ip6-tunnel \ + kernel-module-ip6-udp-tunnel \ + kernel-module-ip6-vti \ + kernel-module-ipip \ + kernel-module-iptable-filter \ + kernel-module-iptable-mangle \ + kernel-module-iptable-nat \ + kernel-module-iptable-raw \ + kernel-module-ip-tables \ + kernel-module-ipt-ah \ + kernel-module-ipt-clusterip \ + kernel-module-ipt-ecn \ + kernel-module-ipt-masquerade \ + kernel-module-ipt-reject \ + kernel-module-ipt-rpfilter \ + kernel-module-ipt-synproxy \ + kernel-module-ip-vs \ + kernel-module-iscsi-tcp \ + kernel-module-jbd2 \ + kernel-module-khazad \ + kernel-module-l2tp-core \ + kernel-module-l2tp-ppp \ + kernel-module-leds-blinkm \ + kernel-module-leds-regulator \ + kernel-module-ledtrig-default-on \ + kernel-module-ledtrig-gpio \ + kernel-module-ledtrig-heartbeat \ + kernel-module-ledtrig-netdev \ + kernel-module-ledtrig-timer \ + kernel-module-ledtrig-usbport \ + kernel-module-libcomposite \ + kernel-module-libiscsi \ + kernel-module-libiscsi-tcp \ + kernel-module-llc \ + kernel-module-mac80211 \ + kernel-module-mbcache \ + kernel-module-md4 \ + kernel-module-micrel \ + kernel-module-microchip \ + kernel-module-mrp \ + kernel-module-mtd-dataflash \ + kernel-module-mtd-nandbiterrs \ + kernel-module-mtd-nandecctest \ + kernel-module-mtd-oobtest \ + kernel-module-mtd-pagetest \ + kernel-module-mtd-readtest \ + kernel-module-mtd-speedtest \ + kernel-module-mtd-stresstest \ + kernel-module-mtd-subpagetest \ + kernel-module-mtd-torturetest \ + kernel-module-nf-conntrack-broadcast \ + kernel-module-nf-conntrack-ftp \ + kernel-module-nf-conntrack-h323 \ + kernel-module-nf-conntrack-ipv4 \ + kernel-module-nf-conntrack-ipv6 \ + kernel-module-nf-conntrack-netbios-ns \ + kernel-module-nf-conntrack-netlink \ + kernel-module-nf-conntrack-pptp \ + kernel-module-nf-conntrack-proto-gre \ + kernel-module-nf-conntrack-sip \ + kernel-module-nf-conntrack-snmp \ + kernel-module-nf-defrag-ipv4 \ + kernel-module-nf-defrag-ipv6 \ + kernel-module-nf-dup-ipv4 \ + kernel-module-nf-dup-ipv6 \ + kernel-module-nf-log-arp \ + kernel-module-nf-log-common \ + kernel-module-nf-log-ipv4 \ + kernel-module-nf-log-ipv6 \ + kernel-module-nf-nat-ftp \ + kernel-module-nf-nat-h323 \ + kernel-module-nf-nat-ipv4 \ + kernel-module-nf-nat-ipv6 \ + kernel-module-nf-nat-masquerade-ipv4 \ + kernel-module-nf-nat-masquerade-ipv6 \ + kernel-module-nf-nat-pptp \ + kernel-module-nf-nat-proto-gre \ + kernel-module-nf-nat-redirect \ + kernel-module-nf-nat-sip \ + kernel-module-nf-nat-snmp-basic \ + kernel-module-nfnetlink-cttimeout \ + kernel-module-nf-reject-ipv4 \ + kernel-module-nf-reject-ipv6 \ + kernel-module-nf-synproxy-core \ + kernel-module-nf-tables-inet \ + kernel-module-nf-tables-ipv4 \ + kernel-module-nf-tables-ipv6 \ + kernel-module-nf-tables-netdev \ + kernel-module-nft-chain-nat-ipv4 \ + kernel-module-nft-exthdr \ + kernel-module-nft-meta \ + kernel-module-p8022 \ + kernel-module-ppp-async \ + kernel-module-ppp-deflate \ + kernel-module-ppp-generic \ + kernel-module-ppp-mppe \ + kernel-module-pppoe \ + kernel-module-pppox \ + kernel-module-pps-core \ + kernel-module-pps-gpio \ + kernel-module-pps-ktimer \ + kernel-module-pps-ldisc \ + kernel-module-pptp \ + kernel-module-psnap \ + kernel-module-ptp \ + kernel-module-pwm-atmel-tcb \ + kernel-module-qmi-wwan \ + kernel-module-rfcomm \ + kernel-module-rfkill \ + kernel-module-rfkill-gpio \ + kernel-module-rfkill-regulator \ + kernel-module-rndis-host \ + kernel-module-rndis-wlan \ + kernel-module-salsa20-generic \ + kernel-module-scsi-transport-iscsi \ + kernel-module-seed \ + kernel-module-seqiv \ + kernel-module-serpent-generic \ + kernel-module-sha512-generic \ + kernel-module-sit \ + kernel-module-slhc \ + kernel-module-spi-atmel \ + kernel-module-spidev \ + kernel-module-spi-nor \ + kernel-module-stp \ + kernel-module-tea \ + kernel-module-tun \ + kernel-module-twofish-common \ + kernel-module-twofish-generic \ + kernel-module-udc-core \ + kernel-module-udp-tunnel \ + kernel-module-u-ether \ + kernel-module-uio \ + kernel-module-uio-pdrv-genirq \ + kernel-module-usb-f-acm \ + kernel-module-usb-f-ecm \ + kernel-module-usb-f-ecm-subset \ + kernel-module-usb-f-mass-storage \ + kernel-module-usb-f-obex \ + kernel-module-usb-f-rndis \ + kernel-module-usb-f-serial \ + kernel-module-usb-f-ss-lb \ + kernel-module-usbmon \ + kernel-module-usbnet \ + kernel-module-usbserial \ + kernel-module-usb-serial-simple \ + kernel-module-usb-storage \ + kernel-module-u-serial \ + kernel-module-xfrm6-mode-tunnel \ + kernel-module-x-tables \ + kernel-module-xt-classify \ + kernel-module-xt-connmark \ + kernel-module-xt-conntrack \ + kernel-module-xt-ct \ + kernel-module-xt-ecn \ + kernel-module-xt-esp \ + kernel-module-xt-hashlimit \ + kernel-module-xt-hl \ + kernel-module-xt-iprange \ + kernel-module-xt-l2tp \ + kernel-module-xt-led \ + kernel-module-xt-limit \ + kernel-module-xt-log \ + kernel-module-xt-mac \ + kernel-module-xt-mark \ + kernel-module-xt-multiport \ + kernel-module-xt-nat \ + kernel-module-xt-netmap \ + kernel-module-xt-nflog \ + kernel-module-xt-nfqueue \ + kernel-module-xt-policy \ + kernel-module-xt-recent \ + kernel-module-xt-redirect \ + kernel-module-xts \ + kernel-module-xt-set \ + kernel-module-xt-state \ + kernel-module-xt-tcpudp \ + kernel-module-xt-tee \ + kernel-module-xt-time \ + kernel-module-xt-tproxy \ +" diff --git a/recipes-core/images/mtr-base-modules.inc b/recipes-core/images/mtr-base-modules.inc new file mode 100644 index 0000000..625b0f5 --- /dev/null +++ b/recipes-core/images/mtr-base-modules.inc @@ -0,0 +1,283 @@ +# Modules for mtrv1 and mtr + +IMAGE_INSTALL_append = " \ + kernel-module-8021q \ + kernel-module-af-alg \ + kernel-module-algif-hash \ + kernel-module-algif-skcipher \ + kernel-module-ansi-cprng \ + kernel-module-anubis \ + kernel-module-arc4 \ + kernel-module-asix \ + kernel-module-at24 \ + kernel-module-at91-udc \ + kernel-module-atmel-mci \ + kernel-module-atmel-usba-udc \ + kernel-module-ax88179-178a \ + kernel-module-bcm203x \ + kernel-module-bfusb \ + kernel-module-blowfish-common \ + kernel-module-blowfish-generic \ + kernel-module-bluetooth \ + kernel-module-bnep \ + kernel-module-bpa10x \ + kernel-module-bridge \ + kernel-module-br-netfilter \ + kernel-module-bsd-comp \ + kernel-module-btbcm \ + kernel-module-btintel \ + kernel-module-btmrvl \ + kernel-module-btmrvl-sdio \ + kernel-module-btqca \ + kernel-module-btsdio \ + kernel-module-cast5-generic \ + kernel-module-cast6-generic \ + kernel-module-cast-common \ + kernel-module-catc \ + kernel-module-ccm \ + kernel-module-cdc-acm \ + kernel-module-cdc-ether \ + kernel-module-cdc-ncm \ + kernel-module-cdc-subset \ + kernel-module-cdc-wdm \ + kernel-module-cfg80211 \ + kernel-module-cmac \ + kernel-module-cn \ + kernel-module-crc32c-generic \ + kernel-module-crc32-generic \ + kernel-module-ctr \ + kernel-module-cts \ + kernel-module-dm9000 \ + kernel-module-dm9601 \ + kernel-module-dm-log \ + kernel-module-dm-log-userspace \ + kernel-module-dm-mirror \ + kernel-module-dm-mod \ + kernel-module-dm-region-hash \ + kernel-module-dns-resolver \ + kernel-module-dummy \ + kernel-module-ecb \ + kernel-module-eeprom-93cx6 \ + kernel-module-encrypted-keys \ + kernel-module-ext4 \ + kernel-module-fcrypt \ + kernel-module-fscrypto \ + kernel-module-g-acm-ms \ + kernel-module-gadgetfs \ + kernel-module-garp \ + kernel-module-g-cdc \ + kernel-module-gcm \ + kernel-module-g-ether \ + kernel-module-gf128mul \ + kernel-module-ghash-generic \ + kernel-module-gluebi \ + kernel-module-g-mass-storage \ + kernel-module-g-serial \ + kernel-module-g-zero \ + kernel-module-hci-uart \ + kernel-module-hci-vhci \ + kernel-module-hidp \ + kernel-module-i2c-at91 \ + kernel-module-i2c-dev \ + kernel-module-i2c-gpio \ + kernel-module-i2c-slave-eeprom \ + kernel-module-ip6-gre \ + kernel-module-ip6table-filter \ + kernel-module-ip6table-mangle \ + kernel-module-ip6table-nat \ + kernel-module-ip6table-raw \ + kernel-module-ip6-tables \ + kernel-module-ip6t-ah \ + kernel-module-ip6t-eui64 \ + kernel-module-ip6t-frag \ + kernel-module-ip6t-hbh \ + kernel-module-ip6t-ipv6header \ + kernel-module-ip6t-masquerade \ + kernel-module-ip6t-mh \ + kernel-module-ip6t-npt \ + kernel-module-ip6t-reject \ + kernel-module-ip6t-rpfilter \ + kernel-module-ip6t-rt \ + kernel-module-ip6t-synproxy \ + kernel-module-ip6-tunnel \ + kernel-module-ip6-udp-tunnel \ + kernel-module-ip6-vti \ + kernel-module-ipip \ + kernel-module-iptable-filter \ + kernel-module-iptable-mangle \ + kernel-module-iptable-nat \ + kernel-module-iptable-raw \ + kernel-module-ip-tables \ + kernel-module-ipt-ah \ + kernel-module-ipt-clusterip \ + kernel-module-ipt-ecn \ + kernel-module-ipt-masquerade \ + kernel-module-ipt-reject \ + kernel-module-ipt-rpfilter \ + kernel-module-ipt-synproxy \ + kernel-module-ip-vs \ + kernel-module-iscsi-tcp \ + kernel-module-jbd2 \ + kernel-module-khazad \ + kernel-module-l2tp-core \ + kernel-module-l2tp-ppp \ + kernel-module-leds-blinkm \ + kernel-module-leds-regulator \ + kernel-module-ledtrig-default-on \ + kernel-module-ledtrig-gpio \ + kernel-module-ledtrig-heartbeat \ + kernel-module-ledtrig-netdev \ + kernel-module-ledtrig-timer \ + kernel-module-ledtrig-usbport \ + kernel-module-libcomposite \ + kernel-module-libiscsi \ + kernel-module-libiscsi-tcp \ + kernel-module-llc \ + kernel-module-mac80211 \ + kernel-module-mbcache \ + kernel-module-md4 \ + kernel-module-micrel \ + kernel-module-microchip \ + kernel-module-mii \ + kernel-module-mrp \ + kernel-module-mtd-dataflash \ + kernel-module-mtd-nandbiterrs \ + kernel-module-mtd-nandecctest \ + kernel-module-mtd-oobtest \ + kernel-module-mtd-pagetest \ + kernel-module-mtd-readtest \ + kernel-module-mtd-speedtest \ + kernel-module-mtd-stresstest \ + kernel-module-mtd-subpagetest \ + kernel-module-mtd-torturetest \ + kernel-module-nf-conntrack-broadcast \ + kernel-module-nf-conntrack-ftp \ + kernel-module-nf-conntrack-h323 \ + kernel-module-nf-conntrack-ipv4 \ + kernel-module-nf-conntrack-ipv6 \ + kernel-module-nf-conntrack-netbios-ns \ + kernel-module-nf-conntrack-netlink \ + kernel-module-nf-conntrack-pptp \ + kernel-module-nf-conntrack-proto-gre \ + kernel-module-nf-conntrack-sip \ + kernel-module-nf-conntrack-snmp \ + kernel-module-nf-defrag-ipv4 \ + kernel-module-nf-defrag-ipv6 \ + kernel-module-nf-dup-ipv4 \ + kernel-module-nf-dup-ipv6 \ + kernel-module-nf-log-arp \ + kernel-module-nf-log-common \ + kernel-module-nf-log-ipv4 \ + kernel-module-nf-log-ipv6 \ + kernel-module-nf-nat-ftp \ + kernel-module-nf-nat-h323 \ + kernel-module-nf-nat-ipv4 \ + kernel-module-nf-nat-ipv6 \ + kernel-module-nf-nat-masquerade-ipv4 \ + kernel-module-nf-nat-masquerade-ipv6 \ + kernel-module-nf-nat-pptp \ + kernel-module-nf-nat-proto-gre \ + kernel-module-nf-nat-redirect \ + kernel-module-nf-nat-sip \ + kernel-module-nf-nat-snmp-basic \ + kernel-module-nfnetlink-cttimeout \ + kernel-module-nf-reject-ipv4 \ + kernel-module-nf-reject-ipv6 \ + kernel-module-nf-synproxy-core \ + kernel-module-nf-tables-inet \ + kernel-module-nf-tables-ipv4 \ + kernel-module-nf-tables-ipv6 \ + kernel-module-nf-tables-netdev \ + kernel-module-nft-chain-nat-ipv4 \ + kernel-module-nft-exthdr \ + kernel-module-nft-meta \ + kernel-module-p8022 \ + kernel-module-ppp-async \ + kernel-module-ppp-deflate \ + kernel-module-ppp-generic \ + kernel-module-ppp-mppe \ + kernel-module-pppoe \ + kernel-module-pppox \ + kernel-module-pps-core \ + kernel-module-pps-gpio \ + kernel-module-pps-ktimer \ + kernel-module-pps-ldisc \ + kernel-module-pptp \ + kernel-module-psnap \ + kernel-module-ptp \ + kernel-module-pwm-atmel-tcb \ + kernel-module-qmi-wwan \ + kernel-module-rfcomm \ + kernel-module-rfkill \ + kernel-module-rfkill-gpio \ + kernel-module-rfkill-regulator \ + kernel-module-rndis-host \ + kernel-module-rndis-wlan \ + kernel-module-salsa20-generic \ + kernel-module-scsi-transport-iscsi \ + kernel-module-seed \ + kernel-module-seqiv \ + kernel-module-serpent-generic \ + kernel-module-sha512-generic \ + kernel-module-sit \ + kernel-module-slhc \ + kernel-module-spi-atmel \ + kernel-module-spidev \ + kernel-module-spi-nor \ + kernel-module-stp \ + kernel-module-tea \ + kernel-module-tun \ + kernel-module-twofish-common \ + kernel-module-twofish-generic \ + kernel-module-udc-core \ + kernel-module-udp-tunnel \ + kernel-module-u-ether \ + kernel-module-uio \ + kernel-module-uio-pdrv-genirq \ + kernel-module-usb-f-acm \ + kernel-module-usb-f-ecm \ + kernel-module-usb-f-ecm-subset \ + kernel-module-usb-f-mass-storage \ + kernel-module-usb-f-obex \ + kernel-module-usb-f-rndis \ + kernel-module-usb-f-serial \ + kernel-module-usb-f-ss-lb \ + kernel-module-usbmon \ + kernel-module-usbnet \ + kernel-module-usbserial \ + kernel-module-usb-serial-simple \ + kernel-module-usb-storage \ + kernel-module-u-serial \ + kernel-module-xfrm6-mode-tunnel \ + kernel-module-x-tables \ + kernel-module-xt-classify \ + kernel-module-xt-connmark \ + kernel-module-xt-conntrack \ + kernel-module-xt-ct \ + kernel-module-xt-ecn \ + kernel-module-xt-esp \ + kernel-module-xt-hashlimit \ + kernel-module-xt-hl \ + kernel-module-xt-iprange \ + kernel-module-xt-l2tp \ + kernel-module-xt-led \ + kernel-module-xt-limit \ + kernel-module-xt-log \ + kernel-module-xt-mac \ + kernel-module-xt-mark \ + kernel-module-xt-multiport \ + kernel-module-xt-nat \ + kernel-module-xt-netmap \ + kernel-module-xt-nflog \ + kernel-module-xt-nfqueue \ + kernel-module-xt-policy \ + kernel-module-xt-recent \ + kernel-module-xt-redirect \ + kernel-module-xts \ + kernel-module-xt-set \ + kernel-module-xt-state \ + kernel-module-xt-tcpudp \ + kernel-module-xt-tee \ + kernel-module-xt-time \ + kernel-module-xt-tproxy \ +" diff --git a/recipes-core/images/mtr-modules.inc b/recipes-core/images/mtr-modules.inc new file mode 100644 index 0000000..f8b197a --- /dev/null +++ b/recipes-core/images/mtr-modules.inc @@ -0,0 +1,7 @@ +require mtr-base-modules.inc + +IMAGE_INSTALL_append = "\ + kernel-module-wl12xx \ + kernel-module-wlcore \ + kernel-module-wlcore-sdio \ +" diff --git a/recipes-core/images/mtrv1-modules.inc b/recipes-core/images/mtrv1-modules.inc new file mode 100644 index 0000000..257f639 --- /dev/null +++ b/recipes-core/images/mtrv1-modules.inc @@ -0,0 +1,6 @@ +# Modules not to be included in +# the original MTR image. + +require mtr-base-modules.inc + +#IMAGE_INSTALL += = " " -- cgit v1.2.3 From 08d40e296c78cc8d594ba9d1f62ccd10b16a2055 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 8 Feb 2019 18:49:36 -0600 Subject: Bump mlinux developer version --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 8ce4c97..6438d11 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev18" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev19" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From f3a5c3694c747a901137800dd3c8ffa36312b6bc Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 11 Feb 2019 09:38:56 -0600 Subject: Change include to require --- recipes-core/images/mlinux-mtr-image.bb | 2 +- recipes-core/images/mlinux-mtrv1-image.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-core/images/mlinux-mtr-image.bb b/recipes-core/images/mlinux-mtr-image.bb index 01ca695..878438f 100644 --- a/recipes-core/images/mlinux-mtr-image.bb +++ b/recipes-core/images/mlinux-mtr-image.bb @@ -1,5 +1,5 @@ # Conduit 0.0 or 0.1 without RS9113 -include mtr-modules.inc +require mtr-modules.inc DESCRIPTION = "mLinux base image" LICENSE = "MIT" diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb index 8b1b97a..b4c494d 100644 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -1,5 +1,5 @@ # Conduit 0.0 or 0.1 without RS9113 -include mtrv1-modules.inc +require mtrv1-modules.inc DESCRIPTION = "mLinux base image" LICENSE = "MIT" -- cgit v1.2.3 From f6bda7ceded6981fda0a239bbbbd49601e9f7be0 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 11 Feb 2019 14:18:49 -0600 Subject: Need option driver for cellular modems --- recipes-core/images/mlinux-mtr-image.bb | 3 +- recipes-core/images/mlinux-mtrv1-image.bb | 69 ------- recipes-core/images/mtcap-modules.inc | 8 + recipes-core/images/mtr-base-modules.inc | 283 ----------------------------- recipes-core/images/mtr-modules.inc | 293 +++++++++++++++++++++++++++++- recipes-core/images/mtrv1-modules.inc | 6 - 6 files changed, 300 insertions(+), 362 deletions(-) delete mode 100644 recipes-core/images/mlinux-mtrv1-image.bb delete mode 100644 recipes-core/images/mtr-base-modules.inc delete mode 100644 recipes-core/images/mtrv1-modules.inc diff --git a/recipes-core/images/mlinux-mtr-image.bb b/recipes-core/images/mlinux-mtr-image.bb index 878438f..bf56719 100644 --- a/recipes-core/images/mlinux-mtr-image.bb +++ b/recipes-core/images/mlinux-mtr-image.bb @@ -1,6 +1,5 @@ -# Conduit 0.0 or 0.1 without RS9113 require mtr-modules.inc -DESCRIPTION = "mLinux base image" +DESCRIPTION = "mLinux base mtr image" LICENSE = "MIT" require mlinux-minimal-image.bb diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb deleted file mode 100644 index b4c494d..0000000 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ /dev/null @@ -1,69 +0,0 @@ -# Conduit 0.0 or 0.1 without RS9113 -require mtrv1-modules.inc -DESCRIPTION = "mLinux base image" -LICENSE = "MIT" - -require mlinux-minimal-image.bb -MULTITECH_MTAC = "" - -FILESYSTEM_FEATURES = "dosfstools \ - cifs-utils \ - lsof \ - " - -NETWORKING_FEATURES += "bridge-utils \ - inetutils-ftp \ - openssl \ - rsync \ - iperf \ - mii-diag \ - tcpdump \ - netcat \ - wget \ - strongswan \ - busybox-ifplugd \ - " - -WIFI_FEATURES = " \ - libnl \ - wpa-supplicant \ - wireless-tools \ - iw \ - hostap-daemon hostap-utils \ - " - -BLUETOOTH_FEATURES = "bluez5" - -# 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" - -# Extra stuff to install -IMAGE_INSTALL += " \ - ${WIFI_FEATURES} \ - ${BLUETOOTH_FEATURES} \ - ${FILESYSTEM_FEATURES} \ - ${TIME_FEATURES} \ - ${MISC_FEATURES} \ - " diff --git a/recipes-core/images/mtcap-modules.inc b/recipes-core/images/mtcap-modules.inc index 239c49b..b49f389 100644 --- a/recipes-core/images/mtcap-modules.inc +++ b/recipes-core/images/mtcap-modules.inc @@ -1,3 +1,10 @@ +# This file could be improved +# by removing modules not needed +# by MTR. It could also be +# improved by not includeing +# modules that are dependency's +# of other modules. + IMAGE_INSTALL += " \ kernel-module-8021q \ kernel-module-af-alg \ @@ -189,6 +196,7 @@ IMAGE_INSTALL += " \ kernel-module-nft-chain-nat-ipv4 \ kernel-module-nft-exthdr \ kernel-module-nft-meta \ + kernel-module-option \ kernel-module-p8022 \ kernel-module-ppp-async \ kernel-module-ppp-deflate \ diff --git a/recipes-core/images/mtr-base-modules.inc b/recipes-core/images/mtr-base-modules.inc deleted file mode 100644 index 625b0f5..0000000 --- a/recipes-core/images/mtr-base-modules.inc +++ /dev/null @@ -1,283 +0,0 @@ -# Modules for mtrv1 and mtr - -IMAGE_INSTALL_append = " \ - kernel-module-8021q \ - kernel-module-af-alg \ - kernel-module-algif-hash \ - kernel-module-algif-skcipher \ - kernel-module-ansi-cprng \ - kernel-module-anubis \ - kernel-module-arc4 \ - kernel-module-asix \ - kernel-module-at24 \ - kernel-module-at91-udc \ - kernel-module-atmel-mci \ - kernel-module-atmel-usba-udc \ - kernel-module-ax88179-178a \ - kernel-module-bcm203x \ - kernel-module-bfusb \ - kernel-module-blowfish-common \ - kernel-module-blowfish-generic \ - kernel-module-bluetooth \ - kernel-module-bnep \ - kernel-module-bpa10x \ - kernel-module-bridge \ - kernel-module-br-netfilter \ - kernel-module-bsd-comp \ - kernel-module-btbcm \ - kernel-module-btintel \ - kernel-module-btmrvl \ - kernel-module-btmrvl-sdio \ - kernel-module-btqca \ - kernel-module-btsdio \ - kernel-module-cast5-generic \ - kernel-module-cast6-generic \ - kernel-module-cast-common \ - kernel-module-catc \ - kernel-module-ccm \ - kernel-module-cdc-acm \ - kernel-module-cdc-ether \ - kernel-module-cdc-ncm \ - kernel-module-cdc-subset \ - kernel-module-cdc-wdm \ - kernel-module-cfg80211 \ - kernel-module-cmac \ - kernel-module-cn \ - kernel-module-crc32c-generic \ - kernel-module-crc32-generic \ - kernel-module-ctr \ - kernel-module-cts \ - kernel-module-dm9000 \ - kernel-module-dm9601 \ - kernel-module-dm-log \ - kernel-module-dm-log-userspace \ - kernel-module-dm-mirror \ - kernel-module-dm-mod \ - kernel-module-dm-region-hash \ - kernel-module-dns-resolver \ - kernel-module-dummy \ - kernel-module-ecb \ - kernel-module-eeprom-93cx6 \ - kernel-module-encrypted-keys \ - kernel-module-ext4 \ - kernel-module-fcrypt \ - kernel-module-fscrypto \ - kernel-module-g-acm-ms \ - kernel-module-gadgetfs \ - kernel-module-garp \ - kernel-module-g-cdc \ - kernel-module-gcm \ - kernel-module-g-ether \ - kernel-module-gf128mul \ - kernel-module-ghash-generic \ - kernel-module-gluebi \ - kernel-module-g-mass-storage \ - kernel-module-g-serial \ - kernel-module-g-zero \ - kernel-module-hci-uart \ - kernel-module-hci-vhci \ - kernel-module-hidp \ - kernel-module-i2c-at91 \ - kernel-module-i2c-dev \ - kernel-module-i2c-gpio \ - kernel-module-i2c-slave-eeprom \ - kernel-module-ip6-gre \ - kernel-module-ip6table-filter \ - kernel-module-ip6table-mangle \ - kernel-module-ip6table-nat \ - kernel-module-ip6table-raw \ - kernel-module-ip6-tables \ - kernel-module-ip6t-ah \ - kernel-module-ip6t-eui64 \ - kernel-module-ip6t-frag \ - kernel-module-ip6t-hbh \ - kernel-module-ip6t-ipv6header \ - kernel-module-ip6t-masquerade \ - kernel-module-ip6t-mh \ - kernel-module-ip6t-npt \ - kernel-module-ip6t-reject \ - kernel-module-ip6t-rpfilter \ - kernel-module-ip6t-rt \ - kernel-module-ip6t-synproxy \ - kernel-module-ip6-tunnel \ - kernel-module-ip6-udp-tunnel \ - kernel-module-ip6-vti \ - kernel-module-ipip \ - kernel-module-iptable-filter \ - kernel-module-iptable-mangle \ - kernel-module-iptable-nat \ - kernel-module-iptable-raw \ - kernel-module-ip-tables \ - kernel-module-ipt-ah \ - kernel-module-ipt-clusterip \ - kernel-module-ipt-ecn \ - kernel-module-ipt-masquerade \ - kernel-module-ipt-reject \ - kernel-module-ipt-rpfilter \ - kernel-module-ipt-synproxy \ - kernel-module-ip-vs \ - kernel-module-iscsi-tcp \ - kernel-module-jbd2 \ - kernel-module-khazad \ - kernel-module-l2tp-core \ - kernel-module-l2tp-ppp \ - kernel-module-leds-blinkm \ - kernel-module-leds-regulator \ - kernel-module-ledtrig-default-on \ - kernel-module-ledtrig-gpio \ - kernel-module-ledtrig-heartbeat \ - kernel-module-ledtrig-netdev \ - kernel-module-ledtrig-timer \ - kernel-module-ledtrig-usbport \ - kernel-module-libcomposite \ - kernel-module-libiscsi \ - kernel-module-libiscsi-tcp \ - kernel-module-llc \ - kernel-module-mac80211 \ - kernel-module-mbcache \ - kernel-module-md4 \ - kernel-module-micrel \ - kernel-module-microchip \ - kernel-module-mii \ - kernel-module-mrp \ - kernel-module-mtd-dataflash \ - kernel-module-mtd-nandbiterrs \ - kernel-module-mtd-nandecctest \ - kernel-module-mtd-oobtest \ - kernel-module-mtd-pagetest \ - kernel-module-mtd-readtest \ - kernel-module-mtd-speedtest \ - kernel-module-mtd-stresstest \ - kernel-module-mtd-subpagetest \ - kernel-module-mtd-torturetest \ - kernel-module-nf-conntrack-broadcast \ - kernel-module-nf-conntrack-ftp \ - kernel-module-nf-conntrack-h323 \ - kernel-module-nf-conntrack-ipv4 \ - kernel-module-nf-conntrack-ipv6 \ - kernel-module-nf-conntrack-netbios-ns \ - kernel-module-nf-conntrack-netlink \ - kernel-module-nf-conntrack-pptp \ - kernel-module-nf-conntrack-proto-gre \ - kernel-module-nf-conntrack-sip \ - kernel-module-nf-conntrack-snmp \ - kernel-module-nf-defrag-ipv4 \ - kernel-module-nf-defrag-ipv6 \ - kernel-module-nf-dup-ipv4 \ - kernel-module-nf-dup-ipv6 \ - kernel-module-nf-log-arp \ - kernel-module-nf-log-common \ - kernel-module-nf-log-ipv4 \ - kernel-module-nf-log-ipv6 \ - kernel-module-nf-nat-ftp \ - kernel-module-nf-nat-h323 \ - kernel-module-nf-nat-ipv4 \ - kernel-module-nf-nat-ipv6 \ - kernel-module-nf-nat-masquerade-ipv4 \ - kernel-module-nf-nat-masquerade-ipv6 \ - kernel-module-nf-nat-pptp \ - kernel-module-nf-nat-proto-gre \ - kernel-module-nf-nat-redirect \ - kernel-module-nf-nat-sip \ - kernel-module-nf-nat-snmp-basic \ - kernel-module-nfnetlink-cttimeout \ - kernel-module-nf-reject-ipv4 \ - kernel-module-nf-reject-ipv6 \ - kernel-module-nf-synproxy-core \ - kernel-module-nf-tables-inet \ - kernel-module-nf-tables-ipv4 \ - kernel-module-nf-tables-ipv6 \ - kernel-module-nf-tables-netdev \ - kernel-module-nft-chain-nat-ipv4 \ - kernel-module-nft-exthdr \ - kernel-module-nft-meta \ - kernel-module-p8022 \ - kernel-module-ppp-async \ - kernel-module-ppp-deflate \ - kernel-module-ppp-generic \ - kernel-module-ppp-mppe \ - kernel-module-pppoe \ - kernel-module-pppox \ - kernel-module-pps-core \ - kernel-module-pps-gpio \ - kernel-module-pps-ktimer \ - kernel-module-pps-ldisc \ - kernel-module-pptp \ - kernel-module-psnap \ - kernel-module-ptp \ - kernel-module-pwm-atmel-tcb \ - kernel-module-qmi-wwan \ - kernel-module-rfcomm \ - kernel-module-rfkill \ - kernel-module-rfkill-gpio \ - kernel-module-rfkill-regulator \ - kernel-module-rndis-host \ - kernel-module-rndis-wlan \ - kernel-module-salsa20-generic \ - kernel-module-scsi-transport-iscsi \ - kernel-module-seed \ - kernel-module-seqiv \ - kernel-module-serpent-generic \ - kernel-module-sha512-generic \ - kernel-module-sit \ - kernel-module-slhc \ - kernel-module-spi-atmel \ - kernel-module-spidev \ - kernel-module-spi-nor \ - kernel-module-stp \ - kernel-module-tea \ - kernel-module-tun \ - kernel-module-twofish-common \ - kernel-module-twofish-generic \ - kernel-module-udc-core \ - kernel-module-udp-tunnel \ - kernel-module-u-ether \ - kernel-module-uio \ - kernel-module-uio-pdrv-genirq \ - kernel-module-usb-f-acm \ - kernel-module-usb-f-ecm \ - kernel-module-usb-f-ecm-subset \ - kernel-module-usb-f-mass-storage \ - kernel-module-usb-f-obex \ - kernel-module-usb-f-rndis \ - kernel-module-usb-f-serial \ - kernel-module-usb-f-ss-lb \ - kernel-module-usbmon \ - kernel-module-usbnet \ - kernel-module-usbserial \ - kernel-module-usb-serial-simple \ - kernel-module-usb-storage \ - kernel-module-u-serial \ - kernel-module-xfrm6-mode-tunnel \ - kernel-module-x-tables \ - kernel-module-xt-classify \ - kernel-module-xt-connmark \ - kernel-module-xt-conntrack \ - kernel-module-xt-ct \ - kernel-module-xt-ecn \ - kernel-module-xt-esp \ - kernel-module-xt-hashlimit \ - kernel-module-xt-hl \ - kernel-module-xt-iprange \ - kernel-module-xt-l2tp \ - kernel-module-xt-led \ - kernel-module-xt-limit \ - kernel-module-xt-log \ - kernel-module-xt-mac \ - kernel-module-xt-mark \ - kernel-module-xt-multiport \ - kernel-module-xt-nat \ - kernel-module-xt-netmap \ - kernel-module-xt-nflog \ - kernel-module-xt-nfqueue \ - kernel-module-xt-policy \ - kernel-module-xt-recent \ - kernel-module-xt-redirect \ - kernel-module-xts \ - kernel-module-xt-set \ - kernel-module-xt-state \ - kernel-module-xt-tcpudp \ - kernel-module-xt-tee \ - kernel-module-xt-time \ - kernel-module-xt-tproxy \ -" diff --git a/recipes-core/images/mtr-modules.inc b/recipes-core/images/mtr-modules.inc index f8b197a..8facc37 100644 --- a/recipes-core/images/mtr-modules.inc +++ b/recipes-core/images/mtr-modules.inc @@ -1,7 +1,296 @@ -require mtr-base-modules.inc +# This file could be improved +# by removing modules not needed +# by MTR. It could also be +# improved by not includeing +# modules that are dependency's +# of other modules. -IMAGE_INSTALL_append = "\ +IMAGE_INSTALL_append_mtr = "\ kernel-module-wl12xx \ kernel-module-wlcore \ kernel-module-wlcore-sdio \ " +# Modules for mtrv1 and mtr + +IMAGE_INSTALL_append = " \ + kernel-module-8021q \ + kernel-module-af-alg \ + kernel-module-algif-hash \ + kernel-module-algif-skcipher \ + kernel-module-ansi-cprng \ + kernel-module-anubis \ + kernel-module-arc4 \ + kernel-module-asix \ + kernel-module-at24 \ + kernel-module-at91-udc \ + kernel-module-atmel-mci \ + kernel-module-atmel-usba-udc \ + kernel-module-ax88179-178a \ + kernel-module-bcm203x \ + kernel-module-bfusb \ + kernel-module-blowfish-common \ + kernel-module-blowfish-generic \ + kernel-module-bluetooth \ + kernel-module-bnep \ + kernel-module-bpa10x \ + kernel-module-bridge \ + kernel-module-br-netfilter \ + kernel-module-bsd-comp \ + kernel-module-btbcm \ + kernel-module-btintel \ + kernel-module-btmrvl \ + kernel-module-btmrvl-sdio \ + kernel-module-btqca \ + kernel-module-btsdio \ + kernel-module-cast5-generic \ + kernel-module-cast6-generic \ + kernel-module-cast-common \ + kernel-module-catc \ + kernel-module-ccm \ + kernel-module-cdc-acm \ + kernel-module-cdc-ether \ + kernel-module-cdc-ncm \ + kernel-module-cdc-subset \ + kernel-module-cdc-wdm \ + kernel-module-cfg80211 \ + kernel-module-cmac \ + kernel-module-cn \ + kernel-module-crc32c-generic \ + kernel-module-crc32-generic \ + kernel-module-ctr \ + kernel-module-cts \ + kernel-module-dm9000 \ + kernel-module-dm9601 \ + kernel-module-dm-log \ + kernel-module-dm-log-userspace \ + kernel-module-dm-mirror \ + kernel-module-dm-mod \ + kernel-module-dm-region-hash \ + kernel-module-dns-resolver \ + kernel-module-dummy \ + kernel-module-ecb \ + kernel-module-eeprom-93cx6 \ + kernel-module-encrypted-keys \ + kernel-module-ext4 \ + kernel-module-fcrypt \ + kernel-module-fscrypto \ + kernel-module-g-acm-ms \ + kernel-module-gadgetfs \ + kernel-module-garp \ + kernel-module-g-cdc \ + kernel-module-gcm \ + kernel-module-g-ether \ + kernel-module-gf128mul \ + kernel-module-ghash-generic \ + kernel-module-gluebi \ + kernel-module-g-mass-storage \ + kernel-module-g-serial \ + kernel-module-g-zero \ + kernel-module-hci-uart \ + kernel-module-hci-vhci \ + kernel-module-hidp \ + kernel-module-i2c-at91 \ + kernel-module-i2c-dev \ + kernel-module-i2c-gpio \ + kernel-module-i2c-slave-eeprom \ + kernel-module-ip6-gre \ + kernel-module-ip6table-filter \ + kernel-module-ip6table-mangle \ + kernel-module-ip6table-nat \ + kernel-module-ip6table-raw \ + kernel-module-ip6-tables \ + kernel-module-ip6t-ah \ + kernel-module-ip6t-eui64 \ + kernel-module-ip6t-frag \ + kernel-module-ip6t-hbh \ + kernel-module-ip6t-ipv6header \ + kernel-module-ip6t-masquerade \ + kernel-module-ip6t-mh \ + kernel-module-ip6t-npt \ + kernel-module-ip6t-reject \ + kernel-module-ip6t-rpfilter \ + kernel-module-ip6t-rt \ + kernel-module-ip6t-synproxy \ + kernel-module-ip6-tunnel \ + kernel-module-ip6-udp-tunnel \ + kernel-module-ip6-vti \ + kernel-module-ipip \ + kernel-module-iptable-filter \ + kernel-module-iptable-mangle \ + kernel-module-iptable-nat \ + kernel-module-iptable-raw \ + kernel-module-ip-tables \ + kernel-module-ipt-ah \ + kernel-module-ipt-clusterip \ + kernel-module-ipt-ecn \ + kernel-module-ipt-masquerade \ + kernel-module-ipt-reject \ + kernel-module-ipt-rpfilter \ + kernel-module-ipt-synproxy \ + kernel-module-ip-vs \ + kernel-module-iscsi-tcp \ + kernel-module-jbd2 \ + kernel-module-khazad \ + kernel-module-l2tp-core \ + kernel-module-l2tp-ppp \ + kernel-module-leds-blinkm \ + kernel-module-leds-regulator \ + kernel-module-ledtrig-default-on \ + kernel-module-ledtrig-gpio \ + kernel-module-ledtrig-heartbeat \ + kernel-module-ledtrig-netdev \ + kernel-module-ledtrig-timer \ + kernel-module-ledtrig-usbport \ + kernel-module-libcomposite \ + kernel-module-libiscsi \ + kernel-module-libiscsi-tcp \ + kernel-module-llc \ + kernel-module-mac80211 \ + kernel-module-mbcache \ + kernel-module-md4 \ + kernel-module-micrel \ + kernel-module-microchip \ + kernel-module-mii \ + kernel-module-mrp \ + kernel-module-mtd-dataflash \ + kernel-module-mtd-nandbiterrs \ + kernel-module-mtd-nandecctest \ + kernel-module-mtd-oobtest \ + kernel-module-mtd-pagetest \ + kernel-module-mtd-readtest \ + kernel-module-mtd-speedtest \ + kernel-module-mtd-stresstest \ + kernel-module-mtd-subpagetest \ + kernel-module-mtd-torturetest \ + kernel-module-nf-conntrack-broadcast \ + kernel-module-nf-conntrack-ftp \ + kernel-module-nf-conntrack-h323 \ + kernel-module-nf-conntrack-ipv4 \ + kernel-module-nf-conntrack-ipv6 \ + kernel-module-nf-conntrack-netbios-ns \ + kernel-module-nf-conntrack-netlink \ + kernel-module-nf-conntrack-pptp \ + kernel-module-nf-conntrack-proto-gre \ + kernel-module-nf-conntrack-sip \ + kernel-module-nf-conntrack-snmp \ + kernel-module-nf-defrag-ipv4 \ + kernel-module-nf-defrag-ipv6 \ + kernel-module-nf-dup-ipv4 \ + kernel-module-nf-dup-ipv6 \ + kernel-module-nf-log-arp \ + kernel-module-nf-log-common \ + kernel-module-nf-log-ipv4 \ + kernel-module-nf-log-ipv6 \ + kernel-module-nf-nat-ftp \ + kernel-module-nf-nat-h323 \ + kernel-module-nf-nat-ipv4 \ + kernel-module-nf-nat-ipv6 \ + kernel-module-nf-nat-masquerade-ipv4 \ + kernel-module-nf-nat-masquerade-ipv6 \ + kernel-module-nf-nat-pptp \ + kernel-module-nf-nat-proto-gre \ + kernel-module-nf-nat-redirect \ + kernel-module-nf-nat-sip \ + kernel-module-nf-nat-snmp-basic \ + kernel-module-nfnetlink-cttimeout \ + kernel-module-nf-reject-ipv4 \ + kernel-module-nf-reject-ipv6 \ + kernel-module-nf-synproxy-core \ + kernel-module-nf-tables-inet \ + kernel-module-nf-tables-ipv4 \ + kernel-module-nf-tables-ipv6 \ + kernel-module-nf-tables-netdev \ + kernel-module-nft-chain-nat-ipv4 \ + kernel-module-nft-exthdr \ + kernel-module-nft-meta \ + kernel-module-option \ + kernel-module-p8022 \ + kernel-module-ppp-async \ + kernel-module-ppp-deflate \ + kernel-module-ppp-generic \ + kernel-module-ppp-mppe \ + kernel-module-pppoe \ + kernel-module-pppox \ + kernel-module-pps-core \ + kernel-module-pps-gpio \ + kernel-module-pps-ktimer \ + kernel-module-pps-ldisc \ + kernel-module-pptp \ + kernel-module-psnap \ + kernel-module-ptp \ + kernel-module-pwm-atmel-tcb \ + kernel-module-qmi-wwan \ + kernel-module-rfcomm \ + kernel-module-rfkill \ + kernel-module-rfkill-gpio \ + kernel-module-rfkill-regulator \ + kernel-module-rndis-host \ + kernel-module-rndis-wlan \ + kernel-module-salsa20-generic \ + kernel-module-scsi-transport-iscsi \ + kernel-module-seed \ + kernel-module-seqiv \ + kernel-module-serpent-generic \ + kernel-module-sha512-generic \ + kernel-module-sit \ + kernel-module-slhc \ + kernel-module-spi-atmel \ + kernel-module-spidev \ + kernel-module-spi-nor \ + kernel-module-stp \ + kernel-module-tea \ + kernel-module-tun \ + kernel-module-twofish-common \ + kernel-module-twofish-generic \ + kernel-module-udc-core \ + kernel-module-udp-tunnel \ + kernel-module-u-ether \ + kernel-module-uio \ + kernel-module-uio-pdrv-genirq \ + kernel-module-usb-f-acm \ + kernel-module-usb-f-ecm \ + kernel-module-usb-f-ecm-subset \ + kernel-module-usb-f-mass-storage \ + kernel-module-usb-f-obex \ + kernel-module-usb-f-rndis \ + kernel-module-usb-f-serial \ + kernel-module-usb-f-ss-lb \ + kernel-module-usbmon \ + kernel-module-usbnet \ + kernel-module-usbserial \ + kernel-module-usb-serial-simple \ + kernel-module-usb-storage \ + kernel-module-u-serial \ + kernel-module-xfrm6-mode-tunnel \ + kernel-module-x-tables \ + kernel-module-xt-classify \ + kernel-module-xt-connmark \ + kernel-module-xt-conntrack \ + kernel-module-xt-ct \ + kernel-module-xt-ecn \ + kernel-module-xt-esp \ + kernel-module-xt-hashlimit \ + kernel-module-xt-hl \ + kernel-module-xt-iprange \ + kernel-module-xt-l2tp \ + kernel-module-xt-led \ + kernel-module-xt-limit \ + kernel-module-xt-log \ + kernel-module-xt-mac \ + kernel-module-xt-mark \ + kernel-module-xt-multiport \ + kernel-module-xt-nat \ + kernel-module-xt-netmap \ + kernel-module-xt-nflog \ + kernel-module-xt-nfqueue \ + kernel-module-xt-policy \ + kernel-module-xt-recent \ + kernel-module-xt-redirect \ + kernel-module-xts \ + kernel-module-xt-set \ + kernel-module-xt-state \ + kernel-module-xt-tcpudp \ + kernel-module-xt-tee \ + kernel-module-xt-time \ + kernel-module-xt-tproxy \ +" diff --git a/recipes-core/images/mtrv1-modules.inc b/recipes-core/images/mtrv1-modules.inc deleted file mode 100644 index 257f639..0000000 --- a/recipes-core/images/mtrv1-modules.inc +++ /dev/null @@ -1,6 +0,0 @@ -# Modules not to be included in -# the original MTR image. - -require mtr-base-modules.inc - -#IMAGE_INSTALL += = " " -- cgit v1.2.3 From 7203a0bbe02ad7c5a7553697d56f712d43fc3f08 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 11 Feb 2019 16:29:24 -0600 Subject: i2c-algo-bit should be we a module, but it is not --- recipes-core/images/mtcap-modules.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes-core/images/mtcap-modules.inc b/recipes-core/images/mtcap-modules.inc index b49f389..cd89e92 100644 --- a/recipes-core/images/mtcap-modules.inc +++ b/recipes-core/images/mtcap-modules.inc @@ -82,7 +82,6 @@ IMAGE_INSTALL += " \ kernel-module-hci-uart \ kernel-module-hci-vhci \ kernel-module-hidp \ - kernel-module-i2c-algo-bit \ kernel-module-i2c-at91 \ kernel-module-i2c-dev \ kernel-module-i2c-gpio \ -- cgit v1.2.3 From 15763e5b3352b846ae9ec8ddf5661c22f3fe722a Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 12 Feb 2019 16:33:24 -0600 Subject: Redpine/Silent Console -- dev20 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 6438d11..cc29031 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev19" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev20" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 9803e9166d59eb8575d6713d5f6fc6122833fe7c Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 18 Feb 2019 09:20:13 -0600 Subject: usb-gadget-mode.bbappend --- recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bbappend | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bbappend diff --git a/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bbappend b/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bbappend new file mode 100644 index 0000000..2b5b932 --- /dev/null +++ b/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bbappend @@ -0,0 +1,9 @@ +# disable usb-gadget on mtr +do_install_append_mtr() { + sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/usb-gadget +} + +# disable usb-gadget on mtrv1 +do_install_append_mtrv1() { + sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/usb-gadget +} -- cgit v1.2.3 From 67ac32d0e6feb43f91a3560140187511c13cf666 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 18 Feb 2019 09:38:09 -0600 Subject: Merge usb-gadget-mode.bbappend for MTR into main recipe --- recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb | 9 +++++++++ recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bbappend | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bbappend diff --git a/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb b/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb index 32f3fdf..0f15830 100644 --- a/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb +++ b/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bb @@ -45,3 +45,12 @@ pkg_postrm_${PN}() { PACKAGE_ARCH = "${MACHINE_ARCH}" +# disable usb-gadget on mtr +do_install_append_mtr() { + sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/usb-gadget +} + +# disable usb-gadget on mtrv1 +do_install_append_mtrv1() { + sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/usb-gadget +} diff --git a/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bbappend b/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bbappend deleted file mode 100644 index 2b5b932..0000000 --- a/recipes-connectivity/usb-gadget-mode/usb-gadget-mode.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -# disable usb-gadget on mtr -do_install_append_mtr() { - sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/usb-gadget -} - -# disable usb-gadget on mtrv1 -do_install_append_mtrv1() { - sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/usb-gadget -} -- cgit v1.2.3 From e2c28a1a61b3315e9acc51be08c0e1fe859ca8e8 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 22 Feb 2019 05:07:05 -0600 Subject: Bump the version to dev21 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index cc29031..1443fd8 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev20" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev21" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 55f83856fa2d0ab39b2a7167f6463dc45ce84c2c Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Thu, 28 Feb 2019 09:16:58 -0600 Subject: Add lap3 support to mlinux-set-apn script --- .../mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 index 8c59c78..3d02e16 100755 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn @@ -26,6 +26,7 @@ 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_link=/etc/ppp/peers/lap3_chat function usage { echo "Usage: $(basename $0) [--] APN" @@ -68,6 +69,7 @@ if ((clear != 1)) ; then 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 @@ -81,6 +83,11 @@ if ((clear != 1)) ; then 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" @@ -101,6 +108,11 @@ else 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 -- cgit v1.2.3 From 522baf25e27ae499bce81a9640a16b98d682765b Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 28 Feb 2019 11:01:56 -0600 Subject: Bump to dev22 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 1443fd8..d97204f 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev21" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev22" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 593efbc7868324d1def06adc7d5c39e67fdf6af4 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 28 Feb 2019 15:39:32 -0600 Subject: gpsd CPU efficiencies for MTR --- recipes-navigation/gpsd/gpsd/gpsd | 21 ++++++++++----- recipes-navigation/gpsd/gpsd/gpsd-default | 9 +++++-- recipes-navigation/gpsd/gpsd_3.18.1.bb | 44 +++++++++++++++++++++++++++++-- 3 files changed, 64 insertions(+), 10 deletions(-) diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index d544ff5..781e109 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -39,16 +39,25 @@ CAPABILITY=/sys/devices/platform/mts-io/capability/gps # Exit if no gps found ([[ -n $GPS_LINE ]] && [[ -c $GPS_LINE ]]) || exit 0 +# Assemble the GPS devices +# PPS device is needed so GPSD finds the PPS. +if [[ -c $GPS_PPS ]] ; then + : ${GPS_DEVICES:="$GPS_LINE $GPS_PPS"} +else + : ${GPS_DEVICES:="$GPS_LINE"} +fi + + # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 -if [ -z "$GPSD_SOCKET" ] && [ -z "$DEVICES" ]; then - GPSD_SOCKET=/var/run/gpsd.sock -fi +#if [ -z "$GPSD_SOCKET" ] && [ -z "$GPS_DEVICES" ]; then +# GPSD_SOCKET=/var/run/gpsd.sock +#fi -if [ -n "$GPSD_SOCKET" ]; then - GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" -fi +#if [ -n "$GPSD_SOCKET" ]; then +# GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" +#fi # # Function that starts the daemon/service diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index 98f998b..5c59791 100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -1,13 +1,18 @@ ENABLED="yes" -GPSD_SOCKET="/var/run/gpsd.sock" +#GPSD_SOCKET="/var/run/gpsd.sock" +GPSD_SOCKET="" GPSD_OPTIONS="-n -D 1" # Conduit 0.1 GPS devices GPS_LINE=/dev/gps0 +GPS_PPS=/dev/pps0 # Highest speed permitted by uBlox. GPS_BAUD=115200 -GPS_DEVICES="$GPS_LINE /dev/pps0" + +# Use this if you must use a specific pps +# that does not exist prior to gpsd running. +# GPS_DEVICES="/dev/gps1 /dev/pps1" GPS_FIXFILE=/var/run/gpsfix diff --git a/recipes-navigation/gpsd/gpsd_3.18.1.bb b/recipes-navigation/gpsd/gpsd_3.18.1.bb index 5a64d3e..10197f3 100644 --- a/recipes-navigation/gpsd/gpsd_3.18.1.bb +++ b/recipes-navigation/gpsd/gpsd_3.18.1.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m2" +PR="m3" EXTRANATIVEPATH += "chrpath-native" @@ -44,6 +44,8 @@ export HOST_SYS PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}" PACKAGECONFIG[bluez] = "bluez='false',${BLUEZ}" PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free" + +# Remove unneeded features. netfeed is needed by gpsmon EXTRA_OESCONS = " \ sysroot=${STAGING_DIR_TARGET} \ libQgpsmm='false' \ @@ -58,6 +60,42 @@ EXTRA_OESCONS = " \ gpsd_group='gps' \ ntpshm='yes' \ prefix='usr' \ + control_socket='false' \ + nofloats='yes' \ + ashtech='false' \ + earthmate='false' \ + evermore='false' \ + fury='false' \ + fv18='false' \ + garmin='false' \ + garmintxt='false' \ + geostar='false' \ + greis='false' \ + itrax='false' \ + mtk3301='false' \ + navcom='false' \ + nmea0183='true' \ + nmea2000='false' \ + oncore='false' \ + sirf='false' \ + skytraq='false' \ + superstar2='false' \ + tnt='false' \ + tripmate='false' \ + tsip='false' \ + ublox='true' \ + aivdm='false' \ + gpsclock='false' \ + isync='false' \ + ntrip='false' \ + oceanserver='false' \ + passthrough='false' \ + rtcm104v2='false' \ + rtcm104v3='false' \ + bluez='false' \ + ipv6='false' \ + netfeed='true' \ + usb='false' \ ${PACKAGECONFIG_CONFARGS} \ " # this cannot be used, because then chrpath is not found and only static lib is built @@ -143,7 +181,9 @@ FILES_${PN} += "${sbindir}/gpsd_ubx_fixed ${sbindir}/gpsd_ubx_settime" FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" RDEPENDS_${PN} = "gpsd-gpsctl bash" -RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" + +# gpsd-udev is for USB, which we are not using +RRECOMMENDS_${PN} = "gpsd-conf gpsd-machine-conf" SUMMARY_${PN}-udev = "udev relevant files to use gpsd hotplugging" FILES_${PN}-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" -- cgit v1.2.3 From 7b0d13957ea65e27d9f5bfa28e348dba678596a2 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 28 Feb 2019 22:39:51 -0600 Subject: Elminate gpsd-udev from image --- recipes-core/images/mlinux-factory-image.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/images/mlinux-factory-image.bb b/recipes-core/images/mlinux-factory-image.bb index c57f0a2..37a6533 100644 --- a/recipes-core/images/mlinux-factory-image.bb +++ b/recipes-core/images/mlinux-factory-image.bb @@ -92,6 +92,6 @@ IMAGE_INSTALL += "pps-tools" IMAGE_INSTALL += "dnsmasq bluez5-pand bluez5-rfcomm" # When ntp is to use the GPS, gps-utils is required -IMAGE_INSTALL += "gpsd libgps ntp ntp-utils gpspipe gps-utils gpsd-udev" +IMAGE_INSTALL += "gpsd libgps ntp ntp-utils gpspipe gps-utils" IMAGE_INSTALL += "lxfp uvccapture" -- cgit v1.2.3 From 53381d71d505eccc7b3964682df16881c8031c1e Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 28 Feb 2019 22:41:27 -0600 Subject: Add mtrv1 image with rs9113 for testing --- recipes-core/images/mlinux-mtrv1-image.bb | 71 +++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 recipes-core/images/mlinux-mtrv1-image.bb diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb new file mode 100644 index 0000000..1eca91a --- /dev/null +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -0,0 +1,71 @@ +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 \ + inetutils-ftp \ + openssl \ + rsync \ + iperf \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +WIFI_FEATURES = " \ + libnl \ + wpa-supplicant \ + wireless-tools \ + iw \ + hostap-daemon hostap-utils \ + " + +BLUETOOTH_FEATURES = "bluez5" + +# 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" + +# Extra stuff to install +IMAGE_INSTALL += "kernel-module-rs9113 rs9113-noarch rs9113-util" +IMAGE_INSTALL += "gpsd libgps ntp ntp-utils gpspipe gps-utils" + +IMAGE_INSTALL += " \ + ${WIFI_FEATURES} \ + ${BLUETOOTH_FEATURES} \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + " -- cgit v1.2.3 From 46d2cdb6e5adf99ad67da1199e51214eb6fc7cf1 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 1 Mar 2019 13:33:21 -0600 Subject: Bump version of mlinux-scripts for mlinux-set-apn changes for LAP3 --- recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb b/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb index 338b62f..27b09ff 100644 --- a/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb +++ b/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb @@ -2,6 +2,6 @@ DESCRIPTION = "Scripts to easily get started with common mLinux use cases" require mlinux-scripts.inc -PR = "r3" +PR = "r4" S = "${WORKDIR}/mlinux-scripts-${PV}" -- cgit v1.2.3 From d45bef878d625713fd71aac2bef9abcd9d634d50 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Thu, 7 Mar 2019 11:22:38 -0600 Subject: lora: update LNS to 2.2.17 --- .../lora/lora-network-server_2.1.5.bb | 47 --------------------- .../lora/lora-network-server_2.2.17.bb | 48 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 47 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-network-server_2.1.5.bb create mode 100644 recipes-connectivity/lora/lora-network-server_2.2.17.bb diff --git a/recipes-connectivity/lora/lora-network-server_2.1.5.bb b/recipes-connectivity/lora/lora-network-server_2.1.5.bb deleted file mode 100644 index 37f5328..0000000 --- a/recipes-connectivity/lora/lora-network-server_2.1.5.bb +++ /dev/null @@ -1,47 +0,0 @@ -DESCRIPTION = "MultiTech LoRa Network Server" -PRIORITY = "optional" -SECTION = "console/utils" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ae2ad602b723a163cd33ca5ee991fbcd" -DEPENDS = "jsoncpp libmts mosquitto sqlite3 curl gnutls" -RDEPENDS_${PN} += "lora-packet-forwarder logrotate bash lora-logging" -PR = "r5" -CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" - -SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ - file://lora-network-server.init \ - file://lora-network-server.default \ - " - -SRC_URI[md5sum] = "c4701d75dccdf6b0413302da52e14172" -SRC_URI[sha256sum] = "f3f695d9ff99136158281c7d9057d29769ed756456cd4ae62ac282f4dfb86aab" - -# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server - 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-network-server_2.2.17.bb b/recipes-connectivity/lora/lora-network-server_2.2.17.bb new file mode 100644 index 0000000..07bd070 --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server_2.2.17.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 = "r8" +CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" + +SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ + file://lora-network-server.init \ + file://lora-network-server.default \ + " + +SRC_URI[md5sum] = "99f715c93d97bc2aed39853362a3227d" +SRC_URI[sha256sum] = "d397bfc59f52eb8185c3a924bfc629f16fb3621dd9e4009194ae86b36d71c4e5" + +# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server + install -m 0755 lora-v21-keygen ${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" -- cgit v1.2.3 From e86758a0c1061567c98ab6f7e20e6fba2fe3e622 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 7 Mar 2019 11:59:27 -0600 Subject: Update hostapd to latest --- .../hostapd/hostap-daemon-2.6/default | 6 - .../hostapd/hostap-daemon-2.6/defconfig | 319 --------------------- .../hostapd/hostap-daemon-2.6/init | 49 ---- ...-Avoid-key-reinstallation-in-FT-handshake.patch | 174 ----------- ...nstallation-of-an-already-in-use-group-ke.patch | 250 ---------------- ...ection-of-GTK-IGTK-reinstallation-of-WNM-.patch | 184 ------------ ...04-Prevent-installation-of-an-all-zero-TK.patch | 79 ----- ...Fix-PTK-rekeying-to-generate-a-new-ANonce.patch | 64 ----- ...6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch | 132 --------- ...llow-multiple-Reassociation-Response-fram.patch | 82 ------ .../hostapd/hostap-daemon-2.7/default | 6 + .../hostapd/hostap-daemon-2.7/defconfig | 319 +++++++++++++++++++++ .../hostapd/hostap-daemon-2.7/init | 49 ++++ recipes-connectivity/hostapd/hostap-daemon_2.6.bb | 45 --- recipes-connectivity/hostapd/hostap-daemon_2.7.bb | 44 +++ 15 files changed, 418 insertions(+), 1384 deletions(-) delete mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.6/default delete mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.6/defconfig delete mode 100755 recipes-connectivity/hostapd/hostap-daemon-2.6/init delete mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch delete mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch delete mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch delete mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch delete mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch delete mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch delete mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch create mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.7/default create mode 100644 recipes-connectivity/hostapd/hostap-daemon-2.7/defconfig create mode 100755 recipes-connectivity/hostapd/hostap-daemon-2.7/init delete mode 100644 recipes-connectivity/hostapd/hostap-daemon_2.6.bb create mode 100644 recipes-connectivity/hostapd/hostap-daemon_2.7.bb diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.6/default b/recipes-connectivity/hostapd/hostap-daemon-2.6/default deleted file mode 100644 index afc965d..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon-2.6/default +++ /dev/null @@ -1,6 +0,0 @@ -# set to "yes" to start hostapd on boot -START_ON_BOOT="no" -# Stuff to creat the device if needed. -DEV=wifi1 -PREUP="[[ -d /sys/class/net/${DEV} ]] || /opt/rs9113/onebox_util rpine0 create_vap ${DEV} ap" -POSTUP="ifup wifi1" diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.6/defconfig b/recipes-connectivity/hostapd/hostap-daemon-2.6/defconfig deleted file mode 100644 index 321b7c1..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon-2.6/defconfig +++ /dev/null @@ -1,319 +0,0 @@ -# Example hostapd build time configuration -# -# This file lists the configuration options that are used when building the -# hostapd binary. All lines starting with # are ignored. Configuration option -# lines must be commented out complete, if they are not to be included, i.e., -# just setting VARIABLE=n is not disabling that variable. -# -# This file is included in Makefile, so variables like CFLAGS and LIBS can also -# be modified from here. In most cass, these lines should use += in order not -# to override previous values of the variables. - -# Driver interface for Host AP driver -CONFIG_DRIVER_HOSTAP=y - -# Driver interface for wired authenticator -CONFIG_DRIVER_WIRED=y - -# Driver interface for madwifi driver -#CONFIG_DRIVER_MADWIFI=y -#CFLAGS += -I../../madwifi # change to the madwifi source directory - -# Driver interface for drivers using the nl80211 kernel interface -CONFIG_DRIVER_NL80211=y -CONFIG_LIBNL32=y - -# driver_nl80211.c requires libnl. If you are compiling it yourself -# you may need to point hostapd to your version of libnl. -# -#CFLAGS += -I$ -#LIBS += -L$ - -# Use libnl v2.0 (or 3.0) libraries. -#CONFIG_LIBNL20=y - -# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored) -#CONFIG_LIBNL32=y - - -# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) -#CONFIG_DRIVER_BSD=y -#CFLAGS += -I/usr/local/include -#LIBS += -L/usr/local/lib -#LIBS_p += -L/usr/local/lib -#LIBS_c += -L/usr/local/lib - -# Driver interface for no driver (e.g., RADIUS server only) -CONFIG_DRIVER_NONE=y - -# IEEE 802.11F/IAPP -CONFIG_IAPP=y - -# WPA2/IEEE 802.11i RSN pre-authentication -CONFIG_RSN_PREAUTH=y - -# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) -CONFIG_PEERKEY=y - -# IEEE 802.11w (management frame protection) -CONFIG_IEEE80211W=y - -# Integrated EAP server -CONFIG_EAP=y - -# EAP-MD5 for the integrated EAP server -CONFIG_EAP_MD5=y - -# EAP-TLS for the integrated EAP server -CONFIG_EAP_TLS=y - -# EAP-MSCHAPv2 for the integrated EAP server -CONFIG_EAP_MSCHAPV2=y - -# EAP-PEAP for the integrated EAP server -CONFIG_EAP_PEAP=y - -# EAP-GTC for the integrated EAP server -CONFIG_EAP_GTC=y - -# EAP-TTLS for the integrated EAP server -CONFIG_EAP_TTLS=y - -# EAP-SIM for the integrated EAP server -#CONFIG_EAP_SIM=y - -# EAP-AKA for the integrated EAP server -#CONFIG_EAP_AKA=y - -# EAP-AKA' for the integrated EAP server -# This requires CONFIG_EAP_AKA to be enabled, too. -#CONFIG_EAP_AKA_PRIME=y - -# EAP-PAX for the integrated EAP server -#CONFIG_EAP_PAX=y - -# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK) -#CONFIG_EAP_PSK=y - -# EAP-pwd for the integrated EAP server (secure authentication with a password) -#CONFIG_EAP_PWD=y - -# EAP-SAKE for the integrated EAP server -#CONFIG_EAP_SAKE=y - -# EAP-GPSK for the integrated EAP server -#CONFIG_EAP_GPSK=y -# Include support for optional SHA256 cipher suite in EAP-GPSK -#CONFIG_EAP_GPSK_SHA256=y - -# EAP-FAST for the integrated EAP server -# Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed -# for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g., -# with openssl-0.9.8x-tls-extensions.patch, to add the needed functions. -CONFIG_EAP_FAST=y - -# Wi-Fi Protected Setup (WPS) -CONFIG_WPS=y -# Enable UPnP support for external WPS Registrars -CONFIG_WPS_UPNP=y -# Enable WPS support with NFC config method -#CONFIG_WPS_NFC=y - -# EAP-IKEv2 -#CONFIG_EAP_IKEV2=y - -# Trusted Network Connect (EAP-TNC) -#CONFIG_EAP_TNC=y - -# EAP-EKE for the integrated EAP server -#CONFIG_EAP_EKE=y - -# PKCS#12 (PFX) support (used to read private key and certificate file from -# a file that usually has extension .p12 or .pfx) -CONFIG_PKCS12=y - -# RADIUS authentication server. This provides access to the integrated EAP -# server from external hosts using RADIUS. -CONFIG_RADIUS_SERVER=y - -# Build IPv6 support for RADIUS operations -CONFIG_IPV6=y - -# IEEE Std 802.11r-2008 (Fast BSS Transition) -#CONFIG_IEEE80211R=y - -# Use the hostapd's IEEE 802.11 authentication (ACL), but without -# the IEEE 802.11 Management capability (e.g., madwifi or FreeBSD/net80211) -#CONFIG_DRIVER_RADIUS_ACL=y - -# IEEE 802.11n (High Throughput) support -CONFIG_IEEE80211N=y - -# Wireless Network Management (IEEE Std 802.11v-2011) -# Note: This is experimental and not complete implementation. -CONFIG_WNM=y - -# IEEE 802.11ac (Very High Throughput) support -CONFIG_IEEE80211AC=y - -# Remove debugging code that is printing out debug messages to stdout. -# This can be used to reduce the size of the hostapd considerably if debugging -# code is not needed. -#CONFIG_NO_STDOUT_DEBUG=y - -# Add support for writing debug log to a file: -f /tmp/hostapd.log -# Disabled by default. -#CONFIG_DEBUG_FILE=y - -# Add support for sending all debug messages (regardless of debug verbosity) -# to the Linux kernel tracing facility. This helps debug the entire stack by -# making it easy to record everything happening from the driver up into the -# same file, e.g., using trace-cmd. -#CONFIG_DEBUG_LINUX_TRACING=y - -# Remove support for RADIUS accounting -#CONFIG_NO_ACCOUNTING=y - -# Remove support for RADIUS -#CONFIG_NO_RADIUS=y - -# Remove support for VLANs -#CONFIG_NO_VLAN=y - -# Enable support for fully dynamic VLANs. This enables hostapd to -# automatically create bridge and VLAN interfaces if necessary. -#CONFIG_FULL_DYNAMIC_VLAN=y - -# Use netlink-based kernel API for VLAN operations instead of ioctl() -# Note: This requires libnl 3.1 or newer. -#CONFIG_VLAN_NETLINK=y - -# Remove support for dumping internal state through control interface commands -# This can be used to reduce binary size at the cost of disabling a debugging -# option. -#CONFIG_NO_DUMP_STATE=y - -# Enable tracing code for developer debugging -# This tracks use of memory allocations and other registrations and reports -# incorrect use with a backtrace of call (or allocation) location. -#CONFIG_WPA_TRACE=y -# For BSD, comment out these. -#LIBS += -lexecinfo -#LIBS_p += -lexecinfo -#LIBS_c += -lexecinfo - -# Use libbfd to get more details for developer debugging -# This enables use of libbfd to get more detailed symbols for the backtraces -# generated by CONFIG_WPA_TRACE=y. -#CONFIG_WPA_TRACE_BFD=y -# For BSD, comment out these. -#LIBS += -lbfd -liberty -lz -#LIBS_p += -lbfd -liberty -lz -#LIBS_c += -lbfd -liberty -lz - -# hostapd depends on strong random number generation being available from the -# operating system. os_get_random() function is used to fetch random data when -# needed, e.g., for key generation. On Linux and BSD systems, this works by -# reading /dev/urandom. It should be noted that the OS entropy pool needs to be -# properly initialized before hostapd is started. This is important especially -# on embedded devices that do not have a hardware random number generator and -# may by default start up with minimal entropy available for random number -# generation. -# -# As a safety net, hostapd is by default trying to internally collect -# additional entropy for generating random data to mix in with the data -# fetched from the OS. This by itself is not considered to be very strong, but -# it may help in cases where the system pool is not initialized properly. -# However, it is very strongly recommended that the system pool is initialized -# with enough entropy either by using hardware assisted random number -# generator or by storing state over device reboots. -# -# hostapd can be configured to maintain its own entropy store over restarts to -# enhance random number generation. This is not perfect, but it is much more -# secure than using the same sequence of random numbers after every reboot. -# This can be enabled with -e command line option. The specified -# file needs to be readable and writable by hostapd. -# -# If the os_get_random() is known to provide strong random data (e.g., on -# Linux/BSD, the board in question is known to have reliable source of random -# data from /dev/urandom), the internal hostapd random pool can be disabled. -# This will save some in binary size and CPU use. However, this should only be -# considered for builds that are known to be used on devices that meet the -# requirements described above. -#CONFIG_NO_RANDOM_POOL=y - -# Select TLS implementation -# openssl = OpenSSL (default) -# gnutls = GnuTLS -# internal = Internal TLSv1 implementation (experimental) -# none = Empty template -#CONFIG_TLS=openssl -CONFIG_TLS=internal - -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1) -# can be enabled to get a stronger construction of messages when block ciphers -# are used. -CONFIG_TLSV11=y - -# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2) -# can be enabled to enable use of stronger crypto algorithms. -#CONFIG_TLSV12=y - -# If CONFIG_TLS=internal is used, additional library and include paths are -# needed for LibTomMath. Alternatively, an integrated, minimal version of -# LibTomMath can be used. See beginning of libtommath.c for details on benefits -# and drawbacks of this option. -CONFIG_INTERNAL_LIBTOMMATH=y -ifndef CONFIG_INTERNAL_LIBTOMMATH -LTM_PATH=/usr/src/libtommath-0.39 -CFLAGS += -I$(LTM_PATH) -LIBS += -L$(LTM_PATH) -LIBS_p += -L$(LTM_PATH) -endif -# At the cost of about 4 kB of additional binary size, the internal LibTomMath -# can be configured to include faster routines for exptmod, sqr, and div to -# speed up DH and RSA calculation considerably -#CONFIG_INTERNAL_LIBTOMMATH_FAST=y - -# Interworking (IEEE 802.11u) -# This can be used to enable functionality to improve interworking with -# external networks. -#CONFIG_INTERWORKING=y - -# Hotspot 2.0 -#CONFIG_HS20=y - -# Enable SQLite database support in hlr_auc_gw, EAP-SIM DB, and eap_user_file -CONFIG_SQLITE=y - -# Testing options -# This can be used to enable some testing options (see also the example -# configuration file) that are really useful only for testing clients that -# connect to this hostapd. These options allow, for example, to drop a -# certain percentage of probe requests or auth/(re)assoc frames. -# -CONFIG_TESTING_OPTIONS=y - -# Automatic Channel Selection -# This will allow hostapd to pick the channel automatically when channel is set -# to "acs_survey" or "0". Eventually, other ACS algorithms can be added in -# similar way. -# -# Automatic selection is currently only done through initialization, later on -# we hope to do background checks to keep us moving to more ideal channels as -# time goes by. ACS is currently only supported through the nl80211 driver and -# your driver must have survey dump capability that is filled by the driver -# during scanning. -# -# You can customize the ACS survey algorithm with the hostapd.conf variable -# acs_num_scans. -# -# Supported ACS drivers: -# * ath9k -# * ath5k -# * ath10k -# -# For more details refer to: -# http://wireless.kernel.org/en/users/Documentation/acs -# -CONFIG_ACS=y diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.6/init b/recipes-connectivity/hostapd/hostap-daemon-2.6/init deleted file mode 100755 index 5bd7ab6..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon-2.6/init +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -DAEMON=/usr/sbin/hostapd -NAME=hostapd -DESC="HOSTAP Daemon" -ARGS="/etc/hostapd.conf -B" - -test -f $DAEMON || exit 0 - -[ -f /etc/default/$NAME ] && . /etc/default/$NAME - - -set -e - -case "$1" in - start) - if [ "$START_ON_BOOT" != "yes" ]; then - exit 0 - fi - if [[ -n $PREUP ]] ; then - bash -c "$PREUP" - fi - echo -n "Starting $DESC: " - start-stop-daemon -S -x $DAEMON -- $ARGS - if [[ -n $POSTUP ]] ; then - bash -c "$POSTUP" - fi - echo "$NAME." - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon -K -x $DAEMON - echo "$NAME." - ;; - restart) - $0 stop - $0 start - ;; - reload) - echo -n "Reloading $DESC: " - killall -HUP $(basename ${DAEMON}) - echo "$NAME." - ;; - *) - echo "Usage: $0 {start|stop|restart|reload}" - exit 1 - ;; -esac - -exit 0 diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch b/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch deleted file mode 100644 index 7276848..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch +++ /dev/null @@ -1,174 +0,0 @@ -From cf4cab804c7afd5c45505528a8d16e46163243a2 Mon Sep 17 00:00:00 2001 -From: Mathy Vanhoef -Date: Fri, 14 Jul 2017 15:15:35 +0200 -Subject: [PATCH 1/8] hostapd: Avoid key reinstallation in FT handshake - -Do not reinstall TK to the driver during Reassociation Response frame -processing if the first attempt of setting the TK succeeded. This avoids -issues related to clearing the TX/RX PN that could result in reusing -same PN values for transmitted frames (e.g., due to CCM nonce reuse and -also hitting replay protection on the receiver) and accepting replayed -frames on RX side. - -This issue was introduced by the commit -0e84c25434e6a1f283c7b4e62e483729085b78d2 ('FT: Fix PTK configuration in -authenticator') which allowed wpa_ft_install_ptk() to be called multiple -times with the same PTK. While the second configuration attempt is -needed with some drivers, it must be done only if the first attempt -failed. - -Signed-off-by: Mathy Vanhoef ---- - src/ap/ieee802_11.c | 16 +++++++++++++--- - src/ap/wpa_auth.c | 11 +++++++++++ - src/ap/wpa_auth.h | 3 ++- - src/ap/wpa_auth_ft.c | 10 ++++++++++ - src/ap/wpa_auth_i.h | 1 + - 5 files changed, 37 insertions(+), 4 deletions(-) - -diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c -index 4e04169..333035f 100644 ---- a/src/ap/ieee802_11.c -+++ b/src/ap/ieee802_11.c -@@ -1841,6 +1841,7 @@ static int add_associated_sta(struct hostapd_data *hapd, - { - struct ieee80211_ht_capabilities ht_cap; - struct ieee80211_vht_capabilities vht_cap; -+ int set = 1; - - /* - * Remove the STA entry to ensure the STA PS state gets cleared and -@@ -1848,9 +1849,18 @@ static int add_associated_sta(struct hostapd_data *hapd, - * FT-over-the-DS, where a station re-associates back to the same AP but - * skips the authentication flow, or if working with a driver that - * does not support full AP client state. -+ * -+ * Skip this if the STA has already completed FT reassociation and the -+ * TK has been configured since the TX/RX PN must not be reset to 0 for -+ * the same key. - */ -- if (!sta->added_unassoc) -+ if (!sta->added_unassoc && -+ (!(sta->flags & WLAN_STA_AUTHORIZED) || -+ !wpa_auth_sta_ft_tk_already_set(sta->wpa_sm))) { - hostapd_drv_sta_remove(hapd, sta->addr); -+ wpa_auth_sm_event(sta->wpa_sm, WPA_DRV_STA_REMOVED); -+ set = 0; -+ } - - #ifdef CONFIG_IEEE80211N - if (sta->flags & WLAN_STA_HT) -@@ -1873,11 +1883,11 @@ static int add_associated_sta(struct hostapd_data *hapd, - sta->flags & WLAN_STA_VHT ? &vht_cap : NULL, - sta->flags | WLAN_STA_ASSOC, sta->qosinfo, - sta->vht_opmode, sta->p2p_ie ? 1 : 0, -- sta->added_unassoc)) { -+ set)) { - hostapd_logger(hapd, sta->addr, - HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_NOTICE, - "Could not %s STA to kernel driver", -- sta->added_unassoc ? "set" : "add"); -+ set ? "set" : "add"); - - if (sta->added_unassoc) { - hostapd_drv_sta_remove(hapd, sta->addr); -diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c -index 3587086..707971d 100644 ---- a/src/ap/wpa_auth.c -+++ b/src/ap/wpa_auth.c -@@ -1745,6 +1745,9 @@ int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event) - #else /* CONFIG_IEEE80211R */ - break; - #endif /* CONFIG_IEEE80211R */ -+ case WPA_DRV_STA_REMOVED: -+ sm->tk_already_set = FALSE; -+ return 0; - } - - #ifdef CONFIG_IEEE80211R -@@ -3250,6 +3253,14 @@ int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm) - } - - -+int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm) -+{ -+ if (!sm || !wpa_key_mgmt_ft(sm->wpa_key_mgmt)) -+ return 0; -+ return sm->tk_already_set; -+} -+ -+ - int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm, - struct rsn_pmksa_cache_entry *entry) - { -diff --git a/src/ap/wpa_auth.h b/src/ap/wpa_auth.h -index 0de8d97..97461b0 100644 ---- a/src/ap/wpa_auth.h -+++ b/src/ap/wpa_auth.h -@@ -267,7 +267,7 @@ void wpa_receive(struct wpa_authenticator *wpa_auth, - u8 *data, size_t data_len); - enum wpa_event { - WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH, -- WPA_REAUTH_EAPOL, WPA_ASSOC_FT -+ WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_DRV_STA_REMOVED - }; - void wpa_remove_ptk(struct wpa_state_machine *sm); - int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event); -@@ -280,6 +280,7 @@ int wpa_auth_pairwise_set(struct wpa_state_machine *sm); - int wpa_auth_get_pairwise(struct wpa_state_machine *sm); - int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm); - int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm); -+int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm); - int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm, - struct rsn_pmksa_cache_entry *entry); - struct rsn_pmksa_cache_entry * -diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c -index 42242a5..e63b99a 100644 ---- a/src/ap/wpa_auth_ft.c -+++ b/src/ap/wpa_auth_ft.c -@@ -780,6 +780,14 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm) - return; - } - -+ if (sm->tk_already_set) { -+ /* Must avoid TK reconfiguration to prevent clearing of TX/RX -+ * PN in the driver */ -+ wpa_printf(MSG_DEBUG, -+ "FT: Do not re-install same PTK to the driver"); -+ return; -+ } -+ - /* FIX: add STA entry to kernel/driver here? The set_key will fail - * most likely without this.. At the moment, STA entry is added only - * after association has been completed. This function will be called -@@ -792,6 +800,7 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm) - - /* FIX: MLME-SetProtection.Request(TA, Tx_Rx) */ - sm->pairwise_set = TRUE; -+ sm->tk_already_set = TRUE; - } - - -@@ -898,6 +907,7 @@ static int wpa_ft_process_auth_req(struct wpa_state_machine *sm, - - sm->pairwise = pairwise; - sm->PTK_valid = TRUE; -+ sm->tk_already_set = FALSE; - wpa_ft_install_ptk(sm); - - buflen = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) + -diff --git a/src/ap/wpa_auth_i.h b/src/ap/wpa_auth_i.h -index 72b7eb3..7fd8f05 100644 ---- a/src/ap/wpa_auth_i.h -+++ b/src/ap/wpa_auth_i.h -@@ -65,6 +65,7 @@ struct wpa_state_machine { - struct wpa_ptk PTK; - Boolean PTK_valid; - Boolean pairwise_set; -+ Boolean tk_already_set; - int keycount; - Boolean Pair; - struct wpa_key_replay_counter { --- -2.7.4 - diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch b/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch deleted file mode 100644 index 1802d66..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch +++ /dev/null @@ -1,250 +0,0 @@ -From 927f891007c402fefd1ff384645b3f07597c3ede Mon Sep 17 00:00:00 2001 -From: Mathy Vanhoef -Date: Wed, 12 Jul 2017 16:03:24 +0200 -Subject: [PATCH 2/8] Prevent reinstallation of an already in-use group key - -Track the current GTK and IGTK that is in use and when receiving a -(possibly retransmitted) Group Message 1 or WNM-Sleep Mode Response, do -not install the given key if it is already in use. This prevents an -attacker from trying to trick the client into resetting or lowering the -sequence counter associated to the group key. - -Signed-off-by: Mathy Vanhoef ---- - src/common/wpa_common.h | 11 +++++ - src/rsn_supp/wpa.c | 116 ++++++++++++++++++++++++++++++------------------ - src/rsn_supp/wpa_i.h | 4 ++ - 3 files changed, 87 insertions(+), 44 deletions(-) - -diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h -index af1d0f0..d200285 100644 ---- a/src/common/wpa_common.h -+++ b/src/common/wpa_common.h -@@ -217,6 +217,17 @@ struct wpa_ptk { - size_t tk_len; - }; - -+struct wpa_gtk { -+ u8 gtk[WPA_GTK_MAX_LEN]; -+ size_t gtk_len; -+}; -+ -+#ifdef CONFIG_IEEE80211W -+struct wpa_igtk { -+ u8 igtk[WPA_IGTK_MAX_LEN]; -+ size_t igtk_len; -+}; -+#endif /* CONFIG_IEEE80211W */ - - /* WPA IE version 1 - * 00-50-f2:1 (OUI:OUI type) -diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c -index 3c47879..95bd7be 100644 ---- a/src/rsn_supp/wpa.c -+++ b/src/rsn_supp/wpa.c -@@ -714,6 +714,15 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm, - const u8 *_gtk = gd->gtk; - u8 gtk_buf[32]; - -+ /* Detect possible key reinstallation */ -+ if (sm->gtk.gtk_len == (size_t) gd->gtk_len && -+ os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) { -+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, -+ "WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)", -+ gd->keyidx, gd->tx, gd->gtk_len); -+ return 0; -+ } -+ - wpa_hexdump_key(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len); - wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, - "WPA: Installing GTK to the driver (keyidx=%d tx=%d len=%d)", -@@ -748,6 +757,9 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm, - } - os_memset(gtk_buf, 0, sizeof(gtk_buf)); - -+ sm->gtk.gtk_len = gd->gtk_len; -+ os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len); -+ - return 0; - } - -@@ -854,6 +866,48 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm, - } - - -+#ifdef CONFIG_IEEE80211W -+static int wpa_supplicant_install_igtk(struct wpa_sm *sm, -+ const struct wpa_igtk_kde *igtk) -+{ -+ size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher); -+ u16 keyidx = WPA_GET_LE16(igtk->keyid); -+ -+ /* Detect possible key reinstallation */ -+ if (sm->igtk.igtk_len == len && -+ os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) { -+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, -+ "WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)", -+ keyidx); -+ return 0; -+ } -+ -+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, -+ "WPA: IGTK keyid %d pn %02x%02x%02x%02x%02x%02x", -+ keyidx, MAC2STR(igtk->pn)); -+ wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", igtk->igtk, len); -+ if (keyidx > 4095) { -+ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, -+ "WPA: Invalid IGTK KeyID %d", keyidx); -+ return -1; -+ } -+ if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), -+ broadcast_ether_addr, -+ keyidx, 0, igtk->pn, sizeof(igtk->pn), -+ igtk->igtk, len) < 0) { -+ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, -+ "WPA: Failed to configure IGTK to the driver"); -+ return -1; -+ } -+ -+ sm->igtk.igtk_len = len; -+ os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len); -+ -+ return 0; -+} -+#endif /* CONFIG_IEEE80211W */ -+ -+ - static int ieee80211w_set_keys(struct wpa_sm *sm, - struct wpa_eapol_ie_parse *ie) - { -@@ -864,30 +918,14 @@ static int ieee80211w_set_keys(struct wpa_sm *sm, - if (ie->igtk) { - size_t len; - const struct wpa_igtk_kde *igtk; -- u16 keyidx; -+ - len = wpa_cipher_key_len(sm->mgmt_group_cipher); - if (ie->igtk_len != WPA_IGTK_KDE_PREFIX_LEN + len) - return -1; -+ - igtk = (const struct wpa_igtk_kde *) ie->igtk; -- keyidx = WPA_GET_LE16(igtk->keyid); -- wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: IGTK keyid %d " -- "pn %02x%02x%02x%02x%02x%02x", -- keyidx, MAC2STR(igtk->pn)); -- wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", -- igtk->igtk, len); -- if (keyidx > 4095) { -- wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, -- "WPA: Invalid IGTK KeyID %d", keyidx); -- return -1; -- } -- if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), -- broadcast_ether_addr, -- keyidx, 0, igtk->pn, sizeof(igtk->pn), -- igtk->igtk, len) < 0) { -- wpa_msg(sm->ctx->msg_ctx, MSG_WARNING, -- "WPA: Failed to configure IGTK to the driver"); -+ if (wpa_supplicant_install_igtk(sm, igtk) < 0) - return -1; -- } - } - - return 0; -@@ -2307,7 +2345,7 @@ void wpa_sm_deinit(struct wpa_sm *sm) - */ - void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) - { -- int clear_ptk = 1; -+ int clear_keys = 1; - - if (sm == NULL) - return; -@@ -2333,11 +2371,11 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) - /* Prepare for the next transition */ - wpa_ft_prepare_auth_request(sm, NULL); - -- clear_ptk = 0; -+ clear_keys = 0; - } - #endif /* CONFIG_IEEE80211R */ - -- if (clear_ptk) { -+ if (clear_keys) { - /* - * IEEE 802.11, 8.4.10: Delete PTK SA on (re)association if - * this is not part of a Fast BSS Transition. -@@ -2347,6 +2385,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) - os_memset(&sm->ptk, 0, sizeof(sm->ptk)); - sm->tptk_set = 0; - os_memset(&sm->tptk, 0, sizeof(sm->tptk)); -+ os_memset(&sm->gtk, 0, sizeof(sm->gtk)); -+#ifdef CONFIG_IEEE80211W -+ os_memset(&sm->igtk, 0, sizeof(sm->igtk)); -+#endif /* CONFIG_IEEE80211W */ - } - - #ifdef CONFIG_TDLS -@@ -2877,6 +2919,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm) - os_memset(sm->pmk, 0, sizeof(sm->pmk)); - os_memset(&sm->ptk, 0, sizeof(sm->ptk)); - os_memset(&sm->tptk, 0, sizeof(sm->tptk)); -+ os_memset(&sm->gtk, 0, sizeof(sm->gtk)); -+#ifdef CONFIG_IEEE80211W -+ os_memset(&sm->igtk, 0, sizeof(sm->igtk)); -+#endif /* CONFIG_IEEE80211W */ - #ifdef CONFIG_IEEE80211R - os_memset(sm->xxkey, 0, sizeof(sm->xxkey)); - os_memset(sm->pmk_r0, 0, sizeof(sm->pmk_r0)); -@@ -2949,29 +2995,11 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf) - os_memset(&gd, 0, sizeof(gd)); - #ifdef CONFIG_IEEE80211W - } else if (subelem_id == WNM_SLEEP_SUBELEM_IGTK) { -- struct wpa_igtk_kde igd; -- u16 keyidx; -- -- os_memset(&igd, 0, sizeof(igd)); -- keylen = wpa_cipher_key_len(sm->mgmt_group_cipher); -- os_memcpy(igd.keyid, buf + 2, 2); -- os_memcpy(igd.pn, buf + 4, 6); -- -- keyidx = WPA_GET_LE16(igd.keyid); -- os_memcpy(igd.igtk, buf + 10, keylen); -- -- wpa_hexdump_key(MSG_DEBUG, "Install IGTK (WNM SLEEP)", -- igd.igtk, keylen); -- if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher), -- broadcast_ether_addr, -- keyidx, 0, igd.pn, sizeof(igd.pn), -- igd.igtk, keylen) < 0) { -- wpa_printf(MSG_DEBUG, "Failed to install the IGTK in " -- "WNM mode"); -- os_memset(&igd, 0, sizeof(igd)); -+ const struct wpa_igtk_kde *igtk; -+ -+ igtk = (const struct wpa_igtk_kde *) (buf + 2); -+ if (wpa_supplicant_install_igtk(sm, igtk) < 0) - return -1; -- } -- os_memset(&igd, 0, sizeof(igd)); - #endif /* CONFIG_IEEE80211W */ - } else { - wpa_printf(MSG_DEBUG, "Unknown element id"); -diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h -index f653ba6..afc9e37 100644 ---- a/src/rsn_supp/wpa_i.h -+++ b/src/rsn_supp/wpa_i.h -@@ -31,6 +31,10 @@ struct wpa_sm { - u8 rx_replay_counter[WPA_REPLAY_COUNTER_LEN]; - int rx_replay_counter_set; - u8 request_counter[WPA_REPLAY_COUNTER_LEN]; -+ struct wpa_gtk gtk; -+#ifdef CONFIG_IEEE80211W -+ struct wpa_igtk igtk; -+#endif /* CONFIG_IEEE80211W */ - - struct eapol_sm *eapol; /* EAPOL state machine from upper level code */ - --- -2.7.4 - diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch b/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch deleted file mode 100644 index e2937b8..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch +++ /dev/null @@ -1,184 +0,0 @@ -From 8280294e74846ea342389a0cd17215050fa5afe8 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sun, 1 Oct 2017 12:12:24 +0300 -Subject: [PATCH 3/8] Extend protection of GTK/IGTK reinstallation of WNM-Sleep - Mode cases - -This extends the protection to track last configured GTK/IGTK value -separately from EAPOL-Key frames and WNM-Sleep Mode frames to cover a -corner case where these two different mechanisms may get used when the -GTK/IGTK has changed and tracking a single value is not sufficient to -detect a possible key reconfiguration. - -Signed-off-by: Jouni Malinen ---- - src/rsn_supp/wpa.c | 53 +++++++++++++++++++++++++++++++++++++--------------- - src/rsn_supp/wpa_i.h | 2 ++ - 2 files changed, 40 insertions(+), 15 deletions(-) - -diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c -index 95bd7be..7a2c68d 100644 ---- a/src/rsn_supp/wpa.c -+++ b/src/rsn_supp/wpa.c -@@ -709,14 +709,17 @@ struct wpa_gtk_data { - - static int wpa_supplicant_install_gtk(struct wpa_sm *sm, - const struct wpa_gtk_data *gd, -- const u8 *key_rsc) -+ const u8 *key_rsc, int wnm_sleep) - { - const u8 *_gtk = gd->gtk; - u8 gtk_buf[32]; - - /* Detect possible key reinstallation */ -- if (sm->gtk.gtk_len == (size_t) gd->gtk_len && -- os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) { -+ if ((sm->gtk.gtk_len == (size_t) gd->gtk_len && -+ os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) || -+ (sm->gtk_wnm_sleep.gtk_len == (size_t) gd->gtk_len && -+ os_memcmp(sm->gtk_wnm_sleep.gtk, gd->gtk, -+ sm->gtk_wnm_sleep.gtk_len) == 0)) { - wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, - "WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)", - gd->keyidx, gd->tx, gd->gtk_len); -@@ -757,8 +760,14 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm, - } - os_memset(gtk_buf, 0, sizeof(gtk_buf)); - -- sm->gtk.gtk_len = gd->gtk_len; -- os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len); -+ if (wnm_sleep) { -+ sm->gtk_wnm_sleep.gtk_len = gd->gtk_len; -+ os_memcpy(sm->gtk_wnm_sleep.gtk, gd->gtk, -+ sm->gtk_wnm_sleep.gtk_len); -+ } else { -+ sm->gtk.gtk_len = gd->gtk_len; -+ os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len); -+ } - - return 0; - } -@@ -852,7 +861,7 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm, - (wpa_supplicant_check_group_cipher(sm, sm->group_cipher, - gtk_len, gtk_len, - &gd.key_rsc_len, &gd.alg) || -- wpa_supplicant_install_gtk(sm, &gd, key_rsc))) { -+ wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0))) { - wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, - "RSN: Failed to install GTK"); - os_memset(&gd, 0, sizeof(gd)); -@@ -868,14 +877,18 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm, - - #ifdef CONFIG_IEEE80211W - static int wpa_supplicant_install_igtk(struct wpa_sm *sm, -- const struct wpa_igtk_kde *igtk) -+ const struct wpa_igtk_kde *igtk, -+ int wnm_sleep) - { - size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher); - u16 keyidx = WPA_GET_LE16(igtk->keyid); - - /* Detect possible key reinstallation */ -- if (sm->igtk.igtk_len == len && -- os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) { -+ if ((sm->igtk.igtk_len == len && -+ os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) || -+ (sm->igtk_wnm_sleep.igtk_len == len && -+ os_memcmp(sm->igtk_wnm_sleep.igtk, igtk->igtk, -+ sm->igtk_wnm_sleep.igtk_len) == 0)) { - wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, - "WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)", - keyidx); -@@ -900,8 +913,14 @@ static int wpa_supplicant_install_igtk(struct wpa_sm *sm, - return -1; - } - -- sm->igtk.igtk_len = len; -- os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len); -+ if (wnm_sleep) { -+ sm->igtk_wnm_sleep.igtk_len = len; -+ os_memcpy(sm->igtk_wnm_sleep.igtk, igtk->igtk, -+ sm->igtk_wnm_sleep.igtk_len); -+ } else { -+ sm->igtk.igtk_len = len; -+ os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len); -+ } - - return 0; - } -@@ -924,7 +943,7 @@ static int ieee80211w_set_keys(struct wpa_sm *sm, - return -1; - - igtk = (const struct wpa_igtk_kde *) ie->igtk; -- if (wpa_supplicant_install_igtk(sm, igtk) < 0) -+ if (wpa_supplicant_install_igtk(sm, igtk, 0) < 0) - return -1; - } - -@@ -1574,7 +1593,7 @@ static void wpa_supplicant_process_1_of_2(struct wpa_sm *sm, - if (wpa_supplicant_rsc_relaxation(sm, key->key_rsc)) - key_rsc = null_rsc; - -- if (wpa_supplicant_install_gtk(sm, &gd, key_rsc) || -+ if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0) || - wpa_supplicant_send_2_of_2(sm, key, ver, key_info) < 0) - goto failed; - os_memset(&gd, 0, sizeof(gd)); -@@ -2386,8 +2405,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid) - sm->tptk_set = 0; - os_memset(&sm->tptk, 0, sizeof(sm->tptk)); - os_memset(&sm->gtk, 0, sizeof(sm->gtk)); -+ os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep)); - #ifdef CONFIG_IEEE80211W - os_memset(&sm->igtk, 0, sizeof(sm->igtk)); -+ os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep)); - #endif /* CONFIG_IEEE80211W */ - } - -@@ -2920,8 +2941,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm) - os_memset(&sm->ptk, 0, sizeof(sm->ptk)); - os_memset(&sm->tptk, 0, sizeof(sm->tptk)); - os_memset(&sm->gtk, 0, sizeof(sm->gtk)); -+ os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep)); - #ifdef CONFIG_IEEE80211W - os_memset(&sm->igtk, 0, sizeof(sm->igtk)); -+ os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep)); - #endif /* CONFIG_IEEE80211W */ - #ifdef CONFIG_IEEE80211R - os_memset(sm->xxkey, 0, sizeof(sm->xxkey)); -@@ -2986,7 +3009,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf) - - wpa_hexdump_key(MSG_DEBUG, "Install GTK (WNM SLEEP)", - gd.gtk, gd.gtk_len); -- if (wpa_supplicant_install_gtk(sm, &gd, key_rsc)) { -+ if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 1)) { - os_memset(&gd, 0, sizeof(gd)); - wpa_printf(MSG_DEBUG, "Failed to install the GTK in " - "WNM mode"); -@@ -2998,7 +3021,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf) - const struct wpa_igtk_kde *igtk; - - igtk = (const struct wpa_igtk_kde *) (buf + 2); -- if (wpa_supplicant_install_igtk(sm, igtk) < 0) -+ if (wpa_supplicant_install_igtk(sm, igtk, 1) < 0) - return -1; - #endif /* CONFIG_IEEE80211W */ - } else { -diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h -index afc9e37..9a54631 100644 ---- a/src/rsn_supp/wpa_i.h -+++ b/src/rsn_supp/wpa_i.h -@@ -32,8 +32,10 @@ struct wpa_sm { - int rx_replay_counter_set; - u8 request_counter[WPA_REPLAY_COUNTER_LEN]; - struct wpa_gtk gtk; -+ struct wpa_gtk gtk_wnm_sleep; - #ifdef CONFIG_IEEE80211W - struct wpa_igtk igtk; -+ struct wpa_igtk igtk_wnm_sleep; - #endif /* CONFIG_IEEE80211W */ - - struct eapol_sm *eapol; /* EAPOL state machine from upper level code */ --- -2.7.4 - diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch b/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch deleted file mode 100644 index 22ee217..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 8f82bc94e8697a9d47fa8774dfdaaede1084912c Mon Sep 17 00:00:00 2001 -From: Mathy Vanhoef -Date: Fri, 29 Sep 2017 04:22:51 +0200 -Subject: [PATCH 4/8] Prevent installation of an all-zero TK - -Properly track whether a PTK has already been installed to the driver -and the TK part cleared from memory. This prevents an attacker from -trying to trick the client into installing an all-zero TK. - -This fixes the earlier fix in commit -ad00d64e7d8827b3cebd665a0ceb08adabf15e1e ('Fix TK configuration to the -driver in EAPOL-Key 3/4 retry case') which did not take into account -possibility of an extra message 1/4 showing up between retries of -message 3/4. - -Signed-off-by: Mathy Vanhoef ---- - src/common/wpa_common.h | 1 + - src/rsn_supp/wpa.c | 5 ++--- - src/rsn_supp/wpa_i.h | 1 - - 3 files changed, 3 insertions(+), 4 deletions(-) - -diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h -index d200285..1021ccb 100644 ---- a/src/common/wpa_common.h -+++ b/src/common/wpa_common.h -@@ -215,6 +215,7 @@ struct wpa_ptk { - size_t kck_len; - size_t kek_len; - size_t tk_len; -+ int installed; /* 1 if key has already been installed to driver */ - }; - - struct wpa_gtk { -diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c -index 7a2c68d..0550a41 100644 ---- a/src/rsn_supp/wpa.c -+++ b/src/rsn_supp/wpa.c -@@ -510,7 +510,6 @@ static void wpa_supplicant_process_1_of_4(struct wpa_sm *sm, - os_memset(buf, 0, sizeof(buf)); - } - sm->tptk_set = 1; -- sm->tk_to_set = 1; - - kde = sm->assoc_wpa_ie; - kde_len = sm->assoc_wpa_ie_len; -@@ -615,7 +614,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm, - enum wpa_alg alg; - const u8 *key_rsc; - -- if (!sm->tk_to_set) { -+ if (sm->ptk.installed) { - wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, - "WPA: Do not re-install same PTK to the driver"); - return 0; -@@ -659,7 +658,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm, - - /* TK is not needed anymore in supplicant */ - os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN); -- sm->tk_to_set = 0; -+ sm->ptk.installed = 1; - - if (sm->wpa_ptk_rekey) { - eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL); -diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h -index 9a54631..41f371f 100644 ---- a/src/rsn_supp/wpa_i.h -+++ b/src/rsn_supp/wpa_i.h -@@ -24,7 +24,6 @@ struct wpa_sm { - struct wpa_ptk ptk, tptk; - int ptk_set, tptk_set; - unsigned int msg_3_of_4_ok:1; -- unsigned int tk_to_set:1; - u8 snonce[WPA_NONCE_LEN]; - u8 anonce[WPA_NONCE_LEN]; /* ANonce from the last 1/4 msg */ - int renew_snonce; --- -2.7.4 - diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch b/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch deleted file mode 100644 index c19c4c7..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 12fac09b437a1dc8a0f253e265934a8aaf4d2f8b Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Sun, 1 Oct 2017 12:32:57 +0300 -Subject: [PATCH 5/8] Fix PTK rekeying to generate a new ANonce - -The Authenticator state machine path for PTK rekeying ended up bypassing -the AUTHENTICATION2 state where a new ANonce is generated when going -directly to the PTKSTART state since there is no need to try to -determine the PMK again in such a case. This is far from ideal since the -new PTK would depend on a new nonce only from the supplicant. - -Fix this by generating a new ANonce when moving to the PTKSTART state -for the purpose of starting new 4-way handshake to rekey PTK. - -Signed-off-by: Jouni Malinen ---- - src/ap/wpa_auth.c | 24 +++++++++++++++++++++--- - 1 file changed, 21 insertions(+), 3 deletions(-) - -diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c -index 707971d..bf10cc1 100644 ---- a/src/ap/wpa_auth.c -+++ b/src/ap/wpa_auth.c -@@ -1901,6 +1901,21 @@ SM_STATE(WPA_PTK, AUTHENTICATION2) - } - - -+static int wpa_auth_sm_ptk_update(struct wpa_state_machine *sm) -+{ -+ if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) { -+ wpa_printf(MSG_ERROR, -+ "WPA: Failed to get random data for ANonce"); -+ sm->Disconnect = TRUE; -+ return -1; -+ } -+ wpa_hexdump(MSG_DEBUG, "WPA: Assign new ANonce", sm->ANonce, -+ WPA_NONCE_LEN); -+ sm->TimeoutCtr = 0; -+ return 0; -+} -+ -+ - SM_STATE(WPA_PTK, INITPMK) - { - u8 msk[2 * PMK_LEN]; -@@ -2458,9 +2473,12 @@ SM_STEP(WPA_PTK) - SM_ENTER(WPA_PTK, AUTHENTICATION); - else if (sm->ReAuthenticationRequest) - SM_ENTER(WPA_PTK, AUTHENTICATION2); -- else if (sm->PTKRequest) -- SM_ENTER(WPA_PTK, PTKSTART); -- else switch (sm->wpa_ptk_state) { -+ else if (sm->PTKRequest) { -+ if (wpa_auth_sm_ptk_update(sm) < 0) -+ SM_ENTER(WPA_PTK, DISCONNECTED); -+ else -+ SM_ENTER(WPA_PTK, PTKSTART); -+ } else switch (sm->wpa_ptk_state) { - case WPA_PTK_INITIALIZE: - break; - case WPA_PTK_DISCONNECT: --- -2.7.4 - diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch b/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch deleted file mode 100644 index e1bd5a5..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 6c4bed4f47d1960ec04981a9d50e5076aea5223d Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Fri, 22 Sep 2017 11:03:15 +0300 -Subject: [PATCH 6/8] TDLS: Reject TPK-TK reconfiguration - -Do not try to reconfigure the same TPK-TK to the driver after it has -been successfully configured. This is an explicit check to avoid issues -related to resetting the TX/RX packet number. There was already a check -for this for TPK M2 (retries of that message are ignored completely), so -that behavior does not get modified. - -For TPK M3, the TPK-TK could have been reconfigured, but that was -followed by immediate teardown of the link due to an issue in updating -the STA entry. Furthermore, for TDLS with any real security (i.e., -ignoring open/WEP), the TPK message exchange is protected on the AP path -and simple replay attacks are not feasible. - -As an additional corner case, make sure the local nonce gets updated if -the peer uses a very unlikely "random nonce" of all zeros. - -Signed-off-by: Jouni Malinen ---- - src/rsn_supp/tdls.c | 38 ++++++++++++++++++++++++++++++++++++-- - 1 file changed, 36 insertions(+), 2 deletions(-) - -diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c -index e424168..9eb9738 100644 ---- a/src/rsn_supp/tdls.c -+++ b/src/rsn_supp/tdls.c -@@ -112,6 +112,7 @@ struct wpa_tdls_peer { - u8 tk[16]; /* TPK-TK; assuming only CCMP will be used */ - } tpk; - int tpk_set; -+ int tk_set; /* TPK-TK configured to the driver */ - int tpk_success; - int tpk_in_progress; - -@@ -192,6 +193,20 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer) - u8 rsc[6]; - enum wpa_alg alg; - -+ if (peer->tk_set) { -+ /* -+ * This same TPK-TK has already been configured to the driver -+ * and this new configuration attempt (likely due to an -+ * unexpected retransmitted frame) would result in clearing -+ * the TX/RX sequence number which can break security, so must -+ * not allow that to happen. -+ */ -+ wpa_printf(MSG_INFO, "TDLS: TPK-TK for the peer " MACSTR -+ " has already been configured to the driver - do not reconfigure", -+ MAC2STR(peer->addr)); -+ return -1; -+ } -+ - os_memset(rsc, 0, 6); - - switch (peer->cipher) { -@@ -209,12 +224,15 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer) - return -1; - } - -+ wpa_printf(MSG_DEBUG, "TDLS: Configure pairwise key for peer " MACSTR, -+ MAC2STR(peer->addr)); - if (wpa_sm_set_key(sm, alg, peer->addr, -1, 1, - rsc, sizeof(rsc), peer->tpk.tk, key_len) < 0) { - wpa_printf(MSG_WARNING, "TDLS: Failed to set TPK to the " - "driver"); - return -1; - } -+ peer->tk_set = 1; - return 0; - } - -@@ -696,7 +714,7 @@ static void wpa_tdls_peer_clear(struct wpa_sm *sm, struct wpa_tdls_peer *peer) - peer->cipher = 0; - peer->qos_info = 0; - peer->wmm_capable = 0; -- peer->tpk_set = peer->tpk_success = 0; -+ peer->tk_set = peer->tpk_set = peer->tpk_success = 0; - peer->chan_switch_enabled = 0; - os_memset(&peer->tpk, 0, sizeof(peer->tpk)); - os_memset(peer->inonce, 0, WPA_NONCE_LEN); -@@ -1159,6 +1177,7 @@ skip_rsnie: - wpa_tdls_peer_free(sm, peer); - return -1; - } -+ peer->tk_set = 0; /* A new nonce results in a new TK */ - wpa_hexdump(MSG_DEBUG, "TDLS: Initiator Nonce for TPK handshake", - peer->inonce, WPA_NONCE_LEN); - os_memcpy(ftie->Snonce, peer->inonce, WPA_NONCE_LEN); -@@ -1751,6 +1770,19 @@ static int wpa_tdls_addset_peer(struct wpa_sm *sm, struct wpa_tdls_peer *peer, - } - - -+static int tdls_nonce_set(const u8 *nonce) -+{ -+ int i; -+ -+ for (i = 0; i < WPA_NONCE_LEN; i++) { -+ if (nonce[i]) -+ return 1; -+ } -+ -+ return 0; -+} -+ -+ - static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr, - const u8 *buf, size_t len) - { -@@ -2004,7 +2036,8 @@ skip_rsn: - peer->rsnie_i_len = kde.rsn_ie_len; - peer->cipher = cipher; - -- if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0) { -+ if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0 || -+ !tdls_nonce_set(peer->inonce)) { - /* - * There is no point in updating the RNonce for every obtained - * TPK M1 frame (e.g., retransmission due to timeout) with the -@@ -2020,6 +2053,7 @@ skip_rsn: - "TDLS: Failed to get random data for responder nonce"); - goto error; - } -+ peer->tk_set = 0; /* A new nonce results in a new TK */ - } - - #if 0 --- -2.7.4 - diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch b/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch deleted file mode 100644 index b9678f6..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon-2.6/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch +++ /dev/null @@ -1,82 +0,0 @@ -From b372ab0b7daea719749194dc554b26e6367603f2 Mon Sep 17 00:00:00 2001 -From: Jouni Malinen -Date: Fri, 22 Sep 2017 12:06:37 +0300 -Subject: [PATCH 8/8] FT: Do not allow multiple Reassociation Response frames - -The driver is expected to not report a second association event without -the station having explicitly request a new association. As such, this -case should not be reachable. However, since reconfiguring the same -pairwise or group keys to the driver could result in nonce reuse issues, -be extra careful here and do an additional state check to avoid this -even if the local driver ends up somehow accepting an unexpected -Reassociation Response frame. - -Signed-off-by: Jouni Malinen ---- - src/rsn_supp/wpa.c | 3 +++ - src/rsn_supp/wpa_ft.c | 8 ++++++++ - src/rsn_supp/wpa_i.h | 1 + - 3 files changed, 12 insertions(+) - -diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c -index 0550a41..2a53c6f 100644 ---- a/src/rsn_supp/wpa.c -+++ b/src/rsn_supp/wpa.c -@@ -2440,6 +2440,9 @@ void wpa_sm_notify_disassoc(struct wpa_sm *sm) - #ifdef CONFIG_TDLS - wpa_tdls_disassoc(sm); - #endif /* CONFIG_TDLS */ -+#ifdef CONFIG_IEEE80211R -+ sm->ft_reassoc_completed = 0; -+#endif /* CONFIG_IEEE80211R */ - - /* Keys are not needed in the WPA state machine anymore */ - wpa_sm_drop_sa(sm); -diff --git a/src/rsn_supp/wpa_ft.c b/src/rsn_supp/wpa_ft.c -index 205793e..d45bb45 100644 ---- a/src/rsn_supp/wpa_ft.c -+++ b/src/rsn_supp/wpa_ft.c -@@ -153,6 +153,7 @@ static u8 * wpa_ft_gen_req_ies(struct wpa_sm *sm, size_t *len, - u16 capab; - - sm->ft_completed = 0; -+ sm->ft_reassoc_completed = 0; - - buf_len = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) + - 2 + sm->r0kh_id_len + ric_ies_len + 100; -@@ -681,6 +682,11 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies, - return -1; - } - -+ if (sm->ft_reassoc_completed) { -+ wpa_printf(MSG_DEBUG, "FT: Reassociation has already been completed for this FT protocol instance - ignore unexpected retransmission"); -+ return 0; -+ } -+ - if (wpa_ft_parse_ies(ies, ies_len, &parse) < 0) { - wpa_printf(MSG_DEBUG, "FT: Failed to parse IEs"); - return -1; -@@ -781,6 +787,8 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies, - return -1; - } - -+ sm->ft_reassoc_completed = 1; -+ - if (wpa_ft_process_gtk_subelem(sm, parse.gtk, parse.gtk_len) < 0) - return -1; - -diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h -index 41f371f..56f88dc 100644 ---- a/src/rsn_supp/wpa_i.h -+++ b/src/rsn_supp/wpa_i.h -@@ -128,6 +128,7 @@ struct wpa_sm { - size_t r0kh_id_len; - u8 r1kh_id[FT_R1KH_ID_LEN]; - int ft_completed; -+ int ft_reassoc_completed; - int over_the_ds_in_progress; - u8 target_ap[ETH_ALEN]; /* over-the-DS target AP */ - int set_ptk_after_assoc; --- -2.7.4 - diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.7/default b/recipes-connectivity/hostapd/hostap-daemon-2.7/default new file mode 100644 index 0000000..a274de1 --- /dev/null +++ b/recipes-connectivity/hostapd/hostap-daemon-2.7/default @@ -0,0 +1,6 @@ +# set to "yes" to start hostapd on boot +START_ON_BOOT="no" +# Stuff to creat the device if needed. +DEV=wifi1 +PREUP="[[ -d /sys/class/net/${DEV} ]] || (ifdown wifi1;/opt/rs9113/onebox_util rpine0 create_vap ${DEV} ap;rfkill unblock all)" +POSTUP="ifup wifi1" diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.7/defconfig b/recipes-connectivity/hostapd/hostap-daemon-2.7/defconfig new file mode 100644 index 0000000..321b7c1 --- /dev/null +++ b/recipes-connectivity/hostapd/hostap-daemon-2.7/defconfig @@ -0,0 +1,319 @@ +# Example hostapd build time configuration +# +# This file lists the configuration options that are used when building the +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. +# +# This file is included in Makefile, so variables like CFLAGS and LIBS can also +# be modified from here. In most cass, these lines should use += in order not +# to override previous values of the variables. + +# Driver interface for Host AP driver +CONFIG_DRIVER_HOSTAP=y + +# Driver interface for wired authenticator +CONFIG_DRIVER_WIRED=y + +# Driver interface for madwifi driver +#CONFIG_DRIVER_MADWIFI=y +#CFLAGS += -I../../madwifi # change to the madwifi source directory + +# Driver interface for drivers using the nl80211 kernel interface +CONFIG_DRIVER_NL80211=y +CONFIG_LIBNL32=y + +# driver_nl80211.c requires libnl. If you are compiling it yourself +# you may need to point hostapd to your version of libnl. +# +#CFLAGS += -I$ +#LIBS += -L$ + +# Use libnl v2.0 (or 3.0) libraries. +#CONFIG_LIBNL20=y + +# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored) +#CONFIG_LIBNL32=y + + +# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) +#CONFIG_DRIVER_BSD=y +#CFLAGS += -I/usr/local/include +#LIBS += -L/usr/local/lib +#LIBS_p += -L/usr/local/lib +#LIBS_c += -L/usr/local/lib + +# Driver interface for no driver (e.g., RADIUS server only) +CONFIG_DRIVER_NONE=y + +# IEEE 802.11F/IAPP +CONFIG_IAPP=y + +# WPA2/IEEE 802.11i RSN pre-authentication +CONFIG_RSN_PREAUTH=y + +# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) +CONFIG_PEERKEY=y + +# IEEE 802.11w (management frame protection) +CONFIG_IEEE80211W=y + +# Integrated EAP server +CONFIG_EAP=y + +# EAP-MD5 for the integrated EAP server +CONFIG_EAP_MD5=y + +# EAP-TLS for the integrated EAP server +CONFIG_EAP_TLS=y + +# EAP-MSCHAPv2 for the integrated EAP server +CONFIG_EAP_MSCHAPV2=y + +# EAP-PEAP for the integrated EAP server +CONFIG_EAP_PEAP=y + +# EAP-GTC for the integrated EAP server +CONFIG_EAP_GTC=y + +# EAP-TTLS for the integrated EAP server +CONFIG_EAP_TTLS=y + +# EAP-SIM for the integrated EAP server +#CONFIG_EAP_SIM=y + +# EAP-AKA for the integrated EAP server +#CONFIG_EAP_AKA=y + +# EAP-AKA' for the integrated EAP server +# This requires CONFIG_EAP_AKA to be enabled, too. +#CONFIG_EAP_AKA_PRIME=y + +# EAP-PAX for the integrated EAP server +#CONFIG_EAP_PAX=y + +# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK) +#CONFIG_EAP_PSK=y + +# EAP-pwd for the integrated EAP server (secure authentication with a password) +#CONFIG_EAP_PWD=y + +# EAP-SAKE for the integrated EAP server +#CONFIG_EAP_SAKE=y + +# EAP-GPSK for the integrated EAP server +#CONFIG_EAP_GPSK=y +# Include support for optional SHA256 cipher suite in EAP-GPSK +#CONFIG_EAP_GPSK_SHA256=y + +# EAP-FAST for the integrated EAP server +# Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed +# for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g., +# with openssl-0.9.8x-tls-extensions.patch, to add the needed functions. +CONFIG_EAP_FAST=y + +# Wi-Fi Protected Setup (WPS) +CONFIG_WPS=y +# Enable UPnP support for external WPS Registrars +CONFIG_WPS_UPNP=y +# Enable WPS support with NFC config method +#CONFIG_WPS_NFC=y + +# EAP-IKEv2 +#CONFIG_EAP_IKEV2=y + +# Trusted Network Connect (EAP-TNC) +#CONFIG_EAP_TNC=y + +# EAP-EKE for the integrated EAP server +#CONFIG_EAP_EKE=y + +# PKCS#12 (PFX) support (used to read private key and certificate file from +# a file that usually has extension .p12 or .pfx) +CONFIG_PKCS12=y + +# RADIUS authentication server. This provides access to the integrated EAP +# server from external hosts using RADIUS. +CONFIG_RADIUS_SERVER=y + +# Build IPv6 support for RADIUS operations +CONFIG_IPV6=y + +# IEEE Std 802.11r-2008 (Fast BSS Transition) +#CONFIG_IEEE80211R=y + +# Use the hostapd's IEEE 802.11 authentication (ACL), but without +# the IEEE 802.11 Management capability (e.g., madwifi or FreeBSD/net80211) +#CONFIG_DRIVER_RADIUS_ACL=y + +# IEEE 802.11n (High Throughput) support +CONFIG_IEEE80211N=y + +# Wireless Network Management (IEEE Std 802.11v-2011) +# Note: This is experimental and not complete implementation. +CONFIG_WNM=y + +# IEEE 802.11ac (Very High Throughput) support +CONFIG_IEEE80211AC=y + +# Remove debugging code that is printing out debug messages to stdout. +# This can be used to reduce the size of the hostapd considerably if debugging +# code is not needed. +#CONFIG_NO_STDOUT_DEBUG=y + +# Add support for writing debug log to a file: -f /tmp/hostapd.log +# Disabled by default. +#CONFIG_DEBUG_FILE=y + +# Add support for sending all debug messages (regardless of debug verbosity) +# to the Linux kernel tracing facility. This helps debug the entire stack by +# making it easy to record everything happening from the driver up into the +# same file, e.g., using trace-cmd. +#CONFIG_DEBUG_LINUX_TRACING=y + +# Remove support for RADIUS accounting +#CONFIG_NO_ACCOUNTING=y + +# Remove support for RADIUS +#CONFIG_NO_RADIUS=y + +# Remove support for VLANs +#CONFIG_NO_VLAN=y + +# Enable support for fully dynamic VLANs. This enables hostapd to +# automatically create bridge and VLAN interfaces if necessary. +#CONFIG_FULL_DYNAMIC_VLAN=y + +# Use netlink-based kernel API for VLAN operations instead of ioctl() +# Note: This requires libnl 3.1 or newer. +#CONFIG_VLAN_NETLINK=y + +# Remove support for dumping internal state through control interface commands +# This can be used to reduce binary size at the cost of disabling a debugging +# option. +#CONFIG_NO_DUMP_STATE=y + +# Enable tracing code for developer debugging +# This tracks use of memory allocations and other registrations and reports +# incorrect use with a backtrace of call (or allocation) location. +#CONFIG_WPA_TRACE=y +# For BSD, comment out these. +#LIBS += -lexecinfo +#LIBS_p += -lexecinfo +#LIBS_c += -lexecinfo + +# Use libbfd to get more details for developer debugging +# This enables use of libbfd to get more detailed symbols for the backtraces +# generated by CONFIG_WPA_TRACE=y. +#CONFIG_WPA_TRACE_BFD=y +# For BSD, comment out these. +#LIBS += -lbfd -liberty -lz +#LIBS_p += -lbfd -liberty -lz +#LIBS_c += -lbfd -liberty -lz + +# hostapd depends on strong random number generation being available from the +# operating system. os_get_random() function is used to fetch random data when +# needed, e.g., for key generation. On Linux and BSD systems, this works by +# reading /dev/urandom. It should be noted that the OS entropy pool needs to be +# properly initialized before hostapd is started. This is important especially +# on embedded devices that do not have a hardware random number generator and +# may by default start up with minimal entropy available for random number +# generation. +# +# As a safety net, hostapd is by default trying to internally collect +# additional entropy for generating random data to mix in with the data +# fetched from the OS. This by itself is not considered to be very strong, but +# it may help in cases where the system pool is not initialized properly. +# However, it is very strongly recommended that the system pool is initialized +# with enough entropy either by using hardware assisted random number +# generator or by storing state over device reboots. +# +# hostapd can be configured to maintain its own entropy store over restarts to +# enhance random number generation. This is not perfect, but it is much more +# secure than using the same sequence of random numbers after every reboot. +# This can be enabled with -e command line option. The specified +# file needs to be readable and writable by hostapd. +# +# If the os_get_random() is known to provide strong random data (e.g., on +# Linux/BSD, the board in question is known to have reliable source of random +# data from /dev/urandom), the internal hostapd random pool can be disabled. +# This will save some in binary size and CPU use. However, this should only be +# considered for builds that are known to be used on devices that meet the +# requirements described above. +#CONFIG_NO_RANDOM_POOL=y + +# Select TLS implementation +# openssl = OpenSSL (default) +# gnutls = GnuTLS +# internal = Internal TLSv1 implementation (experimental) +# none = Empty template +#CONFIG_TLS=openssl +CONFIG_TLS=internal + +# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1) +# can be enabled to get a stronger construction of messages when block ciphers +# are used. +CONFIG_TLSV11=y + +# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2) +# can be enabled to enable use of stronger crypto algorithms. +#CONFIG_TLSV12=y + +# If CONFIG_TLS=internal is used, additional library and include paths are +# needed for LibTomMath. Alternatively, an integrated, minimal version of +# LibTomMath can be used. See beginning of libtommath.c for details on benefits +# and drawbacks of this option. +CONFIG_INTERNAL_LIBTOMMATH=y +ifndef CONFIG_INTERNAL_LIBTOMMATH +LTM_PATH=/usr/src/libtommath-0.39 +CFLAGS += -I$(LTM_PATH) +LIBS += -L$(LTM_PATH) +LIBS_p += -L$(LTM_PATH) +endif +# At the cost of about 4 kB of additional binary size, the internal LibTomMath +# can be configured to include faster routines for exptmod, sqr, and div to +# speed up DH and RSA calculation considerably +#CONFIG_INTERNAL_LIBTOMMATH_FAST=y + +# Interworking (IEEE 802.11u) +# This can be used to enable functionality to improve interworking with +# external networks. +#CONFIG_INTERWORKING=y + +# Hotspot 2.0 +#CONFIG_HS20=y + +# Enable SQLite database support in hlr_auc_gw, EAP-SIM DB, and eap_user_file +CONFIG_SQLITE=y + +# Testing options +# This can be used to enable some testing options (see also the example +# configuration file) that are really useful only for testing clients that +# connect to this hostapd. These options allow, for example, to drop a +# certain percentage of probe requests or auth/(re)assoc frames. +# +CONFIG_TESTING_OPTIONS=y + +# Automatic Channel Selection +# This will allow hostapd to pick the channel automatically when channel is set +# to "acs_survey" or "0". Eventually, other ACS algorithms can be added in +# similar way. +# +# Automatic selection is currently only done through initialization, later on +# we hope to do background checks to keep us moving to more ideal channels as +# time goes by. ACS is currently only supported through the nl80211 driver and +# your driver must have survey dump capability that is filled by the driver +# during scanning. +# +# You can customize the ACS survey algorithm with the hostapd.conf variable +# acs_num_scans. +# +# Supported ACS drivers: +# * ath9k +# * ath5k +# * ath10k +# +# For more details refer to: +# http://wireless.kernel.org/en/users/Documentation/acs +# +CONFIG_ACS=y diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.7/init b/recipes-connectivity/hostapd/hostap-daemon-2.7/init new file mode 100755 index 0000000..5bd7ab6 --- /dev/null +++ b/recipes-connectivity/hostapd/hostap-daemon-2.7/init @@ -0,0 +1,49 @@ +#!/bin/sh +DAEMON=/usr/sbin/hostapd +NAME=hostapd +DESC="HOSTAP Daemon" +ARGS="/etc/hostapd.conf -B" + +test -f $DAEMON || exit 0 + +[ -f /etc/default/$NAME ] && . /etc/default/$NAME + + +set -e + +case "$1" in + start) + if [ "$START_ON_BOOT" != "yes" ]; then + exit 0 + fi + if [[ -n $PREUP ]] ; then + bash -c "$PREUP" + fi + echo -n "Starting $DESC: " + start-stop-daemon -S -x $DAEMON -- $ARGS + if [[ -n $POSTUP ]] ; then + bash -c "$POSTUP" + fi + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x $DAEMON + echo "$NAME." + ;; + restart) + $0 stop + $0 start + ;; + reload) + echo -n "Reloading $DESC: " + killall -HUP $(basename ${DAEMON}) + echo "$NAME." + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-connectivity/hostapd/hostap-daemon_2.6.bb b/recipes-connectivity/hostapd/hostap-daemon_2.6.bb deleted file mode 100644 index b0b7046..0000000 --- a/recipes-connectivity/hostapd/hostap-daemon_2.6.bb +++ /dev/null @@ -1,45 +0,0 @@ -require hostap-daemon.inc - -HOMEPAGE = "http://hostap.epitest.fi" -SECTION = "kernel/userland" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://README;md5=8aa4e8c78b59b12016c4cb2d0a8db350" -DEPENDS = "libnl openssl sqlite3" -SUMMARY = "User space daemon for extended IEEE 802.11 management" - -PR = "r1" -inherit update-rc.d -INITSCRIPT_NAME = "hostapd" - - -DEFAULT_PREFERENCE = "-1" - -SRC_URI += " \ - http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \ - file://defconfig \ - file://init \ - file://default \ -" - -S = "${WORKDIR}/hostapd-${PV}/hostapd" - - -do_configure() { - install -m 0644 ${WORKDIR}/defconfig ${S}/.config -} - -do_compile() { - export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl3" - make -} - -CONFFILES_${PN} += "${sysconfdir}/hostapd.conf ${sysconfdir}/modprobe.d/cfg80211.conf" - -SRC_URI[md5sum] = "eaa56dce9bd8f1d195eb62596eab34c7" -SRC_URI[sha256sum] = "01526b90c1d23bec4b0f052039cc4456c2fd19347b4d830d1d58a0a6aea7117d" - - -do_install_append() { - mkdir -p ${D}${sysconfdir}/default - install -m 644 ${WORKDIR}/default ${D}${sysconfdir}/default/hostapd -} diff --git a/recipes-connectivity/hostapd/hostap-daemon_2.7.bb b/recipes-connectivity/hostapd/hostap-daemon_2.7.bb new file mode 100644 index 0000000..c0809b4 --- /dev/null +++ b/recipes-connectivity/hostapd/hostap-daemon_2.7.bb @@ -0,0 +1,44 @@ +require hostap-daemon.inc + +HOMEPAGE = "http://hostap.epitest.fi" +SECTION = "kernel/userland" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://README;md5=9f542dba9d227d1a51f4405a415cc2b2" +DEPENDS = "libnl openssl sqlite3" +SUMMARY = "User space daemon for extended IEEE 802.11 management" + +PR = "r1" +inherit update-rc.d +INITSCRIPT_NAME = "hostapd" + + +DEFAULT_PREFERENCE = "-1" + +SRC_URI += " \ + http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \ + file://defconfig \ + file://init \ + file://default \ +" + +S = "${WORKDIR}/hostapd-${PV}/hostapd" + + +do_configure() { + install -m 0644 ${WORKDIR}/defconfig ${S}/.config +} + +do_compile() { + export CFLAGS="-MMD -O2 -Wall -g -I${STAGING_INCDIR}/libnl3" + make +} + +CONFFILES_${PN} += "${sysconfdir}/hostapd.conf ${sysconfdir}/modprobe.d/cfg80211.conf" + +SRC_URI[md5sum] = "8d3799f3a3c247cff47d41503698721b" +SRC_URI[sha256sum] = "21b0dda3cc3abe75849437f6b9746da461f88f0ea49dd621216936f87440a141" + +do_install_append() { + mkdir -p ${D}${sysconfdir}/default + install -m 644 ${WORKDIR}/default ${D}${sysconfdir}/default/hostapd +} -- cgit v1.2.3 From 8256cbb4d00f5f2f49a28f256211ba949bfc46a2 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 12 Mar 2019 09:13:17 -0500 Subject: hostapd-daemon 2.7 recipe changes --- recipes-connectivity/hostapd/hostap-daemon.inc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/recipes-connectivity/hostapd/hostap-daemon.inc b/recipes-connectivity/hostapd/hostap-daemon.inc index 23e71f6..5525953 100644 --- a/recipes-connectivity/hostapd/hostap-daemon.inc +++ b/recipes-connectivity/hostapd/hostap-daemon.inc @@ -2,13 +2,6 @@ # -p option is striplevel SRC_URI += " file://cfg80211.conf \ - file://rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch;patchdir=.. \ - file://rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch;patchdir=.. \ - file://rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch;patchdir=.. \ - file://rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch;patchdir=.. \ - file://rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch;patchdir=.. \ - file://rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch;patchdir=.. \ - file://rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch;patchdir=.. \ " do_install() { -- cgit v1.2.3 From 1ed3fcdc5c970b171d2500def477940d8a1e2cf6 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 12 Mar 2019 14:26:36 -0500 Subject: 5.0.0dev23, new RS9113 driver, new hostap-daemon --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index d97204f..b373728 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev22" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev23" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 5a51573a754cfc27a5e3d348de6cc3144e26002b Mon Sep 17 00:00:00 2001 From: David Marcaccini Date: Wed, 13 Mar 2019 11:14:07 -0500 Subject: Update libmts-io to add latest including MNG2 --- recipes-support/multitech/libmts-io_1.0.15.bb | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 recipes-support/multitech/libmts-io_1.0.15.bb diff --git a/recipes-support/multitech/libmts-io_1.0.15.bb b/recipes-support/multitech/libmts-io_1.0.15.bb new file mode 100644 index 0000000..34115be --- /dev/null +++ b/recipes-support/multitech/libmts-io_1.0.15.bb @@ -0,0 +1,30 @@ +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" + +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} +} + -- cgit v1.2.3 From 9bbea67fd49bf857c9f9e63a60c83207e17e565a Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Wed, 13 Mar 2019 11:29:07 -0500 Subject: mtcap: add lora-network-server to mlinux-mtcap-image --- recipes-core/images/mlinux-mtcap-image.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-core/images/mlinux-mtcap-image.bb b/recipes-core/images/mlinux-mtcap-image.bb index effef6d..ec161bd 100644 --- a/recipes-core/images/mlinux-mtcap-image.bb +++ b/recipes-core/images/mlinux-mtcap-image.bb @@ -57,6 +57,7 @@ MULTITECH_FEATURES += " \ IMAGE_INSTALL += "lora-gateway-utils \ lora-query \ lora-packet-forwarder \ + lora-network-server \ logrotate \ mosquitto mosquitto-clients \ " -- cgit v1.2.3 From 71ff2871bb82187cffd0e04a84abec2f148996c5 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Fri, 1 Feb 2019 13:40:56 -0600 Subject: lora: disable HAL debug messages --- recipes-connectivity/lora/lora-gateway-usb/library.cfg | 5 +---- recipes-connectivity/lora/lora-gateway/library_4.0.cfg | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/recipes-connectivity/lora/lora-gateway-usb/library.cfg b/recipes-connectivity/lora/lora-gateway-usb/library.cfg index 01b066d..3d5d95a 100644 --- a/recipes-connectivity/lora/lora-gateway-usb/library.cfg +++ b/recipes-connectivity/lora/lora-gateway-usb/library.cfg @@ -66,8 +66,5 @@ CFG_NET= private DEBUG_AUX= 0 DEBUG_SPI= 0 DEBUG_REG= 0 -# jjg - turning this on is useful to get HAL-related error messages that -# don't print out otherwise. It doesn't seem to add that much printing -# under normal operation. -DEBUG_HAL= 1 +DEBUG_HAL= 0 DEBUG_GPS= 0 diff --git a/recipes-connectivity/lora/lora-gateway/library_4.0.cfg b/recipes-connectivity/lora/lora-gateway/library_4.0.cfg index 641206f..4126bf3 100644 --- a/recipes-connectivity/lora/lora-gateway/library_4.0.cfg +++ b/recipes-connectivity/lora/lora-gateway/library_4.0.cfg @@ -7,10 +7,7 @@ DEBUG_AUX= 0 DEBUG_SPI= 0 DEBUG_REG= 0 -# jjg - turning this on is useful to get HAL-related error messages that -# don't print out otherwise. It doesn't seem to add that much printing -# under normal operation. -DEBUG_HAL= 1 +DEBUG_HAL= 0 DEBUG_LBT= 0 DEBUG_GPS= 0 -- cgit v1.2.3 From aeb9d986eb55aecab8715501acce20a862312cd6 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Fri, 11 Jan 2019 15:16:13 -0600 Subject: lora: add RU864 packet forwarder configs" --- ...nf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 | 2 +- ...nf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 | 191 ++++++++++++++++++++ ...obal_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic | 197 +++++++++++++++++++++ .../lora/lora-packet-forwarder_4.0.1.bb | 6 +- 4 files changed, 394 insertions(+), 2 deletions(-) create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 index 0046e6f..f7c51d9 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 @@ -183,7 +183,7 @@ "forward_crc_disabled": false, "forward_crc_error": false, "forward_crc_valid": true, - "gateway_ID": "AA555A0000000000", + "gateway_ID": "", "keepalive_interval": 10, "push_timeout_ms": 100, "serv_port_down": 1680, diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 new file mode 100644 index 0000000..04d1ec9 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 @@ -0,0 +1,191 @@ +{ + "SX1301_conf": { + "antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "freq_deviation": 25000, + "enable": true, + "if": 0, + "radio": 0 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": true, + "if": -200000, + "radio": 0, + "spread_factor": 7 + }, + "chan_multiSF_0": { + "enable": true, + "if": -400000, + "radio": 0 + }, + "chan_multiSF_1": { + "enable": true, + "if": -200000, + "radio": 0 + }, + "chan_multiSF_2": { + "enable": true, + "if": 0, + "radio": 0 + }, + "chan_multiSF_3": { + "enable": true, + "if": -400000, + "radio": 1 + }, + "chan_multiSF_4": { + "enable": true, + "if": -200000, + "radio": 1 + }, + "chan_multiSF_5": { + "enable": true, + "if": 0, + "radio": 1 + }, + "chan_multiSF_6": { + "enable": true, + "if": 200000, + "radio": 1 + }, + "chan_multiSF_7": { + "enable": false, + "if": 400000, + "radio": 0 + }, + "clksrc": 0, + "lbt_cfg": { + "enable": false, + "rssi_target": 160 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 869100000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 870000000, + "tx_freq_min": 864000000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 868100000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 0, + "rf_power": -6 + }, + "tx_lut_1": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 0, + "rf_power": -3 + }, + "tx_lut_10": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_14": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_15": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 27 + }, + "tx_lut_2": { + "dig_gain": 0, + "mix_gain": 9, + "pa_gain": 1, + "rf_power": 0 + }, + "tx_lut_3": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 1, + "rf_power": 3 + }, + "tx_lut_4": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 1, + "rf_power": 6 + }, + "tx_lut_5": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 2, + "rf_power": 10 + }, + "tx_lut_6": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 11 + }, + "tx_lut_7": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 12 + }, + "tx_lut_8": { + "dig_gain": 2, + "mix_gain": 12, + "pa_gain": 2, + "rf_power": 13 + }, + "tx_lut_9": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 2, + "rf_power": 14 + } + }, + "gateway_conf": { + "forward_crc_disabled": false, + "forward_crc_error": true, + "forward_crc_valid": true, + "gateway_ID": "", + "keepalive_interval": 10, + "push_timeout_ms": 100, + "serv_port_down": 20000, + "serv_port_up": 20000, + "server_address": "52.3.215.147", + "stat_interval": 30, + "autoquit_threshold": 60 + } +} 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 new file mode 100644 index 0000000..a0636a7 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic @@ -0,0 +1,197 @@ +{ + "SX1301_conf": { + "lorawan_public": true, + "clksrc": 0, + "lbt_cfg": { + "enable": false, + "rssi_target": 160, + "nb_channel": 1, + "start_freq": 869525000, + "scan_time_us": 5000, + "tx_delay_1ch_us": 4000000, + "tx_delay_2ch_us": 4000000 + }, + "antenna_gain": 0, + "radio_0": { + "enable": true, + "type": "SX1257", + "freq": 869100000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_min": 864000000, + "tx_freq_max": 870000000 + }, + "radio_1": { + "enable": true, + "type": "SX1257", + "freq": 868100000, + "rssi_offset": -162, + "tx_enable": false + }, + "chan_multiSF_0": { + "enable": true, + "radio": 0, + "if": -400000 + }, + "chan_multiSF_1": { + "enable": true, + "radio": 0, + "if": -200000 + }, + "chan_multiSF_2": { + "enable": true, + "radio": 0, + "if": 0 + }, + "chan_multiSF_3": { + "enable": true, + "radio": 1, + "if": -400000 + }, + "chan_multiSF_4": { + "enable": true, + "radio": 1, + "if": -200000 + }, + "chan_multiSF_5": { + "enable": true, + "radio": 1, + "if": 0 + }, + "chan_multiSF_6": { + "enable": true, + "radio": 1, + "if": 200000 + }, + "chan_multiSF_7": { + "enable": true, + "radio": 1, + "if": 400000 + }, + "chan_Lora_std": { + "enable": true, + "radio": 0, + "if": -200000, + "bandwidth": 250000, + "spread_factor": 7 + }, + "chan_FSK": { + "enable": true, + "radio": 1, + "if": 0, + "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 + } + }, + "gateway_conf": { + "gateway_ID": "", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + "forward_crc_valid": true, + "forward_crc_error": true, + "forward_crc_disabled": false, + "synch_word": 52, + "autoquit_threshold": 60 + } +} + diff --git a/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb b/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb index e3f59ef..282d09e 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb +++ b/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb @@ -7,7 +7,7 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" DEPENDS = "lora-gateway logrotate lora-logging" RDEPENDS_${PN} += "bash" -PR = "r15" +PR = "r16" SRCREV = "v${PV}" @@ -25,6 +25,7 @@ SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \ file://global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 \ file://global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 \ file://global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 \ + file://global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 \ file://global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic \ file://global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic \ file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic \ @@ -32,6 +33,7 @@ SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \ file://global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic \ file://global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic \ file://global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic \ + file://global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic \ file://local_conf.json \ file://lora-packet-forwarder-add-spi-dev-path.patch \ file://lora-packet-forwarder-remove-jit-power-check.patch \ @@ -77,6 +79,7 @@ do_install_append_mtcdt() { install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5 install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.EU868 install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.EU868 + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.RU864 install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_0.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_0.US915 install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.US915 install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json.MTAC_LORA_1_5.AU915 @@ -88,6 +91,7 @@ do_install_append_mtcdt() { do_install_append_mtcap() { install -m 755 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.EU868 + install -m 755 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.RU864 install -m 755 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.US915 install -m 755 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AU915 install -m 755 ${WORKDIR}/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic ${D}${LORA_DIR}/global_conf.json.MTCAP_LORA_1_5.AS923 -- cgit v1.2.3 From 7b683a9931018d4fc820d141120ae2952ce36e5e Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Wed, 13 Mar 2019 10:02:38 -0500 Subject: Update MTAC-LORA-1.5 calibration, LUT values should match US/EU settings for all channel plans --- ...son.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 | 120 +++++------ ...on.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0~ | 227 +++++++++++++++++++++ ...nf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 | 120 +++++------ ...f.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0~ | 195 ++++++++++++++++++ ...nf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 | 72 +++---- ...f.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0~ | 190 +++++++++++++++++ ...nf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 | 72 +++---- ...f.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0~ | 196 ++++++++++++++++++ ...son.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 | 120 +++++------ ...on.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0~ | 226 ++++++++++++++++++++ ...nf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 | 72 +++---- ...f.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0~ | 191 +++++++++++++++++ 12 files changed, 1513 insertions(+), 288 deletions(-) create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0~ create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0~ create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0~ create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0~ create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0~ create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0~ diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 index fe57b24..42ca846 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0 @@ -114,100 +114,100 @@ "type": "SX1257" }, "tx_lut_0": { - "dig_gain": 3, - "mix_gain": 8, + "dig_gain": 0, + "mix_gain": 11, "pa_gain": 0, "rf_power": -6 }, "tx_lut_1": { - "dig_gain": 3, - "mix_gain": 10, + "dig_gain": 0, + "mix_gain": 13, "pa_gain": 0, "rf_power": -3 }, - "tx_lut_10": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 24 - }, - "tx_lut_14": { - "dig_gain": 3, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_15": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, "tx_lut_2": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 0, + "dig_gain": 0, + "mix_gain": 9, + "pa_gain": 1, "rf_power": 0 }, "tx_lut_3": { - "dig_gain": 3, - "mix_gain": 8, + "dig_gain": 0, + "mix_gain": 10, "pa_gain": 1, "rf_power": 3 }, "tx_lut_4": { - "dig_gain": 3, - "mix_gain": 10, + "dig_gain": 0, + "mix_gain": 12, "pa_gain": 1, "rf_power": 6 }, "tx_lut_5": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 2, "rf_power": 10 }, "tx_lut_6": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, "rf_power": 11 }, "tx_lut_7": { - "dig_gain": 3, - "mix_gain": 9, + "dig_gain": 0, + "mix_gain": 11, "pa_gain": 2, "rf_power": 12 }, "tx_lut_8": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 1, + "dig_gain": 2, + "mix_gain": 12, + "pa_gain": 2, "rf_power": 13 }, "tx_lut_9": { - "dig_gain": 3, - "mix_gain": 10, + "dig_gain": 0, + "mix_gain": 13, "pa_gain": 2, "rf_power": 14 + }, + "tx_lut_10": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_14": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_15": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 27 } }, "gateway_conf": { diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0~ new file mode 100644 index 0000000..fe57b24 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0~ @@ -0,0 +1,227 @@ +{ + "SX1301_conf": { + "antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "enable": true, + "freq_deviation": 25000, + "if": 300000, + "radio": 0 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": true, + "if": -200000, + "radio": 0, + "spread_factor": 7 + }, + "chan_multiSF_0": { + "enable": true, + "if": -400000, + "radio": 0 + }, + "chan_multiSF_1": { + "enable": true, + "if": -200000, + "radio": 0 + }, + "chan_multiSF_2": { + "enable": true, + "if": 0, + "radio": 0 + }, + "chan_multiSF_3": { + "enable": true, + "if": -400000, + "radio": 1 + }, + "chan_multiSF_4": { + "enable": true, + "if": -200000, + "radio": 1 + }, + "chan_multiSF_5": { + "enable": true, + "if": 0, + "radio": 1 + }, + "chan_multiSF_6": { + "enable": true, + "if": 200000, + "radio": 1 + }, + "chan_multiSF_7": { + "enable": true, + "if": 400000, + "radio": 1 + }, + "clksrc": 0, + "lbt_cfg": { + "chan_cfg": [ + { + "freq_hz": 923200000, + "scan_time_us": 5000 + }, + { + "freq_hz": 923400000, + "scan_time_us": 5000 + }, + { + "freq_hz": 923600000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922200000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922400000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922600000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922800000, + "scan_time_us": 5000 + }, + { + "freq_hz": 923000000, + "scan_time_us": 5000 + } + ], + "enable": true, + "rssi_target": -80, + "sx127x_rssi_offset": -4 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 923600000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 928000000, + "tx_freq_min": 920000000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 922600000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0": { + "dig_gain": 3, + "mix_gain": 8, + "pa_gain": 0, + "rf_power": -6 + }, + "tx_lut_1": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 0, + "rf_power": -3 + }, + "tx_lut_10": { + "dig_gain": 3, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 3, + "mix_gain": 11, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 24 + }, + "tx_lut_14": { + "dig_gain": 3, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_15": { + "dig_gain": 3, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_2": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 0, + "rf_power": 0 + }, + "tx_lut_3": { + "dig_gain": 3, + "mix_gain": 8, + "pa_gain": 1, + "rf_power": 3 + }, + "tx_lut_4": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 1, + "rf_power": 6 + }, + "tx_lut_5": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 1, + "rf_power": 10 + }, + "tx_lut_6": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 1, + "rf_power": 11 + }, + "tx_lut_7": { + "dig_gain": 3, + "mix_gain": 9, + "pa_gain": 2, + "rf_power": 12 + }, + "tx_lut_8": { + "dig_gain": 3, + "mix_gain": 15, + "pa_gain": 1, + "rf_power": 13 + }, + "tx_lut_9": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 2, + "rf_power": 14 + } + }, + "gateway_conf": { + "gateway_ID": "", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "forward_crc_disabled": false, + "forward_crc_error": true, + "forward_crc_valid": true, + "keepalive_interval": 10, + "push_timeout_ms": 120, + "stat_interval": 20, + "synch_word": 52, + "autoquit_threshold": 60 + } +} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 index 2f01b16..ecb265b 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0 @@ -82,100 +82,100 @@ "type": "SX1257" }, "tx_lut_0": { - "dig_gain": 3, - "mix_gain": 8, + "dig_gain": 0, + "mix_gain": 11, "pa_gain": 0, "rf_power": -6 }, "tx_lut_1": { - "dig_gain": 3, - "mix_gain": 10, + "dig_gain": 0, + "mix_gain": 13, "pa_gain": 0, "rf_power": -3 }, - "tx_lut_10": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 24 - }, - "tx_lut_14": { - "dig_gain": 3, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_15": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, "tx_lut_2": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 0, + "dig_gain": 0, + "mix_gain": 9, + "pa_gain": 1, "rf_power": 0 }, "tx_lut_3": { - "dig_gain": 3, - "mix_gain": 8, + "dig_gain": 0, + "mix_gain": 10, "pa_gain": 1, "rf_power": 3 }, "tx_lut_4": { - "dig_gain": 3, - "mix_gain": 10, + "dig_gain": 0, + "mix_gain": 12, "pa_gain": 1, "rf_power": 6 }, "tx_lut_5": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 2, "rf_power": 10 }, "tx_lut_6": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, "rf_power": 11 }, "tx_lut_7": { - "dig_gain": 3, - "mix_gain": 9, + "dig_gain": 0, + "mix_gain": 11, "pa_gain": 2, "rf_power": 12 }, "tx_lut_8": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 1, + "dig_gain": 2, + "mix_gain": 12, + "pa_gain": 2, "rf_power": 13 }, "tx_lut_9": { - "dig_gain": 3, - "mix_gain": 10, + "dig_gain": 0, + "mix_gain": 13, "pa_gain": 2, "rf_power": 14 + }, + "tx_lut_10": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_14": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_15": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 27 } }, "gateway_conf": { diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0~ new file mode 100644 index 0000000..2f01b16 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0~ @@ -0,0 +1,195 @@ +{ + "SX1301_conf": { + "antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "enable": true, + "freq_deviation": 25000, + "if": 300000, + "radio": 0 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": true, + "if": -200000, + "radio": 0, + "spread_factor": 7 + }, + "chan_multiSF_0": { + "enable": true, + "if": -400000, + "radio": 0 + }, + "chan_multiSF_1": { + "enable": true, + "if": -200000, + "radio": 0 + }, + "chan_multiSF_2": { + "enable": true, + "if": 0, + "radio": 0 + }, + "chan_multiSF_3": { + "enable": true, + "if": -400000, + "radio": 1 + }, + "chan_multiSF_4": { + "enable": true, + "if": -200000, + "radio": 1 + }, + "chan_multiSF_5": { + "enable": true, + "if": 0, + "radio": 1 + }, + "chan_multiSF_6": { + "enable": true, + "if": 200000, + "radio": 1 + }, + "chan_multiSF_7": { + "enable": true, + "if": 400000, + "radio": 1 + }, + "clksrc": 0, + "lbt_cfg": { + "chan_cfg": [ + ], + "enable": false, + "rssi_target": -80, + "sx127x_rssi_offset": -4 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 923600000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 928000000, + "tx_freq_min": 920000000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 922600000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0": { + "dig_gain": 3, + "mix_gain": 8, + "pa_gain": 0, + "rf_power": -6 + }, + "tx_lut_1": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 0, + "rf_power": -3 + }, + "tx_lut_10": { + "dig_gain": 3, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 3, + "mix_gain": 11, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 24 + }, + "tx_lut_14": { + "dig_gain": 3, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_15": { + "dig_gain": 3, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_2": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 0, + "rf_power": 0 + }, + "tx_lut_3": { + "dig_gain": 3, + "mix_gain": 8, + "pa_gain": 1, + "rf_power": 3 + }, + "tx_lut_4": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 1, + "rf_power": 6 + }, + "tx_lut_5": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 1, + "rf_power": 10 + }, + "tx_lut_6": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 1, + "rf_power": 11 + }, + "tx_lut_7": { + "dig_gain": 3, + "mix_gain": 9, + "pa_gain": 2, + "rf_power": 12 + }, + "tx_lut_8": { + "dig_gain": 3, + "mix_gain": 15, + "pa_gain": 1, + "rf_power": 13 + }, + "tx_lut_9": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 2, + "rf_power": 14 + } + }, + "gateway_conf": { + "gateway_ID": "", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "forward_crc_disabled": false, + "forward_crc_error": true, + "forward_crc_valid": true, + "keepalive_interval": 10, + "push_timeout_ms": 120, + "stat_interval": 20, + "synch_word": 52, + "autoquit_threshold": 60 + } +} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 index 56d447c..36554fa 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0 @@ -89,42 +89,6 @@ "pa_gain": 0, "rf_power": -3 }, - "tx_lut_10": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 0, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_14": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, - "tx_lut_15": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 27 - }, "tx_lut_2": { "dig_gain": 0, "mix_gain": 9, @@ -172,6 +136,42 @@ "mix_gain": 13, "pa_gain": 2, "rf_power": 14 + }, + "tx_lut_10": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_14": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_15": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 27 } }, "gateway_conf": { diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0~ new file mode 100644 index 0000000..56d447c --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0~ @@ -0,0 +1,190 @@ +{ + "SX1301_conf": { + "antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "enable": true, + "if": 300000, + "radio": 1 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": true, + "if": -200000, + "radio": 1, + "spread_factor": 7 + }, + "chan_multiSF_0": { + "enable": true, + "if": -400000, + "radio": 1 + }, + "chan_multiSF_1": { + "enable": true, + "if": -200000, + "radio": 1 + }, + "chan_multiSF_2": { + "enable": true, + "if": 0, + "radio": 1 + }, + "chan_multiSF_3": { + "enable": true, + "if": -400000, + "radio": 0 + }, + "chan_multiSF_4": { + "enable": true, + "if": -200000, + "radio": 0 + }, + "chan_multiSF_5": { + "enable": true, + "if": 0, + "radio": 0 + }, + "chan_multiSF_6": { + "enable": true, + "if": 200000, + "radio": 0 + }, + "chan_multiSF_7": { + "enable": true, + "if": 400000, + "radio": 0 + }, + "clksrc": 0, + "lbt_cfg": { + "enable": false, + "rssi_target": 160 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 867500000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 870000000, + "tx_freq_min": 863000000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 868500000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 0, + "rf_power": -6 + }, + "tx_lut_1": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 0, + "rf_power": -3 + }, + "tx_lut_10": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_14": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_15": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 27 + }, + "tx_lut_2": { + "dig_gain": 0, + "mix_gain": 9, + "pa_gain": 1, + "rf_power": 0 + }, + "tx_lut_3": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 1, + "rf_power": 3 + }, + "tx_lut_4": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 1, + "rf_power": 6 + }, + "tx_lut_5": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 2, + "rf_power": 10 + }, + "tx_lut_6": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 11 + }, + "tx_lut_7": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 12 + }, + "tx_lut_8": { + "dig_gain": 2, + "mix_gain": 12, + "pa_gain": 2, + "rf_power": 13 + }, + "tx_lut_9": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 2, + "rf_power": 14 + } + }, + "gateway_conf": { + "forward_crc_disabled": false, + "forward_crc_error": true, + "forward_crc_valid": true, + "gateway_ID": "", + "keepalive_interval": 10, + "push_timeout_ms": 100, + "serv_port_down": 20000, + "serv_port_up": 20000, + "server_address": "52.3.215.147", + "stat_interval": 30, + "autoquit_threshold": 60 + } +} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 index 34e1c44..cd4253f 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0 @@ -94,42 +94,6 @@ "pa_gain": 0, "rf_power": -3 }, - "tx_lut_10": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 0, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_14": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, - "tx_lut_15": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 27 - }, "tx_lut_2": { "dig_gain": 0, "mix_gain": 9, @@ -177,6 +141,42 @@ "mix_gain": 13, "pa_gain": 2, "rf_power": 14 + }, + "tx_lut_10": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_14": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_15": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 27 } }, "gateway_conf": { diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0~ new file mode 100644 index 0000000..34e1c44 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0~ @@ -0,0 +1,196 @@ +{ + "SX1301_conf": { + "antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "enable": true, + "freq_deviation": 25000, + "if": 300000, + "radio": 1 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": true, + "if": 0, + "radio": 0, + "spread_factor": 7 + }, + "chan_multiSF_": { + "radio": null + }, + "chan_multiSF_0": { + "enable": true, + "if": -137500, + "radio": 0 + }, + "chan_multiSF_1": { + "enable": true, + "if": 202500, + "radio": 0 + }, + "chan_multiSF_2": { + "enable": true, + "if": 32500, + "radio": 0 + }, + "chan_multiSF_3": { + "enable": true, + "if": -400000, + "radio": 1 + }, + "chan_multiSF_4": { + "enable": true, + "if": -200000, + "radio": 1 + }, + "chan_multiSF_5": { + "enable": true, + "if": 0, + "radio": 1 + }, + "chan_multiSF_6": { + "enable": true, + "if": 200000, + "radio": 1 + }, + "chan_multiSF_7": { + "enable": true, + "if": 400000, + "radio": 1 + }, + "clksrc": 0, + "lbt_cfg": { + "enable": false, + "rssi_target": 160 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 865200000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 867000000, + "tx_freq_min": 865000000, + "tx_notch_freq": 129000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 866385000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 0, + "rf_power": -6 + }, + "tx_lut_1": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 0, + "rf_power": -3 + }, + "tx_lut_10": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_14": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_15": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 27 + }, + "tx_lut_2": { + "dig_gain": 0, + "mix_gain": 9, + "pa_gain": 1, + "rf_power": 0 + }, + "tx_lut_3": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 1, + "rf_power": 3 + }, + "tx_lut_4": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 1, + "rf_power": 6 + }, + "tx_lut_5": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 2, + "rf_power": 10 + }, + "tx_lut_6": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 11 + }, + "tx_lut_7": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 12 + }, + "tx_lut_8": { + "dig_gain": 2, + "mix_gain": 12, + "pa_gain": 2, + "rf_power": 13 + }, + "tx_lut_9": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 2, + "rf_power": 14 + } + }, + "gateway_conf": { + "gateway_ID": "", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "forward_crc_disabled": false, + "forward_crc_error": true, + "forward_crc_valid": true, + "keepalive_interval": 10, + "push_timeout_ms": 120, + "stat_interval": 20, + "synch_word": 52, + "autoquit_threshold": 60 + } +} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 index 2d8d3e8..d405a57 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0 @@ -113,100 +113,100 @@ "type": "SX1257" }, "tx_lut_0": { - "dig_gain": 3, - "mix_gain": 8, + "dig_gain": 0, + "mix_gain": 11, "pa_gain": 0, "rf_power": -6 }, "tx_lut_1": { - "dig_gain": 3, - "mix_gain": 10, + "dig_gain": 0, + "mix_gain": 13, "pa_gain": 0, "rf_power": -3 }, - "tx_lut_10": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 24 - }, - "tx_lut_14": { - "dig_gain": 3, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_15": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, "tx_lut_2": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 0, + "dig_gain": 0, + "mix_gain": 9, + "pa_gain": 1, "rf_power": 0 }, "tx_lut_3": { - "dig_gain": 3, - "mix_gain": 8, + "dig_gain": 0, + "mix_gain": 10, "pa_gain": 1, "rf_power": 3 }, "tx_lut_4": { - "dig_gain": 3, - "mix_gain": 10, + "dig_gain": 0, + "mix_gain": 12, "pa_gain": 1, "rf_power": 6 }, "tx_lut_5": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 2, "rf_power": 10 }, "tx_lut_6": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, "rf_power": 11 }, "tx_lut_7": { - "dig_gain": 3, - "mix_gain": 9, + "dig_gain": 0, + "mix_gain": 11, "pa_gain": 2, "rf_power": 12 }, "tx_lut_8": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 1, + "dig_gain": 2, + "mix_gain": 12, + "pa_gain": 2, "rf_power": 13 }, "tx_lut_9": { - "dig_gain": 3, - "mix_gain": 10, + "dig_gain": 0, + "mix_gain": 13, "pa_gain": 2, "rf_power": 14 + }, + "tx_lut_10": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_14": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_15": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 27 } }, "gateway_conf": { diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0~ new file mode 100644 index 0000000..2d8d3e8 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0~ @@ -0,0 +1,226 @@ +{ + "SX1301_conf": { + "antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "enable": false, + "if": 300000, + "radio": 0 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": false, + "if": -200000, + "radio": 0, + "spread_factor": 7 + }, + "chan_multiSF_0": { + "enable": true, + "if": -400000, + "radio": 0 + }, + "chan_multiSF_1": { + "enable": true, + "if": -200000, + "radio": 0 + }, + "chan_multiSF_2": { + "enable": true, + "if": 0, + "radio": 0 + }, + "chan_multiSF_3": { + "enable": true, + "if": -400000, + "radio": 1 + }, + "chan_multiSF_4": { + "enable": true, + "if": -200000, + "radio": 1 + }, + "chan_multiSF_5": { + "enable": true, + "if": 0, + "radio": 1 + }, + "chan_multiSF_6": { + "enable": true, + "if": 200000, + "radio": 1 + }, + "chan_multiSF_7": { + "enable": true, + "if": 400000, + "radio": 1 + }, + "clksrc": 0, + "lbt_cfg": { + "chan_cfg": [ + { + "freq_hz": 922100000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922300000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922500000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922700000, + "scan_time_us": 5000 + }, + { + "freq_hz": 922900000, + "scan_time_us": 5000 + }, + { + "freq_hz": 923100000, + "scan_time_us": 5000 + }, + { + "freq_hz": 923300000, + "scan_time_us": 5000 + }, + { + "freq_hz": 921900000, + "scan_time_us": 5000 + } + ], + "enable": true, + "rssi_target": -65, + "sx127x_rssi_offset": -4 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 922500000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 923300000, + "tx_freq_min": 920900000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 922900000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0": { + "dig_gain": 3, + "mix_gain": 8, + "pa_gain": 0, + "rf_power": -6 + }, + "tx_lut_1": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 0, + "rf_power": -3 + }, + "tx_lut_10": { + "dig_gain": 3, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 3, + "mix_gain": 11, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 24 + }, + "tx_lut_14": { + "dig_gain": 3, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_15": { + "dig_gain": 3, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_2": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 0, + "rf_power": 0 + }, + "tx_lut_3": { + "dig_gain": 3, + "mix_gain": 8, + "pa_gain": 1, + "rf_power": 3 + }, + "tx_lut_4": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 1, + "rf_power": 6 + }, + "tx_lut_5": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 1, + "rf_power": 10 + }, + "tx_lut_6": { + "dig_gain": 3, + "mix_gain": 12, + "pa_gain": 1, + "rf_power": 11 + }, + "tx_lut_7": { + "dig_gain": 3, + "mix_gain": 9, + "pa_gain": 2, + "rf_power": 12 + }, + "tx_lut_8": { + "dig_gain": 3, + "mix_gain": 15, + "pa_gain": 1, + "rf_power": 13 + }, + "tx_lut_9": { + "dig_gain": 3, + "mix_gain": 10, + "pa_gain": 2, + "rf_power": 14 + } + }, + "gateway_conf": { + "gateway_ID": "", + "server_address": "52.3.215.147", + "serv_port_up": 20000, + "serv_port_down": 20000, + "forward_crc_disabled": false, + "forward_crc_error": true, + "forward_crc_valid": true, + "keepalive_interval": 10, + "push_timeout_ms": 120, + "stat_interval": 20, + "synch_word": 52, + "autoquit_threshold": 60 + } +} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 index 04d1ec9..eb8e06b 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0 @@ -90,42 +90,6 @@ "pa_gain": 0, "rf_power": -3 }, - "tx_lut_10": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 0, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_14": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, - "tx_lut_15": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 27 - }, "tx_lut_2": { "dig_gain": 0, "mix_gain": 9, @@ -173,6 +137,42 @@ "mix_gain": 13, "pa_gain": 2, "rf_power": 14 + }, + "tx_lut_10": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_14": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_15": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 27 } }, "gateway_conf": { diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0~ new file mode 100644 index 0000000..04d1ec9 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0~ @@ -0,0 +1,191 @@ +{ + "SX1301_conf": { + "antenna_gain": 0, + "chan_FSK": { + "bandwidth": 125000, + "datarate": 50000, + "freq_deviation": 25000, + "enable": true, + "if": 0, + "radio": 0 + }, + "chan_Lora_std": { + "bandwidth": 250000, + "enable": true, + "if": -200000, + "radio": 0, + "spread_factor": 7 + }, + "chan_multiSF_0": { + "enable": true, + "if": -400000, + "radio": 0 + }, + "chan_multiSF_1": { + "enable": true, + "if": -200000, + "radio": 0 + }, + "chan_multiSF_2": { + "enable": true, + "if": 0, + "radio": 0 + }, + "chan_multiSF_3": { + "enable": true, + "if": -400000, + "radio": 1 + }, + "chan_multiSF_4": { + "enable": true, + "if": -200000, + "radio": 1 + }, + "chan_multiSF_5": { + "enable": true, + "if": 0, + "radio": 1 + }, + "chan_multiSF_6": { + "enable": true, + "if": 200000, + "radio": 1 + }, + "chan_multiSF_7": { + "enable": false, + "if": 400000, + "radio": 0 + }, + "clksrc": 0, + "lbt_cfg": { + "enable": false, + "rssi_target": 160 + }, + "lorawan_public": true, + "radio_0": { + "enable": true, + "freq": 869100000, + "rssi_offset": -162, + "tx_enable": true, + "tx_freq_max": 870000000, + "tx_freq_min": 864000000, + "type": "SX1257" + }, + "radio_1": { + "enable": true, + "freq": 868100000, + "rssi_offset": -162, + "tx_enable": false, + "type": "SX1257" + }, + "tx_lut_0": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 0, + "rf_power": -6 + }, + "tx_lut_1": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 0, + "rf_power": -3 + }, + "tx_lut_10": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 2, + "rf_power": 16 + }, + "tx_lut_11": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 3, + "rf_power": 20 + }, + "tx_lut_12": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 3, + "rf_power": 23 + }, + "tx_lut_13": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 3, + "rf_power": 25 + }, + "tx_lut_14": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 26 + }, + "tx_lut_15": { + "dig_gain": 0, + "mix_gain": 15, + "pa_gain": 3, + "rf_power": 27 + }, + "tx_lut_2": { + "dig_gain": 0, + "mix_gain": 9, + "pa_gain": 1, + "rf_power": 0 + }, + "tx_lut_3": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 1, + "rf_power": 3 + }, + "tx_lut_4": { + "dig_gain": 0, + "mix_gain": 12, + "pa_gain": 1, + "rf_power": 6 + }, + "tx_lut_5": { + "dig_gain": 0, + "mix_gain": 10, + "pa_gain": 2, + "rf_power": 10 + }, + "tx_lut_6": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 11 + }, + "tx_lut_7": { + "dig_gain": 0, + "mix_gain": 11, + "pa_gain": 2, + "rf_power": 12 + }, + "tx_lut_8": { + "dig_gain": 2, + "mix_gain": 12, + "pa_gain": 2, + "rf_power": 13 + }, + "tx_lut_9": { + "dig_gain": 0, + "mix_gain": 13, + "pa_gain": 2, + "rf_power": 14 + } + }, + "gateway_conf": { + "forward_crc_disabled": false, + "forward_crc_error": true, + "forward_crc_valid": true, + "gateway_ID": "", + "keepalive_interval": 10, + "push_timeout_ms": 100, + "serv_port_down": 20000, + "serv_port_up": 20000, + "server_address": "52.3.215.147", + "stat_interval": 30, + "autoquit_threshold": 60 + } +} -- cgit v1.2.3 From 8dc8f03422d521d5be56a875790aad792fb0e18e Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 25 Feb 2019 13:40:25 -0600 Subject: Bump config for LAP3 radio addition. --- recipes-core/multitech/config_2.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/multitech/config_2.1.bb b/recipes-core/multitech/config_2.1.bb index f21c009..ed93e64 100644 --- a/recipes-core/multitech/config_2.1.bb +++ b/recipes-core/multitech/config_2.1.bb @@ -2,7 +2,7 @@ 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 = "r3" +PR = "r4" inherit update-rc.d -- cgit v1.2.3 From 37e8ae2054f38093388b29a4159515bc24a3591e Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Tue, 12 Mar 2019 15:00:20 -0500 Subject: lora: update LNS to 2.2.18 --- .../lora/lora-network-server_2.2.17.bb | 48 ---------------------- .../lora/lora-network-server_2.2.18.bb | 48 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-network-server_2.2.17.bb create mode 100644 recipes-connectivity/lora/lora-network-server_2.2.18.bb diff --git a/recipes-connectivity/lora/lora-network-server_2.2.17.bb b/recipes-connectivity/lora/lora-network-server_2.2.17.bb deleted file mode 100644 index 07bd070..0000000 --- a/recipes-connectivity/lora/lora-network-server_2.2.17.bb +++ /dev/null @@ -1,48 +0,0 @@ -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 = "r8" -CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" - -SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ - file://lora-network-server.init \ - file://lora-network-server.default \ - " - -SRC_URI[md5sum] = "99f715c93d97bc2aed39853362a3227d" -SRC_URI[sha256sum] = "d397bfc59f52eb8185c3a924bfc629f16fb3621dd9e4009194ae86b36d71c4e5" - -# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server - install -m 0755 lora-v21-keygen ${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-network-server_2.2.18.bb b/recipes-connectivity/lora/lora-network-server_2.2.18.bb new file mode 100644 index 0000000..a0442d9 --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server_2.2.18.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 = "r8" +CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" + +SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ + file://lora-network-server.init \ + file://lora-network-server.default \ + " + +SRC_URI[md5sum] = "b774c019f2e6f2ff684fd51e62de81aa" +SRC_URI[sha256sum] = "18b1a07b43da70b9a6bdee2c9fdd547af3e924099791aedef138cb13c1027a4e" + +# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server + install -m 0755 lora-v21-keygen ${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" -- cgit v1.2.3 From 607927ef4a1bb935c3c0870daf6b404d91248f8d Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Thu, 21 Feb 2019 15:11:12 -0600 Subject: Add lap3 radio script and corresponding chat script --- recipes-core/multitech/config/ppp/peers/lap3 | 11 +++++++++++ recipes-core/multitech/config/ppp/peers/lap3_chat | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 recipes-core/multitech/config/ppp/peers/lap3 create mode 100644 recipes-core/multitech/config/ppp/peers/lap3_chat diff --git a/recipes-core/multitech/config/ppp/peers/lap3 b/recipes-core/multitech/config/ppp/peers/lap3 new file mode 100644 index 0000000..bac08a1 --- /dev/null +++ b/recipes-core/multitech/config/ppp/peers/lap3 @@ -0,0 +1,11 @@ +linkname ppp0 +230400 +defaultroute +replacedefaultroute +usepeerdns +ipcp-max-failure 10 +ipcp-restart 10 +noauth +crtscts +novj +connect '/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 new file mode 100644 index 0000000..bc5ebcf --- /dev/null +++ b/recipes-core/multitech/config/ppp/peers/lap3_chat @@ -0,0 +1,19 @@ +SAY "LSP3 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' +OK 'AT+CGDCONT?' +SAY "Dialing...\n" +OK 'ATD*99***1#' +SAY "Waiting for CONNECT...\n" +TIMEOUT 120 +CONNECT '' +SAY "Connected\n" -- cgit v1.2.3 From 26b9085f3cab2ce14a0742bae1fa97bcb4a2bd4c Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 13 Mar 2019 14:00:51 -0500 Subject: Put back mtcdt.rules since ACM driver does not work. --- recipes-core/udev/eudev/mtcdt/mtcdt.rules | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes-core/udev/eudev/mtcdt/mtcdt.rules b/recipes-core/udev/eudev/mtcdt/mtcdt.rules index 79434c3..5d528e6 100644 --- a/recipes-core/udev/eudev/mtcdt/mtcdt.rules +++ b/recipes-core/udev/eudev/mtcdt/mtcdt.rules @@ -1,12 +1,11 @@ ACTION=="remove", GOTO="mlinux_end" SUBSYSTEM!="tty", GOTO="mlinux_end" -KERNEL!="ttyACM[0-9]*", GOTO="mlinux_end" +KERNEL!="ttyXRUSB[0-9]*", GOTO="mlinux_end" SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" ENV{ID_IFACE}=="", GOTO="mlinux_end" # Accessory Ports -# ttyXRUSB is Vizzini driver name, for compatiblity. ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" -- cgit v1.2.3 From df5570910360e06a237c4e4cce8579ce6435d5fa Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 13 Mar 2019 14:05:43 -0500 Subject: dev24 adds mng2 support --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index b373728..73945a8 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev23" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev24" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 1c0c5ea008b2f2bff9171e2ec47826cb65756413 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 14 Mar 2019 18:45:03 -0500 Subject: Move U-Blox specific commands out of /etc/init.d/gpsd, and don't set baud rate of Venus. --- recipes-navigation/gpsd/gpsd/gpsd | 15 ++++------- recipes-navigation/gpsd/gpsd/gpsd-default | 43 +++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index 781e109..33a8470 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -71,16 +71,11 @@ do_start() # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started - # 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 - echo 'WARNING: Unable to set GPS serial port speed.' - else - # The next line is needed due to a bug in gpsctl. - # We will go back to the default baud rate if we don't do this step. - echo Expect a timeout error here. Need this error. - gpsctl -T 2 -f $GPS_LINE - stty -F $GPS_LINE $GPS_BAUD - fi + + if [[ -n ${SET_GPS_SPEED} ]] ; then + eval "${SET_GPS_SPEED}" + fi + /usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES \ || return 2 diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index 5c59791..bb4df93 100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -27,3 +27,46 @@ GPS_FIXFILE=/var/run/gpsfix # 04 GPS + dead reckoning combined # 05 Time only fix GPSFIX="03 05" + +# U-Blox defaults to 9600. If the +# default speed is not set before changing +# the baud rate, this does not work +# except right after a boot when the speed +# is 9600 baud. +# +# 115200 baud is preferred to reduce the CPU +# load. Also, u-blox mode is preferred to +# nmea, as it is more efficient. +# +# We check for U-Blox first, because +# we do not set the baud rate of other +# GPS types. +# +# This gpsctl does not always work, because +# the line speed might be wrong, so if we +# fail, we change the baud rate and try again. +# +# There should only be two speeds, 115200 +# or 9600. +# +# If the line speed is already 115200, we +# should not need to change the baud rate. +# +read -r -d '' SET_GPS_SPEED <<"EOF" +if [[ $(cat /run/config/gpstype) == u-blox ]] ; then + logger -t gpsd -p daemon.info "Attempting to set baud rate to ${GPS_BAUD}" + if ! gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE ; then + logger -t gpsd -p daemon.info "WARNING: Unable to set GPS serial port speed." + stty -F $GPS_LINE 9600 + if ! gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE ; then + logger -t gpsd -p daemon.info "WARNING: Unable to set GPS serial port speed." + fi + fi + stty -F $GPS_LINE $GPS_BAUD + logger -t gpsd -p daemon.info "Expect a timeout error here. Need this error." + gpsctl -T 2 -f $GPS_LINE + stty -F $GPS_LINE $GPS_BAUD +fi +EOF + + -- cgit v1.2.3 From 4e0bcd2ab60fe6248e3e2fd738fae27e19b7244a Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 14 Mar 2019 18:45:49 -0500 Subject: Bump version of GPSD --- recipes-navigation/gpsd/gpsd_3.18.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-navigation/gpsd/gpsd_3.18.1.bb b/recipes-navigation/gpsd/gpsd_3.18.1.bb index 10197f3..021d86a 100644 --- a/recipes-navigation/gpsd/gpsd_3.18.1.bb +++ b/recipes-navigation/gpsd/gpsd_3.18.1.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m3" +PR="m4" EXTRANATIVEPATH += "chrpath-native" -- cgit v1.2.3 From 4ab23ea883917948fd575ca9dec446af6dee859e Mon Sep 17 00:00:00 2001 From: David Marcaccini Date: Fri, 15 Mar 2019 13:43:47 -0500 Subject: Commit name change --- recipes-support/multitech/libmts-io_1.0.15.bb | 30 --------------------------- recipes-support/multitech/libmts-io_1.0.16.bb | 30 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 recipes-support/multitech/libmts-io_1.0.15.bb create mode 100644 recipes-support/multitech/libmts-io_1.0.16.bb diff --git a/recipes-support/multitech/libmts-io_1.0.15.bb b/recipes-support/multitech/libmts-io_1.0.15.bb deleted file mode 100644 index 34115be..0000000 --- a/recipes-support/multitech/libmts-io_1.0.15.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" - -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.16.bb b/recipes-support/multitech/libmts-io_1.0.16.bb new file mode 100644 index 0000000..34115be --- /dev/null +++ b/recipes-support/multitech/libmts-io_1.0.16.bb @@ -0,0 +1,30 @@ +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" + +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} +} + -- cgit v1.2.3 From c342cb9ecde8b366cdec3e21af87b0e4746d7078 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 15 Mar 2019 17:44:37 -0500 Subject: Make gpsd recipe independent of U-Blox and faster time setting with improved gpsd_settime. --- recipes-navigation/gpsd/gpsd/gpsd | 6 +- recipes-navigation/gpsd/gpsd/gpsd-default | 24 ++--- recipes-navigation/gpsd/gpsd/gpsd_fixed.sh | 125 +++++++++++++++++++++++ recipes-navigation/gpsd/gpsd/gpsd_settime.sh | 84 +++++++++++++++ recipes-navigation/gpsd/gpsd/gpsd_ubx_fixed.sh | 3 + recipes-navigation/gpsd/gpsd/gpsd_ubx_settime.sh | 2 + recipes-navigation/gpsd/gpsd_3.18.1.bb | 9 +- 7 files changed, 235 insertions(+), 18 deletions(-) create mode 100644 recipes-navigation/gpsd/gpsd/gpsd_fixed.sh create mode 100755 recipes-navigation/gpsd/gpsd/gpsd_settime.sh diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index 33a8470..95e2a84 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -72,8 +72,10 @@ do_start() # 1 if daemon was already running # 2 if daemon could not be started - if [[ -n ${SET_GPS_SPEED} ]] ; then - eval "${SET_GPS_SPEED}" + # If the SET_GPS_SPEED function exists, call it to set the GPS Speed. + what=$(type SET_GPS_SPEED 2>/dev/null) + if [[ $what =~ SET_GPS_SPEED[[:space:]]is[[:space:]]a[[:space:]]function ]] ; then + SET_GPS_SPEED fi /usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index bb4df93..168b0cf 100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -16,17 +16,14 @@ GPS_BAUD=115200 GPS_FIXFILE=/var/run/gpsfix -# GPSD/UBlox Lock requiremnt -# Create GPS_FIXFILE when reached. -# UBlox NAV SOL (0x01 0x06) at gpsFix value -# and above -# 00 No Fix -# 01 Dead reckoning only -# 02 2D fix -# 03 3D fix -# 04 GPS + dead reckoning combined -# 05 Time only fix -GPSFIX="03 05" +# GPSD Json TPV object, mode field. +# See: http://www.catb.org/gpsd/gpsd_json.html +# +# 0 Unknown +# 1 No fix +# 2 2D fix +# 3 3D fix +GPSFIX="3" # U-Blox defaults to 9600. If the # default speed is not set before changing @@ -52,7 +49,7 @@ GPSFIX="03 05" # If the line speed is already 115200, we # should not need to change the baud rate. # -read -r -d '' SET_GPS_SPEED <<"EOF" +function SET_GPS_SPEED { if [[ $(cat /run/config/gpstype) == u-blox ]] ; then logger -t gpsd -p daemon.info "Attempting to set baud rate to ${GPS_BAUD}" if ! gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE ; then @@ -67,6 +64,5 @@ if [[ $(cat /run/config/gpstype) == u-blox ]] ; then gpsctl -T 2 -f $GPS_LINE stty -F $GPS_LINE $GPS_BAUD fi -EOF - +} diff --git a/recipes-navigation/gpsd/gpsd/gpsd_fixed.sh b/recipes-navigation/gpsd/gpsd/gpsd_fixed.sh new file mode 100644 index 0000000..915c7be --- /dev/null +++ b/recipes-navigation/gpsd/gpsd/gpsd_fixed.sh @@ -0,0 +1,125 @@ +#!/bin/bash +# This script filters the gpspipe -w +# (json) output from GPSD. The GPS fix +# is taken from the mode parameter of +# the GPSD TPV object in the json output. +# Values are: +# +# 0 Unseen +# 1 No fix +# 2 2D +# 3 3D +# +# Fix file creation for GPS. +# If GPS reaches expected +# fix level, file GSP_FIXFILE is created. +# This is to know when to set the system +# and hardware clock, and when +# it is safe to start ntp. +# DEBUG=1 to set debug +NAME=gpsd_ubx_fixed +shopt -s expand_aliases +alias LG="logger -t ${NAME}" +if [[ -r /etc/default/gpsd ]] ; then + . /etc/default/gpsd +else + echo "Must configure GPSD requirements" + exit 1 +fi + +function rm_gps_file +{ + if [[ -n "${GPS_FIXFILE}" ]] && [[ -f ${GPS_FIXFILE} ]] ; then + rm -f "${GPS_FIXFILE}" + fi +} +function kill_it +{ + cmd=$1 + pid=$2 + sig=$3 + ((DEBUG)) && LG -p user.info "terminating $cmd(${pid}) with SIG${sig}" + kill -SIG${sig} ${pid} >/dev/null 2>&1 + result=$? + ((DEBUG)) && LG -p user.info "kill -SIG${sig} ${pid} result is $result" +} + +# Most exits are errors, so remove the GPS fix file. +trap rm_gps_file EXIT + +if ! [[ -x /usr/bin/gpspipe ]] ; then + LG -p user.err "Please install gpspipe" + exit 0 +fi + +# Terminate gpspipe after 10 seconds if it is our child +# gpspipe has issues with terminals and stalling on terminal +# read of the console. +( + sleep 10 + # We use BASHPID because our parent, $$, may have already exited, and + # then ps will not work. BASHPID is the current subshell. + ppid=$BASHPID + pgid=$(ps --no-heading -o pgid -p $ppid) + + if ((${#pgid} == 0)) ; then + LG -p user.err "Could not find a pgid for $ppid" + ps -fjp $ppid | LG -p user.error + fi + + # pgrep does not work during boot. + pgrpmemb=$(ps --no-heading -o pgid,pid,comm -e | grep '^ *'"${pgid}"' *' | sed -r 's/^ *[0-9]+ *//') + gpspipepid=$(echo "${pgrpmemb}" | egrep '[[:space:]]gpspipe$' | sed 's/[[:space:]].*//') + + ((DEBUG)) && LG -p user.info "$pgid is pgid $gpspipepid is gpspipepid" + # Find the gpspipepid that is our grandchild + ((didkill=0)) + + # for loop is in case gpspipepid has children. + for p in ${gpspipepid} ; do + if ((${#p})) ; then + kill_it gpspipe $p TERM + ((didkill=p)) + break + fi + done + if ((didkill == 0)) ; then + exit 0 + fi + # Do a sigkill to be sure. + sleep 2 + kill_it gpspipe $didkill KILL +) & + +fix="" +status="" + +# egrep in busybox has a horrible buffering issue. +# echo My shell pid is $$ +# echo Place data fix, status +fix="$(gpspipe -w | grep -m1 '{"class":"TPV","device":"/dev/gps0",.*"mode":' | sed -e 's/.*"mode"://' -e 's/[},].*//')" + +if ((${#fix} == 0)) ; then + LG -p user.err "No data from GPS" + exit 1 +fi + + +# echo "status is $status. fixOK is $fixOK" + + +# echo "fix is $fix. Is it in $GPSFIX?" +# Test the GPS fixOK +for x in $GPSFIX ; do + # echo test $x with $fix + if [[ $x == $fix ]] ; then + LG -p user.info "GPS has fix $fix found in list GPSFIX: $GPSFIX" + echo $x >"${GPS_FIXFILE}" + GPS_FIXFILE="" + exit 0 + fi +done + +LG -p user.info "GPS fix is bad: $fix and should be one of: $GPSFIX" +# Start later +exit 1 diff --git a/recipes-navigation/gpsd/gpsd/gpsd_settime.sh b/recipes-navigation/gpsd/gpsd/gpsd_settime.sh new file mode 100755 index 0000000..578013b --- /dev/null +++ b/recipes-navigation/gpsd/gpsd/gpsd_settime.sh @@ -0,0 +1,84 @@ +#!/bin/bash +# Get the time from gpspipe, and if present, set the time. +# DEBUG=1 to set debug +NAME=gpsd_ubx_settime +shopt -s expand_aliases +alias LG="logger -t $NAME" +function kill_it +{ + cmd=$1 + pid=$2 + sig=$3 + ((DEBUG)) && LG -p user.info "terminating $cmd(${pid}) with SIG${sig}" + kill -SIG${sig} ${pid} + result=$? + ((DEBUG)) && LG -p user.info "kill -SIG${sig} ${pid} result is $result" +} + +trap "stty echo icanon" exit + +OIFS=$IFS +IFS=$'\n' +if ! /usr/sbin/gpsd_fixed 18 )) ; then + LG -p user.warn "Updating time to time, ${ISO8601}." + [[ $ISO8601 =~ ([^-]*)-([^-]*)-([^T]*)T([^:]*):([^:]*):([^\.]*)\. ]] + Y=${BASH_REMATCH[1]} + M=${BASH_REMATCH[2]} + D=${BASH_REMATCH[3]} + h=${BASH_REMATCH[4]} + m=${BASH_REMATCH[5]} + s=${BASH_REMATCH[6]} +fi +if ((${#Y} == 4 )) && ((${#M} > 0)) && ((${#D} > 0)) && ((${#h} > 0)) && ((${#m} > 0)) && ((${#s} > 0)) ; then + date -u "${Y}.${M}.${D}-${h}:${m}:${s}" >/dev/null +else + LG -p user.err "gpspipe output is bad or missing" + exit 1 +fi +exit 0 diff --git a/recipes-navigation/gpsd/gpsd/gpsd_ubx_fixed.sh b/recipes-navigation/gpsd/gpsd/gpsd_ubx_fixed.sh index a1b59cf..82254c2 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd_ubx_fixed.sh +++ b/recipes-navigation/gpsd/gpsd/gpsd_ubx_fixed.sh @@ -1,4 +1,6 @@ #!/bin/bash +# This script is deprecated. +# Use gpsd_fixed instead. # Fix file creation for U-Blox GPS. # If GPS reaches expected # fix level, file GSP_FIXFILE is created. @@ -6,6 +8,7 @@ # and hardware clock, and when # it is safe to start ntp. # DEBUG=1 to set debug +# NAME=gpsd_ubx_fixed shopt -s expand_aliases alias LG=logger\ -t\ ${NAME} diff --git a/recipes-navigation/gpsd/gpsd/gpsd_ubx_settime.sh b/recipes-navigation/gpsd/gpsd/gpsd_ubx_settime.sh index 15dc9c7..b497138 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd_ubx_settime.sh +++ b/recipes-navigation/gpsd/gpsd/gpsd_ubx_settime.sh @@ -1,4 +1,6 @@ #!/bin/bash +# This function is deprecated. +# Use gpsd_settime instead. # PPS= 1484247472.29561104 clock= 1484247990.00000000 offset= 517.704388959 # DEBUG=1 to set debug NAME=gpsd_ubx_settime diff --git a/recipes-navigation/gpsd/gpsd_3.18.1.bb b/recipes-navigation/gpsd/gpsd_3.18.1.bb index 021d86a..5793344 100644 --- a/recipes-navigation/gpsd/gpsd_3.18.1.bb +++ b/recipes-navigation/gpsd/gpsd_3.18.1.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m4" +PR="m5" EXTRANATIVEPATH += "chrpath-native" @@ -21,6 +21,8 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://gpsd \ file://gpsd_ubx_fixed.sh \ file://gpsd_ubx_settime.sh \ + file://gpsd_fixed.sh \ + file://gpsd_settime.sh \ file://gpsd.rules \ file://gpsd.service \ " @@ -128,6 +130,9 @@ do_install_append() { install -d ${D}${sbindir} install -m 0755 ${WORKDIR}/gpsd_ubx_fixed.sh ${D}${sbindir}/gpsd_ubx_fixed install -m 0755 ${WORKDIR}/gpsd_ubx_settime.sh ${D}${sbindir}/gpsd_ubx_settime + install -m 0755 ${WORKDIR}/gpsd_fixed.sh ${D}${sbindir}/gpsd_fixed + install -m 0755 ${WORKDIR}/gpsd_settime.sh ${D}${sbindir}/gpsd_settime + #support for udev install -d ${D}/${sysconfdir}/udev/rules.d @@ -176,7 +181,7 @@ FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps. ${libdir}/libQgpsmm.prl \ ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps" -FILES_${PN} += "${sbindir}/gpsd_ubx_fixed ${sbindir}/gpsd_ubx_settime" +FILES_${PN} += "${sbindir}/gpsd_*" FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" -- cgit v1.2.3 From a92ce0afa104b34d7d3c26833239aeed9711c824 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 18 Mar 2019 10:38:41 -0500 Subject: Fix cold boot issue with vizzini driver and gpsd --- recipes-navigation/gpsd/gpsd/gpsd-default | 14 ++++++++++---- recipes-navigation/gpsd/gpsd_3.18.1.bb | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index 168b0cf..3450731 100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -51,16 +51,22 @@ GPSFIX="3" # function SET_GPS_SPEED { if [[ $(cat /run/config/gpstype) == u-blox ]] ; then - logger -t gpsd -p daemon.info "Attempting to set baud rate to ${GPS_BAUD}" + logger -st gpsd -p daemon.info "Attempting to set baud rate to ${GPS_BAUD}" if ! gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE ; then - logger -t gpsd -p daemon.info "WARNING: Unable to set GPS serial port speed." + logger -st gpsd -p daemon.warning "Unable to set GPS serial port speed." stty -F $GPS_LINE 9600 + sleep 1 if ! gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE ; then - logger -t gpsd -p daemon.info "WARNING: Unable to set GPS serial port speed." + logger -st gpsd -p daemon.warning "Unable to set GPS serial port speed." + stty -F $GPS_LINE $GPS_BAUD + sleep 1 + if ! gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE ; then + logger -st gpsd -p daemon.warning "Unable to set GPS serial port speed -- giving up!" + fi fi fi stty -F $GPS_LINE $GPS_BAUD - logger -t gpsd -p daemon.info "Expect a timeout error here. Need this error." + logger -st gpsd -p daemon.info "Expect a timeout error here. Need this error." gpsctl -T 2 -f $GPS_LINE stty -F $GPS_LINE $GPS_BAUD fi diff --git a/recipes-navigation/gpsd/gpsd_3.18.1.bb b/recipes-navigation/gpsd/gpsd_3.18.1.bb index 5793344..975482c 100644 --- a/recipes-navigation/gpsd/gpsd_3.18.1.bb +++ b/recipes-navigation/gpsd/gpsd_3.18.1.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m5" +PR="m6" EXTRANATIVEPATH += "chrpath-native" -- cgit v1.2.3 From 70e602cdd41141dc713c750623b48aef4250f27d Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 18 Mar 2019 11:45:42 -0500 Subject: Don't use ublox only scripts, and use capability flags for gps availability test --- recipes-support/ntp/files/ntpd-init.patch | 137 +----------------------------- recipes-support/ntp/ntp_%.bbappend | 2 +- 2 files changed, 5 insertions(+), 134 deletions(-) diff --git a/recipes-support/ntp/files/ntpd-init.patch b/recipes-support/ntp/files/ntpd-init.patch index e7667bc..e3107e1 100644 --- a/recipes-support/ntp/files/ntpd-init.patch +++ b/recipes-support/ntp/files/ntpd-init.patch @@ -1,135 +1,6 @@ -diff -Naru orig/mtadm@pand: new/mtadm@pand: ---- orig/mtadm@pand: 1969-12-31 18:00:00.000000000 -0600 -+++ new/mtadm@pand: 2018-02-26 11:36:57.317460809 -0600 -@@ -0,0 +1,125 @@ -+#! /bin/bash -+ -+### BEGIN INIT INFO -+# Provides: ntp -+# Required-Start: $network $remote_fs $syslog -+# Required-Stop: $network $remote_fs $syslog -+# Default-Start: 2 3 4 5 -+# Default-Stop: -+# Short-Description: Start NTP daemon -+### END INIT INFO -+ -+. /etc/default/ntpd -+PATH=/sbin:/bin:/usr/bin:/usr/sbin -+GNSSRST=/sys/devices/platform/mts-io/gnss-reset -+ -+DAEMON=/usr/sbin/ntpd -+PIDFILE=/var/run/ntpd.pid -+ -+# ntpd init.d script for ntpdc from ntp.isc.org -+test -x $DAEMON -a -r /etc/ntp.conf || exit 0 -+ -+# rcS contains TICKADJ -+test -r /etc/default/rcS && . /etc/default/rcS -+ -+# Source function library. -+. /etc/init.d/functions -+ -+# Functions to do individual actions -+settick(){ -+ # If TICKADJ is set we *must* adjust it before we start, because the -+ # driftfile relies on the correct setting -+ test -n "$TICKADJ" -a -x /usr/sbin/tickadj && { -+ echo -n "Setting tick to $TICKADJ: " -+ /usr/sbin/tickadj "$TICKADJ" -+ echo "done" -+ } -+} -+startdaemon(){ -+ /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_ubx_settime ]] && ((GPSD_REQUIRED == 1)) && [[ -L /dev/gps0 ]] && [[ -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_ubx_settime ; then -+ [[ ${VERBOSE} != no ]] && logger -t 'etc_ntpd' -p daemon.info 'Need to set the time next with ntpd' -+ # We just set the system time by the GPS. Should be within 2 seconds. -+ # Now that we are close to the correct system time, we -+ # use the ntpd one shot option to get to less than -+ # 250mS error so that we don't waste time adjusting the clock. -+ /usr/sbin/ntpd -gq -+ start-stop-daemon -N -20 --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -u ntp:ntp -p $PIDFILE "$@" -+ else -+ [[ ${VERBOSE} != no ]] && logger -t 'etc_ntpd' -p daemon.info 'Clock not set, try later' -+ # Need a GPS fix before startint ntp. Try again later. -+ /usr/sbin/start-stop-daemon -b -n z1e9d3qb -N -20 --start -x /bin/bash -- -c "sleep $GPSD_WAIT_TIME;/etc/init.d/ntpd start" -+ fi -+ else -+ # The -g option allows ntpd to step the time to correct it just -+ # once. The daemon will exit if the clock drifts too much after -+ # this. If ntpd seems to disappear after a while assume TICKADJ -+ # above is set to a totally incorrect value. -+ if ((SET_SYSTEM_CLOCK == 1)) ; then -+ # Sets the clock and exits. -+ ntpd -gq -+ shift -+ fi -+ echo -n "Starting ntpd: " -+ start-stop-daemon -N -20 --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -u ntp:ntp -p $PIDFILE "$@" -+ echo "done" -+ fi -+} -+stopdaemon(){ -+ echo -n "Stopping ntpd: " -+ start-stop-daemon --stop --quiet --oknodo -p $PIDFILE -+ echo "done" -+} -+ -+case "$1" in -+ start) -+ if ! [[ $ENABLED =~ ^[yY][eE][sS]$ ]] ; then -+ exit 0 -+ fi -+ if [[ -n "$CONFIGFILE" ]] ; then -+ CONFIGOPT="-c ${CONFIGFILE}" -+ STATSDIR=$(grep "^statsdir" ${CONFIGFILE} | sed -r 's/[^[:space:]]+[[:space:]]//') -+ if ((${#STATSDIR} > 0)) && ! [[ -d ${STATSDIR} ]] ; then -+ echo Make ${STATSDIR} -+ mkdir -m 0755 -p ${STATSDIR} -+ fi -+ if [[ -d ${STATSDIR} ]] ; then -+ chown ntp:ntp ${STATSDIR} >/dev/null 2>&1 -+ fi -+ fi -+ settick -+ startdaemon -g $CONFIGOPT -+ ;; -+ stop) -+ stopdaemon -+ ;; -+ force-reload) -+ stopdaemon -+ settick -+ startdaemon -g -+ ;; -+ restart) -+ # Don't reset the tick here -+ stopdaemon -+ startdaemon -g -+ ;; -+ reload) -+ # Must do this by hand, but don't do -g -+ stopdaemon -+ startdaemon -+ ;; -+ status) -+ status /usr/sbin/ntpd; -+ exit $? -+ ;; -+ *) -+ echo "Usage: ntpd { start | stop | status | restart | reload }" >&2 -+ exit 1 -+ ;; -+esac -+ -+exit 0 diff -Naru orig/ntpd new/ntpd ---- orig/ntpd 2018-02-26 09:29:21.561687456 -0600 -+++ new/ntpd 2018-02-26 12:10:07.113401901 -0600 +--- orig/ntpd 2019-03-18 10:49:41.255374972 -0500 ++++ new/ntpd 2019-03-18 11:36:56.635291031 -0500 @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash @@ -159,10 +30,10 @@ 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_ubx_settime ]] && ((GPSD_REQUIRED == 1)) && [[ -L /dev/gps0 ]] && [[ -f "${GNSSRST}" ]]; then ++ if [[ -x /usr/sbin/gpsd_settime ]] && ((GPSD_REQUIRED == 1)) && (( $(/usr/sbin/mts-io-sysfs show capability/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_ubx_settime ; then ++ if ((SET_SYSTEM_CLOCK == 1)) && /usr/sbin/gpsd_settime ; then + [[ ${VERBOSE} != no ]] && logger -t 'etc_ntpd' -p daemon.info 'Need to set the time next with ntpd' + # We just set the system time by the GPS. Should be within 2 seconds. + # Now that we are close to the correct system time, we diff --git a/recipes-support/ntp/ntp_%.bbappend b/recipes-support/ntp/ntp_%.bbappend index d14a5cf..c69eff0 100644 --- a/recipes-support/ntp/ntp_%.bbappend +++ b/recipes-support/ntp/ntp_%.bbappend @@ -1,4 +1,4 @@ -PR .= ".mlinux4" +PR .= ".mlinux5" SRC_URI += " file://ntpd-default \ file://ntp.conf.patch;patchdir=.. \ -- cgit v1.2.3 From 4376851431bbe3edfa011b2e5e5bb56fd598750d Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 18 Mar 2019 14:40:47 -0500 Subject: Missing dependencies for bt-pan package --- recipes-connectivity/bluez/bluez5.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-connectivity/bluez/bluez5.inc b/recipes-connectivity/bluez/bluez5.inc index e7acfe3..35ebd0c 100644 --- a/recipes-connectivity/bluez/bluez5.inc +++ b/recipes-connectivity/bluez/bluez5.inc @@ -1,5 +1,5 @@ SUMMARY = "Linux Bluetooth Stack Userland V5" -PR = "m3" +PR = "m4" DESCRIPTION = "Linux Bluetooth stack V5 userland components. These include a system configurations, daemons, tools and system libraries." HOMEPAGE = "http://www.bluez.org" SECTION = "libs" @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e" DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline" -RDEPENDS_${PN}-pand += "bash python-dbus python-logging python-syslog" +RDEPENDS_${PN}-pand += "bash python-dbus python-logging python-syslog python-subprocess python-argparse" RDEPENDS_${PN}-rfcomm += "bash python-pygobject python-syslog python-logging python-dbus" PROVIDES += "bluez-hcidump" RPROVIDES_${PN} += "bluez-hcidump" -- cgit v1.2.3 From a5ec8d827b8cb487ffcb1ab5f6b9ad7dbd3de680 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 19 Mar 2019 09:35:07 -0500 Subject: New Redpine ipk files, and proper ARCH types in Redpine packages, gps related fixes for ntpd and gpsd. --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 73945a8..6c8e108 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev24" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev25" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From a001a529161228fe11100900353bc9225d9edb62 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 19 Mar 2019 12:04:45 -0500 Subject: Replace rs9113-noarch package with a new one called rs9113-autostart --- recipes-core/images/mlinux-mtrv1-image.bb | 2 +- recipes-core/images/mlinux-rs9113-base-image.bb | 2 +- recipes-core/images/mlinux-rs9113-factory-image.bb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb index 1eca91a..ab5c30b 100644 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -59,7 +59,7 @@ MULTITECH_FEATURES += " \ MISC_FEATURES = "minicom lrzsz nano" # Extra stuff to install -IMAGE_INSTALL += "kernel-module-rs9113 rs9113-noarch rs9113-util" +IMAGE_INSTALL += "kernel-module-rs9113 rs9113-util rs9113-autostart" IMAGE_INSTALL += "gpsd libgps ntp ntp-utils gpspipe gps-utils" IMAGE_INSTALL += " \ diff --git a/recipes-core/images/mlinux-rs9113-base-image.bb b/recipes-core/images/mlinux-rs9113-base-image.bb index 7890e04..ef565b6 100644 --- a/recipes-core/images/mlinux-rs9113-base-image.bb +++ b/recipes-core/images/mlinux-rs9113-base-image.bb @@ -2,4 +2,4 @@ require mlinux-base-image.bb DESCRIPTION = "mLinux base image with rs9113 drivers" # Extra stuff to install -IMAGE_INSTALL += "kernel-module-rs9113 rs9113-noarch rs9113-util" +IMAGE_INSTALL += "kernel-module-rs9113 rs9113-autostart rs9113-util" diff --git a/recipes-core/images/mlinux-rs9113-factory-image.bb b/recipes-core/images/mlinux-rs9113-factory-image.bb index 2109793..3ab950c 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 += "dnsmasq bluez5-noinst-tools python-dbus kernel-module-rs9113 rs9113-noarch rs9113-util" +IMAGE_INSTALL += "dnsmasq bluez5-noinst-tools python-dbus kernel-module-rs9113 rs9113-autostart rs9113-util" -- cgit v1.2.3 From 06b29eeeb6ecb4fdd6fca84f4b70b489b88004c5 Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Wed, 20 Mar 2019 09:01:49 -0500 Subject: IN003534: Define lap3_chat_file and lsp3_chat_file to fix mlinux-set-apn script --- recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index 3d02e16..317a3d7 100755 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn @@ -26,7 +26,8 @@ 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_link=/etc/ppp/peers/lap3_chat +lap3_chat_file=/etc/ppp/peers/lap3_chat +lsp3_chat_file=/etc/ppp/peers/lsp3_chat function usage { echo "Usage: $(basename $0) [--] APN" -- cgit v1.2.3 From 8e2410624bdf80579dce1ea879ea111694713c6e Mon Sep 17 00:00:00 2001 From: David Marcaccini Date: Thu, 21 Mar 2019 11:16:31 -0500 Subject: Update bitbake recipe name for latest tag --- recipes-support/multitech/libmts-io_1.0.16.bb | 30 --------------------------- recipes-support/multitech/libmts-io_1.0.17.bb | 30 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 recipes-support/multitech/libmts-io_1.0.16.bb create mode 100644 recipes-support/multitech/libmts-io_1.0.17.bb diff --git a/recipes-support/multitech/libmts-io_1.0.16.bb b/recipes-support/multitech/libmts-io_1.0.16.bb deleted file mode 100644 index 34115be..0000000 --- a/recipes-support/multitech/libmts-io_1.0.16.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" - -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.17.bb b/recipes-support/multitech/libmts-io_1.0.17.bb new file mode 100644 index 0000000..34115be --- /dev/null +++ b/recipes-support/multitech/libmts-io_1.0.17.bb @@ -0,0 +1,30 @@ +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" + +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} +} + -- cgit v1.2.3 From 117dac9213ecc8de6aea6e1c3cee56d555eabf11 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 21 Mar 2019 11:35:40 -0500 Subject: Remove kernel-module-cn package which no longer exists. --- recipes-core/images/mtcap-modules.inc | 1 - recipes-core/images/mtr-modules.inc | 1 - 2 files changed, 2 deletions(-) diff --git a/recipes-core/images/mtcap-modules.inc b/recipes-core/images/mtcap-modules.inc index cd89e92..348e10e 100644 --- a/recipes-core/images/mtcap-modules.inc +++ b/recipes-core/images/mtcap-modules.inc @@ -47,7 +47,6 @@ IMAGE_INSTALL += " \ kernel-module-cdc-wdm \ kernel-module-cfg80211 \ kernel-module-cmac \ - kernel-module-cn \ kernel-module-crc32c-generic \ kernel-module-crc32-generic \ kernel-module-ctr \ diff --git a/recipes-core/images/mtr-modules.inc b/recipes-core/images/mtr-modules.inc index 8facc37..a6474de 100644 --- a/recipes-core/images/mtr-modules.inc +++ b/recipes-core/images/mtr-modules.inc @@ -54,7 +54,6 @@ IMAGE_INSTALL_append = " \ kernel-module-cdc-wdm \ kernel-module-cfg80211 \ kernel-module-cmac \ - kernel-module-cn \ kernel-module-crc32c-generic \ kernel-module-crc32-generic \ kernel-module-ctr \ -- cgit v1.2.3 From 67ec1d5d299c596e2ab40160794c5130daf6f3d2 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 25 Mar 2019 12:05:12 -0500 Subject: New rs9113 for WEP fix, and updated kernel for Tomoyo --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 6c8e108..e79d39d 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev25" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev26" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 0153eb238b6df9be7925e6b4176928d21bf0be71 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 27 Mar 2019 11:03:38 -0500 Subject: Remove ledrig-default-on module which is now built-in --- recipes-core/images/mtcap-modules.inc | 1 - recipes-core/images/mtr-modules.inc | 1 - 2 files changed, 2 deletions(-) diff --git a/recipes-core/images/mtcap-modules.inc b/recipes-core/images/mtcap-modules.inc index 348e10e..8cdfea4 100644 --- a/recipes-core/images/mtcap-modules.inc +++ b/recipes-core/images/mtcap-modules.inc @@ -127,7 +127,6 @@ IMAGE_INSTALL += " \ kernel-module-l2tp-ppp \ kernel-module-leds-blinkm \ kernel-module-leds-regulator \ - kernel-module-ledtrig-default-on \ kernel-module-ledtrig-gpio \ kernel-module-ledtrig-heartbeat \ kernel-module-ledtrig-netdev \ diff --git a/recipes-core/images/mtr-modules.inc b/recipes-core/images/mtr-modules.inc index a6474de..db841ff 100644 --- a/recipes-core/images/mtr-modules.inc +++ b/recipes-core/images/mtr-modules.inc @@ -134,7 +134,6 @@ IMAGE_INSTALL_append = " \ kernel-module-l2tp-ppp \ kernel-module-leds-blinkm \ kernel-module-leds-regulator \ - kernel-module-ledtrig-default-on \ kernel-module-ledtrig-gpio \ kernel-module-ledtrig-heartbeat \ kernel-module-ledtrig-netdev \ -- cgit v1.2.3 From 25101321f985a91d5b5f8e3fc9a72c4e7dc296a0 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 27 Mar 2019 13:33:21 -0500 Subject: Turn LEDs on during boot --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index e79d39d..a04f5bf 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev26" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev27" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 9311629bccb42dccddf78138ecda7fe65194cf4d Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 27 Mar 2019 15:26:27 -0500 Subject: Add python-gatt-server example to mLinux --- .../bluez/python-gatt-server_1.0.bb | 24 ++++++++++++++++++++++ scripts/build-feed-extras.sh | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 recipes-connectivity/bluez/python-gatt-server_1.0.bb diff --git a/recipes-connectivity/bluez/python-gatt-server_1.0.bb b/recipes-connectivity/bluez/python-gatt-server_1.0.bb new file mode 100644 index 0000000..76069f6 --- /dev/null +++ b/recipes-connectivity/bluez/python-gatt-server_1.0.bb @@ -0,0 +1,24 @@ +inherit allarch +HOMEPAGE = "https://github.com/Jumperr-labs/python-gatt-server" +SRCREV = "a39ef9773e9ba845f4303b1dfd2efddf24b02238" +PR = "r0" + +S = "${WORKDIR}/git" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c53d04442d1a229d62549856b7ec456a" + +SRC_URI = "git://github.com/Jumperr-labs/python-gatt-server.git;protocol=git" + +RDEPENDS_${PN} += "python-dbus python-pygobject" + +DBTEXEC = "${libexecdir}/bluetooth/" +DEST = "${D}${DBTEXEC}" + +FILES_${PN} = "${DBTEXEC}" + + +do_install_append() { + install -d ${DEST}/${PN} + install -m 0755 ${S}/*.py ${DEST}/${PN} +} diff --git a/scripts/build-feed-extras.sh b/scripts/build-feed-extras.sh index 8fb9d3f..284c7b4 100755 --- a/scripts/build-feed-extras.sh +++ b/scripts/build-feed-extras.sh @@ -4,7 +4,7 @@ FS_PACKAGES="sshfs-fuse fuse-exfat exfat-utils" NET_PACKAGES="wget netcat ipsec-tools openvpn iftop dnsmasq strongswan stunnel tunctl ethtool openobex obexftp" 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" +DEV_PACKAGES="strace mono gdb git vim python-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 -- cgit v1.2.3 From 8bc6c573775ee9845cd859e83ba4128c482d0b4f Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 1 Apr 2019 18:46:43 -0500 Subject: Errors are due to wrong speed on EXAR TTY, which can happen with a no reset reboot. --- recipes-navigation/gpsd/gpsd/gpsd-default | 72 +++++++++++++++++++++++-------- recipes-navigation/gpsd/gpsd_3.18.1.bb | 2 +- 2 files changed, 56 insertions(+), 18 deletions(-) diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index 3450731..46c64a3 100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -51,24 +51,62 @@ GPSFIX="3" # function SET_GPS_SPEED { if [[ $(cat /run/config/gpstype) == u-blox ]] ; then - logger -st gpsd -p daemon.info "Attempting to set baud rate to ${GPS_BAUD}" - if ! gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE ; then - logger -st gpsd -p daemon.warning "Unable to set GPS serial port speed." - stty -F $GPS_LINE 9600 - sleep 1 - if ! gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE ; then - logger -st gpsd -p daemon.warning "Unable to set GPS serial port speed." - stty -F $GPS_LINE $GPS_BAUD - sleep 1 - if ! gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE ; then - logger -st gpsd -p daemon.warning "Unable to set GPS serial port speed -- giving up!" + logger -st gpsd -p daemon.info "Attempting to set baud rate to ${GPS_BAUD}" + out=$(gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE) + rslt=$? + if ((rslt == 0)) && [[ $out =~ ${GPS_BAUD}[[:space:]]baud\. ]] ; then + logger -st gpsd -p daemon.info "GPS serial port speed is $GPS_BAUD." + return 0 + fi + + if ((rslt != 0)) ; then + logger -st gpsd -p daemon.warning "Unable to set read the GPS, try again." + speed=$(stty -F $GPS_LINE) + if ((speed == GPS_BAUD)) ; then + stty -F $GPS_LINE 9600 + else + stty -F $GPS_LINE 115200 + fi + fi + + out=$(gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE) + rslt=$? + if ((rslt == 0)) && [[ $out =~ ${GPS_BAUD}[[:space:]]baud\. ]] ; then + logger -st gpsd -p daemon.info "GPS serial port speed is $GPS_BAUD." + return 0 + fi + + if ((rslt != 0)) ; then + speed=$(stty -F $GPS_LINE) + if ((speed == GPS_BAUD)) ; then + stty -F $GPS_LINE 9600 + else + stty -F $GPS_LINE ${GPS_BAUD} fi fi - fi - stty -F $GPS_LINE $GPS_BAUD - logger -st gpsd -p daemon.info "Expect a timeout error here. Need this error." - gpsctl -T 2 -f $GPS_LINE - stty -F $GPS_LINE $GPS_BAUD -fi + + out=$(gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE) + rslt=$? + if ((rslt == 0)) && [[ $out =~ ${GPS_BAUD}[[:space:]]baud\. ]] ; then + logger -st gpsd -p daemon.info "GPS serial port speed is $GPS_BAUD." + return 0 + fi + + if ((rslt != 0)) ; then + speed=$(stty -F $GPS_LINE) + if ((speed == GPS_BAUD)) ; then + stty -F $GPS_LINE 9600 + else + stty -F $GPS_LINE ${GPS_BAUD} + fi + fi + out=$(gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE) + rslt=$? + if ((rslt == 0)) && [[ $out =~ ${GPS_BAUD}[[:space:]]baud\. ]] ; then + logger -st gpsd -p daemon.info "GPS serial port speed is $GPS_BAUD." + return 0 + fi + logger -st gpsd -p daemon.err "Cannot set GPS serial port speed, speed is $GPS_BAUD." +fi # End of U-Blox GPS type } diff --git a/recipes-navigation/gpsd/gpsd_3.18.1.bb b/recipes-navigation/gpsd/gpsd_3.18.1.bb index 975482c..bbc1f88 100644 --- a/recipes-navigation/gpsd/gpsd_3.18.1.bb +++ b/recipes-navigation/gpsd/gpsd_3.18.1.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m6" +PR="m7" EXTRANATIVEPATH += "chrpath-native" -- cgit v1.2.3 From 7c1d2240fcc164536228437035ac7ea82d7f57f4 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 4 Apr 2019 18:05:53 -0500 Subject: Bump mlinux to 5.0.0dev28 for GPSD and usbhub reset fix in bootstrap. --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index a04f5bf..088c126 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev27" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev28" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 4bf89d1eafb020ba25c2ad911e942b4ad8d6f069 Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Mon, 8 Apr 2019 15:47:52 -0500 Subject: Update libmts-io to fix some MNG2 status issues --- recipes-support/multitech/libmts-io_1.0.17.bb | 30 --------------------------- recipes-support/multitech/libmts-io_1.0.18.bb | 30 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 recipes-support/multitech/libmts-io_1.0.17.bb create mode 100644 recipes-support/multitech/libmts-io_1.0.18.bb diff --git a/recipes-support/multitech/libmts-io_1.0.17.bb b/recipes-support/multitech/libmts-io_1.0.17.bb deleted file mode 100644 index 34115be..0000000 --- a/recipes-support/multitech/libmts-io_1.0.17.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" - -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.18.bb b/recipes-support/multitech/libmts-io_1.0.18.bb new file mode 100644 index 0000000..34115be --- /dev/null +++ b/recipes-support/multitech/libmts-io_1.0.18.bb @@ -0,0 +1,30 @@ +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" + +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} +} + -- cgit v1.2.3 From c6e49b0e00e2ec4906a478a92f8480e2d2f79c9c Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Thu, 11 Apr 2019 10:46:46 -0500 Subject: Add Quectel EG-95 rules for enumerating modem_at0 and modem_at1 --- recipes-core/udev/eudev/cellular_radios.rules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes-core/udev/eudev/cellular_radios.rules b/recipes-core/udev/eudev/cellular_radios.rules index 6dd293d..078f710 100644 --- a/recipes-core/udev/eudev/cellular_radios.rules +++ b/recipes-core/udev/eudev/cellular_radios.rules @@ -75,4 +75,8 @@ ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1100", ENV{ID_IFACE}=="02", SYMLINK+ ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1101", ENV{ID_IFACE}=="01", SYMLINK+="modem_at0" ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1101", ENV{ID_IFACE}=="02", SYMLINK+="modem_at1" +# Quectel EG-95 +ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0195", ENV{ID_IFACE}=="02", SYMLINK+="modem_at0" +ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0195", ENV{ID_IFACE}=="03", SYMLINK+="modem_at1" + LABEL="mlinux_end" -- cgit v1.2.3 From 038fe4443cbe52dee36895e7c04545d43a397f7d Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 17 Apr 2019 11:23:10 -0500 Subject: New bootstrap and new RS9113 bridge patch --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 088c126..cb60ee5 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev28" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev29" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From aadb372f3d8aef30d4f7b548b5a886d09c7224a7 Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Tue, 23 Apr 2019 09:59:43 -0500 Subject: Add ifplugd-disable_1.0.bb to Linux4 --- recipes-core/busybox/ifplugd-disable_1.0.bb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 recipes-core/busybox/ifplugd-disable_1.0.bb diff --git a/recipes-core/busybox/ifplugd-disable_1.0.bb b/recipes-core/busybox/ifplugd-disable_1.0.bb new file mode 100644 index 0000000..b280b93 --- /dev/null +++ b/recipes-core/busybox/ifplugd-disable_1.0.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Turn off ifplugd" +LICENSE = "GPLv2" +PACKAGE_ARCH = "all" + +RDEPENDS_ifplugd-disable = "busybox-ifplugd" +ALLOW_EMPTY_ifplugd-disable = "1" + +PR = "r1" + + +pkg_prerm_${PN}() { +#!/bin/bash +sed -i 's/^ENABLED="no"/ENABLED="yes"/i' $D${sysconfdir}/default/ifplugd +} +pkg_postinst_${PN}() { +#!/bin/bash +sed -i 's/^ENABLED="yes"/ENABLED="no"/i' $D${sysconfdir}/default/ifplugd +} -- cgit v1.2.3 From 585badefdb740acc617e8aaebbb3b53db946507f Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Tue, 23 Apr 2019 10:12:10 -0500 Subject: Remove unneeded \#/bin/bash references --- recipes-core/busybox/ifplugd-disable_1.0.bb | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes-core/busybox/ifplugd-disable_1.0.bb b/recipes-core/busybox/ifplugd-disable_1.0.bb index b280b93..09f866d 100644 --- a/recipes-core/busybox/ifplugd-disable_1.0.bb +++ b/recipes-core/busybox/ifplugd-disable_1.0.bb @@ -9,10 +9,8 @@ PR = "r1" pkg_prerm_${PN}() { -#!/bin/bash sed -i 's/^ENABLED="no"/ENABLED="yes"/i' $D${sysconfdir}/default/ifplugd } pkg_postinst_${PN}() { -#!/bin/bash sed -i 's/^ENABLED="yes"/ENABLED="no"/i' $D${sysconfdir}/default/ifplugd } -- cgit v1.2.3 From 830a9046544dd88b8d7bda9ec7da8f747981289f Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 24 Apr 2019 18:45:08 -0500 Subject: dev30 loads i2c-dev at boot, and sets pins PD14-PD20 as pullups --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index cb60ee5..c503b6f 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev29" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev30" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From fa1bb1a4461771cb0f7210407aa8821867a2a010 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 25 Apr 2019 17:26:23 -0500 Subject: spi-atmel conflicts on pin PIOA14 with mts-io on MTRV1 and spi-atmel is unused --- recipes-core/images/mtr-modules.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes-core/images/mtr-modules.inc b/recipes-core/images/mtr-modules.inc index db841ff..f5a57b3 100644 --- a/recipes-core/images/mtr-modules.inc +++ b/recipes-core/images/mtr-modules.inc @@ -232,7 +232,6 @@ IMAGE_INSTALL_append = " \ kernel-module-sha512-generic \ kernel-module-sit \ kernel-module-slhc \ - kernel-module-spi-atmel \ kernel-module-spidev \ kernel-module-spi-nor \ kernel-module-stp \ -- cgit v1.2.3 From 4c17d20b3feb24224110ed71a507f5655ef3d4a7 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 25 Apr 2019 17:35:46 -0500 Subject: bump mlinux version: remove spi-atmel module from MTR, MTRV1 which breaks MTR-MNG2 Link Status --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index c503b6f..d4b1318 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev30" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev31" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From f7914c714d8e4d7d29b365b8deec8e24b86f0612 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 3 May 2019 17:35:19 -0500 Subject: Copy gpsd-3.16 from mLinux 4.1.9 for better gps initialization --- conf/distro/mlinux.conf | 4 +- recipes-core/images/mlinux-factory-image.bb | 2 +- recipes-core/images/mlinux-mtrv1-image.bb | 2 +- recipes-navigation/gpsd/gpsd/gpsd | 12 +- recipes-navigation/gpsd/gpsd/gpsd-default | 72 ++------- recipes-navigation/gpsd/gpsd_3.16.bb | 51 +++++- recipes-navigation/gpsd/gpsd_3.18.1.bb | 236 ---------------------------- recipes-navigation/gpsd/gpsd_3.18.1.bb.save | 236 ++++++++++++++++++++++++++++ recipes-navigation/gpsd/libgps24_3.18.1.bb | 142 +++++++++++++++++ 9 files changed, 447 insertions(+), 310 deletions(-) delete mode 100644 recipes-navigation/gpsd/gpsd_3.18.1.bb create mode 100644 recipes-navigation/gpsd/gpsd_3.18.1.bb.save create mode 100644 recipes-navigation/gpsd/libgps24_3.18.1.bb diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index d4b1318..73c5865 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev31" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev32" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" @@ -72,4 +72,4 @@ require java.inc PREFERRED_VERSION_nodejs ?= "0.10.%" PREFERRED_VERSION_nodejs-native ?= "0.10.%" -PREFERRED_VERSION_gpsd ?= "3.18.1" +PREFERRED_VERSION_gpsd ?= "3.16" diff --git a/recipes-core/images/mlinux-factory-image.bb b/recipes-core/images/mlinux-factory-image.bb index 37a6533..a20e64b 100644 --- a/recipes-core/images/mlinux-factory-image.bb +++ b/recipes-core/images/mlinux-factory-image.bb @@ -92,6 +92,6 @@ IMAGE_INSTALL += "pps-tools" IMAGE_INSTALL += "dnsmasq bluez5-pand bluez5-rfcomm" # When ntp is to use the GPS, gps-utils is required -IMAGE_INSTALL += "gpsd libgps ntp ntp-utils gpspipe gps-utils" +IMAGE_INSTALL += "gpsd libgps24 libgps ntp ntp-utils gpspipe gps-utils" IMAGE_INSTALL += "lxfp uvccapture" diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb index ab5c30b..3c10593 100644 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -60,7 +60,7 @@ MISC_FEATURES = "minicom lrzsz nano" # Extra stuff to install IMAGE_INSTALL += "kernel-module-rs9113 rs9113-util rs9113-autostart" -IMAGE_INSTALL += "gpsd libgps ntp ntp-utils gpspipe gps-utils" +IMAGE_INSTALL += "gpsd libgps libgps24 ntp ntp-utils gpspipe gps-utils" IMAGE_INSTALL += " \ ${WIFI_FEATURES} \ diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index 95e2a84..3f93442 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -51,13 +51,13 @@ fi # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 -#if [ -z "$GPSD_SOCKET" ] && [ -z "$GPS_DEVICES" ]; then -# GPSD_SOCKET=/var/run/gpsd.sock -#fi +if [ -z "$GPSD_SOCKET" ] && [ -z "$GPS_DEVICES" ]; then + GPSD_SOCKET=/var/run/gpsd.sock +fi -#if [ -n "$GPSD_SOCKET" ]; then -# GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" -#fi +if [ -n "$GPSD_SOCKET" ]; then + GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" +fi # # Function that starts the daemon/service diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index 46c64a3..7dd5372 100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -1,6 +1,8 @@ ENABLED="yes" -#GPSD_SOCKET="/var/run/gpsd.sock" -GPSD_SOCKET="" + +# GPSD control socket for sending GPSD commands. +# GPSD_SOCKET="/var/run/gpsd.sock" + GPSD_OPTIONS="-n -D 1" # Conduit 0.1 GPS devices @@ -51,62 +53,16 @@ GPSFIX="3" # function SET_GPS_SPEED { if [[ $(cat /run/config/gpstype) == u-blox ]] ; then - logger -st gpsd -p daemon.info "Attempting to set baud rate to ${GPS_BAUD}" - out=$(gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE) - rslt=$? - if ((rslt == 0)) && [[ $out =~ ${GPS_BAUD}[[:space:]]baud\. ]] ; then - logger -st gpsd -p daemon.info "GPS serial port speed is $GPS_BAUD." - return 0 - fi - - if ((rslt != 0)) ; then - logger -st gpsd -p daemon.warning "Unable to set read the GPS, try again." - speed=$(stty -F $GPS_LINE) - if ((speed == GPS_BAUD)) ; then - stty -F $GPS_LINE 9600 - else - stty -F $GPS_LINE 115200 - fi - fi - - out=$(gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE) - rslt=$? - if ((rslt == 0)) && [[ $out =~ ${GPS_BAUD}[[:space:]]baud\. ]] ; then - logger -st gpsd -p daemon.info "GPS serial port speed is $GPS_BAUD." - return 0 - fi - - if ((rslt != 0)) ; then - speed=$(stty -F $GPS_LINE) - if ((speed == GPS_BAUD)) ; then - stty -F $GPS_LINE 9600 - else - stty -F $GPS_LINE ${GPS_BAUD} - fi - fi - - out=$(gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE) - rslt=$? - if ((rslt == 0)) && [[ $out =~ ${GPS_BAUD}[[:space:]]baud\. ]] ; then - logger -st gpsd -p daemon.info "GPS serial port speed is $GPS_BAUD." - return 0 - fi - - if ((rslt != 0)) ; then - speed=$(stty -F $GPS_LINE) - if ((speed == GPS_BAUD)) ; then - stty -F $GPS_LINE 9600 - else - stty -F $GPS_LINE ${GPS_BAUD} - fi - fi - out=$(gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE) - rslt=$? - if ((rslt == 0)) && [[ $out =~ ${GPS_BAUD}[[:space:]]baud\. ]] ; then - logger -st gpsd -p daemon.info "GPS serial port speed is $GPS_BAUD." - return 0 - fi - logger -st gpsd -p daemon.err "Cannot set GPS serial port speed, speed is $GPS_BAUD." + # 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 + echo 'WARNING: Unable to set GPS serial port speed.' + else + # The next line is needed due to a bug in gpsctl. + # We will go back to the default baud rate if we don't do this step. + echo Expect a timeout error here. Need this error. + gpsctl -T 2 -f $GPS_LINE + stty -F $GPS_LINE $GPS_BAUD + fi fi # End of U-Blox GPS type } diff --git a/recipes-navigation/gpsd/gpsd_3.16.bb b/recipes-navigation/gpsd/gpsd_3.16.bb index 56fd8e4..35719aa 100644 --- a/recipes-navigation/gpsd/gpsd_3.16.bb +++ b/recipes-navigation/gpsd/gpsd_3.16.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m9" +PR="m12" EXTRANATIVEPATH += "chrpath-native" @@ -60,8 +60,33 @@ EXTRA_OESCONS = " \ chrpath='yes' \ systemd='${SYSTEMD_OESCONS}' \ libdir='${libdir}' \ + ashtech='no' \ + earthmate='no' \ + evermore='no' \ + fury='no' \ + fv18='no' \ + garmin='no' \ + garmintxt='no' \ + geostar='no' \ + greis='no' \ + itrax='no' \ + mtk3301='no' \ + navcom='no' \ + nmea0183='yes' \ + nmea2000='no' \ + oncore='no' \ + sirf='no' \ + skytraq='yes' \ + superstar2='no' \ + tnt='no' \ + tripmate='no' \ + tsip='no' \ ublox='yes' \ ubloxtimels='yes' \ + aivdm='no' \ + gpsclock='no' \ + oceanserver='no' \ + fixed_stop_bits='1' \ pps='yes' \ gpsd_group='gps' \ ntpshm='yes' \ @@ -123,6 +148,10 @@ do_install_append() { install -m 0644 ${S}/ppsthread.h ${D}/${includedir}/gps } +# Use libgps recipe for sysroot. +do_populate_sysroot() { +} + RDEPENDS_${PN}-conf += "bash" pkg_postinst_${PN}-conf() { @@ -133,18 +162,18 @@ pkg_postrm_${PN}-conf() { update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default } -PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" +PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gpspipe gps-utils" # File does not exist: ${libdir}/libQgpsmm.prl -FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ - ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps" +# FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ +# ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps" FILES_${PN} += "${sbindir}/gpsd_ubx_fixed ${sbindir}/gpsd_ubx_settime" FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" RDEPENDS_${PN} = "gpsd-gpsctl bash" -RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" +RRECOMMENDS_${PN} = "gpsd-conf gpsd-machine-conf" SUMMARY_${PN}-udev = "udev relevant files to use gpsd hotplugging" FILES_${PN}-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" @@ -163,13 +192,23 @@ CONFFILES_${PN}-conf = "${sysconfdir}/default/gpsd.default" SUMMARY_${PN}-gpsctl = "Tool for tweaking GPS modes" FILES_${PN}-gpsctl = "${bindir}/gpsctl" +SUMMARY_gpspipe = "Tool to connectg to gpsd and retrieve sentences" +FILES_gpspipe = "${bindir}/gpspipe" + SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS" FILES_gps-utils = "${bindir}/*" RDEPENDS_gps-utils = "python-pygps" SUMMARY_python-pygps = "Python bindings to gpsd" FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" -RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" +RDEPENDS_python-pygps = " \ + python-core \ + python-io \ + python-threading \ + python-terminal \ + python-curses \ + gpsd \ + python-json" RPROVIDES_${PN} += "${PN}-systemd" RREPLACES_${PN} += "${PN}-systemd" diff --git a/recipes-navigation/gpsd/gpsd_3.18.1.bb b/recipes-navigation/gpsd/gpsd_3.18.1.bb deleted file mode 100644 index bbc1f88..0000000 --- a/recipes-navigation/gpsd/gpsd_3.18.1.bb +++ /dev/null @@ -1,236 +0,0 @@ -SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" -SECTION = "console/network" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" -DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" -PROVIDES = "virtual/gpsd" -PR="m7" - -EXTRANATIVEPATH += "chrpath-native" - -# sysclockcrash is fixed for gpsd -# suppress text in binary is fixed for gpsctl - -SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ - file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ - file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \ - file://0001-include-sys-ttydefaults.h.patch \ - file://0006-ubxtimelps.patch \ - file://0006-itu_r_tf_460_6.patch \ - file://gpsd-default \ - file://gpsd \ - file://gpsd_ubx_fixed.sh \ - file://gpsd_ubx_settime.sh \ - file://gpsd_fixed.sh \ - file://gpsd_settime.sh \ - file://gpsd.rules \ - file://gpsd.service \ -" -SRC_URI[md5sum] = "3b11f26b295010666b1767b308f90bc5" -SRC_URI[sha256sum] = "5cb1e6d880ec9a52c62492dd0e3d77451b7c7ad625895bd652f6354215aec23e" - -inherit scons update-rc.d python-dir pythonnative systemd - -INITSCRIPT_NAME = "gpsd" -INITSCRIPT_PARAMS = "defaults 10" - -SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" - -export STAGING_INCDIR -export STAGING_LIBDIR - -# Necessary for python -export BUILD_SYS -export HOST_SYS - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}" -PACKAGECONFIG[bluez] = "bluez='false',${BLUEZ}" -PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free" - -# Remove unneeded features. netfeed is needed by gpsmon -EXTRA_OESCONS = " \ - sysroot=${STAGING_DIR_TARGET} \ - libQgpsmm='false' \ - debug='true' \ - strip='false' \ - chrpath='yes' \ - systemd='${SYSTEMD_OESCONS}' \ - libdir='${libdir}' \ - ublox='yes' \ - ubloxtimels='yes' \ - pps='yes' \ - gpsd_group='gps' \ - ntpshm='yes' \ - prefix='usr' \ - control_socket='false' \ - nofloats='yes' \ - ashtech='false' \ - earthmate='false' \ - evermore='false' \ - fury='false' \ - fv18='false' \ - garmin='false' \ - garmintxt='false' \ - geostar='false' \ - greis='false' \ - itrax='false' \ - mtk3301='false' \ - navcom='false' \ - nmea0183='true' \ - nmea2000='false' \ - oncore='false' \ - sirf='false' \ - skytraq='false' \ - superstar2='false' \ - tnt='false' \ - tripmate='false' \ - tsip='false' \ - ublox='true' \ - aivdm='false' \ - gpsclock='false' \ - isync='false' \ - ntrip='false' \ - oceanserver='false' \ - passthrough='false' \ - rtcm104v2='false' \ - rtcm104v3='false' \ - bluez='false' \ - ipv6='false' \ - netfeed='true' \ - usb='false' \ - ${PACKAGECONFIG_CONFARGS} \ -" -# this cannot be used, because then chrpath is not found and only static lib is built -# target=${HOST_SYS} - -do_compile_prepend() { - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" - export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" - export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" - export LINKFLAGS="${LDFLAGS}" -} - -do_install() { - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" - export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" - export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" - export LINKFLAGS="${LDFLAGS}" - - export DESTDIR="${D}" - # prefix is used for RPATH and DESTDIR/prefix for instalation - ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \ - bbfatal "scons install execution failed." -} - -do_install_append() { - install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/ - install -d ${D}/${sysconfdir}/default - install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default - install -d ${D}${sbindir} - install -m 0755 ${WORKDIR}/gpsd_ubx_fixed.sh ${D}${sbindir}/gpsd_ubx_fixed - install -m 0755 ${WORKDIR}/gpsd_ubx_settime.sh ${D}${sbindir}/gpsd_ubx_settime - install -m 0755 ${WORKDIR}/gpsd_fixed.sh ${D}${sbindir}/gpsd_fixed - install -m 0755 ${WORKDIR}/gpsd_settime.sh ${D}${sbindir}/gpsd_settime - - - #support for udev - install -d ${D}/${sysconfdir}/udev/rules.d - install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d - install -d ${D}${base_libdir}/udev/ - install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ - - #support for python - install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps - install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps - - #support for systemd - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service - install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket - - # support for dev (development) - mkdir -p -m 0644 ${D}/${includedir}/gps - install -m 0644 ${S}/gpsd.h ${D}/${includedir}/gps - install -m 0644 ${S}/os_compat.h ${D}/${includedir}/gps - install -m 0644 ${S}/revision.h ${D}/${includedir}/gps - install -m 0644 ${S}/gpsdclient.h ${D}/${includedir}/gps - install -m 0644 ${S}/gpsd_config.h ${D}/${includedir}/gps - install -m 0644 ${S}/compiler.h ${D}/${includedir}/gps - install -m 0644 ${S}/ppsthread.h ${D}/${includedir}/gps - - # New ubxtool - install -m 0755 ${S}/ubxtool ${D}/${bindir} - install -m 0644 ${S}/ubxtool.1 ${D}/${mandir}/man1 -} - -RDEPENDS_${PN}-conf += "bash" - -pkg_postinst_${PN}-conf() { - update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 -} - -pkg_postrm_${PN}-conf() { - update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default -} - -PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gpspipe gps-utils" - -# File does not exist: ${libdir}/libQgpsmm.prl -FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ - ${libdir}/libQgpsmm.prl \ - ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps" - -FILES_${PN} += "${sbindir}/gpsd_*" - -FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" - -RDEPENDS_${PN} = "gpsd-gpsctl bash" - -# gpsd-udev is for USB, which we are not using -RRECOMMENDS_${PN} = "gpsd-conf gpsd-machine-conf" - -SUMMARY_${PN}-udev = "udev relevant files to use gpsd hotplugging" -FILES_${PN}-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" -RDEPENDS_${PN}-udev += "eudev gpsd-conf" - -SUMMARY_libgpsd = "C service library used for communicating with gpsd" -FILES_libgpsd = "${libdir}/libgpsd.so.*" - -SUMMARY_libgps = "C service library used for communicating with gpsd" -FILES_libgps = "${libdir}/libgps.so.*" - -SUMMARY_${PN}-conf = "gpsd configuration files and init scripts" -FILES_${PN}-conf = "${sysconfdir}" -CONFFILES_${PN}-conf = "${sysconfdir}/default/gpsd.default" - -SUMMARY_${PN}-gpsctl = "Tool for tweaking GPS modes" -FILES_${PN}-gpsctl = "${bindir}/gpsctl" - -SUMMARY_gpspipe = "Tool to connectg to gpsd and retrieve sentences" -FILES_gpspipe = "${bindir}/gpspipe" - -SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS" -FILES_gps-utils = "${bindir}/*" -RDEPENDS_gps-utils = "python-pygps" - -SUMMARY_python-pygps = "Python bindings to gpsd" -FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" -RDEPENDS_python-pygps = " \ - python-core \ - python-io \ - python-threading \ - python-terminal \ - python-curses \ - gpsd \ - python-json" - -RPROVIDES_${PN} += "${PN}-systemd" -RREPLACES_${PN} += "${PN}-systemd" -RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "${BPN}.socket ${BPN}ctl@.service" - - -ALTERNATIVE_${PN} = "gpsd-defaults" -ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" -ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" diff --git a/recipes-navigation/gpsd/gpsd_3.18.1.bb.save b/recipes-navigation/gpsd/gpsd_3.18.1.bb.save new file mode 100644 index 0000000..bbc1f88 --- /dev/null +++ b/recipes-navigation/gpsd/gpsd_3.18.1.bb.save @@ -0,0 +1,236 @@ +SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" +SECTION = "console/network" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" +DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" +PROVIDES = "virtual/gpsd" +PR="m7" + +EXTRANATIVEPATH += "chrpath-native" + +# sysclockcrash is fixed for gpsd +# suppress text in binary is fixed for gpsctl + +SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ + file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ + file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \ + file://0001-include-sys-ttydefaults.h.patch \ + file://0006-ubxtimelps.patch \ + file://0006-itu_r_tf_460_6.patch \ + file://gpsd-default \ + file://gpsd \ + file://gpsd_ubx_fixed.sh \ + file://gpsd_ubx_settime.sh \ + file://gpsd_fixed.sh \ + file://gpsd_settime.sh \ + file://gpsd.rules \ + file://gpsd.service \ +" +SRC_URI[md5sum] = "3b11f26b295010666b1767b308f90bc5" +SRC_URI[sha256sum] = "5cb1e6d880ec9a52c62492dd0e3d77451b7c7ad625895bd652f6354215aec23e" + +inherit scons update-rc.d python-dir pythonnative systemd + +INITSCRIPT_NAME = "gpsd" +INITSCRIPT_PARAMS = "defaults 10" + +SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" + +export STAGING_INCDIR +export STAGING_LIBDIR + +# Necessary for python +export BUILD_SYS +export HOST_SYS + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}" +PACKAGECONFIG[bluez] = "bluez='false',${BLUEZ}" +PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free" + +# Remove unneeded features. netfeed is needed by gpsmon +EXTRA_OESCONS = " \ + sysroot=${STAGING_DIR_TARGET} \ + libQgpsmm='false' \ + debug='true' \ + strip='false' \ + chrpath='yes' \ + systemd='${SYSTEMD_OESCONS}' \ + libdir='${libdir}' \ + ublox='yes' \ + ubloxtimels='yes' \ + pps='yes' \ + gpsd_group='gps' \ + ntpshm='yes' \ + prefix='usr' \ + control_socket='false' \ + nofloats='yes' \ + ashtech='false' \ + earthmate='false' \ + evermore='false' \ + fury='false' \ + fv18='false' \ + garmin='false' \ + garmintxt='false' \ + geostar='false' \ + greis='false' \ + itrax='false' \ + mtk3301='false' \ + navcom='false' \ + nmea0183='true' \ + nmea2000='false' \ + oncore='false' \ + sirf='false' \ + skytraq='false' \ + superstar2='false' \ + tnt='false' \ + tripmate='false' \ + tsip='false' \ + ublox='true' \ + aivdm='false' \ + gpsclock='false' \ + isync='false' \ + ntrip='false' \ + oceanserver='false' \ + passthrough='false' \ + rtcm104v2='false' \ + rtcm104v3='false' \ + bluez='false' \ + ipv6='false' \ + netfeed='true' \ + usb='false' \ + ${PACKAGECONFIG_CONFARGS} \ +" +# this cannot be used, because then chrpath is not found and only static lib is built +# target=${HOST_SYS} + +do_compile_prepend() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LINKFLAGS="${LDFLAGS}" +} + +do_install() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LINKFLAGS="${LDFLAGS}" + + export DESTDIR="${D}" + # prefix is used for RPATH and DESTDIR/prefix for instalation + ${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \ + bbfatal "scons install execution failed." +} + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/ + install -d ${D}/${sysconfdir}/default + install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/gpsd_ubx_fixed.sh ${D}${sbindir}/gpsd_ubx_fixed + install -m 0755 ${WORKDIR}/gpsd_ubx_settime.sh ${D}${sbindir}/gpsd_ubx_settime + install -m 0755 ${WORKDIR}/gpsd_fixed.sh ${D}${sbindir}/gpsd_fixed + install -m 0755 ${WORKDIR}/gpsd_settime.sh ${D}${sbindir}/gpsd_settime + + + #support for udev + install -d ${D}/${sysconfdir}/udev/rules.d + install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d + install -d ${D}${base_libdir}/udev/ + install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ + + #support for python + install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + + #support for systemd + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service + install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket + + # support for dev (development) + mkdir -p -m 0644 ${D}/${includedir}/gps + install -m 0644 ${S}/gpsd.h ${D}/${includedir}/gps + install -m 0644 ${S}/os_compat.h ${D}/${includedir}/gps + install -m 0644 ${S}/revision.h ${D}/${includedir}/gps + install -m 0644 ${S}/gpsdclient.h ${D}/${includedir}/gps + install -m 0644 ${S}/gpsd_config.h ${D}/${includedir}/gps + install -m 0644 ${S}/compiler.h ${D}/${includedir}/gps + install -m 0644 ${S}/ppsthread.h ${D}/${includedir}/gps + + # New ubxtool + install -m 0755 ${S}/ubxtool ${D}/${bindir} + install -m 0644 ${S}/ubxtool.1 ${D}/${mandir}/man1 +} + +RDEPENDS_${PN}-conf += "bash" + +pkg_postinst_${PN}-conf() { + update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 +} + +pkg_postrm_${PN}-conf() { + update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default +} + +PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gpspipe gps-utils" + +# File does not exist: ${libdir}/libQgpsmm.prl +FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ + ${libdir}/libQgpsmm.prl \ + ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps" + +FILES_${PN} += "${sbindir}/gpsd_*" + +FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" + +RDEPENDS_${PN} = "gpsd-gpsctl bash" + +# gpsd-udev is for USB, which we are not using +RRECOMMENDS_${PN} = "gpsd-conf gpsd-machine-conf" + +SUMMARY_${PN}-udev = "udev relevant files to use gpsd hotplugging" +FILES_${PN}-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" +RDEPENDS_${PN}-udev += "eudev gpsd-conf" + +SUMMARY_libgpsd = "C service library used for communicating with gpsd" +FILES_libgpsd = "${libdir}/libgpsd.so.*" + +SUMMARY_libgps = "C service library used for communicating with gpsd" +FILES_libgps = "${libdir}/libgps.so.*" + +SUMMARY_${PN}-conf = "gpsd configuration files and init scripts" +FILES_${PN}-conf = "${sysconfdir}" +CONFFILES_${PN}-conf = "${sysconfdir}/default/gpsd.default" + +SUMMARY_${PN}-gpsctl = "Tool for tweaking GPS modes" +FILES_${PN}-gpsctl = "${bindir}/gpsctl" + +SUMMARY_gpspipe = "Tool to connectg to gpsd and retrieve sentences" +FILES_gpspipe = "${bindir}/gpspipe" + +SUMMARY_gps-utils = "Utils used for simulating, monitoring,... a GPS" +FILES_gps-utils = "${bindir}/*" +RDEPENDS_gps-utils = "python-pygps" + +SUMMARY_python-pygps = "Python bindings to gpsd" +FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" +RDEPENDS_python-pygps = " \ + python-core \ + python-io \ + python-threading \ + python-terminal \ + python-curses \ + gpsd \ + python-json" + +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "${BPN}.socket ${BPN}ctl@.service" + + +ALTERNATIVE_${PN} = "gpsd-defaults" +ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" +ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.default" diff --git a/recipes-navigation/gpsd/libgps24_3.18.1.bb b/recipes-navigation/gpsd/libgps24_3.18.1.bb new file mode 100644 index 0000000..8f1b811 --- /dev/null +++ b/recipes-navigation/gpsd/libgps24_3.18.1.bb @@ -0,0 +1,142 @@ +SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices" +SECTION = "console/network" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" +DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" +PROVIDES = "${PN} ${PN}-dbg ${PN}-dev" +PR="m5" +#BPN="gpsd" +#BP="${BPN}-${PV}" + +EXTRANATIVEPATH += "chrpath-native" +FILESEXTRAPATHS_prepend = "${THISDIR}/gpsd-${PV}:" +# sysclockcrash is fixed for gpsd +# suppress text in binary is fixed for gpsctl + +S = "${WORKDIR}/gpsd-${PV}" + +SRC_URI = "${SAVANNAH_GNU_MIRROR}/gpsd/gpsd-${PV}.tar.gz \ + file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ + file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \ + file://0001-include-sys-ttydefaults.h.patch \ + file://0006-ubxtimelps.patch \ + file://0006-itu_r_tf_460_6.patch \ +" +SRC_URI[md5sum] = "3b11f26b295010666b1767b308f90bc5" +SRC_URI[sha256sum] = "5cb1e6d880ec9a52c62492dd0e3d77451b7c7ad625895bd652f6354215aec23e" + +inherit scons python-dir pythonnative systemd + +SYSTEMD_OESCONS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false',d)}" + +export STAGING_INCDIR +export STAGING_LIBDIR + +# Necessary for python +export BUILD_SYS +export HOST_SYS + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}" +PACKAGECONFIG[bluez] = "bluez='false',${BLUEZ}" +PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free" +EXTRA_OESCONS = " \ + sysroot=${STAGING_DIR_TARGET} \ + libQgpsmm='false' \ + debug='true' \ + strip='false' \ + chrpath='yes' \ + systemd='${SYSTEMD_OESCONS}' \ + ashtech='no' \ + earthmate='no' \ + evermore='no' \ + fury='no' \ + fv18='no' \ + garmin='no' \ + garmintxt='no' \ + geostar='no' \ + greis='no' \ + itrax='no' \ + mtk3301='no' \ + navcom='no' \ + nmea0183='yes' \ + nmea2000='no' \ + oncore='no' \ + sirf='no' \ + skytraq='no' \ + superstar2='no' \ + tnt='no' \ + tripmate='no' \ + tsip='no' \ + ublox='yes' \ + ubloxtimels='yes' \ + aivdm='no' \ + gpsclock='no' \ + oceanserver='no' \ + libdir='${libdir}' \ + fixed_stop_bits='1' \ + pps='yes' \ + gpsd_group='gps' \ + ntpshm='yes' \ + prefix='usr' \ + ${PACKAGECONFIG_CONFARGS} \ +" +# this cannot be used, because then chrpath is not found and only static lib is built +# target=${HOST_SYS} + +do_compile_prepend() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LINKFLAGS="${LDFLAGS}" +} +do_install() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export LINKFLAGS="${LDFLAGS}" + + export DESTDIR="${D}" + install -d 755 ${D}${libdir} + install libgps.so.24.* ${D}${libdir} + cp -a libgps.so.24 ${D}${libdir} + (cd ${D}${libdir};ln -sf libgps.so.24.* libgps.so) + + # support for dev (development) + mkdir -p -m 0644 ${D}/${includedir}/gps + install -m 0644 ${S}/gpsd.h ${D}/${includedir}/gps + install -m 0644 ${S}/os_compat.h ${D}/${includedir}/gps + install -m 0644 ${S}/revision.h ${D}/${includedir}/gps + install -m 0644 ${S}/gpsdclient.h ${D}/${includedir}/gps + install -m 0644 ${S}/gpsd_config.h ${D}/${includedir}/gps + install -m 0644 ${S}/compiler.h ${D}/${includedir}/gps + install -m 0644 ${S}/ppsthread.h ${D}/${includedir}/gps + install -m 0644 ${S}/gps.h ${D}/${includedir} + install -m 0644 ${S}/libgpsmm.h ${D}/${includedir} +} + + +FILES_${PN}-dev_append = " ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps ${libdir}/libgps.so" +FILES_${PN}-dev_remove = "${includedir} ${FILES_SOLIBSDEV} \ + ${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig \ + ${datadir}/pkgconfig ${datadir}/aclocal \ + ${base_libdir}/*.o ${libdir}/${BPN}/*.la ${base_libdir}/*.la" + +SUMMARY_${PN}-dbg = "Debug the C service library used for communicating with gpsd" +PACKAGES = "${PN} ${PN}-dbg ${PN}-dev" + +FILES_${PN}-dbg_replace = "${prefix}/src/* ${libdir}/.debug/*" + +SUMMARY_${PN} = "C service library used for communicating with gpsd" + +RDEPENDS_${PN} += "dbus-lib" + +FILES_${PN}_append = " ${libdir}/libgps.so.* " +FILES_${PN}_remove = "${bindir}/* ${sbindir}/* ${libexecdir}/* \ + ${libdir}/lib*${SOLIBS} ${sysconfdir} ${sharedstatedir} \ + ${localstatedir} ${base_bindir}/* ${base_sbindir}/* \ + ${base_libdir}/*${SOLIBS} ${base_prefix}/lib/udev \ + ${prefix}/lib/udev ${base_libdir}/udev ${libdir}/udev \ + ${datadir}/${BPN} ${libdir}/${BPN}/* ${datadir}/pixmaps \ + ${datadir}/applications ${datadir}/idl ${datadir}/omf \ + ${datadir}/sounds ${libdir}/bonobo/servers \ +" -- cgit v1.2.3 From 2e72ebdd58ba47d84d0fd7f6ed4cdadc802d6f88 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 6 May 2019 11:38:57 -0500 Subject: lora gateway depends on libgps24 --- recipes-connectivity/lora/lora-gateway_5.0.1.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-connectivity/lora/lora-gateway_5.0.1.bb b/recipes-connectivity/lora/lora-gateway_5.0.1.bb index c8f1ffc..b0509ba 100644 --- a/recipes-connectivity/lora/lora-gateway_5.0.1.bb +++ b/recipes-connectivity/lora/lora-gateway_5.0.1.bb @@ -5,8 +5,8 @@ SECTION = "console/utils" # Semtech license is a modified BSD-style license LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" -DEPENDS = "gpsd" -PR = "r11" +DEPENDS = "libgps24" +PR = "r12" SRCREV = "v${PV}" SRC_URI = "git://github.com/Lora-net/lora_gateway.git;protocol=git \ -- cgit v1.2.3 From 1eb511049142fe12e5ea4215fe7ce56abe1fdbc9 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 7 May 2019 19:24:23 -0500 Subject: Bump mLinux version for device tree for PD14-PC20 fix --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 73c5865..8d9abde 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev32" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev33" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 46c0dfd29d55c9db1d8b614d25f5b004e77cf148 Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Wed, 8 May 2019 10:51:35 -0500 Subject: Update ifplugd-disable to also disable in /var/config/default/ifplugd --- recipes-core/busybox/ifplugd-disable_1.0.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes-core/busybox/ifplugd-disable_1.0.bb b/recipes-core/busybox/ifplugd-disable_1.0.bb index 09f866d..3d75d2d 100644 --- a/recipes-core/busybox/ifplugd-disable_1.0.bb +++ b/recipes-core/busybox/ifplugd-disable_1.0.bb @@ -13,4 +13,9 @@ sed -i 's/^ENABLED="no"/ENABLED="yes"/i' $D${sysconfdir}/default/ifplugd } pkg_postinst_${PN}() { 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 +fi } -- cgit v1.2.3 From 1ad5c6d9e45b97e46f657b56fbb11480a5139c0b Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 9 May 2019 08:58:10 -0500 Subject: Add socat for GPS testing --- scripts/build-feed-extras.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-feed-extras.sh b/scripts/build-feed-extras.sh index 284c7b4..8a50f59 100755 --- a/scripts/build-feed-extras.sh +++ b/scripts/build-feed-extras.sh @@ -2,7 +2,7 @@ # 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" +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" SUP_PACKAGES="pps-tools setserial boost diffutils" -- cgit v1.2.3 From eb67e7cde29b6371558ca1f07be7c02025c0830b Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 13 May 2019 09:12:47 -0500 Subject: Remove gitlab from mLinux for eventual mainline --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 8d9abde..c6dbe70 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev33" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev34" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From cbadde624256362d7b3a8313932e2e30daa54232 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 14 May 2019 11:47:18 -0500 Subject: Bump the recipe revision of mlinux-scripts to match mLinux 4 --- recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb b/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb index 27b09ff..0dfd740 100644 --- a/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb +++ b/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb @@ -2,6 +2,6 @@ DESCRIPTION = "Scripts to easily get started with common mLinux use cases" require mlinux-scripts.inc -PR = "r4" +PR = "r5" S = "${WORKDIR}/mlinux-scripts-${PV}" -- cgit v1.2.3 From e42a056889f5a629fe0e3229c933c4873b0f177c Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 14 May 2019 14:35:20 -0500 Subject: Make lora-gateway revision match mLinux4 --- recipes-connectivity/lora/lora-gateway_5.0.1.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-connectivity/lora/lora-gateway_5.0.1.bb b/recipes-connectivity/lora/lora-gateway_5.0.1.bb index b0509ba..23538a9 100644 --- a/recipes-connectivity/lora/lora-gateway_5.0.1.bb +++ b/recipes-connectivity/lora/lora-gateway_5.0.1.bb @@ -6,7 +6,8 @@ SECTION = "console/utils" LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" DEPENDS = "libgps24" -PR = "r12" +RDEPENDS_${PN} = "libgps24" +PR = "r11" SRCREV = "v${PV}" SRC_URI = "git://github.com/Lora-net/lora_gateway.git;protocol=git \ -- cgit v1.2.3 From 5fc68d16e845c562c262862e7cbfe49db149e2f2 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 20 May 2019 15:39:45 -0500 Subject: add packages for certification testing mtrv1 --- recipes-core/images/mlinux-mtrv1-image.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb index 3c10593..a9b2280 100644 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -15,6 +15,7 @@ NETWORKING_FEATURES += "bridge-utils \ openssl \ rsync \ iperf \ + iperf3 \ mii-diag \ tcpdump \ netcat \ @@ -31,7 +32,7 @@ WIFI_FEATURES = " \ hostap-daemon hostap-utils \ " -BLUETOOTH_FEATURES = "bluez5" +BLUETOOTH_FEATURES = "bluez5 bluez5-pand" # Add all timezones available # ntpdate will sync time every 30 min by default via cron @@ -56,10 +57,10 @@ MULTITECH_FEATURES += " \ jsparser \ " -MISC_FEATURES = "minicom lrzsz nano" +MISC_FEATURES = "minicom lrzsz nano pps-tools" # Extra stuff to install -IMAGE_INSTALL += "kernel-module-rs9113 rs9113-util rs9113-autostart" +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 += " \ -- cgit v1.2.3 From cc2b2b6bad0bcd17c3df129be61a67fe392cbc93 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Tue, 21 May 2019 14:17:26 -0500 Subject: lora: update packet forwarders with increased JIT peek ahead time 60ms for v1.5 and 90ms for v2.1, add additional escapes from spec scan loops --- .../lora/lora-gateway-geolocation_5.1.0.bb | 8 ++--- ...ora-gateway-spectral-scan-skip-fpga-reset.patch | 25 +++++++++++++-- .../lora-packet-forwarder-geolocation_5.1.0.bb | 8 ++--- ...ncrease-peek-and-remove-sort-from-dequeue.patch | 36 ++++++++++++++++++++++ .../lora/lora-packet-forwarder_4.0.1.bb | 3 +- 5 files changed, 69 insertions(+), 11 deletions(-) create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-jit-queue-increase-peek-and-remove-sort-from-dequeue.patch 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 424ea43..403670a 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-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, ®_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, ®_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-packet-forwarder-geolocation_5.1.0.bb b/recipes-connectivity/lora/lora-packet-forwarder-geolocation_5.1.0.bb index 34a18a1..fa5232a 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/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/lora/lora-packet-forwarder_4.0.1.bb b/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb index 282d09e..d55e511 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb +++ b/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb @@ -7,7 +7,7 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" DEPENDS = "lora-gateway logrotate lora-logging" RDEPENDS_${PN} += "bash" -PR = "r16" +PR = "r17" SRCREV = "v${PV}" @@ -39,6 +39,7 @@ SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \ file://lora-packet-forwarder-remove-jit-power-check.patch \ file://lora-packet-forwarder-gpsd.patch \ file://lora-packet-forwarder-beacon-rfu-fix.patch \ + file://lora-packet-forwarder-jit-queue-increase-peek-and-remove-sort-from-dequeue.patch \ " -- cgit v1.2.3 From a3287995c52c3d3d7ea70180a6e23492fc645863 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 21 May 2019 19:37:10 -0500 Subject: Add dnsmasq for MNG2 testing --- recipes-core/images/mlinux-mtrv1-image.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb index a9b2280..a81ddb1 100644 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -11,6 +11,7 @@ FILESYSTEM_FEATURES = "dosfstools \ " NETWORKING_FEATURES += "bridge-utils \ + dnsmasq \ inetutils-ftp \ openssl \ rsync \ -- cgit v1.2.3 From 066eabf3dc9ec218f16fd988fd2ce2e18cb88c33 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 22 May 2019 13:44:38 -0500 Subject: Add MTHS u-blox initialization to mLinux 5 --- recipes-navigation/gpsd/gpsd/gpsd-default | 8 ++++++++ recipes-navigation/gpsd/gpsd_3.16.bb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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-navigation/gpsd/gpsd_3.16.bb b/recipes-navigation/gpsd/gpsd_3.16.bb index 35719aa..2111399 100644 --- a/recipes-navigation/gpsd/gpsd_3.16.bb +++ b/recipes-navigation/gpsd/gpsd_3.16.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m12" +PR="m13" EXTRANATIVEPATH += "chrpath-native" -- cgit v1.2.3 From c4f1525f9b67e39b0eb1e2d9b09dabd005fea6ba Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 22 May 2019 14:51:26 -0500 Subject: dnsmasq configuration for MTHS factory test. --- .../multitech/config/config-mths/default/dnsmasq | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 recipes-core/multitech/config/config-mths/default/dnsmasq 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..d48c464 --- /dev/null +++ b/recipes-core/multitech/config/config-mths/default/dnsmasq @@ -0,0 +1,16 @@ +ENABLED="yes" + +# dnsmasq configuration is used a hook to further +# configure the system. Since we don't want any factory +# settings, we remove the WiFi tarball with saved +# wifi related settings. + +# 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 + +# letting ntpd start is a waste of time. The factory +# tests do not use NTP. +sed -i 's/ENABLED="yes"/ENABLED="no"/' /etc/default/ntpd -- cgit v1.2.3 From 27305bcacf848f618b24e81f0be7f59cb2e22981 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 22 May 2019 14:52:43 -0500 Subject: New MTHS configuration package for factory testing. --- .../multitech/config/config-mths/default/bluetooth | 8 + .../multitech/config/config-mths/default/hostapd | 11 + .../multitech/config/config-mths/default/rs9113 | 14 + .../config/config-mths/dnsmasq.d/dhcp.conf | 8 + .../multitech/config/config-mths/hostapd.conf | 1996 ++++++++++++++++++++ .../multitech/config/config-mths/ifplugd/usb1.conf | 2 + .../config/config-mths/modprobe.d/cfg80211.conf | 7 + .../config/config-mths/modprobe.d/mts-io.conf | 1 + .../config/config-mths/network/interfaces.mths | 12 + recipes-core/multitech/config_2.1.bb | 47 +- 10 files changed, 2104 insertions(+), 2 deletions(-) create mode 100644 recipes-core/multitech/config/config-mths/default/bluetooth create mode 100644 recipes-core/multitech/config/config-mths/default/hostapd create mode 100644 recipes-core/multitech/config/config-mths/default/rs9113 create mode 100644 recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf create mode 100644 recipes-core/multitech/config/config-mths/hostapd.conf create mode 100644 recipes-core/multitech/config/config-mths/ifplugd/usb1.conf create mode 100644 recipes-core/multitech/config/config-mths/modprobe.d/cfg80211.conf create mode 100644 recipes-core/multitech/config/config-mths/modprobe.d/mts-io.conf create mode 100644 recipes-core/multitech/config/config-mths/network/interfaces.mths 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/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/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/dnsmasq.d/dhcp.conf b/recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf new file mode 100644 index 0000000..837d0e2 --- /dev/null +++ b/recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf @@ -0,0 +1,8 @@ +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 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= + +# 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 : 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 ' 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 ' 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__ +# 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 +# :: +#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= 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 . 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, e.g., vlan1 +# 1 = ., 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: 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=[:] +# 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=[:] +# 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: <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: <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 = 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: [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: [,] +#domain_name=example.com,another.example.com,yet-another.example.com + +# 3GPP Cellular Network information +# format: [;][;...] +#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: +# 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: [:<[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=: +# 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: +# [,],... +# +# 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: 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: 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 +# ::::: +#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= + +# The content of a location civic measurement subelement +#civic= + +# 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 ). 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/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..0f1541e --- /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 usb1 +iface usb1 inet static +address 192.168.2.1 +netmask 255.255.255.0 + diff --git a/recipes-core/multitech/config_2.1.bb b/recipes-core/multitech/config_2.1.bb index ed93e64..297fdcd 100644 --- a/recipes-core/multitech/config_2.1.bb +++ b/recipes-core/multitech/config_2.1.bb @@ -2,20 +2,30 @@ DESCRIPTION = "Provides default system config files and /var/config fs" SECTION = "base" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +PACKAGE_ARCH = "all" PR = "r4" - +PACKAGES =+ "${PN}-mths" inherit update-rc.d 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 \ " -CONFIGFILES = "network ppp" +RDEPENDS_${PN}-mths += "${PN}" + +CONFFILES_${PN} += "${sysconfdir}/defaults.tar.gz" +CONFIGFILES = "network/interfaces ppp" + +CONFIGFILES_MTHS = "config-mths" fakeroot do_install () { cd ${WORKDIR} @@ -34,7 +44,40 @@ fakeroot do_install () { # 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 } FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass" FILES_${PN} += "${sysconfdir}/init.d/config" + +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 +} -- cgit v1.2.3 From 2332a398d0120404a1a5c6958efefb12f17e5713 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 22 May 2019 15:15:05 -0500 Subject: Use /etc/default/dnsmasq as a hook to remove user settings in .defaults2.tar.gz and disable ntpd --- recipes-core/multitech/config/config-mths/default/dnsmasq | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/recipes-core/multitech/config/config-mths/default/dnsmasq b/recipes-core/multitech/config/config-mths/default/dnsmasq index d48c464..a27c1c6 100644 --- a/recipes-core/multitech/config/config-mths/default/dnsmasq +++ b/recipes-core/multitech/config/config-mths/default/dnsmasq @@ -1,16 +1,10 @@ ENABLED="yes" -# dnsmasq configuration is used a hook to further -# configure the system. Since we don't want any factory -# settings, we remove the WiFi tarball with saved -# wifi related settings. - # 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 -# letting ntpd start is a waste of time. The factory -# tests do not use NTP. +# Stop ntpd. ntpd default is in root. sed -i 's/ENABLED="yes"/ENABLED="no"/' /etc/default/ntpd -- cgit v1.2.3 From ea08cf268df3f61c9bb3e232af13c0bb812e3c5d Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 22 May 2019 15:20:41 -0500 Subject: Add MTHS recipe for manufacturing. --- recipes-core/images/mlinux-mths-image.bb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 recipes-core/images/mlinux-mths-image.bb diff --git a/recipes-core/images/mlinux-mths-image.bb b/recipes-core/images/mlinux-mths-image.bb new file mode 100644 index 0000000..4be72ec --- /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-mtrv1-image.bb +DESCRIPTION = "MTHS images for Factory Testing" + +# Extra stuff to install +IMAGE_INSTALL += "config-mths dnsmasq" -- cgit v1.2.3 From 0309e54b1b96e8ba06fdd0defc5372af215bdba9 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 22 May 2019 17:33:54 -0500 Subject: Allow ifplugd-disable to install on MTR --- recipes-core/busybox/ifplugd-disable_1.0.bb | 30 ++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/recipes-core/busybox/ifplugd-disable_1.0.bb b/recipes-core/busybox/ifplugd-disable_1.0.bb index 3d75d2d..927ce54 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}() { -sed -i 's/^ENABLED="no"/ENABLED="yes"/i' $D${sysconfdir}/default/ifplugd +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/etc/default/ifplugd +if [ $ro -eq 1 ] ; then + mount -o remount,ro / +fi } + pkg_postinst_${PN}() { -sed -i 's/^ENABLED="yes"/ENABLED="no"/i' $D${sysconfdir}/default/ifplugd +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/etc/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 fi +if [ $ro -eq 1 ] ; then + mount -o remount,ro / +fi } -- cgit v1.2.3 From a413914ce0341779e3dfb0fa4e2947c00c20e5c4 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 22 May 2019 17:54:45 -0500 Subject: Put back sysconfdir which was accidentally deleted in the prior change --- recipes-core/busybox/ifplugd-disable_1.0.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-core/busybox/ifplugd-disable_1.0.bb b/recipes-core/busybox/ifplugd-disable_1.0.bb index 927ce54..bdb8678 100644 --- a/recipes-core/busybox/ifplugd-disable_1.0.bb +++ b/recipes-core/busybox/ifplugd-disable_1.0.bb @@ -19,7 +19,7 @@ if [ -z "$D" ] ; then mount -o remount,rw / fi fi -sed -i 's/^ENABLED="no"/ENABLED="yes"/i' $D/etc/default/ifplugd +sed -i 's/^ENABLED="no"/ENABLED="yes"/i' $D/${sysconfdir}/default/ifplugd if [ $ro -eq 1 ] ; then mount -o remount,ro / fi @@ -33,11 +33,11 @@ if [ -z "$D" ] ; then mount -o remount,rw / fi fi -sed -i 's/^ENABLED="yes"/ENABLED="no"/i' $D/etc/default/ifplugd +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 / -- cgit v1.2.3 From a844c8f115abf8e011015f932d773f9ccd0559b6 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 22 May 2019 18:06:09 -0500 Subject: Remove / after $D when next is a bitbake variable. --- recipes-core/busybox/ifplugd-disable_1.0.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-core/busybox/ifplugd-disable_1.0.bb b/recipes-core/busybox/ifplugd-disable_1.0.bb index bdb8678..3037e23 100644 --- a/recipes-core/busybox/ifplugd-disable_1.0.bb +++ b/recipes-core/busybox/ifplugd-disable_1.0.bb @@ -19,7 +19,7 @@ if [ -z "$D" ] ; then mount -o remount,rw / fi fi -sed -i 's/^ENABLED="no"/ENABLED="yes"/i' $D/${sysconfdir}/default/ifplugd +sed -i 's/^ENABLED="no"/ENABLED="yes"/i' $D${sysconfdir}/default/ifplugd if [ $ro -eq 1 ] ; then mount -o remount,ro / fi @@ -33,11 +33,11 @@ if [ -z "$D" ] ; then mount -o remount,rw / fi fi -sed -i 's/^ENABLED="yes"/ENABLED="no"/i' $D/${sysconfdir}/default/ifplugd +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/${sysconfdir}/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 / -- cgit v1.2.3 From 6c32071e09d7628272c21f3895d93c690ef09a8e Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 23 May 2019 18:44:47 -0500 Subject: Bump mLinux to dev35 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index c6dbe70..144f8a1 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev34" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev35" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 48756c440e339af5a0e2b486978e7a183f6cc8a2 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 24 May 2019 13:53:53 -0500 Subject: Turn off ntpd for testing --- .../multitech/config/config-mths/default/ntpd | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 recipes-core/multitech/config/config-mths/default/ntpd 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 + -- cgit v1.2.3 From 991ceb279ad22790b6814ea9a3cae17c062af85e Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 28 May 2019 22:51:04 -0500 Subject: Patch ifplugd to allow for drivers being loaded, and allow symlinks in config paths. --- recipes-core/busybox/busybox_%.bbappend | 3 ++- recipes-core/busybox/files/ifplugd.init | 2 +- recipes-core/busybox/files/ifplugd.patch | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 recipes-core/busybox/files/ifplugd.patch diff --git a/recipes-core/busybox/busybox_%.bbappend b/recipes-core/busybox/busybox_%.bbappend index b8bbdf7..6ead22b 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" @@ -9,6 +9,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 */ -- cgit v1.2.3 From 3bb5d4ef3f599536de76ebaa0ca382fa7bf66472 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 28 May 2019 22:53:46 -0500 Subject: Fix up gadget and ifplugd for mLinux MTHS test image. --- .../multitech/config/config-mths/default/dnsmasq | 17 ++++++++++++ .../config/config-mths/default/usb-gadget | 6 +++++ .../config/config-mths/ifplugd/ifplugd.action | 30 ++++++++++++++++++++++ .../multitech/config/config-mths/ifplugd/usb0.conf | 2 ++ .../config/config-mths/network/interfaces.mths | 4 +-- 5 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 recipes-core/multitech/config/config-mths/default/usb-gadget create mode 100755 recipes-core/multitech/config/config-mths/ifplugd/ifplugd.action create mode 100644 recipes-core/multitech/config/config-mths/ifplugd/usb0.conf diff --git a/recipes-core/multitech/config/config-mths/default/dnsmasq b/recipes-core/multitech/config/config-mths/default/dnsmasq index a27c1c6..129fda1 100644 --- a/recipes-core/multitech/config/config-mths/default/dnsmasq +++ b/recipes-core/multitech/config/config-mths/default/dnsmasq @@ -1,3 +1,5 @@ +# MTHS dnsmasq +# and a hook to set up config files for MTHS ENABLED="yes" # This configuration is for manufacturing test. @@ -8,3 +10,18 @@ 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/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/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/network/interfaces.mths b/recipes-core/multitech/config/config-mths/network/interfaces.mths index 0f1541e..689ce0b 100644 --- a/recipes-core/multitech/config/config-mths/network/interfaces.mths +++ b/recipes-core/multitech/config/config-mths/network/interfaces.mths @@ -5,8 +5,8 @@ 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 usb1 -iface usb1 inet static +auto usb0 +iface usb0 inet static address 192.168.2.1 netmask 255.255.255.0 -- cgit v1.2.3 From b5a2ca08e91475eeaee33166d018f532e1c069f5 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 28 May 2019 22:57:07 -0500 Subject: Fix mtrv1 device tree USB, ifplugd/gadget for MTHS testing. --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 144f8a1..c0257a6 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev35" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev36" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 1db3228526ff0a380a0170e21320fd8d0d345cbe Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Tue, 4 Jun 2019 14:16:52 -0500 Subject: lora: fix gps time stamping and synchronization, add patch for PKF deduplication to be incorporated into recipe later --- .../lora/lora-gateway/lora-gateway-gpsd.patch | 219 ++++++++++++++++++--- recipes-connectivity/lora/lora-gateway_5.0.1.bb | 3 +- .../lora-packet-forwarder-dedup-rx.patch | 47 +++++ .../lora-packet-forwarder-gpsd.patch | 9 + .../lora/lora-packet-forwarder_4.0.1.bb | 2 +- 5 files changed, 251 insertions(+), 29 deletions(-) create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-dedup-rx.patch 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 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 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_5.0.1.bb b/recipes-connectivity/lora/lora-gateway_5.0.1.bb index 23538a9..faec985 100644 --- a/recipes-connectivity/lora/lora-gateway_5.0.1.bb +++ b/recipes-connectivity/lora/lora-gateway_5.0.1.bb @@ -7,7 +7,8 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=a2bdef95625509f821ba00460e3ae0eb" DEPENDS = "libgps24" RDEPENDS_${PN} = "libgps24" -PR = "r11" +PR = "r12" + SRCREV = "v${PV}" SRC_URI = "git://github.com/Lora-net/lora_gateway.git;protocol=git \ 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..b80bb26 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-dedup-rx.patch @@ -0,0 +1,47 @@ +diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c +index 801f28d..7c94308 100644 +--- a/lora_pkt_fwd/src/lora_pkt_fwd.c ++++ b/lora_pkt_fwd/src/lora_pkt_fwd.c +@@ -1536,6 +1556,41 @@ void thread_up(void) { + memcpy((void *)(buff_up + buff_index), (void *)"{\"rxpk\":[", 9); + buff_index += 9; + ++ if (nb_pkt > 1) { ++ uint32_t check_addr = 0; ++ uint16_t check_fcnt = 0; ++ float check_snr = -30.0; ++ ++ for (i=0; i < nb_pkt; ++i) { ++ p = &rxpkt[i]; ++ check_addr = p->payload[1]; ++ check_addr |= p->payload[2] << 8; ++ check_addr |= p->payload[3] << 16; ++ check_addr |= p->payload[4] << 24; ++ ++ check_fcnt = p->payload[6]; ++ check_fcnt |= p->payload[7] << 8; ++ ++ check_snr = p->snr; ++ ++ for (j=0; j < nb_pkt; ++j) { ++ p = &rxpkt[j]; ++ mote_addr = p->payload[1]; ++ mote_addr |= p->payload[2] << 8; ++ mote_addr |= p->payload[3] << 16; ++ mote_addr |= p->payload[4] << 24; ++ ++ mote_fcnt = p->payload[6]; ++ mote_fcnt |= p->payload[7] << 8; ++ ++ if (check_addr == mote_addr && check_fcnt == mote_fcnt && 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-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_4.0.1.bb b/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb index d55e511..1430c6c 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb +++ b/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb @@ -7,7 +7,7 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" DEPENDS = "lora-gateway logrotate lora-logging" RDEPENDS_${PN} += "bash" -PR = "r17" +PR = "r18" SRCREV = "v${PV}" -- cgit v1.2.3 From cc8d044b694d5b1238e9f1a15d23edc9a9466929 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Wed, 5 Jun 2019 09:55:20 -0500 Subject: lora: update network server to 2.2.25 --- .../lora/lora-network-server_2.2.18.bb | 48 ---------------------- .../lora/lora-network-server_2.2.25.bb | 48 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-network-server_2.2.18.bb create mode 100644 recipes-connectivity/lora/lora-network-server_2.2.25.bb diff --git a/recipes-connectivity/lora/lora-network-server_2.2.18.bb b/recipes-connectivity/lora/lora-network-server_2.2.18.bb deleted file mode 100644 index a0442d9..0000000 --- a/recipes-connectivity/lora/lora-network-server_2.2.18.bb +++ /dev/null @@ -1,48 +0,0 @@ -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 = "r8" -CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" - -SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ - file://lora-network-server.init \ - file://lora-network-server.default \ - " - -SRC_URI[md5sum] = "b774c019f2e6f2ff684fd51e62de81aa" -SRC_URI[sha256sum] = "18b1a07b43da70b9a6bdee2c9fdd547af3e924099791aedef138cb13c1027a4e" - -# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server - install -m 0755 lora-v21-keygen ${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-network-server_2.2.25.bb b/recipes-connectivity/lora/lora-network-server_2.2.25.bb new file mode 100644 index 0000000..bf39c4f --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server_2.2.25.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 = "r8" +CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" + +SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ + file://lora-network-server.init \ + file://lora-network-server.default \ + " + +SRC_URI[md5sum] = "256452241125ef7ba2f5ac822315d6b9" +SRC_URI[sha256sum] = "be1187424789c8a605883bee6272ad062407222de082dd61cd7cff9f703f4391" + +# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server + install -m 0755 lora-v21-keygen ${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" -- cgit v1.2.3 From 82cf797b6093c83b5a4ae8734ae8c02a1f7ef5ff Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Thu, 6 Jun 2019 07:47:50 -0500 Subject: lora: update network server to v2.2.26 --- .../lora/lora-network-server_2.2.25.bb | 48 ---------------------- .../lora/lora-network-server_2.2.26.bb | 48 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-network-server_2.2.25.bb create mode 100644 recipes-connectivity/lora/lora-network-server_2.2.26.bb diff --git a/recipes-connectivity/lora/lora-network-server_2.2.25.bb b/recipes-connectivity/lora/lora-network-server_2.2.25.bb deleted file mode 100644 index bf39c4f..0000000 --- a/recipes-connectivity/lora/lora-network-server_2.2.25.bb +++ /dev/null @@ -1,48 +0,0 @@ -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 = "r8" -CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" - -SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ - file://lora-network-server.init \ - file://lora-network-server.default \ - " - -SRC_URI[md5sum] = "256452241125ef7ba2f5ac822315d6b9" -SRC_URI[sha256sum] = "be1187424789c8a605883bee6272ad062407222de082dd61cd7cff9f703f4391" - -# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server - install -m 0755 lora-v21-keygen ${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-network-server_2.2.26.bb b/recipes-connectivity/lora/lora-network-server_2.2.26.bb new file mode 100644 index 0000000..087b7df --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server_2.2.26.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 = "r8" +CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" + +SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ + file://lora-network-server.init \ + file://lora-network-server.default \ + " + +SRC_URI[md5sum] = "d8c717c6aa14469842f964dd4d166d6b" +SRC_URI[sha256sum] = "0854ae5d2ed1411c5ceb86232db09e9084141451df0e982e1cb6b6db2ee7dc12" + +# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server + install -m 0755 lora-v21-keygen ${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" -- cgit v1.2.3 From e3cbbc95e3a923a90c911137dcf7e2aff9688bc0 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Fri, 7 Jun 2019 08:03:01 -0500 Subject: lora: update network server to 2.2.27 --- .../lora/lora-network-server_2.2.26.bb | 48 ---------------------- .../lora/lora-network-server_2.2.27.bb | 48 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-network-server_2.2.26.bb create mode 100644 recipes-connectivity/lora/lora-network-server_2.2.27.bb diff --git a/recipes-connectivity/lora/lora-network-server_2.2.26.bb b/recipes-connectivity/lora/lora-network-server_2.2.26.bb deleted file mode 100644 index 087b7df..0000000 --- a/recipes-connectivity/lora/lora-network-server_2.2.26.bb +++ /dev/null @@ -1,48 +0,0 @@ -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 = "r8" -CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" - -SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ - file://lora-network-server.init \ - file://lora-network-server.default \ - " - -SRC_URI[md5sum] = "d8c717c6aa14469842f964dd4d166d6b" -SRC_URI[sha256sum] = "0854ae5d2ed1411c5ceb86232db09e9084141451df0e982e1cb6b6db2ee7dc12" - -# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server - install -m 0755 lora-v21-keygen ${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-network-server_2.2.27.bb b/recipes-connectivity/lora/lora-network-server_2.2.27.bb new file mode 100644 index 0000000..22023ee --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server_2.2.27.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 = "r8" +CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" + +SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ + file://lora-network-server.init \ + file://lora-network-server.default \ + " + +SRC_URI[md5sum] = "7a8a86272cccc454f634f14ba0b6cab7" +SRC_URI[sha256sum] = "f5ed505d7a0dfa6eb42363d9a27464d3e1953d2d3acfdefd919b2f2b6a7cb2a8" + +# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server + install -m 0755 lora-v21-keygen ${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" -- cgit v1.2.3 From 99f29054bd72b3f57bf5745ad4b9f8f990369f71 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 10 Jun 2019 10:57:46 -0500 Subject: Add usb0 to DHCP for MTHS, use address 192.168.3.1 to reduce conflict. --- recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf | 4 ++++ recipes-core/multitech/config/config-mths/network/interfaces.mths | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf b/recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf index 837d0e2..47eb1c0 100644 --- a/recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf +++ b/recipes-core/multitech/config/config-mths/dnsmasq.d/dhcp.conf @@ -6,3 +6,7 @@ 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/network/interfaces.mths b/recipes-core/multitech/config/config-mths/network/interfaces.mths index 689ce0b..2463e0a 100644 --- a/recipes-core/multitech/config/config-mths/network/interfaces.mths +++ b/recipes-core/multitech/config/config-mths/network/interfaces.mths @@ -7,6 +7,6 @@ pre-up bash -c '([[ -d /sys/class/net/wifi1 ]] || /opt/rs9113/onebox_util rpine0 # Gadget USB auto usb0 iface usb0 inet static -address 192.168.2.1 +address 192.168.3.1 netmask 255.255.255.0 -- cgit v1.2.3 From 33be6e867de482010cb84d2ea57ee0e4f2790114 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 10 Jun 2019 11:21:21 -0500 Subject: Bump mLinux version --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index c0257a6..cbe8f6c 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev36" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev37" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From aa56d1bc09d4b7de4137db08cb6aa3cad9196d48 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Tue, 18 Jun 2019 09:36:21 -0500 Subject: lora: add best packet filter patch to v1.5 packet forwarder --- .../lora-packet-forwarder-dedup-rx.patch | 57 ++++++++++++++-------- .../lora/lora-packet-forwarder_4.0.1.bb | 3 +- 2 files changed, 40 insertions(+), 20 deletions(-) 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 index b80bb26..c368033 100644 --- 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 @@ -1,39 +1,59 @@ diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c -index 801f28d..7c94308 100644 +index 801f28d..c35c64f 100644 --- a/lora_pkt_fwd/src/lora_pkt_fwd.c +++ b/lora_pkt_fwd/src/lora_pkt_fwd.c -@@ -1536,6 +1556,41 @@ void thread_up(void) { +@@ -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 (nb_pkt > 1) { ++ 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]; -+ check_addr = p->payload[1]; -+ check_addr |= p->payload[2] << 8; -+ check_addr |= p->payload[3] << 16; -+ check_addr |= p->payload[4] << 24; ++ 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_fcnt = p->payload[6]; -+ check_fcnt |= p->payload[7] << 8; -+ + check_snr = p->snr; + + for (j=0; j < nb_pkt; ++j) { + p = &rxpkt[j]; -+ mote_addr = p->payload[1]; -+ mote_addr |= p->payload[2] << 8; -+ mote_addr |= p->payload[3] << 16; -+ mote_addr |= p->payload[4] << 24; -+ -+ mote_fcnt = p->payload[6]; -+ mote_fcnt |= p->payload[7] << 8; + -+ if (check_addr == mote_addr && check_fcnt == mote_fcnt && p->snr < check_snr) { ++ 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; + } @@ -44,4 +64,3 @@ index 801f28d..7c94308 100644 /* 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_4.0.1.bb b/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb index 1430c6c..ca061da 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb +++ b/recipes-connectivity/lora/lora-packet-forwarder_4.0.1.bb @@ -7,7 +7,7 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENSE;md5=22af7693d7b76ef0fc76161c4be76c45" DEPENDS = "lora-gateway logrotate lora-logging" RDEPENDS_${PN} += "bash" -PR = "r18" +PR = "r19" SRCREV = "v${PV}" @@ -40,6 +40,7 @@ SRC_URI = "git://github.com/Lora-net/packet_forwarder.git;protocol=git \ file://lora-packet-forwarder-gpsd.patch \ file://lora-packet-forwarder-beacon-rfu-fix.patch \ file://lora-packet-forwarder-jit-queue-increase-peek-and-remove-sort-from-dequeue.patch \ + file://lora-packet-forwarder-dedup-rx.patch \ " -- cgit v1.2.3 From 9222f31ef4808c87da7aadfd5255102fa4284087 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 18 Jun 2019 16:38:54 -0500 Subject: Release 5.0.0 and 5.0.0-AEP --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index c6dbe70..bccc8fd 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev34" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 77194ecce55297cf2544a4a571e7512e34cf2902 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Thu, 27 Jun 2019 10:43:32 -0500 Subject: lora: add patch for duty-cycle limiting of packet forwarder --- .../lora-packet-forwarder-duty-cycle.patch | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch 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..ee9ecf4 --- /dev/null +++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch @@ -0,0 +1,76 @@ +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,7 +134,13 @@ 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, "forward_crc_valid"); + if (json_value_get_type(val) == JSONBoolean) { + fwd_valid_pkt = (bool)json_value_get_boolean(val); +@@ -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); -- cgit v1.2.3 From 70829a51c4518387189723d2e8c75572184acfde Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 5 Jul 2019 10:06:26 -0500 Subject: Put back examples and utilities removed in mLinux 5.0.0 --- recipes-core/images/mlinux-rs9113-factory-image.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/images/mlinux-rs9113-factory-image.bb b/recipes-core/images/mlinux-rs9113-factory-image.bb index 3ab950c..55a2316 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 += "dnsmasq bluez5-noinst-tools python-dbus kernel-module-rs9113 rs9113-autostart rs9113-util" +IMAGE_INSTALL += "dnsmasq bluez5-noinst-tools python-dbus kernel-module-rs9113 rs9113-autostart rs9113-util rs9113-misc rs9113-utils-extra" -- cgit v1.2.3 From aa92e2fd870f7cd75b49e0dc4b0a67d68ee7b788 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 5 Jul 2019 10:11:58 -0500 Subject: Add back missing rs9113 examples, utilities --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index bccc8fd..21e9134 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.1" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 52fd1d2e08c0a456cf0023e3adb55b61db6df51a Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 5 Jul 2019 13:45:01 -0500 Subject: Upgrade sudo to 1.8.27 to fix various vulnerabilities --- recipes-extended/sudo/files/sudo.pam | 6 +++ recipes-extended/sudo/sudo.inc | 52 ++++++++++++++++++++++ ...1-Include-sys-types.h-for-id_t-definition.patch | 34 ++++++++++++++ recipes-extended/sudo/sudo_1.8.27.bb | 45 +++++++++++++++++++ 4 files changed, 137 insertions(+) create mode 100644 recipes-extended/sudo/files/sudo.pam create mode 100644 recipes-extended/sudo/sudo.inc create mode 100644 recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch create mode 100644 recipes-extended/sudo/sudo_1.8.27.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 +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 +--- +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 ++ + #ifdef HAVE_STDBOOL_H + # include + #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" + + + + + -- cgit v1.2.3 From 01b6ffa922dfac33e271c079332d8408653295ee Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Tue, 9 Jul 2019 10:24:28 -0500 Subject: lora: update duty-cycle patch --- .../lora-packet-forwarder-duty-cycle.patch | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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 index ee9ecf4..b1790e7 100644 --- 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 @@ -2,7 +2,7 @@ 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,7 +134,13 @@ static char serv_port_up[8] = STR(DEFAULT_PORT_UP); /* server port for upstream traffic */ +@@ -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 */ @@ -45,9 +45,19 @@ index 801f28d..7b63b8f 100644 + /* packet filtering parameters */ - val = json_object_get_value(conf_obj, "forward_crc_valid"); + val = json_object_get_value(conf_obj, "best_packet_filter"); if (json_value_get_type(val) == JSONBoolean) { - fwd_valid_pkt = (bool)json_value_get_boolean(val); + 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); -- cgit v1.2.3 From 70095bfa330e121d16c607eabba7c4c68530239f Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 5 Aug 2019 17:38:15 -0500 Subject: Add L4N1 and L4E1 modems, and add COPS dialer strings to non-VZ LTE modems --- recipes-core/multitech/config/ppp/peers/l4e1 | 11 +++++ recipes-core/multitech/config/ppp/peers/l4e1_chat | 25 +++++++++++ recipes-core/multitech/config/ppp/peers/l4n1 | 11 +++++ recipes-core/multitech/config/ppp/peers/l4n1_chat | 1 + .../multitech/config/ppp/peers/l4n1_chat_non_vz | 48 ++++++++++++++++++++++ .../multitech/config/ppp/peers/l4n1_chat_vz | 44 ++++++++++++++++++++ .../multitech/config/ppp/peers/lna3_chat_non_vz | 2 + recipes-core/multitech/config/ppp/peers/lsp3_chat | 6 +++ 8 files changed, 148 insertions(+) create mode 100644 recipes-core/multitech/config/ppp/peers/l4e1 create mode 100644 recipes-core/multitech/config/ppp/peers/l4e1_chat create mode 100644 recipes-core/multitech/config/ppp/peers/l4n1 create mode 120000 recipes-core/multitech/config/ppp/peers/l4n1_chat create mode 100644 recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz create mode 100644 recipes-core/multitech/config/ppp/peers/l4n1_chat_vz diff --git a/recipes-core/multitech/config/ppp/peers/l4e1 b/recipes-core/multitech/config/ppp/peers/l4e1 new file mode 100644 index 0000000..d6359cd --- /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/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..3a297ed --- /dev/null +++ b/recipes-core/multitech/config/ppp/peers/l4e1_chat @@ -0,0 +1,25 @@ +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 +# ---------------------------------- +OK 'AT+COPS=2' +OK 'AT+CGDCONT=1,"IP","internet"' +OK 'AT+COPS=0' +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..c0b4beb --- /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/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..ea5907e --- /dev/null +++ b/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz @@ -0,0 +1,48 @@ +#---------------------------------------- +# 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 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+COPS=2' +OK 'AT+CGDCONT=3,"IP","phone"' +OK 'AT+COPS=0' +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/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/lna3_chat_non_vz b/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz index 1e9740a..033efde 100644 --- a/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz +++ b/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz @@ -37,7 +37,9 @@ OK 'AT+CSQ' #OK 'AT+CGDCONT=3,"IP","proxy"' #OK 'AT+CGDCONT=3,"IP","ISP.CINGULAR"' #OK 'AT+CGDCONT=3,"IP","internet2.voicestream.com"' +OK 'AT+COPS=2' OK 'AT+CGDCONT=3,"IP","phone"' +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_chat b/recipes-core/multitech/config/ppp/peers/lsp3_chat index 3fcdfc2..347c3b8 100644 --- a/recipes-core/multitech/config/ppp/peers/lsp3_chat +++ b/recipes-core/multitech/config/ppp/peers/lsp3_chat @@ -10,6 +10,12 @@ ABORT 'BUSY' '' 'AT' OK 'ATZ' OK 'AT+CSQ' +# ---------------------------------- +# Set the APN for your provider here +# ---------------------------------- +OK 'AT+COPS=2' +OK 'AT+CGDCONT=1,"IP","internet"' +OK 'AT+COPS=0' OK 'AT+CGDCONT?' SAY "Dialing...\n" OK 'ATD*99***2#' -- cgit v1.2.3 From 3c835ea0fde39c08fe189d83b8d951ed61090683 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 5 Aug 2019 17:42:59 -0500 Subject: Bump the config package version for new modems and COPS command. --- recipes-core/multitech/config_2.1.bb | 83 ------------------------------------ recipes-core/multitech/config_2.2.bb | 83 ++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 83 deletions(-) delete mode 100644 recipes-core/multitech/config_2.1.bb create mode 100644 recipes-core/multitech/config_2.2.bb diff --git a/recipes-core/multitech/config_2.1.bb b/recipes-core/multitech/config_2.1.bb deleted file mode 100644 index 297fdcd..0000000 --- a/recipes-core/multitech/config_2.1.bb +++ /dev/null @@ -1,83 +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" -PACKAGE_ARCH = "all" -PR = "r4" -PACKAGES =+ "${PN}-mths" -inherit update-rc.d - -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 \ -" - -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 -} - -FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass" -FILES_${PN} += "${sysconfdir}/init.d/config" - -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/multitech/config_2.2.bb b/recipes-core/multitech/config_2.2.bb new file mode 100644 index 0000000..da51cc9 --- /dev/null +++ b/recipes-core/multitech/config_2.2.bb @@ -0,0 +1,83 @@ +DESCRIPTION = "Provides default system config files and /var/config fs" +SECTION = "base" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +PACKAGE_ARCH = "all" +PR = "r1" +PACKAGES =+ "${PN}-mths" +inherit update-rc.d + +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 \ +" + +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 +} + +FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass" +FILES_${PN} += "${sysconfdir}/init.d/config" + +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 +} -- cgit v1.2.3 From bc867a61153a07a4bbbacf6c35f33169cf8b559b Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Mon, 12 Aug 2019 10:29:02 -0500 Subject: lora: remove temp files --- ...on.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0~ | 227 --------------------- ...f.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0~ | 195 ------------------ ...f.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0~ | 190 ----------------- ...f.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0~ | 196 ------------------ ...on.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0~ | 226 -------------------- ...f.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0~ | 191 ----------------- 6 files changed, 1225 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0~ delete mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0~ delete mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0~ delete mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0~ delete mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0~ delete mode 100644 recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0~ diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0~ deleted file mode 100644 index fe57b24..0000000 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0~ +++ /dev/null @@ -1,227 +0,0 @@ -{ - "SX1301_conf": { - "antenna_gain": 0, - "chan_FSK": { - "bandwidth": 125000, - "datarate": 50000, - "enable": true, - "freq_deviation": 25000, - "if": 300000, - "radio": 0 - }, - "chan_Lora_std": { - "bandwidth": 250000, - "enable": true, - "if": -200000, - "radio": 0, - "spread_factor": 7 - }, - "chan_multiSF_0": { - "enable": true, - "if": -400000, - "radio": 0 - }, - "chan_multiSF_1": { - "enable": true, - "if": -200000, - "radio": 0 - }, - "chan_multiSF_2": { - "enable": true, - "if": 0, - "radio": 0 - }, - "chan_multiSF_3": { - "enable": true, - "if": -400000, - "radio": 1 - }, - "chan_multiSF_4": { - "enable": true, - "if": -200000, - "radio": 1 - }, - "chan_multiSF_5": { - "enable": true, - "if": 0, - "radio": 1 - }, - "chan_multiSF_6": { - "enable": true, - "if": 200000, - "radio": 1 - }, - "chan_multiSF_7": { - "enable": true, - "if": 400000, - "radio": 1 - }, - "clksrc": 0, - "lbt_cfg": { - "chan_cfg": [ - { - "freq_hz": 923200000, - "scan_time_us": 5000 - }, - { - "freq_hz": 923400000, - "scan_time_us": 5000 - }, - { - "freq_hz": 923600000, - "scan_time_us": 5000 - }, - { - "freq_hz": 922200000, - "scan_time_us": 5000 - }, - { - "freq_hz": 922400000, - "scan_time_us": 5000 - }, - { - "freq_hz": 922600000, - "scan_time_us": 5000 - }, - { - "freq_hz": 922800000, - "scan_time_us": 5000 - }, - { - "freq_hz": 923000000, - "scan_time_us": 5000 - } - ], - "enable": true, - "rssi_target": -80, - "sx127x_rssi_offset": -4 - }, - "lorawan_public": true, - "radio_0": { - "enable": true, - "freq": 923600000, - "rssi_offset": -162, - "tx_enable": true, - "tx_freq_max": 928000000, - "tx_freq_min": 920000000, - "type": "SX1257" - }, - "radio_1": { - "enable": true, - "freq": 922600000, - "rssi_offset": -162, - "tx_enable": false, - "type": "SX1257" - }, - "tx_lut_0": { - "dig_gain": 3, - "mix_gain": 8, - "pa_gain": 0, - "rf_power": -6 - }, - "tx_lut_1": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 0, - "rf_power": -3 - }, - "tx_lut_10": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 24 - }, - "tx_lut_14": { - "dig_gain": 3, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_15": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, - "tx_lut_2": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 0, - "rf_power": 0 - }, - "tx_lut_3": { - "dig_gain": 3, - "mix_gain": 8, - "pa_gain": 1, - "rf_power": 3 - }, - "tx_lut_4": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 1, - "rf_power": 6 - }, - "tx_lut_5": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, - "rf_power": 10 - }, - "tx_lut_6": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, - "rf_power": 11 - }, - "tx_lut_7": { - "dig_gain": 3, - "mix_gain": 9, - "pa_gain": 2, - "rf_power": 12 - }, - "tx_lut_8": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 1, - "rf_power": 13 - }, - "tx_lut_9": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 2, - "rf_power": 14 - } - }, - "gateway_conf": { - "gateway_ID": "", - "server_address": "52.3.215.147", - "serv_port_up": 20000, - "serv_port_down": 20000, - "forward_crc_disabled": false, - "forward_crc_error": true, - "forward_crc_valid": true, - "keepalive_interval": 10, - "push_timeout_ms": 120, - "stat_interval": 20, - "synch_word": 52, - "autoquit_threshold": 60 - } -} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0~ deleted file mode 100644 index 2f01b16..0000000 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0~ +++ /dev/null @@ -1,195 +0,0 @@ -{ - "SX1301_conf": { - "antenna_gain": 0, - "chan_FSK": { - "bandwidth": 125000, - "datarate": 50000, - "enable": true, - "freq_deviation": 25000, - "if": 300000, - "radio": 0 - }, - "chan_Lora_std": { - "bandwidth": 250000, - "enable": true, - "if": -200000, - "radio": 0, - "spread_factor": 7 - }, - "chan_multiSF_0": { - "enable": true, - "if": -400000, - "radio": 0 - }, - "chan_multiSF_1": { - "enable": true, - "if": -200000, - "radio": 0 - }, - "chan_multiSF_2": { - "enable": true, - "if": 0, - "radio": 0 - }, - "chan_multiSF_3": { - "enable": true, - "if": -400000, - "radio": 1 - }, - "chan_multiSF_4": { - "enable": true, - "if": -200000, - "radio": 1 - }, - "chan_multiSF_5": { - "enable": true, - "if": 0, - "radio": 1 - }, - "chan_multiSF_6": { - "enable": true, - "if": 200000, - "radio": 1 - }, - "chan_multiSF_7": { - "enable": true, - "if": 400000, - "radio": 1 - }, - "clksrc": 0, - "lbt_cfg": { - "chan_cfg": [ - ], - "enable": false, - "rssi_target": -80, - "sx127x_rssi_offset": -4 - }, - "lorawan_public": true, - "radio_0": { - "enable": true, - "freq": 923600000, - "rssi_offset": -162, - "tx_enable": true, - "tx_freq_max": 928000000, - "tx_freq_min": 920000000, - "type": "SX1257" - }, - "radio_1": { - "enable": true, - "freq": 922600000, - "rssi_offset": -162, - "tx_enable": false, - "type": "SX1257" - }, - "tx_lut_0": { - "dig_gain": 3, - "mix_gain": 8, - "pa_gain": 0, - "rf_power": -6 - }, - "tx_lut_1": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 0, - "rf_power": -3 - }, - "tx_lut_10": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 24 - }, - "tx_lut_14": { - "dig_gain": 3, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_15": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, - "tx_lut_2": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 0, - "rf_power": 0 - }, - "tx_lut_3": { - "dig_gain": 3, - "mix_gain": 8, - "pa_gain": 1, - "rf_power": 3 - }, - "tx_lut_4": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 1, - "rf_power": 6 - }, - "tx_lut_5": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, - "rf_power": 10 - }, - "tx_lut_6": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, - "rf_power": 11 - }, - "tx_lut_7": { - "dig_gain": 3, - "mix_gain": 9, - "pa_gain": 2, - "rf_power": 12 - }, - "tx_lut_8": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 1, - "rf_power": 13 - }, - "tx_lut_9": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 2, - "rf_power": 14 - } - }, - "gateway_conf": { - "gateway_ID": "", - "server_address": "52.3.215.147", - "serv_port_up": 20000, - "serv_port_down": 20000, - "forward_crc_disabled": false, - "forward_crc_error": true, - "forward_crc_valid": true, - "keepalive_interval": 10, - "push_timeout_ms": 120, - "stat_interval": 20, - "synch_word": 52, - "autoquit_threshold": 60 - } -} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0~ deleted file mode 100644 index 56d447c..0000000 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0~ +++ /dev/null @@ -1,190 +0,0 @@ -{ - "SX1301_conf": { - "antenna_gain": 0, - "chan_FSK": { - "bandwidth": 125000, - "datarate": 50000, - "enable": true, - "if": 300000, - "radio": 1 - }, - "chan_Lora_std": { - "bandwidth": 250000, - "enable": true, - "if": -200000, - "radio": 1, - "spread_factor": 7 - }, - "chan_multiSF_0": { - "enable": true, - "if": -400000, - "radio": 1 - }, - "chan_multiSF_1": { - "enable": true, - "if": -200000, - "radio": 1 - }, - "chan_multiSF_2": { - "enable": true, - "if": 0, - "radio": 1 - }, - "chan_multiSF_3": { - "enable": true, - "if": -400000, - "radio": 0 - }, - "chan_multiSF_4": { - "enable": true, - "if": -200000, - "radio": 0 - }, - "chan_multiSF_5": { - "enable": true, - "if": 0, - "radio": 0 - }, - "chan_multiSF_6": { - "enable": true, - "if": 200000, - "radio": 0 - }, - "chan_multiSF_7": { - "enable": true, - "if": 400000, - "radio": 0 - }, - "clksrc": 0, - "lbt_cfg": { - "enable": false, - "rssi_target": 160 - }, - "lorawan_public": true, - "radio_0": { - "enable": true, - "freq": 867500000, - "rssi_offset": -162, - "tx_enable": true, - "tx_freq_max": 870000000, - "tx_freq_min": 863000000, - "type": "SX1257" - }, - "radio_1": { - "enable": true, - "freq": 868500000, - "rssi_offset": -162, - "tx_enable": false, - "type": "SX1257" - }, - "tx_lut_0": { - "dig_gain": 0, - "mix_gain": 11, - "pa_gain": 0, - "rf_power": -6 - }, - "tx_lut_1": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 0, - "rf_power": -3 - }, - "tx_lut_10": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 0, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_14": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, - "tx_lut_15": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 27 - }, - "tx_lut_2": { - "dig_gain": 0, - "mix_gain": 9, - "pa_gain": 1, - "rf_power": 0 - }, - "tx_lut_3": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 1, - "rf_power": 3 - }, - "tx_lut_4": { - "dig_gain": 0, - "mix_gain": 12, - "pa_gain": 1, - "rf_power": 6 - }, - "tx_lut_5": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 2, - "rf_power": 10 - }, - "tx_lut_6": { - "dig_gain": 0, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 11 - }, - "tx_lut_7": { - "dig_gain": 0, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 12 - }, - "tx_lut_8": { - "dig_gain": 2, - "mix_gain": 12, - "pa_gain": 2, - "rf_power": 13 - }, - "tx_lut_9": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 2, - "rf_power": 14 - } - }, - "gateway_conf": { - "forward_crc_disabled": false, - "forward_crc_error": true, - "forward_crc_valid": true, - "gateway_ID": "", - "keepalive_interval": 10, - "push_timeout_ms": 100, - "serv_port_down": 20000, - "serv_port_up": 20000, - "server_address": "52.3.215.147", - "stat_interval": 30, - "autoquit_threshold": 60 - } -} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0~ deleted file mode 100644 index 34e1c44..0000000 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0~ +++ /dev/null @@ -1,196 +0,0 @@ -{ - "SX1301_conf": { - "antenna_gain": 0, - "chan_FSK": { - "bandwidth": 125000, - "datarate": 50000, - "enable": true, - "freq_deviation": 25000, - "if": 300000, - "radio": 1 - }, - "chan_Lora_std": { - "bandwidth": 250000, - "enable": true, - "if": 0, - "radio": 0, - "spread_factor": 7 - }, - "chan_multiSF_": { - "radio": null - }, - "chan_multiSF_0": { - "enable": true, - "if": -137500, - "radio": 0 - }, - "chan_multiSF_1": { - "enable": true, - "if": 202500, - "radio": 0 - }, - "chan_multiSF_2": { - "enable": true, - "if": 32500, - "radio": 0 - }, - "chan_multiSF_3": { - "enable": true, - "if": -400000, - "radio": 1 - }, - "chan_multiSF_4": { - "enable": true, - "if": -200000, - "radio": 1 - }, - "chan_multiSF_5": { - "enable": true, - "if": 0, - "radio": 1 - }, - "chan_multiSF_6": { - "enable": true, - "if": 200000, - "radio": 1 - }, - "chan_multiSF_7": { - "enable": true, - "if": 400000, - "radio": 1 - }, - "clksrc": 0, - "lbt_cfg": { - "enable": false, - "rssi_target": 160 - }, - "lorawan_public": true, - "radio_0": { - "enable": true, - "freq": 865200000, - "rssi_offset": -162, - "tx_enable": true, - "tx_freq_max": 867000000, - "tx_freq_min": 865000000, - "tx_notch_freq": 129000, - "type": "SX1257" - }, - "radio_1": { - "enable": true, - "freq": 866385000, - "rssi_offset": -162, - "tx_enable": false, - "type": "SX1257" - }, - "tx_lut_0": { - "dig_gain": 0, - "mix_gain": 11, - "pa_gain": 0, - "rf_power": -6 - }, - "tx_lut_1": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 0, - "rf_power": -3 - }, - "tx_lut_10": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 0, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_14": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, - "tx_lut_15": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 27 - }, - "tx_lut_2": { - "dig_gain": 0, - "mix_gain": 9, - "pa_gain": 1, - "rf_power": 0 - }, - "tx_lut_3": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 1, - "rf_power": 3 - }, - "tx_lut_4": { - "dig_gain": 0, - "mix_gain": 12, - "pa_gain": 1, - "rf_power": 6 - }, - "tx_lut_5": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 2, - "rf_power": 10 - }, - "tx_lut_6": { - "dig_gain": 0, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 11 - }, - "tx_lut_7": { - "dig_gain": 0, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 12 - }, - "tx_lut_8": { - "dig_gain": 2, - "mix_gain": 12, - "pa_gain": 2, - "rf_power": 13 - }, - "tx_lut_9": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 2, - "rf_power": 14 - } - }, - "gateway_conf": { - "gateway_ID": "", - "server_address": "52.3.215.147", - "serv_port_up": 20000, - "serv_port_down": 20000, - "forward_crc_disabled": false, - "forward_crc_error": true, - "forward_crc_valid": true, - "keepalive_interval": 10, - "push_timeout_ms": 120, - "stat_interval": 20, - "synch_word": 52, - "autoquit_threshold": 60 - } -} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0~ deleted file mode 100644 index 2d8d3e8..0000000 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0~ +++ /dev/null @@ -1,226 +0,0 @@ -{ - "SX1301_conf": { - "antenna_gain": 0, - "chan_FSK": { - "bandwidth": 125000, - "datarate": 50000, - "enable": false, - "if": 300000, - "radio": 0 - }, - "chan_Lora_std": { - "bandwidth": 250000, - "enable": false, - "if": -200000, - "radio": 0, - "spread_factor": 7 - }, - "chan_multiSF_0": { - "enable": true, - "if": -400000, - "radio": 0 - }, - "chan_multiSF_1": { - "enable": true, - "if": -200000, - "radio": 0 - }, - "chan_multiSF_2": { - "enable": true, - "if": 0, - "radio": 0 - }, - "chan_multiSF_3": { - "enable": true, - "if": -400000, - "radio": 1 - }, - "chan_multiSF_4": { - "enable": true, - "if": -200000, - "radio": 1 - }, - "chan_multiSF_5": { - "enable": true, - "if": 0, - "radio": 1 - }, - "chan_multiSF_6": { - "enable": true, - "if": 200000, - "radio": 1 - }, - "chan_multiSF_7": { - "enable": true, - "if": 400000, - "radio": 1 - }, - "clksrc": 0, - "lbt_cfg": { - "chan_cfg": [ - { - "freq_hz": 922100000, - "scan_time_us": 5000 - }, - { - "freq_hz": 922300000, - "scan_time_us": 5000 - }, - { - "freq_hz": 922500000, - "scan_time_us": 5000 - }, - { - "freq_hz": 922700000, - "scan_time_us": 5000 - }, - { - "freq_hz": 922900000, - "scan_time_us": 5000 - }, - { - "freq_hz": 923100000, - "scan_time_us": 5000 - }, - { - "freq_hz": 923300000, - "scan_time_us": 5000 - }, - { - "freq_hz": 921900000, - "scan_time_us": 5000 - } - ], - "enable": true, - "rssi_target": -65, - "sx127x_rssi_offset": -4 - }, - "lorawan_public": true, - "radio_0": { - "enable": true, - "freq": 922500000, - "rssi_offset": -162, - "tx_enable": true, - "tx_freq_max": 923300000, - "tx_freq_min": 920900000, - "type": "SX1257" - }, - "radio_1": { - "enable": true, - "freq": 922900000, - "rssi_offset": -162, - "tx_enable": false, - "type": "SX1257" - }, - "tx_lut_0": { - "dig_gain": 3, - "mix_gain": 8, - "pa_gain": 0, - "rf_power": -6 - }, - "tx_lut_1": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 0, - "rf_power": -3 - }, - "tx_lut_10": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 3, - "mix_gain": 11, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 24 - }, - "tx_lut_14": { - "dig_gain": 3, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_15": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, - "tx_lut_2": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 0, - "rf_power": 0 - }, - "tx_lut_3": { - "dig_gain": 3, - "mix_gain": 8, - "pa_gain": 1, - "rf_power": 3 - }, - "tx_lut_4": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 1, - "rf_power": 6 - }, - "tx_lut_5": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, - "rf_power": 10 - }, - "tx_lut_6": { - "dig_gain": 3, - "mix_gain": 12, - "pa_gain": 1, - "rf_power": 11 - }, - "tx_lut_7": { - "dig_gain": 3, - "mix_gain": 9, - "pa_gain": 2, - "rf_power": 12 - }, - "tx_lut_8": { - "dig_gain": 3, - "mix_gain": 15, - "pa_gain": 1, - "rf_power": 13 - }, - "tx_lut_9": { - "dig_gain": 3, - "mix_gain": 10, - "pa_gain": 2, - "rf_power": 14 - } - }, - "gateway_conf": { - "gateway_ID": "", - "server_address": "52.3.215.147", - "serv_port_up": 20000, - "serv_port_down": 20000, - "forward_crc_disabled": false, - "forward_crc_error": true, - "forward_crc_valid": true, - "keepalive_interval": 10, - "push_timeout_ms": 120, - "stat_interval": 20, - "synch_word": 52, - "autoquit_threshold": 60 - } -} diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0~ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0~ deleted file mode 100644 index 04d1ec9..0000000 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTAC_LORA_1_5.RU864.basic.clksrc0~ +++ /dev/null @@ -1,191 +0,0 @@ -{ - "SX1301_conf": { - "antenna_gain": 0, - "chan_FSK": { - "bandwidth": 125000, - "datarate": 50000, - "freq_deviation": 25000, - "enable": true, - "if": 0, - "radio": 0 - }, - "chan_Lora_std": { - "bandwidth": 250000, - "enable": true, - "if": -200000, - "radio": 0, - "spread_factor": 7 - }, - "chan_multiSF_0": { - "enable": true, - "if": -400000, - "radio": 0 - }, - "chan_multiSF_1": { - "enable": true, - "if": -200000, - "radio": 0 - }, - "chan_multiSF_2": { - "enable": true, - "if": 0, - "radio": 0 - }, - "chan_multiSF_3": { - "enable": true, - "if": -400000, - "radio": 1 - }, - "chan_multiSF_4": { - "enable": true, - "if": -200000, - "radio": 1 - }, - "chan_multiSF_5": { - "enable": true, - "if": 0, - "radio": 1 - }, - "chan_multiSF_6": { - "enable": true, - "if": 200000, - "radio": 1 - }, - "chan_multiSF_7": { - "enable": false, - "if": 400000, - "radio": 0 - }, - "clksrc": 0, - "lbt_cfg": { - "enable": false, - "rssi_target": 160 - }, - "lorawan_public": true, - "radio_0": { - "enable": true, - "freq": 869100000, - "rssi_offset": -162, - "tx_enable": true, - "tx_freq_max": 870000000, - "tx_freq_min": 864000000, - "type": "SX1257" - }, - "radio_1": { - "enable": true, - "freq": 868100000, - "rssi_offset": -162, - "tx_enable": false, - "type": "SX1257" - }, - "tx_lut_0": { - "dig_gain": 0, - "mix_gain": 11, - "pa_gain": 0, - "rf_power": -6 - }, - "tx_lut_1": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 0, - "rf_power": -3 - }, - "tx_lut_10": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 2, - "rf_power": 16 - }, - "tx_lut_11": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 3, - "rf_power": 20 - }, - "tx_lut_12": { - "dig_gain": 0, - "mix_gain": 12, - "pa_gain": 3, - "rf_power": 23 - }, - "tx_lut_13": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 3, - "rf_power": 25 - }, - "tx_lut_14": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 26 - }, - "tx_lut_15": { - "dig_gain": 0, - "mix_gain": 15, - "pa_gain": 3, - "rf_power": 27 - }, - "tx_lut_2": { - "dig_gain": 0, - "mix_gain": 9, - "pa_gain": 1, - "rf_power": 0 - }, - "tx_lut_3": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 1, - "rf_power": 3 - }, - "tx_lut_4": { - "dig_gain": 0, - "mix_gain": 12, - "pa_gain": 1, - "rf_power": 6 - }, - "tx_lut_5": { - "dig_gain": 0, - "mix_gain": 10, - "pa_gain": 2, - "rf_power": 10 - }, - "tx_lut_6": { - "dig_gain": 0, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 11 - }, - "tx_lut_7": { - "dig_gain": 0, - "mix_gain": 11, - "pa_gain": 2, - "rf_power": 12 - }, - "tx_lut_8": { - "dig_gain": 2, - "mix_gain": 12, - "pa_gain": 2, - "rf_power": 13 - }, - "tx_lut_9": { - "dig_gain": 0, - "mix_gain": 13, - "pa_gain": 2, - "rf_power": 14 - } - }, - "gateway_conf": { - "forward_crc_disabled": false, - "forward_crc_error": true, - "forward_crc_valid": true, - "gateway_ID": "", - "keepalive_interval": 10, - "push_timeout_ms": 100, - "serv_port_down": 20000, - "serv_port_up": 20000, - "server_address": "52.3.215.147", - "stat_interval": 30, - "autoquit_threshold": 60 - } -} -- cgit v1.2.3 From 9fb9a90cee3cf582fd58a07144cc27b8669d979b Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Mon, 12 Aug 2019 11:05:37 -0500 Subject: lora: update global conf LUT values for MTCAP --- ..._conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic | 128 +++------------------ ...obal_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic | 128 +++------------------ ...obal_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic | 128 +++------------------ ...obal_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic | 112 +++--------------- ...obal_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic | 128 +++------------------ ..._conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic | 128 +++------------------ ...obal_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic | 112 +++--------------- ...obal_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic | 128 +++------------------ 8 files changed, 128 insertions(+), 864 deletions(-) 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..ef9eb54 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":0,"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": "", 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..ae96528 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":0,"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": "", 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..016fdd5 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":0,"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..d826995 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":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":0,"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": "", 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..598a579 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":0,"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": "", 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..044a48e 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":0,"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": "", 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..3bb62eb 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":0,"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": "", 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..f8b5027 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":0,"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": "", -- cgit v1.2.3 From 3697116a00cc4965f5470a6238a385be53ba831c Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 12 Aug 2019 11:43:27 -0500 Subject: New config for l4e1, lap3 --- recipes-core/multitech/config/chat_wrapper | 129 +++++++++++++++++++++ recipes-core/multitech/config/chat_wrapper.default | 12 ++ recipes-core/multitech/config/ppp/peers/gsm | 2 +- recipes-core/multitech/config/ppp/peers/gsm_chat | 29 ++++- recipes-core/multitech/config/ppp/peers/l4e1 | 2 +- recipes-core/multitech/config/ppp/peers/l4e1_chat | 24 +++- recipes-core/multitech/config/ppp/peers/l4n1 | 2 +- .../multitech/config/ppp/peers/l4n1_chat_non_vz | 37 ++++-- recipes-core/multitech/config/ppp/peers/lap3 | 2 +- recipes-core/multitech/config/ppp/peers/lap3_chat | 26 ++++- recipes-core/multitech/config/ppp/peers/leu1 | 2 +- recipes-core/multitech/config/ppp/peers/leu1_chat | 23 +++- recipes-core/multitech/config/ppp/peers/lna3 | 2 +- .../multitech/config/ppp/peers/lna3_chat_non_vz | 36 ++++-- recipes-core/multitech/config/ppp/peers/lsp3 | 2 +- recipes-core/multitech/config/ppp/peers/lsp3_chat | 24 +++- recipes-core/multitech/config_2.2.bb | 83 ------------- recipes-core/multitech/config_2.3.bb | 91 +++++++++++++++ 18 files changed, 409 insertions(+), 119 deletions(-) create mode 100755 recipes-core/multitech/config/chat_wrapper create mode 100644 recipes-core/multitech/config/chat_wrapper.default delete mode 100644 recipes-core/multitech/config_2.2.bb create mode 100644 recipes-core/multitech/config_2.3.bb diff --git a/recipes-core/multitech/config/chat_wrapper b/recipes-core/multitech/config/chat_wrapper new file mode 100755 index 0000000..9db3188 --- /dev/null +++ b/recipes-core/multitech/config/chat_wrapper @@ -0,0 +1,129 @@ +#!/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 -t10 'AT+CGDCONT?' 2>&1 | tr -d '\r') +[[ $MCONTEXT =~ \+CGDCONT:[[:space:]]+${CONTEXTNUM},\"([^\"]*)\",\"([^\"]*)\",\"([^\"]*)\",([0-9]+),([0-9]+)([^$'\n']*) ]] + +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 + +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)) || \ + [[ $MFULLBOAT != $FULLBOAT ]] ; then + ${LOG} "Modem context $MPDP,$MAPN,$MADDR,$MDCOMP,$HCOMP does not match chat script" + ${LOG} "$MCONTEXT" + ${LOG} "Dropping registration with carrier to set context" + # Need to deregister + /usr/bin/radio-cmd -t10 'AT+COPS=2' + /usr/bin/radio-cmd -t10 "AT+CGDCONT=${CONTEXTNUM},\"${PDP}\",\"${APN}\",\"${ADDR}\",$DCOMP,${HCOMP}${FULLBOAT}" + /usr/bin/radio-cmd -t10 'AT+COPS=0' + ${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 --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" + fi + done + uptime=$(cat /proc/uptime) + [[ $uptime =~ ^([^\.]*) ]] + t1=${BASH_REMATCH[1]} + ${LOG} "Re-registered in $((t1-t0)) seconds -- wait 5 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..941c008 --- /dev/null +++ b/recipes-core/multitech/config/chat_wrapper.default @@ -0,0 +1,12 @@ +# 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 diff --git a/recipes-core/multitech/config/ppp/peers/gsm b/recipes-core/multitech/config/ppp/peers/gsm index d23957e..c456764 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/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..a92c938 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/chat_wrapper +# as the intended context +# setting. Make the context number +# (after the =) match the +# dialer number context. +# If the context changes, 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 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 index d6359cd..2996e6e 100644 --- a/recipes-core/multitech/config/ppp/peers/l4e1 +++ b/recipes-core/multitech/config/ppp/peers/l4e1 @@ -8,4 +8,4 @@ ipcp-restart 10 noauth crtscts novj -connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/l4e1_chat' +connect '/usr/libexec/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 index 3a297ed..6b6be44 100644 --- a/recipes-core/multitech/config/ppp/peers/l4e1_chat +++ b/recipes-core/multitech/config/ppp/peers/l4e1_chat @@ -12,10 +12,28 @@ 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/chat_wrapper +# as the intended context +# setting. Make the context number +# (after the =) match the +# dialer number context. +# If the context changes, 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 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+COPS=2' -OK 'AT+CGDCONT=1,"IP","internet"' -OK 'AT+COPS=0' +#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/l4n1 b/recipes-core/multitech/config/ppp/peers/l4n1 index c0b4beb..2e0b501 100644 --- a/recipes-core/multitech/config/ppp/peers/l4n1 +++ b/recipes-core/multitech/config/ppp/peers/l4n1 @@ -8,4 +8,4 @@ ipcp-restart 10 noauth crtscts novj -connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/l4n1_chat' +connect '/usr/libexec/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_non_vz b/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz index ea5907e..64a05be 100644 --- a/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz +++ b/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz @@ -31,15 +31,34 @@ 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+COPS=2' -OK 'AT+CGDCONT=3,"IP","phone"' -OK 'AT+COPS=0' +# ---------------------------------- +# Set the APN for your provider here +# Note that a comment starting with +# #MT AT+CGDCONT= +# will be interpretted by +# /usr/libexec/chat_wrapper +# as the intended context +# setting. Make the context number +# (after the =) match the +# dialer number context. +# If the context changes, 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 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?' SAY "Dialing...\n" OK 'ATD*99***3#' SAY "Waiting for CONNECT...\n" diff --git a/recipes-core/multitech/config/ppp/peers/lap3 b/recipes-core/multitech/config/ppp/peers/lap3 index bac08a1..9b56aae 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/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..92a5e54 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/chat_wrapper +# as the intended context +# setting. Make the context number +# (after the =) match the +# dialer number context. +# If the context changes, 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 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..2e247b3 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/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..817f75d 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/chat_wrapper +# as the intended context +# setting. Make the context number +# (after the =) match the +# dialer number context. +# If the context changes, 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 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..022e4fc 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/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 033efde..33fd377 100644 --- a/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz +++ b/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz @@ -31,14 +31,34 @@ 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+COPS=2' -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/chat_wrapper +# as the intended context +# setting. Make the context number +# (after the =) match the +# dialer number context. +# If the context changes, 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 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#' diff --git a/recipes-core/multitech/config/ppp/peers/lsp3 b/recipes-core/multitech/config/ppp/peers/lsp3 index 072477b..4a3da2f 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/chat_wrapper /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/lsp3_chat' diff --git a/recipes-core/multitech/config/ppp/peers/lsp3_chat b/recipes-core/multitech/config/ppp/peers/lsp3_chat index 347c3b8..529a260 100644 --- a/recipes-core/multitech/config/ppp/peers/lsp3_chat +++ b/recipes-core/multitech/config/ppp/peers/lsp3_chat @@ -12,10 +12,28 @@ 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/chat_wrapper +# as the intended context +# setting. Make the context number +# (after the =) match the +# dialer number context. +# If the context changes, 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 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+COPS=2' -OK 'AT+CGDCONT=1,"IP","internet"' -OK 'AT+COPS=0' +#MT AT+CGDCONT=1,"IP","internet" OK 'AT+CGDCONT?' SAY "Dialing...\n" OK 'ATD*99***2#' diff --git a/recipes-core/multitech/config_2.2.bb b/recipes-core/multitech/config_2.2.bb deleted file mode 100644 index da51cc9..0000000 --- a/recipes-core/multitech/config_2.2.bb +++ /dev/null @@ -1,83 +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" -PACKAGE_ARCH = "all" -PR = "r1" -PACKAGES =+ "${PN}-mths" -inherit update-rc.d - -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 \ -" - -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 -} - -FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass" -FILES_${PN} += "${sysconfdir}/init.d/config" - -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/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb new file mode 100644 index 0000000..816aab2 --- /dev/null +++ b/recipes-core/multitech/config_2.3.bb @@ -0,0 +1,91 @@ +DESCRIPTION = "Provides default system config files and /var/config fs" +SECTION = "base" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +PACKAGE_ARCH = "all" +PR = "r1" +PACKAGES =+ "${PN}-mths" +inherit update-rc.d + +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 \ +" + +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}/defaults + install -d ${D}${libexecdir}/ppp + install -m 0755 ${WORKDIR}/chat_wrapper ${D}${libexecdir}/ppp/chat_wrapper + install -m 0644 ${WORKDIR}/chat_wrapper.default ${D}${sysconfdir}/defaults + +} + +FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass" +FILES_${PN} += "${sysconfdir}/init.d/config" + +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 +} -- cgit v1.2.3 From fd72c74c99849b26db9a6876ada2e6a0e80bc783 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 12 Aug 2019 12:13:11 -0500 Subject: Update mlinux-set-apn for new chat_wrapper script --- .../mlinux-scripts-1.1/mlinux-cell-radio-ready | 34 ----- .../mlinux-scripts-1.1/mlinux-cell-router | 147 ------------------ .../mlinux-scripts/mlinux-scripts-1.1/mlinux-dhcpd | 65 -------- .../mlinux-scripts-1.1/mlinux-firmware-upgrade | 69 --------- .../mlinux-scripts-1.1/mlinux-set-apn | 119 --------------- .../mlinux-scripts-1.1/mlinux-switch-apn | 110 -------------- .../mlinux-scripts-1.1/mlinux-switch-cell-fw | 149 ------------------- .../mlinux-scripts-1.1/mlinux-wifi-ap | 165 --------------------- .../mlinux-scripts-1.2/mlinux-cell-radio-ready | 34 +++++ .../mlinux-scripts-1.2/mlinux-cell-router | 147 ++++++++++++++++++ .../mlinux-scripts/mlinux-scripts-1.2/mlinux-dhcpd | 65 ++++++++ .../mlinux-scripts-1.2/mlinux-firmware-upgrade | 69 +++++++++ .../mlinux-scripts-1.2/mlinux-set-apn | 117 +++++++++++++++ .../mlinux-scripts-1.2/mlinux-switch-apn | 110 ++++++++++++++ .../mlinux-scripts-1.2/mlinux-switch-cell-fw | 149 +++++++++++++++++++ .../mlinux-scripts-1.2/mlinux-wifi-ap | 165 +++++++++++++++++++++ recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb | 7 - recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb | 7 + 18 files changed, 863 insertions(+), 865 deletions(-) delete mode 100644 recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready delete mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-router delete mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-dhcpd delete mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-firmware-upgrade delete mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-set-apn delete mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-apn delete mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-cell-fw delete mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-wifi-ap create mode 100644 recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-radio-ready create mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-router create mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-dhcpd create mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade create mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-set-apn create mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-apn create mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-cell-fw create mode 100755 recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-wifi-ap delete mode 100644 recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb create mode 100644 recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready deleted file mode 100644 index 42c5cdc..0000000 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# The timeout can be set in the environment or the -# first parameter. - -COUNTER=0 - -if [ $# -gt 1 ]; then - echo "usage: $0 [timeout]" - exit 1 -fi - -[ $# -eq 1 ] && TIMEOUT=$1 - -# Set the default TIMEOUT -: ${TIMEOUT:=60} - -# Wait for the radio to be ready before continuing -while [ $COUNTER -lt $TIMEOUT ]; do - TYPE=$(radio-query --type) - MODEL=$(radio-query --model) - if [ $? == 0 ]; then - echo "Cellular radio is ready." - exit 0 - fi - let COUNTER=COUNTER+1 - - echo "Waiting for radio to come up in order to identify type ..." - - sleep 1 -done - -echo "Cellular radio is not ready." -exit 1 diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-router b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-router deleted file mode 100755 index 1607c32..0000000 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-router +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (C) 2014 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. - -set -e - -do_start() { - lan_interfaces=$(echo "$lan" | sed "s/,/ /g") - - echo "Configuring firewall rules..." - # Flush all the tables first - iptables -t filter -F - iptables -t nat -F - iptables -t mangle -F - - # Drop all incoming packets by default - iptables -t filter -P INPUT DROP - # Accept all on local loopback - iptables -t filter -A INPUT -i lo -j ACCEPT - # Allow packets in for existing socket connections - iptables -t filter -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT - - # Accept all from LAN interfaces - for i in $lan_interfaces; do - iptables -t filter -A INPUT -i $i -j ACCEPT - - # Accept ssh from the LAN (Wired) - #iptables -t filter -A INPUT -i $i -p tcp --dport 22 -j ACCEPT - # Accept http from the LAN (Wired) - #iptables -t filter -A INPUT -i $i -p tcp --dport 80 -j ACCEPT - # Accept tftp from the LAN (Wired) - #iptables -t filter -A INPUT -i $i -p udp --dport 69 -j ACCEPT - done - - # Accept ssh from the WAN (Wireless) - #iptables -t filter -A INPUT -i $wan -p tcp --dport 22 -j ACCEPT - # Accept http from the WAN (Wireless) - #iptables -t filter -A INPUT -i $wan -p tcp --dport 80 -j ACCEPT - - # Allow packet fowarding from LAN interfaces to WAN (cell router) - iptables -t filter -P FORWARD DROP - iptables -t filter -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT - for i in $lan_interfaces; do - iptables -t filter -A FORWARD -i $i -o $wan -j ACCEPT - done - - # Allow all output packets - iptables -t filter -P OUTPUT ACCEPT - - # enable NAT for cell router - iptables -t nat -A POSTROUTING -o $wan -j MASQUERADE - - echo "Enabling packet forwarding..." - # turn on packet forwarding last - echo 1 > /proc/sys/net/ipv4/ip_forward - echo "Done" -} - -do_stop() { - echo "Clearing firewall rules..." - # clear all tables - iptables -t filter -F - iptables -t nat -F - iptables -t mangle -F - # reset policies to ACCEPT - iptables -t filter -P INPUT ACCEPT - iptables -t filter -P OUTPUT ACCEPT - iptables -t filter -P FORWARD ACCEPT - - # turn off packet forwarding - echo "Disabling packet forwarding..." - echo 0 > /proc/sys/net/ipv4/ip_forward - echo "Done" -} - -usage() { - echo "Usage: $(basename $0) start|stop [options]" - echo " options:" - echo " -l LAN interfaces to allow, comma-separated (defaults to \"eth0\")" - echo " -w WAN interface to route out (defaults to \"ppp0\")" - exit 1 -} - -# main -if [[ $# < 1 ]]; then - usage -fi - -cmd=$1 -shift - -while getopts "l:w:h" opt; do - case "$opt" in - l) - l=$OPTARG - ;; - w) - w=$OPTARG - ;; - h) - usage - ;; - *) - usage - ;; - esac -done - -# default lan to eth0 if not specified -lan=${l-eth0} -# default wan to ppp0 if not specified -wan=${w-ppp0} - -case $cmd in - start) - echo "LAN: $lan" - echo "WAN: $wan" - do_start - ;; - stop) - do_stop - ;; - *) - usage - ;; -esac - -exit 0 - diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-dhcpd b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-dhcpd deleted file mode 100755 index 976b138..0000000 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-dhcpd +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2014 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. - -do_start() { - echo "starting dhcp daemon" - udhcpd -S /etc/udhcpd.conf -} - -do_stop() { - echo "stopping dhcp daemon" - killall udhcpd -} - -usage() { - echo "Usage: $(basename $0) start|stop|restart" - exit 1 -} - -# main -if [[ $# != 1 ]]; then - usage -fi - -case $1 in - start) - if [[ ! -f "/etc/udhcpd.conf" ]] - then - echo "/etc/udhcpd.conf does not exist" - exit 1 - fi - do_start - ;; - stop) - do_stop - ;; - restart) - do_stop - sleep 1 - do_start - ;; - *) - usage - ;; -esac - -exit 0 diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-firmware-upgrade b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-firmware-upgrade deleted file mode 100755 index a377309..0000000 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-firmware-upgrade +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -dofile=/var/volatile/do_flash_upgrade - -if [ $# != 1 ]; then - echo "Usage: $0 upgrade.bin" - exit 1 -fi - -set -e -upgrade=$1 - -mkdir -p /var/volatile -cd /var/volatile - -# make sure firmware is for this device -hw_version=$(cat /sys/devices/platform/mts-io/hw-version) -firmware_model=$(tar -xO -f $upgrade model) -shopt -s nocasematch -if [[ ! "$hw_version" =~ ^$firmware_model- ]]; then - logger -s -t firmware_upgrade "Wrong firmware for this hardware" - logger -s -t firmware_upgrade "hw version: $hw_version" - logger -s -t firmware_upgrade "firmware model: $firmware_model" - exit 1 -fi - -files=(bstrap.bin uboot.bin uImage.bin config.jffs2 oem.jffs2 rootfs.jffs2 install.sh) - -tobeflashed=0 -# verify all MD5 sums -for (( i = 0; i < ${#files[@]}; i++ )); do - file=${files[i]} - # if the file is in the tar, md5sum it - if tar -t -f $upgrade | grep -F -q "$file"; then - logger -s -t firmware_upgrade "Checking MD5 for $file..." - if ! tar -x -f $upgrade $file.md5; then - logger -s -t firmware_upgrade "MD5 is not found for the $file, upgrade aborted" - exit 1 - fi - if ! tar -xO -f $upgrade $file | md5sum -c $file.md5; then - logger -s -t firmware_upgrade "MD5 check failed, upgrade aborted" - exit 1 - fi - tobeflashed=1 - fi -done - -if (( $tobeflashed )); then - mkdir -p /var/volatile/flash-upgrade - mv -f $upgrade /var/volatile/flash-upgrade/upgrade.bin - touch "${dofile}" - chown "root:root" "${dofile}" || true - uid=$(stat -c %u "${dofile}") || true - result=$? - if ((result != 0)) ; then - logger -s -t firmware_upgrade "Cannot create ${dofile}" - exit 1 - fi - if ((uid != 0)) ; then - logger -s -t firmware_upgrade "Cannot set ownership of ${dofile} to root" - exit 1 - fi - logger -s -t firmware_upgrade "Rebooting" - sleep 1 - reboot - exit 0 -else - logger -s -t firmware_upgrade "Nothing to be flashed!" - exit 1 -fi 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 [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-wifi-ap b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-wifi-ap deleted file mode 100755 index ddbec95..0000000 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-wifi-ap +++ /dev/null @@ -1,165 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2014 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. - -dhcpd_file=/etc/udhcpd.conf -hostapd_file=/etc/hostapd.conf -interface=wlan0 -bridge_mode=0 - -do_start() { - if [ "$bridge_mode" = 1 ]; then - interface=$b - if ! grep -E -q "^bridge=$interface\s*$" $hostapd_file; then - echo "Enabling bridge=br0 in $hostapd_file" - sed -r -i "s/^#?bridge=.*$/bridge=$interface/" $hostapd_file - fi - else - if grep -E -q "^bridge=.*$" $hostapd_file; then - echo "Disabling bridge in $hostapd_file" - sed -r -i "s/^bridge=/#bridge=/" $hostapd_file - fi - fi - - echo "Starting hostap daemon" - /etc/init.d/hostapd start - - if [ "$bridge_mode" != 1 ]; then - echo "Setting IP address to $ip" - ifconfig $interface $ip - # strip off end of IP address to get subnet - # assumes subnet of /24 - subnet=${ip%.*} - # escape periods for regex - subnet_regex=${subnet//./\\.} - ip_regex=${ip//./\\.} - # set default address range for dhcpd - addr_start=100 - addr_end=254 - if ! grep -E -q "^start\s+$subnet_regex\." $dhcpd_file; then - echo "Changing dhcpd start to $subnet.$addr_start" - sed -r -i "s/^start\s+.*$/start $subnet.$addr_start/" $dhcpd_file - fi - if ! grep -E -q "^end\s+$subnet_regex\." $dhcpd_file; then - echo "Changing dhcpd end to $subnet.$addr_end" - sed -r -i "s/^end\s+.*$/end $subnet.$addr_end/" $dhcpd_file - fi - # update dhcpd addresses if needed - if ! grep -E -q "^option\s+router\s+$ip_regex" $dhcpd_file; then - echo "Changing dhcpd router to $ip" - sed -r -i "s/^option\s+router\s+.*$/option router $ip/" $dhcpd_file - fi - else - # unset ip address for bridge mode - ifconfig wlan0 0.0.0.0 - fi - - if ! grep -E -q "^interface\s+$interface" $dhcpd_file; then - echo "Changing dhcpd interface to $interface" - sed -r -i "s/^interface\s+.*$/interface $interface/" $dhcpd_file - fi - mlinux-dhcpd start -} - -do_stop() { - echo "Stopping hostap daemon" - /etc/init.d/hostapd stop - mlinux-dhcpd stop -} - -usage() { - echo "Usage: $(basename $0) start|stop|restart [options]" - echo " options:" - echo " -a
      Sets AP IP address (defaults to 192.168.3.1)" - echo " -b Add AP to specified bridge interface (conflicts with -a)" - exit 1 -} - -# main -if [[ $# < 1 ]]; then - usage -fi - -cmd=$1 -shift - -while getopts "a:b:h" opt; do - case "$opt" in - a) - a=$OPTARG - ;; - b) - b=$OPTARG - bridge_mode=1 - ;; - h) - usage - ;; - *) - usage - ;; - esac -done - -# can't specify both address and bridge mode -if [ -n "$a" ] && [ -n "$b" ]; then - usage -fi - -if [ -n "$a" ]; then - ret=1 - if [[ $a =~ ^([0-9]{1,3}\.){3,3}[0-9]{1,3}$ ]] - then - OIFS=$IFS - IFS='.' - ip=($a) - IFS=$OFIS - [[ ${ip[0]} -le 255 && ${ip[1]} -le 255 && ${ip[2]} -le 255 && ${ip[3]} -le 255 ]] - ret=$? - fi - if [[ ret -ne 0 ]] - then - echo "invalid IP address" - exit 1 - fi - ip=$a -else - ip="192.168.3.1" -fi - -case $cmd in - start) - do_start - ;; - stop) - do_stop - ;; - restart) - do_stop - sleep 1 - do_start - ;; - *) - usage - ;; -esac - -exit 0 diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-radio-ready b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-radio-ready new file mode 100644 index 0000000..42c5cdc --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-radio-ready @@ -0,0 +1,34 @@ +#!/bin/sh + +# The timeout can be set in the environment or the +# first parameter. + +COUNTER=0 + +if [ $# -gt 1 ]; then + echo "usage: $0 [timeout]" + exit 1 +fi + +[ $# -eq 1 ] && TIMEOUT=$1 + +# Set the default TIMEOUT +: ${TIMEOUT:=60} + +# Wait for the radio to be ready before continuing +while [ $COUNTER -lt $TIMEOUT ]; do + TYPE=$(radio-query --type) + MODEL=$(radio-query --model) + if [ $? == 0 ]; then + echo "Cellular radio is ready." + exit 0 + fi + let COUNTER=COUNTER+1 + + echo "Waiting for radio to come up in order to identify type ..." + + sleep 1 +done + +echo "Cellular radio is not ready." +exit 1 diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-router b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-router new file mode 100755 index 0000000..1607c32 --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-cell-router @@ -0,0 +1,147 @@ +#!/usr/bin/env bash + +# Copyright (C) 2014 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. + +set -e + +do_start() { + lan_interfaces=$(echo "$lan" | sed "s/,/ /g") + + echo "Configuring firewall rules..." + # Flush all the tables first + iptables -t filter -F + iptables -t nat -F + iptables -t mangle -F + + # Drop all incoming packets by default + iptables -t filter -P INPUT DROP + # Accept all on local loopback + iptables -t filter -A INPUT -i lo -j ACCEPT + # Allow packets in for existing socket connections + iptables -t filter -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT + + # Accept all from LAN interfaces + for i in $lan_interfaces; do + iptables -t filter -A INPUT -i $i -j ACCEPT + + # Accept ssh from the LAN (Wired) + #iptables -t filter -A INPUT -i $i -p tcp --dport 22 -j ACCEPT + # Accept http from the LAN (Wired) + #iptables -t filter -A INPUT -i $i -p tcp --dport 80 -j ACCEPT + # Accept tftp from the LAN (Wired) + #iptables -t filter -A INPUT -i $i -p udp --dport 69 -j ACCEPT + done + + # Accept ssh from the WAN (Wireless) + #iptables -t filter -A INPUT -i $wan -p tcp --dport 22 -j ACCEPT + # Accept http from the WAN (Wireless) + #iptables -t filter -A INPUT -i $wan -p tcp --dport 80 -j ACCEPT + + # Allow packet fowarding from LAN interfaces to WAN (cell router) + iptables -t filter -P FORWARD DROP + iptables -t filter -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT + for i in $lan_interfaces; do + iptables -t filter -A FORWARD -i $i -o $wan -j ACCEPT + done + + # Allow all output packets + iptables -t filter -P OUTPUT ACCEPT + + # enable NAT for cell router + iptables -t nat -A POSTROUTING -o $wan -j MASQUERADE + + echo "Enabling packet forwarding..." + # turn on packet forwarding last + echo 1 > /proc/sys/net/ipv4/ip_forward + echo "Done" +} + +do_stop() { + echo "Clearing firewall rules..." + # clear all tables + iptables -t filter -F + iptables -t nat -F + iptables -t mangle -F + # reset policies to ACCEPT + iptables -t filter -P INPUT ACCEPT + iptables -t filter -P OUTPUT ACCEPT + iptables -t filter -P FORWARD ACCEPT + + # turn off packet forwarding + echo "Disabling packet forwarding..." + echo 0 > /proc/sys/net/ipv4/ip_forward + echo "Done" +} + +usage() { + echo "Usage: $(basename $0) start|stop [options]" + echo " options:" + echo " -l LAN interfaces to allow, comma-separated (defaults to \"eth0\")" + echo " -w WAN interface to route out (defaults to \"ppp0\")" + exit 1 +} + +# main +if [[ $# < 1 ]]; then + usage +fi + +cmd=$1 +shift + +while getopts "l:w:h" opt; do + case "$opt" in + l) + l=$OPTARG + ;; + w) + w=$OPTARG + ;; + h) + usage + ;; + *) + usage + ;; + esac +done + +# default lan to eth0 if not specified +lan=${l-eth0} +# default wan to ppp0 if not specified +wan=${w-ppp0} + +case $cmd in + start) + echo "LAN: $lan" + echo "WAN: $wan" + do_start + ;; + stop) + do_stop + ;; + *) + usage + ;; +esac + +exit 0 + diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-dhcpd b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-dhcpd new file mode 100755 index 0000000..976b138 --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-dhcpd @@ -0,0 +1,65 @@ +#!/bin/bash + +# Copyright (C) 2014 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. + +do_start() { + echo "starting dhcp daemon" + udhcpd -S /etc/udhcpd.conf +} + +do_stop() { + echo "stopping dhcp daemon" + killall udhcpd +} + +usage() { + echo "Usage: $(basename $0) start|stop|restart" + exit 1 +} + +# main +if [[ $# != 1 ]]; then + usage +fi + +case $1 in + start) + if [[ ! -f "/etc/udhcpd.conf" ]] + then + echo "/etc/udhcpd.conf does not exist" + exit 1 + fi + do_start + ;; + stop) + do_stop + ;; + restart) + do_stop + sleep 1 + do_start + ;; + *) + usage + ;; +esac + +exit 0 diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade new file mode 100755 index 0000000..a377309 --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-firmware-upgrade @@ -0,0 +1,69 @@ +#!/bin/bash +dofile=/var/volatile/do_flash_upgrade + +if [ $# != 1 ]; then + echo "Usage: $0 upgrade.bin" + exit 1 +fi + +set -e +upgrade=$1 + +mkdir -p /var/volatile +cd /var/volatile + +# make sure firmware is for this device +hw_version=$(cat /sys/devices/platform/mts-io/hw-version) +firmware_model=$(tar -xO -f $upgrade model) +shopt -s nocasematch +if [[ ! "$hw_version" =~ ^$firmware_model- ]]; then + logger -s -t firmware_upgrade "Wrong firmware for this hardware" + logger -s -t firmware_upgrade "hw version: $hw_version" + logger -s -t firmware_upgrade "firmware model: $firmware_model" + exit 1 +fi + +files=(bstrap.bin uboot.bin uImage.bin config.jffs2 oem.jffs2 rootfs.jffs2 install.sh) + +tobeflashed=0 +# verify all MD5 sums +for (( i = 0; i < ${#files[@]}; i++ )); do + file=${files[i]} + # if the file is in the tar, md5sum it + if tar -t -f $upgrade | grep -F -q "$file"; then + logger -s -t firmware_upgrade "Checking MD5 for $file..." + if ! tar -x -f $upgrade $file.md5; then + logger -s -t firmware_upgrade "MD5 is not found for the $file, upgrade aborted" + exit 1 + fi + if ! tar -xO -f $upgrade $file | md5sum -c $file.md5; then + logger -s -t firmware_upgrade "MD5 check failed, upgrade aborted" + exit 1 + fi + tobeflashed=1 + fi +done + +if (( $tobeflashed )); then + mkdir -p /var/volatile/flash-upgrade + mv -f $upgrade /var/volatile/flash-upgrade/upgrade.bin + touch "${dofile}" + chown "root:root" "${dofile}" || true + uid=$(stat -c %u "${dofile}") || true + result=$? + if ((result != 0)) ; then + logger -s -t firmware_upgrade "Cannot create ${dofile}" + exit 1 + fi + if ((uid != 0)) ; then + logger -s -t firmware_upgrade "Cannot set ownership of ${dofile} to root" + exit 1 + fi + logger -s -t firmware_upgrade "Rebooting" + sleep 1 + reboot + exit 0 +else + logger -s -t firmware_upgrade "Nothing to be flashed!" + exit 1 +fi 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..535ab17 --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-apn @@ -0,0 +1,110 @@ +#!/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.2/mlinux-switch-cell-fw b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-cell-fw new file mode 100755 index 0000000..9edacac --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-cell-fw @@ -0,0 +1,149 @@ +#!/bin/bash +lna3_chat_link=/etc/ppp/peers/lna3_chat +lna3_readme=/etc/ppp/peers/README.lna3 +function usage { +>&2 echo "\ +Usage: $0 [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.2/mlinux-wifi-ap b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-wifi-ap new file mode 100755 index 0000000..ddbec95 --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-wifi-ap @@ -0,0 +1,165 @@ +#!/bin/bash + +# Copyright (C) 2014 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. + +dhcpd_file=/etc/udhcpd.conf +hostapd_file=/etc/hostapd.conf +interface=wlan0 +bridge_mode=0 + +do_start() { + if [ "$bridge_mode" = 1 ]; then + interface=$b + if ! grep -E -q "^bridge=$interface\s*$" $hostapd_file; then + echo "Enabling bridge=br0 in $hostapd_file" + sed -r -i "s/^#?bridge=.*$/bridge=$interface/" $hostapd_file + fi + else + if grep -E -q "^bridge=.*$" $hostapd_file; then + echo "Disabling bridge in $hostapd_file" + sed -r -i "s/^bridge=/#bridge=/" $hostapd_file + fi + fi + + echo "Starting hostap daemon" + /etc/init.d/hostapd start + + if [ "$bridge_mode" != 1 ]; then + echo "Setting IP address to $ip" + ifconfig $interface $ip + # strip off end of IP address to get subnet + # assumes subnet of /24 + subnet=${ip%.*} + # escape periods for regex + subnet_regex=${subnet//./\\.} + ip_regex=${ip//./\\.} + # set default address range for dhcpd + addr_start=100 + addr_end=254 + if ! grep -E -q "^start\s+$subnet_regex\." $dhcpd_file; then + echo "Changing dhcpd start to $subnet.$addr_start" + sed -r -i "s/^start\s+.*$/start $subnet.$addr_start/" $dhcpd_file + fi + if ! grep -E -q "^end\s+$subnet_regex\." $dhcpd_file; then + echo "Changing dhcpd end to $subnet.$addr_end" + sed -r -i "s/^end\s+.*$/end $subnet.$addr_end/" $dhcpd_file + fi + # update dhcpd addresses if needed + if ! grep -E -q "^option\s+router\s+$ip_regex" $dhcpd_file; then + echo "Changing dhcpd router to $ip" + sed -r -i "s/^option\s+router\s+.*$/option router $ip/" $dhcpd_file + fi + else + # unset ip address for bridge mode + ifconfig wlan0 0.0.0.0 + fi + + if ! grep -E -q "^interface\s+$interface" $dhcpd_file; then + echo "Changing dhcpd interface to $interface" + sed -r -i "s/^interface\s+.*$/interface $interface/" $dhcpd_file + fi + mlinux-dhcpd start +} + +do_stop() { + echo "Stopping hostap daemon" + /etc/init.d/hostapd stop + mlinux-dhcpd stop +} + +usage() { + echo "Usage: $(basename $0) start|stop|restart [options]" + echo " options:" + echo " -a
      Sets AP IP address (defaults to 192.168.3.1)" + echo " -b Add AP to specified bridge interface (conflicts with -a)" + exit 1 +} + +# main +if [[ $# < 1 ]]; then + usage +fi + +cmd=$1 +shift + +while getopts "a:b:h" opt; do + case "$opt" in + a) + a=$OPTARG + ;; + b) + b=$OPTARG + bridge_mode=1 + ;; + h) + usage + ;; + *) + usage + ;; + esac +done + +# can't specify both address and bridge mode +if [ -n "$a" ] && [ -n "$b" ]; then + usage +fi + +if [ -n "$a" ]; then + ret=1 + if [[ $a =~ ^([0-9]{1,3}\.){3,3}[0-9]{1,3}$ ]] + then + OIFS=$IFS + IFS='.' + ip=($a) + IFS=$OFIS + [[ ${ip[0]} -le 255 && ${ip[1]} -le 255 && ${ip[2]} -le 255 && ${ip[3]} -le 255 ]] + ret=$? + fi + if [[ ret -ne 0 ]] + then + echo "invalid IP address" + exit 1 + fi + ip=$a +else + ip="192.168.3.1" +fi + +case $cmd in + start) + do_start + ;; + stop) + do_stop + ;; + restart) + do_stop + sleep 1 + do_start + ;; + *) + usage + ;; +esac + +exit 0 diff --git a/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb b/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb deleted file mode 100644 index 0dfd740..0000000 --- a/recipes-core/mlinux-scripts/mlinux-scripts_1.1.bb +++ /dev/null @@ -1,7 +0,0 @@ -DESCRIPTION = "Scripts to easily get started with common mLinux use cases" - -require mlinux-scripts.inc - -PR = "r5" - -S = "${WORKDIR}/mlinux-scripts-${PV}" diff --git a/recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb b/recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb new file mode 100644 index 0000000..05c1b84 --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts_1.2.bb @@ -0,0 +1,7 @@ +DESCRIPTION = "Scripts to easily get started with common mLinux use cases" + +require mlinux-scripts.inc + +PR = "r1" + +S = "${WORKDIR}/mlinux-scripts-${PV}" -- cgit v1.2.3 From bf5b19d94ea22401762a387ea5dd2e043da4e9af Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 12 Aug 2019 14:56:39 -0500 Subject: New multiple modem switch APN code --- .../mlinux-scripts-1.2/mlinux-switch-apn | 103 ++++++++++++++------- 1 file changed, 68 insertions(+), 35 deletions(-) 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 index 535ab17..689b0a4 100755 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-apn +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-apn @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (C) 2014, 2017 Multi-Tech Systems +# 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 @@ -20,26 +20,19 @@ # 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 +MTMODEMS=(LNA3 L4N1) +MODEMS=(LE910-NA1 LE910C4-NF) -function setchat { - fw=$1 - silent=$2 - if ((${#lna3_chat_file[$fw]} == 0)) ; then - >&2 echo "Invalid firmware SKU $fw" +# 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 - 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 { @@ -47,37 +40,77 @@ function usage { >&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-" + >&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 =~ -LNA3- ]] ; then - echo "Firmware switch is supported only on LE910-NA1 models with product-id containing -LNA3-." +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 - if ((fw < 0)) || ((fw > 1)) ; then + if [[ $fw =~ ^[0-9]+$ ]] ; then + echo fw is $fw + if ((fw < 0)) || ((fw > 2)) ; then usage fi else - if ((fw > 1)) || ((fw < 0)) ; then - >&2 echo "Invalid firmware SKU value" - usage - fi + >&2 echo "Invalid firmware SKU value" + usage fi echo "Switching chat script to firmware SKU $fw" - setchat $fw 0 + setchat $mymtmodem $fw 0 exit $? else if ! /usr/sbin/mlinux-cell-radio-ready ; then @@ -87,23 +120,23 @@ else fi MODEL=$(radio-query --model) if (($? != 0)) ; then - >&2echo "Assume no radio on this device." + >&2echo "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-." + 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 $fw 0 + setchat "${mymtmodem}" $fw 0 else fw=$(radio-query --active-firmware) if (($? == 0)) ; then - setchat $fw 0 + setchat "${mymtmodem}" $fw 0 fi fi fi -- cgit v1.2.3 From 8ff7c0de58ab02fb9c61811a90415e8bbb251c8e Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Tue, 13 Aug 2019 10:09:20 -0500 Subject: lora: update MTCAP LUT values, tx power 20 was incorrect --- .../global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic | 2 +- .../global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic | 2 +- .../global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic | 2 +- .../global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic | 2 +- .../global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic | 2 +- .../global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic | 2 +- .../global_conf.json.3.1.0.MTCAP-LORA-1-5.RU864.basic | 2 +- .../global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) 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 ef9eb54..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 @@ -123,7 +123,7 @@ "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":0,"rf_power":20}, + "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}, 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 ae96528..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 @@ -91,7 +91,7 @@ "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":0,"rf_power":20}, + "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}, 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 016fdd5..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 @@ -89,7 +89,7 @@ "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":0,"rf_power":20}, + "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}, 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 d826995..4adf76b 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 @@ -92,7 +92,7 @@ "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":0,"rf_power":20}, + "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}, 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 598a579..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 @@ -92,7 +92,7 @@ "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":0,"rf_power":20}, + "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}, 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 044a48e..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 @@ -122,7 +122,7 @@ "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":0,"rf_power":20}, + "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}, 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 3bb62eb..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 @@ -92,7 +92,7 @@ "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":0,"rf_power":20}, + "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}, 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 f8b5027..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 @@ -106,7 +106,7 @@ "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":0,"rf_power":20}, + "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}, -- cgit v1.2.3 From b53c4d0e1066c12925cde34628d54389aa16da3a Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 13 Aug 2019 10:37:13 -0500 Subject: Fix regression in lsp3_chat --- recipes-core/multitech/config/ppp/peers/lsp3_chat | 24 ----------------------- 1 file changed, 24 deletions(-) diff --git a/recipes-core/multitech/config/ppp/peers/lsp3_chat b/recipes-core/multitech/config/ppp/peers/lsp3_chat index 529a260..3fcdfc2 100644 --- a/recipes-core/multitech/config/ppp/peers/lsp3_chat +++ b/recipes-core/multitech/config/ppp/peers/lsp3_chat @@ -10,30 +10,6 @@ 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/chat_wrapper -# as the intended context -# setting. Make the context number -# (after the =) match the -# dialer number context. -# If the context changes, 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 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***2#' -- cgit v1.2.3 From 1fc0c4bb06f980fbe7db5f920f806e19a7c54990 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 13 Aug 2019 17:35:11 -0500 Subject: Fix context number --- recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz b/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz index 64a05be..2839f40 100644 --- a/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz +++ b/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz @@ -54,10 +54,10 @@ OK 'AT+CSQ' # 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" +# 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***3#' -- cgit v1.2.3 From 4c8903bbf55d210ad59a817fc755926b265c1539 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 14 Aug 2019 18:01:29 -0500 Subject: Move to L4N1 and L4E1 support, temporarily on gitlab --- .../multitech/config/ppp/peers/README.fwswitch | 75 ++++++++++++++++++++++ .../multitech/config/ppp/peers/README.lna3 | 75 ---------------------- recipes-support/multitech/libmts-io_1.0.18.bb | 30 --------- recipes-support/multitech/libmts-io_1.0.19.bb | 31 +++++++++ recipes-support/multitech/radio-cmd_0.4.bb | 22 ------- recipes-support/multitech/radio-cmd_0.6.bb | 23 +++++++ recipes-support/multitech/radio-query_0.7.bb | 22 ------- recipes-support/multitech/radio-query_0.8.bb | 23 +++++++ 8 files changed, 152 insertions(+), 149 deletions(-) create mode 100644 recipes-core/multitech/config/ppp/peers/README.fwswitch delete mode 100644 recipes-core/multitech/config/ppp/peers/README.lna3 delete mode 100644 recipes-support/multitech/libmts-io_1.0.18.bb create mode 100644 recipes-support/multitech/libmts-io_1.0.19.bb delete mode 100644 recipes-support/multitech/radio-cmd_0.4.bb create mode 100644 recipes-support/multitech/radio-cmd_0.6.bb delete mode 100644 recipes-support/multitech/radio-query_0.7.bb create mode 100644 recipes-support/multitech/radio-query_0.8.bb diff --git a/recipes-core/multitech/config/ppp/peers/README.fwswitch b/recipes-core/multitech/config/ppp/peers/README.fwswitch new file mode 100644 index 0000000..3e6e5fb --- /dev/null +++ b/recipes-core/multitech/config/ppp/peers/README.fwswitch @@ -0,0 +1,75 @@ +LNA3 firmware/SIM switching instructions + +To automatically set the APN, bring up the system +with the desired SIM installed (AT&T or Verizon). + +Execute with a Verizon SIM installed +(switch to Verizon Firmware and Chat): + +root@mtcap:~# /usr/sbin/mlinux-switch-apn +Cellular radio is ready. +Setting chat script to /etc/ppp/peers/lna3_chat_vz + +root@mtcap:~# ls -ld /etc/ppp/peers/lna3_chat +lrwxrwxrwx 1 root root 27 Aug 31 16:30 /etc/ppp/peers/lna3_chat -> /etc/ppp/peers/lna3_chat_vz + +root@mtcap:~# radio-query --active-firmware +1 + +Firmware image 1 is Verizon, and lna3_chat should point at the Verizon chat scripts lna3_chat_vz. + +To switch to an AT&T SIM (the default): + +root@mtcap:~# mlinux-switch-apn +Cellular radio is ready. +Setting chat script to /etc/ppp/peers/lna3_chat_non_vz + +It is critical that you do not use an AT&T chat script with a Verizon SIM, +because it will set the wrong APN, and it will be remembered as belonging +to the SIM/device combination. + + +The following are not recommended: +To manually set the chat script: + +mlinux-switch-apn [0|1] + +To manually switch the firmware setting: +mlinux-switch-cell-fw [0|1|-1] [timeout] + +This command sets the chat to this readme file. Then it will be needed to +set the symlink for the chat script, which can be done by using mlinux-switch-apn +with 0 for AT&T, and 1 for Verizon. + + + + + + +Put the desired SIM into the device. + +The default APN is "phone" for the LNA3. + +Set the APN using: + +kkk # mlinux-set-apn "YOURAPN" + +Do not put a "AT+CGDCONT" in the lna3_chat_vz script. It will cause trouble. + +To pick a firmware based on the + +To switch to the Verizon firmware and chat script: + + # mlinux-switch-cell-fw 1 + +To switch to the non-Verizon firmware and chat script: + + # mlinux-switch-cell-fw 0 + +Verizon provided APN setting over the air. If you set the APN on a Verizon SIM, +and they push a new APN, you will need to change the APN on the device. + +It is best not to set the APN. To switch from a manually set APN or incorrect APN +to letting Verizon set the APN, remove the SIM, and put it in another device. +Then register with the Verizon network. With the APN setting removed, put the SIM +back into this device. diff --git a/recipes-core/multitech/config/ppp/peers/README.lna3 b/recipes-core/multitech/config/ppp/peers/README.lna3 deleted file mode 100644 index 3e6e5fb..0000000 --- a/recipes-core/multitech/config/ppp/peers/README.lna3 +++ /dev/null @@ -1,75 +0,0 @@ -LNA3 firmware/SIM switching instructions - -To automatically set the APN, bring up the system -with the desired SIM installed (AT&T or Verizon). - -Execute with a Verizon SIM installed -(switch to Verizon Firmware and Chat): - -root@mtcap:~# /usr/sbin/mlinux-switch-apn -Cellular radio is ready. -Setting chat script to /etc/ppp/peers/lna3_chat_vz - -root@mtcap:~# ls -ld /etc/ppp/peers/lna3_chat -lrwxrwxrwx 1 root root 27 Aug 31 16:30 /etc/ppp/peers/lna3_chat -> /etc/ppp/peers/lna3_chat_vz - -root@mtcap:~# radio-query --active-firmware -1 - -Firmware image 1 is Verizon, and lna3_chat should point at the Verizon chat scripts lna3_chat_vz. - -To switch to an AT&T SIM (the default): - -root@mtcap:~# mlinux-switch-apn -Cellular radio is ready. -Setting chat script to /etc/ppp/peers/lna3_chat_non_vz - -It is critical that you do not use an AT&T chat script with a Verizon SIM, -because it will set the wrong APN, and it will be remembered as belonging -to the SIM/device combination. - - -The following are not recommended: -To manually set the chat script: - -mlinux-switch-apn [0|1] - -To manually switch the firmware setting: -mlinux-switch-cell-fw [0|1|-1] [timeout] - -This command sets the chat to this readme file. Then it will be needed to -set the symlink for the chat script, which can be done by using mlinux-switch-apn -with 0 for AT&T, and 1 for Verizon. - - - - - - -Put the desired SIM into the device. - -The default APN is "phone" for the LNA3. - -Set the APN using: - -kkk # mlinux-set-apn "YOURAPN" - -Do not put a "AT+CGDCONT" in the lna3_chat_vz script. It will cause trouble. - -To pick a firmware based on the - -To switch to the Verizon firmware and chat script: - - # mlinux-switch-cell-fw 1 - -To switch to the non-Verizon firmware and chat script: - - # mlinux-switch-cell-fw 0 - -Verizon provided APN setting over the air. If you set the APN on a Verizon SIM, -and they push a new APN, you will need to change the APN on the device. - -It is best not to set the APN. To switch from a manually set APN or incorrect APN -to letting Verizon set the APN, remove the SIM, and put it in another device. -Then register with the Verizon network. With the APN setting removed, put the SIM -back into this device. 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 34115be..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" - -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.19.bb b/recipes-support/multitech/libmts-io_1.0.19.bb new file mode 100644 index 0000000..3572e17 --- /dev/null +++ b/recipes-support/multitech/libmts-io_1.0.19.bb @@ -0,0 +1,31 @@ +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" + +PR = "r0" +SRCREV = "${PV}" +#SRC_URI = "git://git.multitech.net/libmts-io;branch=master" +SRC_URI = "git://git@${MTS_INTERNAL_GIT}/mirrors/libmts-io.git;protocol=ssh;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/radio-cmd_0.4.bb b/recipes-support/multitech/radio-cmd_0.4.bb deleted file mode 100644 index b8e5b23..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" - -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.6.bb b/recipes-support/multitech/radio-cmd_0.6.bb new file mode 100644 index 0000000..afa7308 --- /dev/null +++ b/recipes-support/multitech/radio-cmd_0.6.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "MultiTech cellular radio command tool" +HOMEPAGE = "http://www.multitech.net/" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "jsoncpp libmts libmts-io" + +PR = "r0" +SRCREV = "${PV}" + +#SRC_URI = "git://git.multitech.net/radio-cmd;branch=master" +SRC_URI = "git://git@${MTS_INTERNAL_GIT}/mirrors/radio-cmd.git;protocol=ssh;branch=master" + +S = "${WORKDIR}/git" + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake install DESTDIR=${D} +} + diff --git a/recipes-support/multitech/radio-query_0.7.bb b/recipes-support/multitech/radio-query_0.7.bb deleted file mode 100644 index 5e0b60a..0000000 --- a/recipes-support/multitech/radio-query_0.7.bb +++ /dev/null @@ -1,22 +0,0 @@ -DESCRIPTION = "MultiTech cellular radio query tool" -HOMEPAGE = "http://www.multitech.net/" -LICENSE = "GPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" - -DEPENDS = "jsoncpp libmts libmts-io" - -PR = "r0" -SRCREV = "${PV}" - -SRC_URI = "git://git.multitech.net/radio-query;branch=master" - -S = "${WORKDIR}/git" - -do_compile() { - oe_runmake -} - -do_install() { - oe_runmake install DESTDIR=${D} -} - diff --git a/recipes-support/multitech/radio-query_0.8.bb b/recipes-support/multitech/radio-query_0.8.bb new file mode 100644 index 0000000..f548cf6 --- /dev/null +++ b/recipes-support/multitech/radio-query_0.8.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "MultiTech cellular radio query tool" +HOMEPAGE = "http://www.multitech.net/" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "jsoncpp libmts libmts-io" + +PR = "r0" +SRCREV = "${PV}" + +#SRC_URI = "git://git.multitech.net/radio-query;branch=master" +SRC_URI = "git://git@${MTS_INTERNAL_GIT}/mirrors/radio-query.git;protocol=ssh;branch=master" + +S = "${WORKDIR}/git" + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake install DESTDIR=${D} +} + -- cgit v1.2.3 From 1eea5c652209d93746318e80a48d178ffd2905ac Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 14 Aug 2019 18:04:07 -0500 Subject: Move to L4N1 and L4E1 support, temporarily on gitlab --- recipes-core/multitech/config/chat_wrapper | 21 +++++++++++++++------ recipes-core/multitech/config/chat_wrapper.default | 8 ++++++++ .../multitech/config/ppp/peers/README.fwswitch | 9 +++++---- recipes-core/multitech/config/ppp/peers/gsm | 2 +- recipes-core/multitech/config/ppp/peers/gsm_chat | 6 +++--- recipes-core/multitech/config/ppp/peers/l4e1 | 2 +- recipes-core/multitech/config/ppp/peers/l4e1_chat | 6 +++--- recipes-core/multitech/config/ppp/peers/l4n1 | 2 +- .../multitech/config/ppp/peers/l4n1_chat_non_vz | 8 ++++---- recipes-core/multitech/config/ppp/peers/lap3 | 2 +- recipes-core/multitech/config/ppp/peers/lap3_chat | 6 +++--- recipes-core/multitech/config/ppp/peers/leu1 | 2 +- recipes-core/multitech/config/ppp/peers/leu1_chat | 6 +++--- recipes-core/multitech/config/ppp/peers/lna3 | 2 +- .../multitech/config/ppp/peers/lna3_chat_non_vz | 6 +++--- recipes-core/multitech/config/ppp/peers/lsp3 | 2 +- 16 files changed, 54 insertions(+), 36 deletions(-) diff --git a/recipes-core/multitech/config/chat_wrapper b/recipes-core/multitech/config/chat_wrapper index 9db3188..51f8cc1 100755 --- a/recipes-core/multitech/config/chat_wrapper +++ b/recipes-core/multitech/config/chat_wrapper @@ -66,8 +66,16 @@ ${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 -t10 'AT+CGDCONT?' 2>&1 | tr -d '\r') -[[ $MCONTEXT =~ \+CGDCONT:[[:space:]]+${CONTEXTNUM},\"([^\"]*)\",\"([^\"]*)\",\"([^\"]*)\",([0-9]+),([0-9]+)([^$'\n']*) ]] +MCONTEXT=$(/usr/bin/radio-cmd ${RADIOOPTION} -t10 'AT+CGDCONT?' 2>&1 | tr -d '\r') +if [[ $MCONTEXT =~ [Ee][Rr][Rr][Oo][Rr] ]] ; then + RADIOOPTION="${RADIOOPTION2}" + MCONTEXT=$(/usr/bin/radio-cmd ${RADIOOPTION} -t10 '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]}" @@ -100,21 +108,22 @@ if [[ $MPDP != $PDP ]] || [[ $MAPN != $APN ]] || \ ${LOG} "$MCONTEXT" ${LOG} "Dropping registration with carrier to set context" # Need to deregister - /usr/bin/radio-cmd -t10 'AT+COPS=2' - /usr/bin/radio-cmd -t10 "AT+CGDCONT=${CONTEXTNUM},\"${PDP}\",\"${APN}\",\"${ADDR}\",$DCOMP,${HCOMP}${FULLBOAT}" - /usr/bin/radio-cmd -t10 'AT+COPS=0' + /usr/bin/radio-cmd ${RADIOOPTION} -t10 'AT+COPS=2' + /usr/bin/radio-cmd ${RADIOOPTION} -t10 "AT+CGDCONT=${CONTEXTNUM},\"${PDP}\",\"${APN}\",\"${ADDR}\",$DCOMP,${HCOMP}${FULLBOAT}" + /usr/bin/radio-cmd ${RADIOOPTION} -t10 'AT+COPS=0' ${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 --netreg) =~ ^REGISTERED$ ]] ; do + 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) diff --git a/recipes-core/multitech/config/chat_wrapper.default b/recipes-core/multitech/config/chat_wrapper.default index 941c008..a1b4e41 100644 --- a/recipes-core/multitech/config/chat_wrapper.default +++ b/recipes-core/multitech/config/chat_wrapper.default @@ -10,3 +10,11 @@ REGWAITTIME=300 # 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/ppp/peers/README.fwswitch b/recipes-core/multitech/config/ppp/peers/README.fwswitch index 3e6e5fb..47ef5ef 100644 --- a/recipes-core/multitech/config/ppp/peers/README.fwswitch +++ 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 c456764..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/libexec/chat_wrapper /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 a92c938..d952a89 100644 --- a/recipes-core/multitech/config/ppp/peers/gsm_chat +++ b/recipes-core/multitech/config/ppp/peers/gsm_chat @@ -15,18 +15,18 @@ OK 'AT+CSQ' # Note that a comment starting with # #MT AT+CGDCONT= # will be interpretted by -# /usr/libexec/chat_wrapper +# /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, chat_wrapper +# 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 chat_wrapper script +# after the ppp/chat_wrapper script # re-registers the modem. # The context will only be set if the # modem settings do not match the diff --git a/recipes-core/multitech/config/ppp/peers/l4e1 b/recipes-core/multitech/config/ppp/peers/l4e1 index 2996e6e..9638398 100644 --- a/recipes-core/multitech/config/ppp/peers/l4e1 +++ b/recipes-core/multitech/config/ppp/peers/l4e1 @@ -8,4 +8,4 @@ ipcp-restart 10 noauth crtscts novj -connect '/usr/libexec/chat_wrapper /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/l4e1_chat' +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 index 6b6be44..bb95881 100644 --- a/recipes-core/multitech/config/ppp/peers/l4e1_chat +++ b/recipes-core/multitech/config/ppp/peers/l4e1_chat @@ -15,18 +15,18 @@ OK 'AT+CSQ' # Note that a comment starting with # #MT AT+CGDCONT= # will be interpretted by -# /usr/libexec/chat_wrapper +# /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, chat_wrapper +# 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 chat_wrapper script +# after the ppp/chat_wrapper script # re-registers the modem. # The context will only be set if the # modem settings do not match the diff --git a/recipes-core/multitech/config/ppp/peers/l4n1 b/recipes-core/multitech/config/ppp/peers/l4n1 index 2e0b501..5c011e0 100644 --- a/recipes-core/multitech/config/ppp/peers/l4n1 +++ b/recipes-core/multitech/config/ppp/peers/l4n1 @@ -8,4 +8,4 @@ ipcp-restart 10 noauth crtscts novj -connect '/usr/libexec/chat_wrapper /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/l4n1_chat' +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_non_vz b/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz index 2839f40..76f3aae 100644 --- a/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz +++ b/recipes-core/multitech/config/ppp/peers/l4n1_chat_non_vz @@ -36,18 +36,18 @@ OK 'AT+CSQ' # Note that a comment starting with # #MT AT+CGDCONT= # will be interpretted by -# /usr/libexec/chat_wrapper +# /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, chat_wrapper +# 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 chat_wrapper script +# after the ppp/chat_wrapper script # re-registers the modem. # The context will only be set if the # modem settings do not match the @@ -60,7 +60,7 @@ OK 'AT+CSQ' #MT AT+CGDCONT=1,"IP","phone" OK 'AT+CGDCONT?' SAY "Dialing...\n" -OK 'ATD*99***3#' +OK 'ATD*99***1#' SAY "Waiting for CONNECT...\n" TIMEOUT 120 CONNECT '' diff --git a/recipes-core/multitech/config/ppp/peers/lap3 b/recipes-core/multitech/config/ppp/peers/lap3 index 9b56aae..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/libexec/chat_wrapper /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 92a5e54..0f7adf6 100644 --- a/recipes-core/multitech/config/ppp/peers/lap3_chat +++ b/recipes-core/multitech/config/ppp/peers/lap3_chat @@ -15,18 +15,18 @@ OK 'AT+CSQ' # Note that a comment starting with # #MT AT+CGDCONT= # will be interpretted by -# /usr/libexec/chat_wrapper +# /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, chat_wrapper +# 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 chat_wrapper script +# after the ppp/chat_wrapper script # re-registers the modem. # The context will only be set if the # modem settings do not match the diff --git a/recipes-core/multitech/config/ppp/peers/leu1 b/recipes-core/multitech/config/ppp/peers/leu1 index 2e247b3..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/libexec/chat_wrapper /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 817f75d..6aef877 100644 --- a/recipes-core/multitech/config/ppp/peers/leu1_chat +++ b/recipes-core/multitech/config/ppp/peers/leu1_chat @@ -15,18 +15,18 @@ OK 'AT+CSQ' # Note that a comment starting with # #MT AT+CGDCONT= # will be interpretted by -# /usr/libexec/chat_wrapper +# /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, chat_wrapper +# 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 chat_wrapper script +# after the ppp/chat_wrapper script # re-registers the modem. # The context will only be set if the # modem settings do not match the diff --git a/recipes-core/multitech/config/ppp/peers/lna3 b/recipes-core/multitech/config/ppp/peers/lna3 index 022e4fc..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/libexec/chat_wrapper /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 33fd377..a3da519 100644 --- a/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz +++ b/recipes-core/multitech/config/ppp/peers/lna3_chat_non_vz @@ -36,18 +36,18 @@ OK 'AT+CSQ' # Note that a comment starting with # #MT AT+CGDCONT= # will be interpretted by -# /usr/libexec/chat_wrapper +# /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, chat_wrapper +# 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 chat_wrapper script +# after the ppp/chat_wrapper script # re-registers the modem. # The context will only be set if the # modem settings do not match the diff --git a/recipes-core/multitech/config/ppp/peers/lsp3 b/recipes-core/multitech/config/ppp/peers/lsp3 index 4a3da2f..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/libexec/chat_wrapper /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' -- cgit v1.2.3 From a4704d2afa37fe9d063a33dad83f1398cb924f40 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 14 Aug 2019 18:05:49 -0500 Subject: Firmware switching for L4N1 --- .../mlinux-scripts-1.2/mlinux-switch-apn | 26 ++++- .../mlinux-scripts-1.2/mlinux-switch-cell-fw | 128 +++++++++++++++------ 2 files changed, 117 insertions(+), 37 deletions(-) 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 index 689b0a4..be056eb 100755 --- a/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-apn +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.2/mlinux-switch-apn @@ -23,6 +23,18 @@ 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 @@ -118,8 +130,14 @@ else >&2 echo Try again later exit 1 fi - MODEL=$(radio-query --model) - if (($? != 0)) ; then + 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 @@ -130,11 +148,11 @@ else 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 + 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=$(radio-query --active-firmware) + fw=$(getactivefirmware) if (($? == 0)) ; then setchat "${mymtmodem}" $fw 0 fi 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 index 9edacac..4065ccb 100755 --- 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 @@ -1,11 +1,53 @@ #!/bin/bash -lna3_chat_link=/etc/ppp/peers/lna3_chat -lna3_readme=/etc/ppp/peers/README.lna3 +# 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 "\ +>&2 echo " Usage: $0 [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). + 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) @@ -17,11 +59,27 @@ 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 > 1)) ; then +if ((FWIMAGE < -2)) || ((FWIMAGE > 2)) ; then usage fi if ! >&2 /usr/sbin/mlinux-cell-radio-ready ; then @@ -30,16 +88,27 @@ if ! >&2 /usr/sbin/mlinux-cell-radio-ready ; then exit 1 fi if ((FWIMAGE == -1)) ; then - iccid=$(radio-query --iccid) + 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 + 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 @@ -58,47 +127,40 @@ fi [ "$VERBOSE" ] && >&2 echo -n "Switching the radio firmware image: " # -# Check if the radio present +# Applicable for LTE910-NA1 and LE910C4-NF with dual FW images only # -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 +if ! findItem "$MODEL" "${fwsw_modems[@]}" ; then + echo "Firmware switch is not supported on ${MODEL}." + exit 1 fi # # Check if firmware switch is required # -FWACTIVE=$(radio-query --active-firmware) +FWACTIVE=$(getactivefirmware) if [ $? -ne 0 ] || [ "$FWACTIVE" == "" ]; then - [ "$VERBOSE" ] && >&2 echo "The $MODEL radio does not support firmware switching." - exit 0 + [ "$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 + 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 +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=$(radio-cmd --set-active-firmware "$FWIMAGE") +RESULT=$(setactivefirmware "$FWIMAGE") if [ $? -ne 0 ]; then [ "$VERBOSE" ] && >&2 echo "$RESULT" exit 1 @@ -130,7 +192,7 @@ COUNTER=0 sleep 5 while [ $COUNTER -lt $TIMEOUT ]; do - MODEL=$(radio-query --model) + MODEL=$(radio-query ${RADIOOPTION} --model) if [ $? -eq 0 ]; then echo "Cellular radio firmware has been switched to $FWIMAGE image." exit 0 -- cgit v1.2.3 From 87f64609702a92b821ddc3ad0caae051dda31c88 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Thu, 15 Aug 2019 07:44:27 -0500 Subject: lora: update EU868 tx power LUT with entry for +4 dBm as lowest to support 100% duty-cycle at low power --- .../global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4adf76b..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,7 +82,7 @@ "bandwidth": 125000, "datarate": 50000 }, - "tx_lut_0":{"dig_gain":2,"mix_gain":15,"pa_gain":1,"rf_power":10}, + "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}, -- cgit v1.2.3 From 5f7a9d3973d0c1c29893ccd8c759fc74ea8bb584 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Thu, 15 Aug 2019 07:45:58 -0500 Subject: lora: increase sleep between LNS and PKF starting to allow config to be written --- recipes-connectivity/lora/lora-network-server/lora-network-server.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-connectivity/lora/lora-network-server/lora-network-server.init b/recipes-connectivity/lora/lora-network-server/lora-network-server.init index 88ea271..b8b1f6f 100755 --- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init +++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init @@ -205,7 +205,7 @@ do_start() { if [ "$no_lora_hw" != "true" ]; then # start packet forwarder - sleep 2 + sleep 4 /usr/sbin/start-stop-daemon --chdir $run_dir/1 --start --background --make-pidfile \ --pidfile $pkt_fwd_pidfile --startas /bin/bash \ -- -c "exec $angel $pkt_fwd $pkt_fwd_options 2>&1 >> $pkt_fwd_log" -- cgit v1.2.3 From c9631d41890d31a357b60d515ca372de015511c6 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Thu, 15 Aug 2019 09:29:27 -0500 Subject: lora: update network server to 2.2.29 --- .../lora/lora-network-server_2.2.27.bb | 48 ---------------------- .../lora/lora-network-server_2.2.29.bb | 48 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-network-server_2.2.27.bb create mode 100644 recipes-connectivity/lora/lora-network-server_2.2.29.bb diff --git a/recipes-connectivity/lora/lora-network-server_2.2.27.bb b/recipes-connectivity/lora/lora-network-server_2.2.27.bb deleted file mode 100644 index 22023ee..0000000 --- a/recipes-connectivity/lora/lora-network-server_2.2.27.bb +++ /dev/null @@ -1,48 +0,0 @@ -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 = "r8" -CONFFILES_${PN} += "${sysconfdir}/default/lora-network-server ${sysconfdir}/init.d/lora-network-server" - -SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ - file://lora-network-server.init \ - file://lora-network-server.default \ - " - -SRC_URI[md5sum] = "7a8a86272cccc454f634f14ba0b6cab7" -SRC_URI[sha256sum] = "f5ed505d7a0dfa6eb42363d9a27464d3e1953d2d3acfdefd919b2f2b6a7cb2a8" - -# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server - install -m 0755 lora-v21-keygen ${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-network-server_2.2.29.bb b/recipes-connectivity/lora/lora-network-server_2.2.29.bb new file mode 100644 index 0000000..6bd9f8a --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server_2.2.29.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 = "r8" +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] = "2634d6fdad416c71bff47846ec85f5a6" +SRC_URI[sha256sum] = "9c2803fcc347b2f6ef2e8fd3ad6e8a2601d976304035809fbc6f1bf9c201fd9e" + +# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server + install -m 0755 lora-v21-keygen ${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" -- cgit v1.2.3 From d734a105ee536afbd837a62059be1ea60c7e8f42 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Thu, 15 Aug 2019 13:34:49 -0500 Subject: lora: update network server to 2.2.30 --- .../lora/lora-network-server_2.2.29.bb | 48 ---------------------- .../lora/lora-network-server_2.2.30.bb | 48 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 recipes-connectivity/lora/lora-network-server_2.2.29.bb create mode 100644 recipes-connectivity/lora/lora-network-server_2.2.30.bb diff --git a/recipes-connectivity/lora/lora-network-server_2.2.29.bb b/recipes-connectivity/lora/lora-network-server_2.2.29.bb deleted file mode 100644 index 6bd9f8a..0000000 --- a/recipes-connectivity/lora/lora-network-server_2.2.29.bb +++ /dev/null @@ -1,48 +0,0 @@ -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 = "r8" -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] = "2634d6fdad416c71bff47846ec85f5a6" -SRC_URI[sha256sum] = "9c2803fcc347b2f6ef2e8fd3ad6e8a2601d976304035809fbc6f1bf9c201fd9e" - -# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server - install -m 0755 lora-v21-keygen ${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-network-server_2.2.30.bb b/recipes-connectivity/lora/lora-network-server_2.2.30.bb new file mode 100644 index 0000000..6c05481 --- /dev/null +++ b/recipes-connectivity/lora/lora-network-server_2.2.30.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] = "c8b1589023b413e16fc3939d01a01e35" +SRC_URI[sha256sum] = "70bc0f6e703ec346efa195922ce2392a53f2069aa1a0fa63f2998af8e9a22922" + +# 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-mlinux-4 ${D}${LORA_DIR}/lora-network-server + install -m 0755 lora-v21-keygen ${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" -- cgit v1.2.3 From 156ba658a653a1be3e333b16f463b0d33b4906d9 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 15 Aug 2019 14:46:44 -0500 Subject: Bump mLinux version to 5.1.0dev1 --- conf/distro/mlinux.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 21e9134..db577fa 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" -DISTRO_BASE_VERSION = "5.0" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.1" +DISTRO_BASE_VERSION = "5.1" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev1" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 3aa4c7d26909e42c2af4e07d902dfbc8a3891b82 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 16 Aug 2019 16:15:50 -0500 Subject: Incomplete file list, missing bash dependency --- recipes-core/multitech/config_2.3.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb index 816aab2..a8f6784 100644 --- a/recipes-core/multitech/config_2.3.bb +++ b/recipes-core/multitech/config_2.3.bb @@ -1,9 +1,10 @@ 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" PACKAGE_ARCH = "all" -PR = "r1" +PR = "r2" PACKAGES =+ "${PN}-mths" inherit update-rc.d @@ -59,7 +60,7 @@ fakeroot do_install () { } FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass" -FILES_${PN} += "${sysconfdir}/init.d/config" +FILES_${PN} += "${sysconfdir}/init.d/config ${sysconfdir}/defaults ${libexecdir}/ppp/chat_wrapper" FILES_${PN}-mths = "${sysconfdir}/defaults-mths.tar.gz" -- cgit v1.2.3 From 05de283c969f5048409762a7685284f163305e4f Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 16 Aug 2019 16:34:26 -0500 Subject: Bump version of mlinux --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index db577fa..9378fef 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev1" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev2" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 2721688bdecac49dd1746c809f35f8ace18965d5 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 16 Aug 2019 17:02:15 -0500 Subject: Misspelling of directory name --- recipes-core/multitech/config_2.3.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb index a8f6784..6460cdd 100644 --- a/recipes-core/multitech/config_2.3.bb +++ b/recipes-core/multitech/config_2.3.bb @@ -55,12 +55,12 @@ fakeroot do_install () { install -d ${D}${sysconfdir}/defaults install -d ${D}${libexecdir}/ppp install -m 0755 ${WORKDIR}/chat_wrapper ${D}${libexecdir}/ppp/chat_wrapper - install -m 0644 ${WORKDIR}/chat_wrapper.default ${D}${sysconfdir}/defaults + install -m 0644 ${WORKDIR}/chat_wrapper.default ${D}${sysconfdir}/default } FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass" -FILES_${PN} += "${sysconfdir}/init.d/config ${sysconfdir}/defaults ${libexecdir}/ppp/chat_wrapper" +FILES_${PN} += "${sysconfdir}/init.d/config ${sysconfdir}/default ${libexecdir}/ppp/chat_wrapper" FILES_${PN}-mths = "${sysconfdir}/defaults-mths.tar.gz" -- cgit v1.2.3 From 6f7d2bad78019f03b27beb1d527b60c4aed7d1c7 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 16 Aug 2019 17:10:04 -0500 Subject: more cleanup of /etc/default --- recipes-core/multitech/config_2.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb index 6460cdd..aac6474 100644 --- a/recipes-core/multitech/config_2.3.bb +++ b/recipes-core/multitech/config_2.3.bb @@ -52,7 +52,7 @@ fakeroot do_install () { 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}/defaults + install -d ${D}${sysconfdir}/default install -d ${D}${libexecdir}/ppp install -m 0755 ${WORKDIR}/chat_wrapper ${D}${libexecdir}/ppp/chat_wrapper install -m 0644 ${WORKDIR}/chat_wrapper.default ${D}${sysconfdir}/default -- cgit v1.2.3 From 66b3ba9e9bba932faa8e11c27b920123f9f2937c Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 16 Aug 2019 17:18:12 -0500 Subject: Fix filename of /etc/default/chat_wrapper --- recipes-core/multitech/config_2.3.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb index aac6474..379149e 100644 --- a/recipes-core/multitech/config_2.3.bb +++ b/recipes-core/multitech/config_2.3.bb @@ -54,9 +54,8 @@ fakeroot do_install () { install -d ${D}${sysconfdir}/default install -d ${D}${libexecdir}/ppp - install -m 0755 ${WORKDIR}/chat_wrapper ${D}${libexecdir}/ppp/chat_wrapper - install -m 0644 ${WORKDIR}/chat_wrapper.default ${D}${sysconfdir}/default - + install -m 0755 ${WORKDIR}/chat_wrapper ${D}${libexecdir}/ppp/ + install -m 0644 ${WORKDIR}/chat_wrapper.default ${D}${sysconfdir}/default/chat_wrapper } FILES_${PN} = "${sysconfdir}/defaults.tar.gz ${sysconfdir}/default_pass" -- cgit v1.2.3 From 6a9ad96dc77fc8589d275300c9f1d1e2c4f58871 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 20 Aug 2019 10:22:42 -0500 Subject: Move recipes to public git.multitech.net for release. --- recipes-support/multitech/libmts-io_1.0.13.bb | 30 --------------------------- recipes-support/multitech/libmts-io_1.0.19.bb | 3 +-- recipes-support/multitech/radio-cmd_0.2.bb | 22 -------------------- recipes-support/multitech/radio-cmd_0.6.bb | 3 +-- recipes-support/multitech/radio-query_0.8.bb | 3 +-- 5 files changed, 3 insertions(+), 58 deletions(-) delete mode 100644 recipes-support/multitech/libmts-io_1.0.13.bb delete mode 100644 recipes-support/multitech/radio-cmd_0.2.bb diff --git a/recipes-support/multitech/libmts-io_1.0.13.bb b/recipes-support/multitech/libmts-io_1.0.13.bb deleted file mode 100644 index 34115be..0000000 --- a/recipes-support/multitech/libmts-io_1.0.13.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" - -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.19.bb b/recipes-support/multitech/libmts-io_1.0.19.bb index 3572e17..34115be 100644 --- a/recipes-support/multitech/libmts-io_1.0.19.bb +++ b/recipes-support/multitech/libmts-io_1.0.19.bb @@ -8,8 +8,7 @@ BBCLASSEXTEND = "native" PR = "r0" SRCREV = "${PV}" -#SRC_URI = "git://git.multitech.net/libmts-io;branch=master" -SRC_URI = "git://git@${MTS_INTERNAL_GIT}/mirrors/libmts-io.git;protocol=ssh;branch=master" +SRC_URI = "git://git.multitech.net/libmts-io;branch=master" S = "${WORKDIR}/git" diff --git a/recipes-support/multitech/radio-cmd_0.2.bb b/recipes-support/multitech/radio-cmd_0.2.bb deleted file mode 100644 index b8e5b23..0000000 --- a/recipes-support/multitech/radio-cmd_0.2.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" - -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.6.bb b/recipes-support/multitech/radio-cmd_0.6.bb index afa7308..b8e5b23 100644 --- a/recipes-support/multitech/radio-cmd_0.6.bb +++ b/recipes-support/multitech/radio-cmd_0.6.bb @@ -8,8 +8,7 @@ DEPENDS = "jsoncpp libmts libmts-io" PR = "r0" SRCREV = "${PV}" -#SRC_URI = "git://git.multitech.net/radio-cmd;branch=master" -SRC_URI = "git://git@${MTS_INTERNAL_GIT}/mirrors/radio-cmd.git;protocol=ssh;branch=master" +SRC_URI = "git://git.multitech.net/radio-cmd;branch=master" S = "${WORKDIR}/git" diff --git a/recipes-support/multitech/radio-query_0.8.bb b/recipes-support/multitech/radio-query_0.8.bb index f548cf6..5e0b60a 100644 --- a/recipes-support/multitech/radio-query_0.8.bb +++ b/recipes-support/multitech/radio-query_0.8.bb @@ -8,8 +8,7 @@ DEPENDS = "jsoncpp libmts libmts-io" PR = "r0" SRCREV = "${PV}" -#SRC_URI = "git://git.multitech.net/radio-query;branch=master" -SRC_URI = "git://git@${MTS_INTERNAL_GIT}/mirrors/radio-query.git;protocol=ssh;branch=master" +SRC_URI = "git://git.multitech.net/radio-query;branch=master" S = "${WORKDIR}/git" -- cgit v1.2.3 From 8e1fd475090aeb09fb99f811eb69e1bf19304cbd Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 20 Aug 2019 10:34:04 -0500 Subject: 5.1.0 mLinux version for release --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 9378fef..29d2648 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0dev2" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 794428f56c21788ed64da7440c9e3728d7aa5b5c Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 21 Aug 2019 11:53:01 -0500 Subject: Fix chat_wrapper for L4E1 --- recipes-core/multitech/config/chat_wrapper | 35 +++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/recipes-core/multitech/config/chat_wrapper b/recipes-core/multitech/config/chat_wrapper index 51f8cc1..b15a949 100755 --- a/recipes-core/multitech/config/chat_wrapper +++ b/recipes-core/multitech/config/chat_wrapper @@ -92,6 +92,13 @@ 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 @@ -102,9 +109,31 @@ fi # Only update context on a mismatch between chat and modem. if [[ $MPDP != $PDP ]] || [[ $MAPN != $APN ]] || \ [[ $MADDR != $ADDR ]] || ((MDCOMP != DCOMP)) || \ - ((MHCOMP != HCOMP)) || \ - [[ $MFULLBOAT != $FULLBOAT ]] ; then - ${LOG} "Modem context $MPDP,$MAPN,$MADDR,$MDCOMP,$HCOMP does not match chat script" + ((MHCOMP != HCOMP)) ; then + ${LOG} "Modem context $MPDP,$MAPN,$MADDR,$MDCOMP,$MHCOMP does not match chat script" + ${LOG} "Modem context $PDP,$APN,$ADDR,$DCOMP,$HCOMP does not match chat script" + 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 -- cgit v1.2.3 From ad9372e296f9e71f46a70a1a1d6a4e29ee9d9b20 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 21 Aug 2019 11:54:41 -0500 Subject: Bump revision for L4E1 Context Fix --- recipes-core/multitech/config_2.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb index 379149e..784b55e 100644 --- a/recipes-core/multitech/config_2.3.bb +++ b/recipes-core/multitech/config_2.3.bb @@ -4,7 +4,7 @@ LICENSE = "MIT" RDEPENDS_${PN} += "bash" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" PACKAGE_ARCH = "all" -PR = "r2" +PR = "r3" PACKAGES =+ "${PN}-mths" inherit update-rc.d -- cgit v1.2.3 From 6b605c9543db187ae4b3ca69fdec4c2bec68395d Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 21 Aug 2019 11:59:27 -0500 Subject: Bump mlinux version --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 29d2648..c80c5bb 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.1" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From f948715a12fc59075229c4a1ac29f1e68f7307c7 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 21 Aug 2019 14:43:52 -0500 Subject: Add mtadm to dialout for chat_wrapper access to modems --- recipes-core/useradd/useradd.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-core/useradd/useradd.bb b/recipes-core/useradd/useradd.bb index cbc48e7..9f7ef05 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 = "r2" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" @@ -28,7 +28,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 mtadm" +USERADD_PARAM_${PN} = "-u 50 -G sudo,disk,dialout -m -r -s /bin/bash mtadm" do_install () { # If the recipe doesn't have a file, the ipk -- cgit v1.2.3 From 04b226b7f6be2735d9dbae12b39d68b84c69f20a Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 21 Aug 2019 14:45:16 -0500 Subject: 5.1.2 to fix chat access to modems from mtadm --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index c80c5bb..1dcd3e4 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.1" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.2" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 55b0fbdbd86876704e0a85b14ad40a572faf899d Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 22 Aug 2019 14:41:56 -0500 Subject: Add mtadm to dialout in upgrade case, and create /run/radio in dialout group --- recipes-core/multitech/config_2.3.bb | 6 +++++- recipes-core/useradd/useradd.bb | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb index 784b55e..0cbae96 100644 --- a/recipes-core/multitech/config_2.3.bb +++ b/recipes-core/multitech/config_2.3.bb @@ -4,7 +4,7 @@ LICENSE = "MIT" RDEPENDS_${PN} += "bash" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" PACKAGE_ARCH = "all" -PR = "r3" +PR = "r4" PACKAGES =+ "${PN}-mths" inherit update-rc.d @@ -21,6 +21,7 @@ SRC_URI = "\ file://config-mths \ file://chat_wrapper \ file://chat_wrapper.default \ + file://99_radio \ " RDEPENDS_${PN}-mths += "${PN}" @@ -53,13 +54,16 @@ fakeroot do_install () { 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" diff --git a/recipes-core/useradd/useradd.bb b/recipes-core/useradd/useradd.bb index 9f7ef05..78fc981 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 = "r2" +PR = "r3" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" @@ -53,5 +53,11 @@ pkg_postinst_${PN} () { echo 'PATH='${Sub} >>/home/mtadm/.profile echo 'export PATH' >>/home/mtadm/.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 } -- cgit v1.2.3 From 0b781ef8025458cc8c9db58087fcc178fba11174 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 22 Aug 2019 14:56:36 -0500 Subject: Add missing /run/radio configuration file --- recipes-core/multitech/config/99_radio | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 recipes-core/multitech/config/99_radio diff --git a/recipes-core/multitech/config/99_radio b/recipes-core/multitech/config/99_radio new file mode 100644 index 0000000..a37346c --- /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: +# +# where the items are separated by whitespace ! +# +# : 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 2777 /run/radio none -- cgit v1.2.3 From 3b064d4a8f304d36aee749b64319ddde707191b4 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 22 Aug 2019 14:57:00 -0500 Subject: Fix syntax error in recipe --- recipes-core/useradd/useradd.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/useradd/useradd.bb b/recipes-core/useradd/useradd.bb index 78fc981..7b70fec 100644 --- a/recipes-core/useradd/useradd.bb +++ b/recipes-core/useradd/useradd.bb @@ -56,7 +56,7 @@ pkg_postinst_${PN} () { # 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 + if [[ -z $D ]] ; then sudo groupmems -a mtadm -g dialout || true fi } -- cgit v1.2.3 From 5ac0b36626f05ba200fcada5a492dd62fbef2993 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 22 Aug 2019 14:57:48 -0500 Subject: Bump mlinux.conf for radio-cmd/radio-query permission issue --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 1dcd3e4..5e2125f 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.2" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.3" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From e5179767498b20b5d4f710c7f88376807a021112 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 22 Aug 2019 17:47:50 -0500 Subject: Other should not be able to write the /run/radio directory --- recipes-core/multitech/config/99_radio | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/multitech/config/99_radio b/recipes-core/multitech/config/99_radio index a37346c..c2aa885 100644 --- a/recipes-core/multitech/config/99_radio +++ b/recipes-core/multitech/config/99_radio @@ -21,4 +21,4 @@ # 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 2777 /run/radio none +d root dialout 2775 /run/radio none -- cgit v1.2.3 From 56b35723e1355a7f9841d7263fd56bbe8167dc91 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 23 Aug 2019 18:11:19 -0500 Subject: Missing $D in path for .profile --- recipes-core/useradd/useradd.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-core/useradd/useradd.bb b/recipes-core/useradd/useradd.bb index 7b70fec..d229a2f 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 = "r3" +PR = "r4" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" @@ -46,12 +46,12 @@ FILES_${PN} = "/home/mtadm/.ssh" INHIBIT_PACKAGE_DEBUG_SPLIT = "1" pkg_postinst_${PN} () { - profile=/home/mtadm/.profile + profile=$D/home/mtadm/.profile if ! grep 'sbin' ${profile} ; then Sub='${PA' Sub=${Sub}'TH}:/sbin:/usr/sbin' - echo 'PATH='${Sub} >>/home/mtadm/.profile - echo 'export PATH' >>/home/mtadm/.profile + echo 'PATH='${Sub} >>${profile} + echo 'export PATH' >>${profile} fi # If doing an update, we need to add mtadm to dialout. # If the admin has been changed, then the user must -- cgit v1.2.3 From 86de60eb7af230daa1fdb37ec0d47a8f5bf16847 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 23 Aug 2019 18:11:57 -0500 Subject: Bump mlinux version for PATH fix for mtadm --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 5e2125f..63d355a 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.3" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.4" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From bff7963529a0b430739ed3baa4ca0f3dcf255ba6 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 26 Aug 2019 18:54:29 -0500 Subject: Add lxfp to MTRV1/MTHS images --- recipes-core/images/mlinux-mtrv1-image.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb index a81ddb1..553d9cb 100644 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -63,6 +63,7 @@ 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} \ -- cgit v1.2.3 From 69e8edcb6ef730bfc7f761d21dfa57778999b795 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 26 Aug 2019 18:56:20 -0500 Subject: Allow hotspot to run mtrv1 images --- classes/mlinux-image.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/mlinux-image.bbclass b/classes/mlinux-image.bbclass index 0ad1389..e3190a1 100644 --- a/classes/mlinux-image.bbclass +++ b/classes/mlinux-image.bbclass @@ -55,6 +55,9 @@ do_firmware () { mtcdt) echo "mtcdt|mtcdtip|mtcdtiphp" >model ;; + mtrv1) + echo "mtrv1|mths" >model + ;; *) echo "${MACHINE}" > model ;; -- cgit v1.2.3 From e0ba782c5c74bc9d6b5538f586eea88aa1b85b7e Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 27 Aug 2019 10:03:38 -0500 Subject: mtrv1 without rs9113 for Stryker --- recipes-core/images/mlinux-mtrv1-image.bb | 1 - recipes-core/images/mlinux-rs9113-mtrv1-image.bb | 74 ++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 recipes-core/images/mlinux-rs9113-mtrv1-image.bb diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb index 553d9cb..cb19add 100644 --- a/recipes-core/images/mlinux-mtrv1-image.bb +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -61,7 +61,6 @@ MULTITECH_FEATURES += " \ 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" 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} \ + " -- cgit v1.2.3 From be4205208a1d6c6991e759b39c88dc56d2b60a43 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 27 Aug 2019 10:33:23 -0500 Subject: 5.1.5 for MTHS lxfp, MTRV1 with no rs9113 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 63d355a..ce65eb8 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.4" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.5" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 4aca1ffd33577c4b99eee210ff659196864fe5eb Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 27 Aug 2019 13:53:33 -0500 Subject: MTHS requires the RS9113 MTRV1 image now --- recipes-core/images/mlinux-mths-image.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/images/mlinux-mths-image.bb b/recipes-core/images/mlinux-mths-image.bb index 4be72ec..9a90eea 100644 --- a/recipes-core/images/mlinux-mths-image.bb +++ b/recipes-core/images/mlinux-mths-image.bb @@ -1,7 +1,7 @@ # Factory testing image for MTHS. # config-mths is needed for factory # reset. -require mlinux-mtrv1-image.bb +require mlinux-rs9113-mtrv1-image.bb DESCRIPTION = "MTHS images for Factory Testing" # Extra stuff to install -- cgit v1.2.3 From f70d6daf40e6d7dcef0142c09a0e7e64cbba1d59 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 16 Sep 2019 11:17:03 -0500 Subject: Add lldpd to mLinux base image --- recipes-core/images/mlinux-base-image.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-core/images/mlinux-base-image.bb b/recipes-core/images/mlinux-base-image.bb index 0eb3592..bd8dce7 100644 --- a/recipes-core/images/mlinux-base-image.bb +++ b/recipes-core/images/mlinux-base-image.bb @@ -14,6 +14,7 @@ NETWORKING_FEATURES += "bridge-utils \ openssl \ rsync \ iperf \ + lldpd \ mii-diag \ tcpdump \ netcat \ -- cgit v1.2.3 From 837d35b23ab87fb8b49c4e2306103587ecd35ee6 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 16 Sep 2019 11:18:12 -0500 Subject: Bump mLinux version to 5.1.6 --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index ce65eb8..e395f2d 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.5" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.6" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 6b7743d747639db8db7d40ebe35ffd56ba97fc73 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 16 Sep 2019 12:12:50 -0500 Subject: Turn lldpd off by default --- recipes-connectivity/lldpd/lldpd/lldpd.default | 3 + recipes-connectivity/lldpd/lldpd/lldpd.init.d | 129 +++++++++++++++++++++++++ recipes-connectivity/lldpd/lldpd_%.bbappend | 1 + 3 files changed, 133 insertions(+) create mode 100644 recipes-connectivity/lldpd/lldpd/lldpd.default create mode 100644 recipes-connectivity/lldpd/lldpd/lldpd.init.d create mode 100644 recipes-connectivity/lldpd/lldpd_%.bbappend 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}:" -- cgit v1.2.3 From 270273e6e92969dbedb39cfd3ea2b7e4e3dc4ce1 Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Mon, 16 Sep 2019 13:35:19 -0500 Subject: Update sms-utils to 1.0.6 --- recipes-extended/multitech/sms-utils_1.0.5.bb | 3 --- recipes-extended/multitech/sms-utils_1.0.6.bb | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 recipes-extended/multitech/sms-utils_1.0.5.bb create mode 100644 recipes-extended/multitech/sms-utils_1.0.6.bb diff --git a/recipes-extended/multitech/sms-utils_1.0.5.bb b/recipes-extended/multitech/sms-utils_1.0.5.bb deleted file mode 100644 index f796b24..0000000 --- a/recipes-extended/multitech/sms-utils_1.0.5.bb +++ /dev/null @@ -1,3 +0,0 @@ -require sms-utils.inc - -PR = "r0" diff --git a/recipes-extended/multitech/sms-utils_1.0.6.bb b/recipes-extended/multitech/sms-utils_1.0.6.bb new file mode 100644 index 0000000..f796b24 --- /dev/null +++ b/recipes-extended/multitech/sms-utils_1.0.6.bb @@ -0,0 +1,3 @@ +require sms-utils.inc + +PR = "r0" -- cgit v1.2.3 From b986f8417cfcffd911ca20c3395c6233e3b9f089 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Thu, 19 Sep 2019 08:11:24 -0500 Subject: lora: update lora-logging for PKF rotating --- recipes-connectivity/lora/lora-logging/lora-logging.logrotate.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.3 From 6e5cd3556737d3c8d36d33a79a543fb3c39d1318 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 3 Oct 2019 18:15:42 -0500 Subject: Temperature monitor regression fix and MTCAP POE --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index e395f2d..6f93ba5 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.6" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.7" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From 78c5f93554b298c2956c34c1d011f4b1cce9a68a Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 3 Oct 2019 18:19:27 -0500 Subject: Bump lora-logging package revision --- recipes-connectivity/lora/lora-logging.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 \ -- cgit v1.2.3 From c27e246545204548e2a5c6eb00ff66be3d81110f Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 17 Oct 2019 13:03:35 -0500 Subject: Fix timeout value for LAT1 --- recipes-core/multitech/config/chat_wrapper | 14 +++++++++----- recipes-core/multitech/config_2.3.bb | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/recipes-core/multitech/config/chat_wrapper b/recipes-core/multitech/config/chat_wrapper index b15a949..3c05622 100755 --- a/recipes-core/multitech/config/chat_wrapper +++ b/recipes-core/multitech/config/chat_wrapper @@ -66,10 +66,10 @@ ${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} -t10 'AT+CGDCONT?' 2>&1 | tr -d '\r') +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} -t10 'AT+CGDCONT?' 2>&1 | tr -d '\r') + 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 @@ -137,9 +137,13 @@ if [[ $MPDP != $PDP ]] || [[ $MAPN != $APN ]] || \ ${LOG} "$MCONTEXT" ${LOG} "Dropping registration with carrier to set context" # Need to deregister - /usr/bin/radio-cmd ${RADIOOPTION} -t10 'AT+COPS=2' - /usr/bin/radio-cmd ${RADIOOPTION} -t10 "AT+CGDCONT=${CONTEXTNUM},\"${PDP}\",\"${APN}\",\"${ADDR}\",$DCOMP,${HCOMP}${FULLBOAT}" - /usr/bin/radio-cmd ${RADIOOPTION} -t10 'AT+COPS=0' + /usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+COPS=2' + CMDSTR="AT+CGDCONT=${CONTEXTNUM},${PDP},${APN},${ADDR},$DCOMP,${HCOMP}${FULLBOAT}" + ${LOG} "Issued command /usr/bin/radio-cmd ${RADIOOPTION} -t10000 ..." + ${LOG} "... ${CMDSTR}" + LOGMSG=$(/usr/bin/radio-cmd ${RADIOOPTION} -t10000 "${CMDSTR}" 2>&1) + ${LOG} "Got response ${LOGMSG}" + /usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+COPS=0' ${LOG} "New context is set. Wait up to $REGWAITTIME seconds to register" # Wait for registration uptime=$(cat /proc/uptime) diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb index 0cbae96..9a4dabf 100644 --- a/recipes-core/multitech/config_2.3.bb +++ b/recipes-core/multitech/config_2.3.bb @@ -4,7 +4,7 @@ LICENSE = "MIT" RDEPENDS_${PN} += "bash" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" PACKAGE_ARCH = "all" -PR = "r4" +PR = "r5" PACKAGES =+ "${PN}-mths" inherit update-rc.d -- cgit v1.2.3 From 0237133f16f4efe07e558f6061447805328d3c2c Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 17 Oct 2019 15:29:40 -0500 Subject: Need to set CFUN to 0 then CFUN to 1 to get modem to register after COPS startup --- recipes-core/multitech/config/chat_wrapper | 4 ++++ recipes-core/multitech/config_2.3.bb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes-core/multitech/config/chat_wrapper b/recipes-core/multitech/config/chat_wrapper index 3c05622..bb25d38 100755 --- a/recipes-core/multitech/config/chat_wrapper +++ b/recipes-core/multitech/config/chat_wrapper @@ -144,6 +144,10 @@ if [[ $MPDP != $PDP ]] || [[ $MAPN != $APN ]] || \ LOGMSG=$(/usr/bin/radio-cmd ${RADIOOPTION} -t10000 "${CMDSTR}" 2>&1) ${LOG} "Got response ${LOGMSG}" /usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+COPS=0' + sleep 1 + /usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+CFUN=0' + /usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+CFUN=1' + sleep 1 ${LOG} "New context is set. Wait up to $REGWAITTIME seconds to register" # Wait for registration uptime=$(cat /proc/uptime) diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb index 9a4dabf..84721a7 100644 --- a/recipes-core/multitech/config_2.3.bb +++ b/recipes-core/multitech/config_2.3.bb @@ -4,7 +4,7 @@ LICENSE = "MIT" RDEPENDS_${PN} += "bash" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" PACKAGE_ARCH = "all" -PR = "r5" +PR = "r6" PACKAGES =+ "${PN}-mths" inherit update-rc.d -- cgit v1.2.3 From 8e7bf688d8b90e2f8ac61404b02499246c61c7f3 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 18 Oct 2019 16:53:50 -0500 Subject: Do not use "" for empty network addresses in AT+CGDCONT specifications --- recipes-core/multitech/config/chat_wrapper | 40 ++++++++++++++++++++++++++---- recipes-core/multitech/config_2.3.bb | 2 +- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/recipes-core/multitech/config/chat_wrapper b/recipes-core/multitech/config/chat_wrapper index bb25d38..f1fd30c 100755 --- a/recipes-core/multitech/config/chat_wrapper +++ b/recipes-core/multitech/config/chat_wrapper @@ -111,7 +111,7 @@ 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} "Modem context $PDP,$APN,$ADDR,$DCOMP,$HCOMP 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 @@ -138,15 +138,45 @@ if [[ $MPDP != $PDP ]] || [[ $MAPN != $APN ]] || \ ${LOG} "Dropping registration with carrier to set context" # Need to deregister /usr/bin/radio-cmd ${RADIOOPTION} -t10000 'AT+COPS=2' - CMDSTR="AT+CGDCONT=${CONTEXTNUM},${PDP},${APN},${ADDR},$DCOMP,${HCOMP}${FULLBOAT}" + # 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}" - LOGMSG=$(/usr/bin/radio-cmd ${RADIOOPTION} -t10000 "${CMDSTR}" 2>&1) - ${LOG} "Got response ${LOGMSG}" + + # 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 @@ -166,7 +196,7 @@ if [[ $MPDP != $PDP ]] || [[ $MAPN != $APN ]] || \ uptime=$(cat /proc/uptime) [[ $uptime =~ ^([^\.]*) ]] t1=${BASH_REMATCH[1]} - ${LOG} "Re-registered in $((t1-t0)) seconds -- wait 5 more seconds" + ${LOG} "Re-registered in $((t1-t0)) seconds -- wait ${FINALWAIT} more seconds" sleep $FINALWAIT else ${LOG} "Context $CONTEXTNUM matches and nothing to do." diff --git a/recipes-core/multitech/config_2.3.bb b/recipes-core/multitech/config_2.3.bb index 84721a7..3e9733a 100644 --- a/recipes-core/multitech/config_2.3.bb +++ b/recipes-core/multitech/config_2.3.bb @@ -4,7 +4,7 @@ LICENSE = "MIT" RDEPENDS_${PN} += "bash" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" PACKAGE_ARCH = "all" -PR = "r6" +PR = "r7" PACKAGES =+ "${PN}-mths" inherit update-rc.d -- cgit v1.2.3 From 0a3f99fc26efa34e65d0105ae18888bd750e5ab6 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 18 Oct 2019 17:39:02 -0500 Subject: LAT1 and H5 chat_wrapper changes --- conf/distro/mlinux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index 6f93ba5..dce4a35 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.7" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.8" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3 From d828723d1a3e8ca5ef74c05f6acdf8257b25404c Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 13 Nov 2019 09:40:06 -0600 Subject: add openldap and python3-pip to the build --- scripts/build-feed-extras.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build-feed-extras.sh b/scripts/build-feed-extras.sh index 8a50f59..ce0826c 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" +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" -DEV_PACKAGES="strace mono gdb git vim python-pip python-pyopenssl python-pygobject openjdk-8 node-red strace python-gatt-server" +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 -- cgit v1.2.3 From 7454b299f9c5d13f7c1415b3fbffcda5a4bf4726 Mon Sep 17 00:00:00 2001 From: David Marcaccini Date: Wed, 4 Dec 2019 12:08:27 -0600 Subject: add openssh8.1p1 to meta-mlinux --- ...ial-signed-overflow-in-pointer-arithmatic.patch | 99 +++++++++++++ recipes-connectivity/openssh/openssh/init | 153 ++++++++++++++++++++ ...penssh-8.1p1-add-test-support-for-busybox.patch | 48 +++++++ ...h-8.1p1-conditional-compile-des-in-cipher.patch | 13 ++ ...h-8.1p1-conditional-compile-des-in-pkcs11.patch | 52 +++++++ recipes-connectivity/openssh/openssh/run-ptest | 44 ++++++ recipes-connectivity/openssh/openssh/ssh_config | 48 +++++++ recipes-connectivity/openssh/openssh/sshd | 11 ++ recipes-connectivity/openssh/openssh/sshd.socket | 10 ++ recipes-connectivity/openssh/openssh/sshd@.service | 13 ++ recipes-connectivity/openssh/openssh/sshd_config | 132 +++++++++++++++++ .../openssh/openssh/sshdgenkeys.service | 22 +++ .../openssh/openssh/volatiles.99_sshd | 2 + recipes-connectivity/openssh/openssh_8.1p1.bb | 160 +++++++++++++++++++++ 14 files changed, 807 insertions(+) create mode 100644 recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch create mode 100644 recipes-connectivity/openssh/openssh/init create mode 100644 recipes-connectivity/openssh/openssh/openssh-8.1p1-add-test-support-for-busybox.patch create mode 100644 recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-cipher.patch create mode 100644 recipes-connectivity/openssh/openssh/openssh-8.1p1-conditional-compile-des-in-pkcs11.patch create mode 100755 recipes-connectivity/openssh/openssh/run-ptest create mode 100644 recipes-connectivity/openssh/openssh/ssh_config create mode 100644 recipes-connectivity/openssh/openssh/sshd create mode 100644 recipes-connectivity/openssh/openssh/sshd.socket create mode 100644 recipes-connectivity/openssh/openssh/sshd@.service create mode 100644 recipes-connectivity/openssh/openssh/sshd_config create mode 100644 recipes-connectivity/openssh/openssh/sshdgenkeys.service create mode 100644 recipes-connectivity/openssh/openssh/volatiles.99_sshd create mode 100644 recipes-connectivity/openssh/openssh_8.1p1.bb 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 +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 +--- + 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 + #include ++#include + + /* + * 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 + #include ++#include + + /* + * 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 + + #include ++#include + + 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 () { +} -- cgit v1.2.3 From 1ccad4b98b412197ef72a2bb978cf26327b54fd6 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 4 Dec 2019 13:35:28 -0600 Subject: Create mlinux-basetest-image which has no login for console --- recipes-core/images/mlinux-basetest-image.bb | 72 ++++++++++++++++++++++ recipes-core/images/mlinux-minimal-image.bb | 3 + recipes-core/sysvinit/files/start_getty_open | 6 ++ .../sysvinit/sysvinit-inittab_2.88dsf.bbappend | 23 +++++++ 4 files changed, 104 insertions(+) create mode 100644 recipes-core/images/mlinux-basetest-image.bb create mode 100644 recipes-core/sysvinit/files/start_getty_open diff --git a/recipes-core/images/mlinux-basetest-image.bb b/recipes-core/images/mlinux-basetest-image.bb new file mode 100644 index 0000000..6e000c1 --- /dev/null +++ b/recipes-core/images/mlinux-basetest-image.bb @@ -0,0 +1,72 @@ +# Conduit 0.0 or 0.1 without RS9113 +DESCRIPTION = "mLinux base image" +LICENSE = "MIT" + +require mlinux-minimal-image.bb + +# Open console for test image +CONSOLE = "sysvinit-inittab-start-open" + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES += "bridge-utils \ + inetutils-ftp \ + openssl \ + rsync \ + iperf \ + lldpd \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +WIFI_FEATURES = " \ + libnl \ + wpa-supplicant \ + wireless-tools \ + iw \ + hostap-daemon hostap-utils \ + " + +BLUETOOTH_FEATURES = "bluez5" + +# 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" + +# Extra stuff to install +IMAGE_INSTALL += " \ + kernel-modules \ + ${WIFI_FEATURES} \ + ${BLUETOOTH_FEATURES} \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + " diff --git a/recipes-core/images/mlinux-minimal-image.bb b/recipes-core/images/mlinux-minimal-image.bb index 8090f57..0e1d4a3 100644 --- a/recipes-core/images/mlinux-minimal-image.bb +++ b/recipes-core/images/mlinux-minimal-image.bb @@ -57,10 +57,13 @@ MULTITECH_MTAC = "kernel-module-mtac \ UPGRADE_FEATURES = "upgrade-reboot mtd-utils-static" +CONSOLE = "sysvinit-inittab-start" + IMAGE_INSTALL = "${CORE_FEATURES} \ ${NETWORKING_FEATURES} \ ${UPGRADE_FEATURES} \ ${MULTITECH_FEATURES} \ ${MULTITECH_MTAC} \ + ${CONSOLE} \ " 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 +} -- cgit v1.2.3 From f6569e52373440b6416b5fcb0f8d300e8b655030 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 4 Dec 2019 13:39:42 -0600 Subject: Clean up base test image recipe --- recipes-core/images/mlinux-basetest-image.bb | 67 +--------------------------- 1 file changed, 2 insertions(+), 65 deletions(-) diff --git a/recipes-core/images/mlinux-basetest-image.bb b/recipes-core/images/mlinux-basetest-image.bb index 6e000c1..807b16e 100644 --- a/recipes-core/images/mlinux-basetest-image.bb +++ b/recipes-core/images/mlinux-basetest-image.bb @@ -1,72 +1,9 @@ # Conduit 0.0 or 0.1 without RS9113 -DESCRIPTION = "mLinux base image" +DESCRIPTION = "mLinux base test image" LICENSE = "MIT" -require mlinux-minimal-image.bb +require mlinux-base-image.bb # Open console for test image CONSOLE = "sysvinit-inittab-start-open" -FILESYSTEM_FEATURES = "dosfstools \ - cifs-utils \ - lsof \ - " - -NETWORKING_FEATURES += "bridge-utils \ - inetutils-ftp \ - openssl \ - rsync \ - iperf \ - lldpd \ - mii-diag \ - tcpdump \ - netcat \ - wget \ - strongswan \ - busybox-ifplugd \ - " - -WIFI_FEATURES = " \ - libnl \ - wpa-supplicant \ - wireless-tools \ - iw \ - hostap-daemon hostap-utils \ - " - -BLUETOOTH_FEATURES = "bluez5" - -# 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" - -# Extra stuff to install -IMAGE_INSTALL += " \ - kernel-modules \ - ${WIFI_FEATURES} \ - ${BLUETOOTH_FEATURES} \ - ${FILESYSTEM_FEATURES} \ - ${TIME_FEATURES} \ - ${MISC_FEATURES} \ - " -- cgit v1.2.3 From b71f5e51f91d3262a91ebd8a9f8433e3a43b1969 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 6 Dec 2019 18:50:47 -0600 Subject: Commissioning recipe with php --- recipes-core/multitech/commissioning_1.0.0.bb | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 recipes-core/multitech/commissioning_1.0.0.bb 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}/ +} -- cgit v1.2.3 From 2ca44c76f6d3b3f120c8e8c7cd0387c66d9a7157 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 11 Dec 2019 12:22:55 -0600 Subject: mLinux 5.2 with Commissioning --- conf/distro/mlinux.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/distro/mlinux.conf b/conf/distro/mlinux.conf index dce4a35..b3155f0 100644 --- a/conf/distro/mlinux.conf +++ b/conf/distro/mlinux.conf @@ -1,7 +1,7 @@ DISTRO = "mlinux" DISTRO_NAME = "mLinux" -DISTRO_BASE_VERSION = "5.1" -DISTRO_VERSION = "${DISTRO_BASE_VERSION}.8" +DISTRO_BASE_VERSION = "5.2" +DISTRO_VERSION = "${DISTRO_BASE_VERSION}.0" DISTRO_CODENAME = "" SDK_VENDOR = "-mlinux" SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" -- cgit v1.2.3