diff options
20 files changed, 770 insertions, 260 deletions
diff --git a/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch b/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch new file mode 100644 index 0000000..af5b44b --- /dev/null +++ b/recipes-connectivity/hostapd/hostap-daemon-2.4/init.patch @@ -0,0 +1,35 @@ +diff -uprN old/init new/init +--- old/init 2016-11-30 10:37:35.512524572 -0600 ++++ new/init 2016-11-30 10:35:11.176524877 -0600 +@@ -3,6 +3,21 @@ DAEMON=/usr/sbin/hostapd + NAME=hostapd + DESC="HOSTAP Daemon" + ARGS="/etc/hostapd.conf -B" ++PLTFM="/sys/devices/platform/mts-io" ++PRDIDFILE="${PLTFM}/product-id" ++if ! [[ -f "${PRDIDFILE}" ]] ; then ++ echo "No ${PRDIDFILE}." ++ exit 1 ++fi ++PRDID=$(cat "${PLTFM}/product-id") ++CONDUIT="^MTCDT" ++((WIFIBT=1)) ++if [[ $PRDID =~ $CONDUIT ]] ; then ++ if ! [[ -f ${PLTFM}/wifi-bt-reset ]] ; then ++ ((WIFIBT=0)) ++ fi ++fi ++ + + test -f $DAEMON || exit 0 + +@@ -10,6 +25,9 @@ set -e + + case "$1" in + start) ++ if ((WIFIBT == 0)) ; then ++ exit 0 ++ fi + echo -n "Starting $DESC: " + start-stop-daemon -S -x $DAEMON -- $ARGS + echo "$NAME." diff --git a/recipes-connectivity/hostapd/hostap-daemon_2.4.bb b/recipes-connectivity/hostapd/hostap-daemon_2.4.bb index e64704a..863f895 100644 --- a/recipes-connectivity/hostapd/hostap-daemon_2.4.bb +++ b/recipes-connectivity/hostapd/hostap-daemon_2.4.bb @@ -17,6 +17,7 @@ SRC_URI += " \ http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \ file://defconfig \ file://init \ + file://init.patch;patchdir=${WORKDIR} \ " S = "${WORKDIR}/hostapd-${PV}/hostapd" diff --git a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.conf b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.conf index 448b3db..5884078 100644 --- a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.conf +++ b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.conf @@ -6,7 +6,7 @@ "rx2Datarate": 12, /* Datarate for mote rx window 2 sent in join response (7-12) */ "maxTxPower": 26, /* Max Tx power (dBm), -6 to 26 */ "frequencyEU": 867500000, /* center freq for extra EU channels (Hz) */ - "antennaGain": 0 + "antennaGain": 1.4 }, "udp": { "appPortUp": 1784, /* port for user-developed application use */ diff --git a/recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.16.bb index 56fda88..cd129c3 100644 --- a/recipes-connectivity/lora/lora-network-server-mtcap_1.0.15.bb +++ b/recipes-connectivity/lora/lora-network-server-mtcap_1.0.16.bb @@ -9,7 +9,7 @@ DEPENDS = "jsoncpp libmts mosquitto sqlite3" RDEPENDS_${PN} += "lora-packet-forwarder logrotate" PR = "r2" -SRC_URI = "http://multitech.net/downloads/lora-network-server_arm926ejste_1.0.15-2-g642a748.tar.gz \ +SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \ file://lora-network-server.conf \ file://lora-network-server.init \ file://lora-network-server.default \ @@ -17,8 +17,8 @@ SRC_URI = "http://multitech.net/downloads/lora-network-server_arm926ejste_1.0.15 file://local_conf.json \ " -SRC_URI[md5sum] = "28db13a45497d678e071a6062a1cc486" -SRC_URI[sha256sum] = "7558391a635f5c47723d6bd56831d3aa9420169572914b0c8fa6f01aa1730677" +SRC_URI[md5sum] = "3169970ea9b96656847d7472a2cf1f0f" +SRC_URI[sha256sum] = "81b3c348911464fccbb70e3ff0c60dbcf77af69c2205aec3591fc2ceff7a5c52" # binaries are already stripped, so suppress warning INSANE_SKIP_${PN} = "already-stripped" @@ -34,7 +34,7 @@ do_install() { install -d ${D}${LORA_DIR} install -m 0755 lora-network-server ${D}${LORA_DIR}/ install -m 0644 ${WORKDIR}/lora-network-server.conf ${D}${LORA_DIR}/ - install -m 0755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/ + install -m 0755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/ install -d ${D}${sysconfdir}/default install -m 0644 ${WORKDIR}/lora-network-server.default ${D}${sysconfdir}/default/lora-network-server 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 0e73148..726aec5 100755 --- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init +++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init @@ -52,7 +52,7 @@ card_found() { if [[ "$lora_id" =~ "$lora_mtac_id" ]]; then GLOBAL_CONF=/opt/lora/global_conf.json.MTAC_LORA_1_0 - if [ "$lora_hw" = "$lora_hw" ] && [[ ! "$lora_id" =~ .*-SPI ]]; then + 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 diff --git a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTCAP-LORA-1-5.EU868.basic b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTCAP-LORA-1-5.EU868.basic index 49c0edd..8f8d93d 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTCAP-LORA-1-5.EU868.basic +++ b/recipes-connectivity/lora/lora-packet-forwarder/global_conf.json.3.0.0.MTCAP-LORA-1-5.EU868.basic @@ -1,225 +1,225 @@ -{
- "SX1301_conf": {
- "lorawan_public": true,
- "clksrc": 0, /* radio_0 provides clock to concentrator */
- "lbt_cfg": {
- "enable": false,
- "rssi_target": 160, /* rssi in dBm = -lbt_rssi_target/2 */
- "nb_channel": 1,
- "start_freq": 869525000,
- "scan_time_us": 5000,
- "tx_delay_1ch_us": 4000000,
- "tx_delay_2ch_us": 4000000
- },
- "antenna_gain": 0, /* antenna gain, in dBi */
- "radio_0": {
- "enable": true,
- "type": "SX1257",
- "freq": 867500000,
- "rssi_offset": -165.0,
- "tx_enable": true,
- "tx_freq_min": 863000000,
- "tx_freq_max": 870000000
- },
- "radio_1": {
- "enable": true,
- "type": "SX1257",
- "freq": 868500000,
- "rssi_offset": -165.0,
- "tx_enable": false
- },
- "chan_multiSF_0": {
- /* Lora MAC channel, 125kHz, all SF, 868.1 MHz */
- "enable": true,
- "radio": 1,
- "if": -400000
- },
- "chan_multiSF_1": {
- /* Lora MAC channel, 125kHz, all SF, 868.3 MHz */
- "enable": true,
- "radio": 1,
- "if": -200000
- },
- "chan_multiSF_2": {
- /* Lora MAC channel, 125kHz, all SF, 868.5 MHz */
- "enable": true,
- "radio": 1,
- "if": 0
- },
- "chan_multiSF_3": {
- /* Lora MAC channel, 125kHz, all SF, 867.1 MHz */
- "enable": true,
- "radio": 0,
- "if": -400000
- },
- "chan_multiSF_4": {
- /* Lora MAC channel, 125kHz, all SF, 867.3 MHz */
- "enable": true,
- "radio": 0,
- "if": -200000
- },
- "chan_multiSF_5": {
- /* Lora MAC channel, 125kHz, all SF, 867.5 MHz */
- "enable": true,
- "radio": 0,
- "if": 0
- },
- "chan_multiSF_6": {
- /* Lora MAC channel, 125kHz, all SF, 867.7 MHz */
- "enable": true,
- "radio": 0,
- "if": 200000
- },
- "chan_multiSF_7": {
- /* Lora MAC channel, 125kHz, all SF, 867.9 MHz */
- "enable": true,
- "radio": 0,
- "if": 400000
- },
- "chan_Lora_std": {
- /* Lora MAC channel, 250kHz, SF7, 868.3 MHz */
- "enable": true,
- "radio": 1,
- "if": -200000,
- "bandwidth": 250000,
- "spread_factor": 7
- },
- "chan_FSK": {
- /* FSK 50kbps channel, 868.8 MHz */
- "enable": true,
- "radio": 1,
- "if": 300000,
- "bandwidth": 125000,
- "datarate": 50000
- },
- "tx_lut_0": {
- /* TX gain table, index 0 */
- "pa_gain": 0,
- "mix_gain": 9,
- "rf_power": -6,
- "dig_gain": 1
- },
- "tx_lut_1": {
- /* TX gain table, index 1 */
- "pa_gain": 0,
- "mix_gain": 12,
- "rf_power": -3,
- "dig_gain": 1
- },
- "tx_lut_2": {
- /* TX gain table, index 2 */
- "pa_gain": 1,
- "mix_gain": 8,
- "rf_power": 0,
- "dig_gain": 2
- },
- "tx_lut_3": {
- /* TX gain table, index 3 */
- "pa_gain": 1,
- "mix_gain": 11,
- "rf_power": 3,
- "dig_gain": 3
- },
- "tx_lut_4": {
- /* TX gain table, index 4 */
- "pa_gain": 1,
- "mix_gain": 10,
- "rf_power": 6,
- "dig_gain": 0
- },
- "tx_lut_5": {
- /* TX gain table, index 5 */
- "pa_gain": 2,
- "mix_gain": 11,
- "rf_power": 10,
- "dig_gain": 3
- },
- "tx_lut_6": {
- /* TX gain table, index 6 */
- "pa_gain": 2,
- "mix_gain": 9,
- "rf_power": 11,
- "dig_gain": 1
- },
- "tx_lut_7": {
- /* TX gain table, index 7 */
- "pa_gain": 2,
- "mix_gain": 9,
- "rf_power": 12,
- "dig_gain": 0
- },
- "tx_lut_8": {
- /* TX gain table, index 8 */
- "pa_gain": 2,
- "mix_gain": 11,
- "rf_power": 13,
- "dig_gain": 2
- },
- "tx_lut_9": {
- /* TX gain table, index 9 */
- "pa_gain": 2,
- "mix_gain": 11,
- "rf_power": 14,
- "dig_gain": 1
- },
- "tx_lut_10": {
- /* TX gain table, index 10 */
- "pa_gain": 2,
- "mix_gain": 12,
- "rf_power": 16,
- "dig_gain": 0
- },
- "tx_lut_11": {
- /* TX gain table, index 11 */
- "pa_gain": 3,
- "mix_gain": 10,
- "rf_power": 20,
- "dig_gain": 3
- },
- "tx_lut_12": {
- /* TX gain table, index 12 */
- "pa_gain": 3,
- "mix_gain": 9,
- "rf_power": 23,
- "dig_gain": 0
- },
- "tx_lut_13": {
- /* TX gain table, index 13 */
- "pa_gain": 3,
- "mix_gain": 12,
- "rf_power": 25,
- "dig_gain": 2
- },
- "tx_lut_14": {
- /* TX gain table, index 14 */
- "pa_gain": 3,
- "mix_gain": 13,
- "rf_power": 26,
- "dig_gain": 0
- },
- "tx_lut_15": {
- /* TX gain table, index 15 */
- "pa_gain": 3,
- "mix_gain": 15,
- "rf_power": 27,
- "dig_gain": 0
- }
- },
-
- "gateway_conf": {
- "gateway_ID": "AA555A0000000000",
- /* change with default server address/ports, or overwrite in local_conf.json */
- "server_address": "localhost",
- "serv_port_up": 1680,
- "serv_port_down": 1680,
- /* adjust the following parameters for your network */
- "keepalive_interval": 10,
- "stat_interval": 30,
- "push_timeout_ms": 100,
- /* forward only valid packets */
- "forward_crc_valid": true,
- "forward_crc_error": false,
- "forward_crc_disabled": false
- }
-}
-
+{ + "SX1301_conf": { + "lorawan_public": true, + "clksrc": 0, /* radio_0 provides clock to concentrator */ + "lbt_cfg": { + "enable": false, + "rssi_target": 160, /* rssi in dBm = -lbt_rssi_target/2 */ + "nb_channel": 1, + "start_freq": 869525000, + "scan_time_us": 5000, + "tx_delay_1ch_us": 4000000, + "tx_delay_2ch_us": 4000000 + }, + "antenna_gain": 1.4, /* antenna gain, in dBi */ + "radio_0": { + "enable": true, + "type": "SX1257", + "freq": 867500000, + "rssi_offset": -165.0, + "tx_enable": true, + "tx_freq_min": 863000000, + "tx_freq_max": 870000000 + }, + "radio_1": { + "enable": true, + "type": "SX1257", + "freq": 868500000, + "rssi_offset": -165.0, + "tx_enable": false + }, + "chan_multiSF_0": { + /* Lora MAC channel, 125kHz, all SF, 868.1 MHz */ + "enable": true, + "radio": 1, + "if": -400000 + }, + "chan_multiSF_1": { + /* Lora MAC channel, 125kHz, all SF, 868.3 MHz */ + "enable": true, + "radio": 1, + "if": -200000 + }, + "chan_multiSF_2": { + /* Lora MAC channel, 125kHz, all SF, 868.5 MHz */ + "enable": true, + "radio": 1, + "if": 0 + }, + "chan_multiSF_3": { + /* Lora MAC channel, 125kHz, all SF, 867.1 MHz */ + "enable": true, + "radio": 0, + "if": -400000 + }, + "chan_multiSF_4": { + /* Lora MAC channel, 125kHz, all SF, 867.3 MHz */ + "enable": true, + "radio": 0, + "if": -200000 + }, + "chan_multiSF_5": { + /* Lora MAC channel, 125kHz, all SF, 867.5 MHz */ + "enable": true, + "radio": 0, + "if": 0 + }, + "chan_multiSF_6": { + /* Lora MAC channel, 125kHz, all SF, 867.7 MHz */ + "enable": true, + "radio": 0, + "if": 200000 + }, + "chan_multiSF_7": { + /* Lora MAC channel, 125kHz, all SF, 867.9 MHz */ + "enable": true, + "radio": 0, + "if": 400000 + }, + "chan_Lora_std": { + /* Lora MAC channel, 250kHz, SF7, 868.3 MHz */ + "enable": true, + "radio": 1, + "if": -200000, + "bandwidth": 250000, + "spread_factor": 7 + }, + "chan_FSK": { + /* FSK 50kbps channel, 868.8 MHz */ + "enable": true, + "radio": 1, + "if": 300000, + "bandwidth": 125000, + "datarate": 50000 + }, + "tx_lut_0": { + /* TX gain table, index 0 */ + "pa_gain": 0, + "mix_gain": 9, + "rf_power": -6, + "dig_gain": 1 + }, + "tx_lut_1": { + /* TX gain table, index 1 */ + "pa_gain": 0, + "mix_gain": 12, + "rf_power": -3, + "dig_gain": 1 + }, + "tx_lut_2": { + /* TX gain table, index 2 */ + "pa_gain": 1, + "mix_gain": 8, + "rf_power": 0, + "dig_gain": 2 + }, + "tx_lut_3": { + /* TX gain table, index 3 */ + "pa_gain": 1, + "mix_gain": 11, + "rf_power": 3, + "dig_gain": 3 + }, + "tx_lut_4": { + /* TX gain table, index 4 */ + "pa_gain": 1, + "mix_gain": 10, + "rf_power": 6, + "dig_gain": 0 + }, + "tx_lut_5": { + /* TX gain table, index 5 */ + "pa_gain": 2, + "mix_gain": 11, + "rf_power": 10, + "dig_gain": 3 + }, + "tx_lut_6": { + /* TX gain table, index 6 */ + "pa_gain": 2, + "mix_gain": 9, + "rf_power": 11, + "dig_gain": 1 + }, + "tx_lut_7": { + /* TX gain table, index 7 */ + "pa_gain": 2, + "mix_gain": 9, + "rf_power": 12, + "dig_gain": 0 + }, + "tx_lut_8": { + /* TX gain table, index 8 */ + "pa_gain": 2, + "mix_gain": 11, + "rf_power": 13, + "dig_gain": 2 + }, + "tx_lut_9": { + /* TX gain table, index 9 */ + "pa_gain": 2, + "mix_gain": 11, + "rf_power": 14, + "dig_gain": 1 + }, + "tx_lut_10": { + /* TX gain table, index 10 */ + "pa_gain": 2, + "mix_gain": 12, + "rf_power": 16, + "dig_gain": 0 + }, + "tx_lut_11": { + /* TX gain table, index 11 */ + "pa_gain": 3, + "mix_gain": 10, + "rf_power": 20, + "dig_gain": 3 + }, + "tx_lut_12": { + /* TX gain table, index 12 */ + "pa_gain": 3, + "mix_gain": 9, + "rf_power": 23, + "dig_gain": 0 + }, + "tx_lut_13": { + /* TX gain table, index 13 */ + "pa_gain": 3, + "mix_gain": 12, + "rf_power": 25, + "dig_gain": 2 + }, + "tx_lut_14": { + /* TX gain table, index 14 */ + "pa_gain": 3, + "mix_gain": 13, + "rf_power": 26, + "dig_gain": 0 + }, + "tx_lut_15": { + /* TX gain table, index 15 */ + "pa_gain": 3, + "mix_gain": 15, + "rf_power": 27, + "dig_gain": 0 + } + }, + + "gateway_conf": { + "gateway_ID": "AA555A0000000000", + /* change with default server address/ports, or overwrite in local_conf.json */ + "server_address": "localhost", + "serv_port_up": 1680, + "serv_port_down": 1680, + /* adjust the following parameters for your network */ + "keepalive_interval": 10, + "stat_interval": 30, + "push_timeout_ms": 100, + /* forward only valid packets */ + "forward_crc_valid": true, + "forward_crc_error": false, + "forward_crc_disabled": false + } +} + diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init index 8c0894a..9ffaf6d 100755 --- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init +++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init @@ -11,6 +11,7 @@ run_dir=/var/run/lora pkt_fwd=/opt/lora/lora_pkt_fwd pkt_fwd_pidfile=$run_dir/lora-pkt-fwd-1.pid log_file=/var/log/lora-pkt-fwd.log +cfg_file=/opt/lora/global_conf.json do_start() { echo "Starting $NAME: " @@ -18,8 +19,8 @@ do_start() { eui=$(mts-io-sysfs show lora/eui) # Remove colons clean_eui="${eui//:/}" - echo "Setting gateway_id in global_conf.json to $clean_eui" - sed -i "s/\"gateway_ID\": \".*\"/\"gateway_ID\": \"$clean_eui\"/" global_conf.json + echo "Setting gateway_id in $cfg_file to $clean_eui" + sed -i "s/\"gateway_ID\": \".*\"/\"gateway_ID\": \"$clean_eui\"/" $cfg_file mkdir -p $run_dir diff --git a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb index 834ff6c..cafa265 100644 --- a/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb +++ b/recipes-connectivity/lora/lora-packet-forwarder_3.0.0.bb @@ -32,34 +32,34 @@ export LGW_INC = "${STAGING_INCDIR}/lora" CFLAGS += "-I${LGW_INC} -Iinc -I." do_compile() { - oe_runmake + oe_runmake } do_install() { - install -d ${D}${LORA_DIR} - install -m 755 lora_pkt_fwd/lora_pkt_fwd ${D}${LORA_DIR}/ - install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/ + install -d ${D}${LORA_DIR} + install -m 755 lora_pkt_fwd/lora_pkt_fwd ${D}${LORA_DIR}/ + install -m 755 ${WORKDIR}/local_conf.json ${D}${LORA_DIR}/ - install -d ${D}${LORA_DIR}/forwarder-utils - install -m 755 util_sink/util_sink ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 util_ack/util_ack ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 util_tx_test/util_tx_test ${D}${LORA_DIR}/forwarder-utils/ - install -m 755 ${WORKDIR}/README.md ${D}${LORA_DIR}/ + install -d ${D}${LORA_DIR}/forwarder-utils + install -m 755 util_sink/util_sink ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 util_ack/util_ack ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 util_tx_test/util_tx_test ${D}${LORA_DIR}/forwarder-utils/ + install -m 755 ${WORKDIR}/README.md ${D}${LORA_DIR}/ } 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 - 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 - 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_5.EU868.basic.clksrc0 ${D}${LORA_DIR}/global_conf.json + 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 + 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 } do_install_append_mtcap() { - install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTCAP-LORA-1-5.EU868.basic ${D}${LORA_DIR}/global_conf.json + install -m 755 ${WORKDIR}/global_conf.json.3.0.0.MTCAP-LORA-1-5.EU868.basic ${D}${LORA_DIR}/global_conf.json - install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/lora-packet-forwarder.init ${D}${sysconfdir}/init.d/lora-packet-forwarder + install -d ${D}${sysconfdir}/default + install -m 0644 ${WORKDIR}/lora-packet-forwarder.default ${D}${sysconfdir}/default/lora-packet-forwarder + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/lora-packet-forwarder.init ${D}${sysconfdir}/init.d/lora-packet-forwarder } FILES_${PN} += "${LORA_DIR}" @@ -67,5 +67,5 @@ FILES_${PN}-dbg += "${LORA_DIR}/.debug ${LORA_DIR}/forwarder-utils/.debug" # disable this on purpose for dev purposes do_rm_work() { - echo "skipping" + echo "skipping" } diff --git a/recipes-core/annex-client/annex-client-from-src.bb b/recipes-core/annex-client/annex-client-from-src.bb index ee7dee9..3534f23 100644 --- a/recipes-core/annex-client/annex-client-from-src.bb +++ b/recipes-core/annex-client/annex-client-from-src.bb @@ -5,8 +5,9 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda PROVIDES = "annex-client-from-src" DEPENDS = "jsoncpp curl protobuf cyrus-sasl protobuf-native annex-proto mts-io" -PR = "r0" -SRCREV = "a696a7660bf153fec126cf971442c60961c51782" +# IMPORTANT: if you change PR, you'll also want to change the url in annex-client.bb +PR = "r1" +SRCREV = "b954c83e155f95ecd68c14a890f9455331e19878" SRC_URI = "git://git@${MTS_INTERNAL_GIT}/multitech/annex-client.git;protocol=ssh;branch=master" diff --git a/recipes-core/annex-client/annex-client.bb b/recipes-core/annex-client/annex-client.bb index 1a0544a..83dd602 100644 --- a/recipes-core/annex-client/annex-client.bb +++ b/recipes-core/annex-client/annex-client.bb @@ -6,13 +6,20 @@ PROVIDES = "annex-client" # NOTE: annex-client binary is built with Jenkin's job using annex-client-from-src.bb # To update this, manually copy ipk from Jenkin's job to .net/downloads/ -PR = "r0" -SRC_URI = "http://multitech.net/downloads/annex-client-from-src_${PV}-${PR}.0_${TUNE_PKGARCH}.ipk \ +PR = "r3" +ANNEX_PR = "r1" +SRC_URI = "http://multitech.net/downloads/annex-client-from-src_1.0-${ANNEX_PR}.0_${TUNE_PKGARCH}.ipk \ file://annex-client.init \ + file://monitor-annexcd \ + file://call_home \ + file://call_home.init \ + file://config.json.sample \ + file://push_api_mdm_connected \ + file://push_api_mdm_status \ " -SRC_URI[md5sum] = "b17462ba3883df6a06b226b37a523eba" -SRC_URI[sha256sum] = "be903e7e27ad34832cb8045ef805f4e226aa6e254a3c995c5e61a0a9197a95b0" +SRC_URI[md5sum] = "e180f4e569fbba2f5b9d524b5a9e944e" +SRC_URI[sha256sum] = "1e93c65005c630cf211615dc143eb64f177591efcdbed6952142c7bac0e95988" #inherit update-rc.d # @@ -20,10 +27,27 @@ SRC_URI[sha256sum] = "be903e7e27ad34832cb8045ef805f4e226aa6e254a3c995c5e61a0a919 #INITSCRIPT_PARAMS = "defaults 95 1" S = "${WORKDIR}" +DHQ_DIR="/opt/devicehq" + do_install() { install -d ${D}${sbindir} install -m 755 sbin/annexcd ${D}${sbindir} + install -d ${D}/etc/ssl/certs + install -m 644 etc/ssl/certs/rootCA.pem ${D}/etc/ssl/certs + + install -d ${D}${base_sbindir} + install -m 755 ${WORKDIR}/monitor-annexcd ${D}${base_sbindir} + install -m 755 ${WORKDIR}/call_home ${D}${base_sbindir} + install -m 755 ${WORKDIR}/push_api_mdm_connected ${D}${base_sbindir} + install -m 755 ${WORKDIR}/push_api_mdm_status ${D}${base_sbindir} + install -d ${D}${sysconfdir}/init.d install -m 755 ${WORKDIR}/annex-client.init ${D}${sysconfdir}/init.d/annex-client + install -m 755 ${WORKDIR}/call_home.init ${D}${sysconfdir}/init.d/call_home + + install -d ${D}${DHQ_DIR} + install -m 644 ${WORKDIR}/config.json.sample ${D}${DHQ_DIR} } + +FILES_${PN} += "${DHQ_DIR}" diff --git a/recipes-core/annex-client/annex-client/call_home b/recipes-core/annex-client/annex-client/call_home new file mode 100755 index 0000000..64887ec --- /dev/null +++ b/recipes-core/annex-client/annex-client/call_home @@ -0,0 +1,192 @@ +#!/bin/bash +#Attempt to gain a WAN connection for MDM Registration to query for this device's MDM account ID +#PREREQ: Firewall allows outgoing DHCP requests and MDM Client connection + +CONFIG_FILE="/var/config/devicehq/config.json" +STATUS_FILE="/var/config/devicehq/status.json" + +if [ ! -f $CONFIG_FILE ]; then + logger -t callhome "Config file missing!" + logger -t callhome "Do: mkdir /var/config/devicehq" + logger -t callhome "Then: cp /opt/devicehq/config.json.sample /var/config/devicehq/config.json" + exit 1 +fi + +JSON=$(cat $CONFIG_FILE) +ENABLED=$( echo $JSON | jsparser -p /enabled ) +KEY=$( echo $JSON | jsparser -p /accountKey ) +MDM_URL=$( echo $JSON | jsparser -p /deviceHqUrl ) + +if [ "$ENABLED" != "true" ]; then + logger -t callhome "Not calling home because DeviceHQ is disabled in /var/config/devicehq/config..json." + exit 1 +fi + +UUID=$(mts-io-sysfs show uuid) +DEVID=$(mts-io-sysfs show device-id) + + +MDM_REG_URL="$MDM_URL/api/v1/register-device" +TMPFILE="/var/run/callhome" +DONE=false +FORCE=false +WAN_AVAILABLE=true +MAX_ATTEMPTS=0 #Infinite +INTERVAL_SECONDS=30 + +#Gather options from command line +# Reset in case getopts has been used previously in the shell. +OPTIND=1 + +function show_help() { + echo "Usage: $0 -k <ACCOUNT KEY> -a <MAX ATTEMPTS> -i <INTERVAL SECONDS>" +} + +while getopts "h?k:a:i:d:u:m:f" opt; do + case "$opt" in + h|\?) + show_help + exit 0 + ;; + k) KEY=$OPTARG + ;; + a) MAX_ATTEMPTS=$OPTARG + ;; + a) INTERVAL_SECONDS=$OPTARG + ;; + f) FORCE=true + ;; + d) DEVID=$OPTARG + ;; + u) UUID=$OPTARG + ;; + m) MDM_URL=$OPTARG + ;; + esac +done + +shift $((OPTIND-1)) + +[ "$1" = "--" ] && shift + +if [ "$FORCE" == "true" ]; then + DONE=false +fi + + +function checkCallHomeNeeded() { + if [ "$FORCE" != "true" ]; then + JSON=$(cat $CONFIG_FILE) + KEY=$( echo $JSON | jsparser -p /accountKey ) + + LAST_CONNECTED="unknown" + STATUS="" + if [ -f $STATUS_FILE ]; then + JSON=$(cat $STATUS_FILE) + LAST_CONNECTED=$( echo $JSON | jsparser -p /lastConnected ) + STATUS=$( echo $JSON | jsparser -p /status ) + fi + + if [ "$KEY" != "" ] && [ $LAST_CONNECTED != "unknown" ] && [ $STATUS == "idle" ]; then + echo "Found that Call-Home Not Needed" + exit 0 + fi + fi +} + +function saveConfigs() { + logger -t callhome "Saving accountKey" + + sed -i "s/\"accountKey\"\s*:\s*\".*\"/\"accountKey\": \"$KEY\"/" $CONFIG_FILE + + if [ $? != 0 ]; then + logger -t callhome "Failed to add account key [$KEY] to $CONFIG_FILE" + fi +} + +function checkForCheckIn() { + + i=0 + while [ $i -lt 10 ]; do + if [ -f $STATUS_FILE ]; then + JSON=$(cat $STATUS_FILE) + LAST_CONNECTED=$( echo $JSON | jsparser -p /lastConnected ) + STATUS=$( echo $JSON | jsparser -p /status ) + if [ "$LAST_CONNECTED" == "unknown" ] || [ $STATUS != "idle" ]; then + logger -t callhome "MDM client has not checked-in yet" + else + logger -t callhome "SUCCESS! MDM Client has checked-in." + DONE=true + return + fi + else + logger -t callhome "MDM client has not checked-in yet" + fi + + let i=i+1 + logger -t callhome "Sleeping for 30 seconds." + sleep 30 + done + +} + +function attemptMdmRegistration() { + + logger -t callhome "Attempting to register with MDM" + CODE=$( curl -m 20 -ks -o $TMPFILE -w "%{http_code}" -X POST -H "Content-Type: application/json" \ + -d '{ "device_id" : "'$DEVID'", "uuid" : "'$UUID'" }' \ + $MDM_REG_URL ) + + if [ $? == 0 ]; then + if [ "$CODE" == "200" ]; then + logger -t callhome "Registered with MDM. Checking for Account Key" + + #Request returned 200 + KEY=$( cat $TMPFILE | jsparser -p /account_key ) + if [ $? == 0 ]; then + if [ "$KEY" != "" ]; then + logger -t callhome "Received Account Key! [$KEY]" + saveConfigs + /etc/init.d/annex-client start + checkForCheckIn + else + logger -t callhome "Account Key not returned. This device may not be registered with a user account" + fi + else + RESULT=$(cat $TMPFILE) + logger -t callhome "Error: Unexpected MDM Registration Server response: $RESULT" + fi + else + RESULT=$(cat $TMPFILE) + logger -t callhome "Error: MDM Registration Failed with Device ID [$DEVID] and UUID [$UUID]" + logger -t callhome "Error: MDM Registration Server Response Header Code: $CODE" + logger -t callhome "Error: MDM Registration Server Response Body Content: $RESULT" + fi + else + logger -t callhome "Warning: Could not connect to MDM server: $MDM_REG_URL" + fi +} + +logger -t callhome "Setting Up Call-Home " +COUNT=0 + +while [ $DONE == false ]; do + logger -t callhome "Attempts: $COUNT" + + checkCallHomeNeeded + + attemptMdmRegistration + + COUNT=$(($COUNT+1)) + if [ $MAX_ATTEMPTS != 0 ] && [ $COUNT -gt $MAX_ATTEMPTS ]; then + DONE=true + logger -t callhome "Reached Maximum Attempts [$MAX_ATTEMPTS]" + fi + + if [ $DONE == false ]; then + logger -t callhome "Sleeping for $INTERVAL_SECONDS seconds before next attempt" + sleep $INTERVAL_SECONDS + fi + +done + diff --git a/recipes-core/annex-client/annex-client/call_home.init b/recipes-core/annex-client/annex-client/call_home.init new file mode 100755 index 0000000..b874565 --- /dev/null +++ b/recipes-core/annex-client/annex-client/call_home.init @@ -0,0 +1,40 @@ +#!/bin/bash +CALLHOME="/sbin/call_home" + +start() { + if [[ $(pidof $CALLHOME) ]]; then + echo "Call-Home Service is already running" + else + echo "Starting Call-Home Service" + $CALLHOME & + fi +} + +stop() { + CALLHOME_PID=$(pidof -x $CALLHOME) + if [[ $CALLHOME_PID ]]; then + echo "Stopping Call-Home Service" + kill $CALLHOME_PID + else + echo "Call-Home Service is not running" + fi +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; + *) + echo "Usage: /etc/init.d/call_home {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-core/annex-client/annex-client/config.json.sample b/recipes-core/annex-client/annex-client/config.json.sample new file mode 100644 index 0000000..5e83c64 --- /dev/null +++ b/recipes-core/annex-client/annex-client/config.json.sample @@ -0,0 +1,10 @@ +{ + "enabled": true, + "accountKey": "", + "deviceHqUrl": "https://www.devicehq.com", + "deviceServerUrl": "ds.devicehq.com", + "checkInIntervalMins": 720, + "gpsDataIntervalMins": 720, + "allowFirmwareUpgrade": true, + "allowConfigUpgrade": false +} diff --git a/recipes-core/annex-client/annex-client/monitor-annexcd b/recipes-core/annex-client/annex-client/monitor-annexcd new file mode 100755 index 0000000..21d5a6b --- /dev/null +++ b/recipes-core/annex-client/annex-client/monitor-annexcd @@ -0,0 +1,46 @@ +#!/bin/bash + +CONFIG_FILE="/var/config/devicehq/config.json" + +if [ ! -f $CONFIG_FILE ]; then + logger -t monitor-annexcd "Config file missing!" + logger -t monitor-annexcd "Do: mkdir /var/config/devicehq" + logger -t monitor-annexcd "Then: cp /opt/devicehq/config.json.sample /var/config/devicehq/config.json" + logger -t monitor-annexcd "Exiting..." + exit 1 +fi + +DEVICE_ID=$(mts-io-sysfs show device-id) +PRODUCT_ID=$(mts-io-sysfs show product-id) + +get_args() { + JSON=$(cat $CONFIG_FILE) + + ENABLED=$( echo $JSON | jsparser -p enabled ) + KEY=$( echo $JSON | jsparser -p accountKey ) + SERVER=$( echo $JSON | jsparser -p deviceServerUrl ) + PORT=5798 + QUERY_INT=$( echo $JSON | jsparser -p checkInIntervalMins ) + GPS_INT=$( echo $JSON | jsparser -p gpsDataIntervalMins ) + FW_UPGRADE=$( echo $JSON | jsparser -p allowFirmwareUpgrade ) + CONFIG_UPGRADE=$(echo $JSON | jsparser -p allowConfigUpgrade ) +} + + +get_args + +if [ "$KEY" == "" ]; then + logger -t monitor-annexcd "Account key missing in $CONFIG_FILE" + logger -t monitor-annexcd "Exiting..." + exit 1 +fi + +MIN_TO_MS=60000 + +if [[ $ENABLED == "true" ]]; then + ANNEXCD="annexcd --account-key $KEY --host $SERVER --port $PORT --product-id $PRODUCT_ID --device-id $DEVICE_ID --rpd-interval $(( $QUERY_INT * $MIN_TO_MS )) --gps-interval $(( $GPS_INT * $MIN_TO_MS )) --net-interval $(( $QUERY_INT * $MIN_TO_MS )) --cell-interval $(( $QUERY_INT * $MIN_TO_MS )) --active-apps-interval $(( $QUERY_INT * $MIN_TO_MS )) --lora-interval $(( $QUERY_INT * $MIN_TO_MS )) --when-ppp-up on --firmware-upgrade $FW_UPGRADE --config-upgrade $CONFIG_UPGRADE --ssl-method ssl --ssl-ca-certificate /etc/ssl/certs/rootCA.pem --ssl-ca-strict --log-upto 7" + until $ANNEXCD; do + echo "annexcd exited with status $? - restarting..." >&2 + sleep 1 + done +fi diff --git a/recipes-core/annex-client/annex-client/push_api_mdm_connected b/recipes-core/annex-client/annex-client/push_api_mdm_connected new file mode 100755 index 0000000..ec8a23d --- /dev/null +++ b/recipes-core/annex-client/annex-client/push_api_mdm_connected @@ -0,0 +1,59 @@ +#!/bin/bash +# This script pushes the current time to the API's remote management +# to track last connected time + +STATUS_FILE="/var/config/devicehq/status.json" +DHQ_DIR="/var/config/devicehq" + +LAST_CONNECTED=$(date +%m/%d/%Y/%H:%M:%S) +INTERVAL="" + +# Reset in case getopts has been used previously in the shell. +OPTIND=1 + +function show_help() { + echo "Usage: $0 -t <TIME OF CONNECTION> -i <INTERVAL SECONDS>" +} + +while getopts "h?t:i:" opt; do + case "$opt" in + h|\?) + show_help + exit 0 + ;; + t) LAST_CONNECTED=$OPTARG + ;; + i) INTERVAL=$OPTARG + ;; + esac +done + +shift $((OPTIND-1)) +[ "$1" = "--" ] && shift + +if [ ! -f $STATUS_FILE ]; then + mkdir -p $DHQ_DIR + echo "{ + \"status\": \"unknown\", + \"lastConnected\": \"unknown\", + \"intervalSeconds\": \"10\" +}" > $STATUS_FILE +fi + + +sed -i "s~\"lastConnected\"\s*:\s*\".*\"~\"lastConnected\": \"$LAST_CONNECTED\"~" $STATUS_FILE + +if [ $? != 0 ]; then + logger -t push_api_mdm_connected "Failed to save lastConnected [$LAST_CONNECTED] to $STATUS_FILE" +fi + + +if [ "$INTERVAL" != "" ]; then + sed -i "s/\"intervalSeconds\"\s*:\s*\".*\"/\"intervalSeconds\": \"$INTERVAL\"/" $STATUS_FILE + + if [ $? != 0 ]; then + logger -t push_api_mdm_connected "Failed to save intervalSeconds [$INTERVAL] to $STATUS_FILE" + fi +fi + + diff --git a/recipes-core/annex-client/annex-client/push_api_mdm_status b/recipes-core/annex-client/annex-client/push_api_mdm_status new file mode 100755 index 0000000..cf91eda --- /dev/null +++ b/recipes-core/annex-client/annex-client/push_api_mdm_status @@ -0,0 +1,30 @@ +#!/bin/bash +# This script pushes the current time to the API's remote management +# to track last connected time + +STATUS_FILE="/var/config/devicehq/status.json" +DHQ_DIR="/var/config/devicehq" + +STATUS="$1" + +if [ "$STATUS" == "" ]; then + STATUS="HEARTBEAT: $(date)" +fi + +if [ ! -f $STATUS_FILE ]; then + mkdir -p $DHQ_DIR + echo "{ + \"status\": \"unknown\", + \"lastConnected\": \"unknown\", + \"intervalSeconds\": \"10\" +}" > $STATUS_FILE +fi + +sed -i "s~\"status\"\s*:\s*\".*\"~\"status\": \"$STATUS\"~" $STATUS_FILE + +if [ $? != 0 ]; then + logger -t push_api_mdm_status "Failed to save status [$STATUS] to $STATUS_FILE" +fi + + + diff --git a/recipes-core/udev/udev-182/mtcdt/accessory_ethernet.rules b/recipes-core/udev/udev-182/mtcdt/accessory_ethernet.rules new file mode 100644 index 0000000..376486b --- /dev/null +++ b/recipes-core/udev/udev-182/mtcdt/accessory_ethernet.rules @@ -0,0 +1,21 @@ +#To add new rule for new device you have to run (in case if you want to add eth1 interface) +#admin@mtcdt:~# udevadm info --attribute-walk --path=/sys/class/net/eth1 +# looking at device '/devices/ahb.0/700000.ehci/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.0/net/eth1': +# KERNEL=="eth1" +# SUBSYSTEM=="net" +# DRIVER=="" +# ATTR{mtu}=="1500" +# ATTR{type}=="1" +# ........... +# ........... + +# looking at parent device '/devices/ahb.0/700000.ehci/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.0': +# KERNELS=="1-2.1.1:1.0" <------------------- extract this record to add to the rule +# SUBSYSTEMS=="usb" +# DRIVERS=="smsc75xx" +# ATTRS{bInterfaceClass}=="ff" +# ATTRS{bInterfaceSubClass}=="00" +# ........... + +KERNELS=="1-2.1.1:1.0", SUBSYSTEMS=="usb", DRIVERS=="smsc75xx", NAME="eth1" +KERNELS=="1-2.1.2:1.0", SUBSYSTEMS=="usb", DRIVERS=="smsc75xx", NAME="eth2" diff --git a/recipes-core/udev/udev_182.bbappend b/recipes-core/udev/udev_182.bbappend index 39a5ae1..f5548c1 100644 --- a/recipes-core/udev/udev_182.bbappend +++ b/recipes-core/udev/udev_182.bbappend @@ -4,10 +4,17 @@ PR .= ".mlinux1" # add custom rules for persistent modem device names SRC_URI += " file://cellular_radios.rules \ - file://${MACHINE}.rules \ + file://${MACHINE}.rules \ " +SRC_URI_append_mtcdt = " file://accessory_ethernet.rules \ + " + do_install_append() { install -m 644 ${WORKDIR}/cellular_radios.rules ${D}${sysconfdir}/udev/rules.d/ install -m 644 ${WORKDIR}/${MACHINE}.rules ${D}${sysconfdir}/udev/rules.d/ } + +do_install_append_mtcdt() { + install -m 644 ${WORKDIR}/accessory_ethernet.rules ${D}${sysconfdir}/udev/rules.d/ +} diff --git a/recipes-navigation/gpsd/gpsd-3.7/udev.patch b/recipes-navigation/gpsd/gpsd-3.7/udev.patch new file mode 100644 index 0000000..fdc40cb --- /dev/null +++ b/recipes-navigation/gpsd/gpsd-3.7/udev.patch @@ -0,0 +1,41 @@ +diff -uprN old/60-gpsd.rules new/60-gpsd.rules +--- old/60-gpsd.rules 2016-11-29 17:43:46.300653070 -0600 ++++ new/60-gpsd.rules 2016-11-29 17:47:39.540652577 -0600 +@@ -22,26 +22,26 @@ + SUBSYSTEM!="tty", GOTO="gpsd_rules_end" + + # Prolific Technology, Inc. PL2303 Serial Port +-ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug" + # ATEN International Co., Ltd UC-232A Serial Port [pl2303] +-ATTR{idVendor}=="0557", ATTR{idProduct}=="2008", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ATTR{idVendor}=="0557", ATTR{idProduct}=="2008", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug" + # FTDI 8U232AM +-ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug" + # Cypress M8/CY7C64013 (DeLorme uses these) +-ATTR{idVendor}=="1163", ATTR{idProduct}=="0100", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ATTR{idVendor}=="1163", ATTR{idProduct}=="0100", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug" + # PS-360 OEM (Microsoft GPS sold with Street and Trips 2005) +-ATTR{idVendor}=="067b", ATTR{idProduct}=="aaa0", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ATTR{idVendor}=="067b", ATTR{idProduct}=="aaa0", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug" + # Garmin International GPSmap, various models (tested with Garmin GPS 18 USB) +-ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug" + # Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241) +-ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug" + # u-blox AG, u-blox 5 (tested with Navilock NL-402U) +-ATTR{idVendor}=="1546", ATTR{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ATTR{idVendor}=="1546", ATTR{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug" + # FTDI FT232 +-ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug" + # u-blox 4 +-ATTR{idVendor}=="1546", ATTR{idProduct}=="01a4", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ATTR{idVendor}=="1546", ATTR{idProduct}=="01a4", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug" + +-ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug.wrapper" ++ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug" + + LABEL="gpsd_rules_end" diff --git a/recipes-navigation/gpsd/gpsd_3.7.bbappend b/recipes-navigation/gpsd/gpsd_3.7.bbappend index 73b814f..8081b6f 100644 --- a/recipes-navigation/gpsd/gpsd_3.7.bbappend +++ b/recipes-navigation/gpsd/gpsd_3.7.bbappend @@ -1,7 +1,9 @@ PR .= ".mlinux1" -SRC_URI += " file://Conduit.patch;patchdir=.." -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}" +SRC_URI += " file://Conduit.patch;patchdir=.. \ + file://udev.patch;patchdir=.. \ + " +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:${THISDIR}/${PN}" python do_patch_prepend () { import os |