aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity')
-rw-r--r--recipes-connectivity/bluez-alsa/bluez-alsa/0001-utils-add-a-gstreamer-helper-application-for-interco.patch517
-rw-r--r--recipes-connectivity/bluez-alsa/bluez-alsa/bluealsa-gst-helper@.service18
-rw-r--r--recipes-connectivity/bluez-alsa/bluez-alsa_git.bb43
-rw-r--r--recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend35
-rw-r--r--recipes-connectivity/bluez-alsa/files/bluez-alsa.service11
-rw-r--r--recipes-connectivity/bluez5/bluez5/bluetooth.conf39
-rw-r--r--recipes-connectivity/bluez5/bluez5/bluetooth.service21
-rw-r--r--recipes-connectivity/bluez5/bluez5/obex.service10
-rw-r--r--recipes-connectivity/bluez5/bluez5/tmpdir.conf2
-rw-r--r--recipes-connectivity/bluez5/bluez5_%.bbappend1
-rw-r--r--recipes-connectivity/bluez5/bluez5_agldemo.inc24
-rw-r--r--recipes-connectivity/cluster-connman-conf/cluster-connman-conf/cluster.config3
-rw-r--r--recipes-connectivity/cluster-connman-conf/cluster-connman-conf_1.0.bb15
-rw-r--r--recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info/0001-remove-Fido-service-provider.patch31
-rw-r--r--recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_agldemo.inc4
-rw-r--r--recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bbappend1
-rw-r--r--recipes-connectivity/neard/files/0001-systemd-neard-add-multi-user.target-to-neard.service.patch25
-rw-r--r--recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch33
-rw-r--r--recipes-connectivity/neard/neard_0.16.bbappend1
-rw-r--r--recipes-connectivity/neard/neard_agldemo.inc7
-rw-r--r--recipes-connectivity/neardal/neardal.inc22
-rw-r--r--recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch27
-rw-r--r--recipes-connectivity/neardal/neardal/0002-neardal-lib-fix-memory-corruption.patch58
-rw-r--r--recipes-connectivity/neardal/neardal/ncl.patch25
-rw-r--r--recipes-connectivity/neardal/neardal_0.14.bb10
-rw-r--r--recipes-connectivity/ofono/files/0001-provision-allow-duplicate-entries-from-mbpi_lookup_a.patch27
-rw-r--r--recipes-connectivity/ofono/files/ofono.conf30
-rw-r--r--recipes-connectivity/ofono/ofono_%.bbappend1
-rw-r--r--recipes-connectivity/ofono/ofono_agldemo.inc11
-rw-r--r--recipes-connectivity/rtl-sdr/rtl-sdr/0001-remove-I-usr-include-in-pkg-config.patch40
-rw-r--r--recipes-connectivity/rtl-sdr/rtl-sdr_0.5.3.bb32
31 files changed, 1124 insertions, 0 deletions
diff --git a/recipes-connectivity/bluez-alsa/bluez-alsa/0001-utils-add-a-gstreamer-helper-application-for-interco.patch b/recipes-connectivity/bluez-alsa/bluez-alsa/0001-utils-add-a-gstreamer-helper-application-for-interco.patch
new file mode 100644
index 000000000..6c9a388c8
--- /dev/null
+++ b/recipes-connectivity/bluez-alsa/bluez-alsa/0001-utils-add-a-gstreamer-helper-application-for-interco.patch
@@ -0,0 +1,517 @@
+From f2e6a0a324106b40195f88953e55a355875d2b1b Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Fri, 4 Oct 2019 20:51:24 +0300
+Subject: [PATCH] utils: add a gstreamer helper application for interconnection
+ with pipewire
+
+Unfortunately, the bluez-alsa PCM plugin does not work correctly
+when it is used through pipewire (or gstreamer, or anywhere really...).
+
+Thanfully, the bluez-alsa PCM plugin is only a simple client that
+reads/writes on a file descriptor that was opened by bluealsa.
+This allows us to use bluealsa without the PCM plugin, just like it
+is done in the aplay.c util.
+
+This one uses GStreamer to implement the plumbing between pipewire
+and the file descriptor. On the reading side we are also doing some
+tricks to ensure a smooth stream, which is not the case for the
+stream that is coming out of bluealsa.
+
+This helper is implemented as a patch to bluez-alsa so that it can
+use its internal private API. In the future this needs some re-thinking.
+
+Upstream-Status: Inappropriate
+---
+ configure.ac | 7 +
+ utils/Makefile.am | 20 +++
+ utils/gst-helper.c | 432 +++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 459 insertions(+)
+ create mode 100644 utils/gst-helper.c
+
+diff --git a/configure.ac b/configure.ac
+index 4825afa..9125871 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -141,6 +141,13 @@ AM_COND_IF([ENABLE_HCITOP], [
+ PKG_CHECK_MODULES([NCURSES], [ncurses])
+ ])
+
++AC_ARG_ENABLE([gsthelper],
++ [AS_HELP_STRING([--enable-gsthelper], [enable building of gsthelper tool])])
++AM_CONDITIONAL([ENABLE_GSTHELPER], [test "x$enable_gsthelper" = "xyes"])
++AM_COND_IF([ENABLE_GSTHELPER], [
++ PKG_CHECK_MODULES([GST], [gstreamer-1.0 glib-2.0])
++])
++
+ AC_ARG_ENABLE([test],
+ [AS_HELP_STRING([--enable-test], [enable unit test])])
+ AM_CONDITIONAL([ENABLE_TEST], [test "x$enable_test" = "xyes"])
+diff --git a/utils/Makefile.am b/utils/Makefile.am
+index 9057f2c..9790474 100644
+--- a/utils/Makefile.am
++++ b/utils/Makefile.am
+@@ -47,3 +47,23 @@ hcitop_LDADD = \
+ @LIBBSD_LIBS@ \
+ @NCURSES_LIBS@
+ endif
++
++if ENABLE_GSTHELPER
++bin_PROGRAMS += bluealsa-gst-helper
++bluealsa_gst_helper_SOURCES = \
++ ../src/shared/dbus-client.c \
++ ../src/shared/ffb.c \
++ ../src/shared/log.c \
++ gst-helper.c
++bluealsa_gst_helper_CFLAGS = \
++ -I$(top_srcdir)/src \
++ @ALSA_CFLAGS@ \
++ @BLUEZ_CFLAGS@ \
++ @DBUS1_CFLAGS@ \
++ @GST_CFLAGS@
++bluealsa_gst_helper_LDADD = \
++ @ALSA_LIBS@ \
++ @BLUEZ_LIBS@ \
++ @DBUS1_LIBS@ \
++ @GST_LIBS@
++endif
+diff --git a/utils/gst-helper.c b/utils/gst-helper.c
+new file mode 100644
+index 0000000..de1d47c
+--- /dev/null
++++ b/utils/gst-helper.c
+@@ -0,0 +1,432 @@
++/* Bluez-Alsa PipeWire integration GStreamer helper
++ *
++ * Copyright © 2016-2019 Arkadiusz Bokowy
++ * Copyright © 2019 Collabora Ltd.
++ * @author George Kiagiadakis <george.kiagiadakis@collabora.com>
++ *
++ * SPDX-License-Identifier: MIT
++ */
++
++#if HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <errno.h>
++#include <getopt.h>
++#include <poll.h>
++#include <pthread.h>
++#include <signal.h>
++#include <stdbool.h>
++#include <stdint.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++
++#include <bluetooth/bluetooth.h>
++#include <dbus/dbus.h>
++#include <gst/gst.h>
++
++#include "shared/dbus-client.h"
++#include "shared/defs.h"
++#include "shared/ffb.h"
++#include "shared/log.h"
++
++struct worker {
++ /* used BlueALSA PCM device */
++ struct ba_pcm ba_pcm;
++ /* file descriptor of PCM FIFO */
++ int ba_pcm_fd;
++ /* file descriptor of PCM control */
++ int ba_pcm_ctrl_fd;
++ /* the gstreamer pipelines (sink & source) */
++ GstElement *pipeline[2];
++ /* the queue & pwaudiosink of the sink pipeline */
++ GstElement *queue;
++ GstElement *pwelem;
++};
++
++static struct ba_dbus_ctx dbus_ctx;
++static GHashTable *workers;
++static bool main_loop_on = true;
++
++static void
++main_loop_stop(int sig)
++{
++ /* Call to this handler restores the default action, so on the
++ * second call the program will be forcefully terminated. */
++
++ struct sigaction sigact = { .sa_handler = SIG_DFL };
++ sigaction(sig, &sigact, NULL);
++
++ main_loop_on = false;
++}
++
++static GstBusSyncReply
++bus_sync_handler(GstBus *bus, GstMessage *message, gpointer user_data)
++{
++ struct worker *w = user_data;
++ GstState s;
++
++ switch (GST_MESSAGE_TYPE (message)) {
++ case GST_MESSAGE_REQUEST_STATE:
++ gst_message_parse_request_state (message, &s);
++
++ debug ("corked: %d", (s == GST_STATE_PAUSED));
++
++ /* drop queue data when corked */
++ g_object_set (w->queue,
++ "leaky", (s == GST_STATE_PAUSED) ? 2 /* downstream */ : 0 /* no */,
++ NULL);
++ gst_element_set_state (w->pwelem, s);
++
++ /* flush the queue when resuming */
++ if (s == GST_STATE_PLAYING) {
++ gst_element_send_event (w->queue, gst_event_new_flush_start ());
++ gst_element_send_event (w->queue, gst_event_new_flush_stop (FALSE));
++ }
++ break;
++ default:
++ break;
++ }
++
++ gst_message_unref (message);
++ return GST_BUS_DROP;
++}
++
++static int
++worker_start_pipeline(struct worker *w, int id, int mode, int profile)
++{
++ GError *gerr = NULL;
++ DBusError err = DBUS_ERROR_INIT;
++ const gchar * role = NULL;
++
++ if (w->pipeline[id])
++ return 0;
++
++ if (!bluealsa_dbus_pcm_open(&dbus_ctx, w->ba_pcm.pcm_path, mode,
++ &w->ba_pcm_fd, &w->ba_pcm_ctrl_fd, &err)) {
++ error("Couldn't open PCM: %s", err.message);
++ dbus_error_free(&err);
++ goto fail;
++ }
++
++ if (mode == BA_PCM_FLAG_SINK) {
++ debug("sink start");
++ w->pipeline[id] = gst_parse_launch(
++ /* add a silent live source to ensure a perfect live stream on the
++ output, even when the bt device is not sending or has gaps;
++ this also effectively changes the clock to be the system clock,
++ which is the same clock used by bluez-alsa on the sending side */
++ "audiotestsrc is-live=true wave=silence ! capsfilter name=capsf "
++ "! audiomixer name=m "
++ /* mix the input from bluez-alsa using fdsrc; rawaudioparse
++ is necessary to convert bytes to time and align the buffers */
++ "fdsrc name=fdelem do-timestamp=true ! capsfilter name=capsf2 "
++ "! rawaudioparse use-sink-caps=true ! m. "
++ /* take the mixer output, convert and push to pipewire */
++ "m.src ! capsfilter name=capsf3 ! audioconvert ! audioresample "
++ "! audio/x-raw,format=F32LE,rate=48000 ! identity sync=true "
++ "! queue name=queue leaky=no max-size-time=0 max-size-buffers=0 max-size-bytes=192000 "
++ "! pwaudiosink name=pwelem",
++ &gerr);
++
++ /* a2dp is for music, sco is for calls */
++ role = (profile == BA_PCM_FLAG_PROFILE_A2DP) ? "Multimedia" : "Communication";
++ }
++ else if (mode == BA_PCM_FLAG_SOURCE && profile == BA_PCM_FLAG_PROFILE_SCO) {
++ debug("source start");
++ w->pipeline[id] = gst_parse_launch(
++ /* read from pipewire and put the buffers on a leaky queue, which
++ will essentially allow pwaudiosrc to continue working while
++ the fdsink is blocked (when there is no phone call in progress).
++ 9600 bytes = 50ms @ F32LE/1ch/48000
++ */
++ "pwaudiosrc name=pwelem ! audio/x-raw,format=F32LE,rate=48000 "
++ "! queue name=queue leaky=downstream max-size-time=0 max-size-buffers=0 max-size-bytes=9600 "
++ "! audioconvert ! audioresample ! capsfilter name=capsf "
++ "! fdsink name=fdelem", &gerr);
++
++ role = "Communication";
++ }
++
++ if (gerr) {
++ error("Failed to start pipeline: %s", gerr->message);
++ g_error_free(gerr);
++ goto fail;
++ }
++
++ if (w->pipeline[id]) {
++ g_autofree gchar *capsstr = NULL;
++ g_autoptr (GstElement) fdelem = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "fdelem");
++ g_autoptr (GstElement) pwelem = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "pwelem");
++ g_autoptr (GstElement) queue = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "queue");
++ g_autoptr (GstElement) capsf = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "capsf");
++ g_autoptr (GstElement) capsf2 = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "capsf2");
++ g_autoptr (GstElement) capsf3 = gst_bin_get_by_name(GST_BIN(w->pipeline[id]), "capsf3");
++ g_autoptr (GstCaps) caps = gst_caps_new_simple("audio/x-raw",
++ "format", G_TYPE_STRING, "S16LE",
++ "layout", G_TYPE_STRING, "interleaved",
++ "channels", G_TYPE_INT, w->ba_pcm.channels,
++ "rate", G_TYPE_INT, w->ba_pcm.sampling,
++ NULL);
++ g_autoptr (GstStructure) stream_props = gst_structure_new("props",
++ "media.role", G_TYPE_STRING, role,
++ "bluealsa.profile", G_TYPE_STRING,
++ (profile == BA_PCM_FLAG_PROFILE_SCO) ? "sco" : "a2dp",
++ NULL);
++
++ g_object_set(capsf, "caps", caps, NULL);
++ if (capsf2)
++ g_object_set(capsf2, "caps", caps, NULL);
++ if (capsf3)
++ g_object_set(capsf3, "caps", caps, NULL);
++
++ capsstr = gst_caps_to_string (caps);
++ debug(" caps: %s", capsstr);
++
++ g_object_set(fdelem, "fd", w->ba_pcm_fd, NULL);
++ g_object_set(pwelem, "stream-properties", stream_props, NULL);
++
++ if (mode == BA_PCM_FLAG_SINK) {
++ g_autoptr (GstBus) bus = gst_pipeline_get_bus(GST_PIPELINE(w->pipeline[id]));
++ gst_bus_set_sync_handler(bus, bus_sync_handler, w, NULL);
++ w->queue = queue;
++ w->pwelem = pwelem;
++ }
++
++ gst_element_set_state(w->pipeline[id], GST_STATE_PLAYING);
++ }
++
++ return 0;
++fail:
++ g_clear_object(&w->pipeline[id]);
++ return -1;
++}
++
++static int
++worker_start(struct worker *w)
++{
++ int mode = w->ba_pcm.flags & (BA_PCM_FLAG_SOURCE | BA_PCM_FLAG_SINK);
++ int profile = w->ba_pcm.flags & (BA_PCM_FLAG_PROFILE_A2DP | BA_PCM_FLAG_PROFILE_SCO);
++ /* human-readable BT address */
++ char addr[18];
++
++ g_return_val_if_fail (profile != 0 && profile != (BA_PCM_FLAG_PROFILE_A2DP | BA_PCM_FLAG_PROFILE_SCO), -1);
++
++ ba2str(&w->ba_pcm.addr, addr);
++ debug("%p: worker start addr:%s, mode:0x%x, profile:0x%x", w, addr, mode, profile);
++
++ if (mode & BA_PCM_FLAG_SINK)
++ worker_start_pipeline(w, 0, BA_PCM_FLAG_SINK, profile);
++ if (mode & BA_PCM_FLAG_SOURCE)
++ worker_start_pipeline(w, 1, BA_PCM_FLAG_SOURCE, profile);
++}
++
++static int
++worker_stop(struct worker *w)
++{
++ debug("stop worker %p", w);
++ if (w->pipeline[0]) {
++ gst_element_set_state(w->pipeline[0], GST_STATE_NULL);
++ g_clear_object(&w->pipeline[0]);
++ }
++ if (w->pipeline[1]) {
++ gst_element_set_state(w->pipeline[1], GST_STATE_NULL);
++ g_clear_object(&w->pipeline[1]);
++ }
++ if (w->ba_pcm_fd != -1) {
++ close(w->ba_pcm_fd);
++ w->ba_pcm_fd = -1;
++ }
++ if (w->ba_pcm_ctrl_fd != -1) {
++ close(w->ba_pcm_ctrl_fd);
++ w->ba_pcm_ctrl_fd = -1;
++ }
++ return 0;
++}
++
++static int
++supervise_pcm_worker(struct worker *worker)
++{
++ if (worker == NULL)
++ return -1;
++
++ /* no mode? */
++ if (worker->ba_pcm.flags & (BA_PCM_FLAG_SOURCE | BA_PCM_FLAG_SINK) == 0)
++ goto stop;
++
++ /* no profile? */
++ if (worker->ba_pcm.flags & (BA_PCM_FLAG_PROFILE_A2DP | BA_PCM_FLAG_PROFILE_SCO) == 0)
++ goto stop;
++
++ /* check whether SCO has selected codec */
++ if (worker->ba_pcm.flags & BA_PCM_FLAG_PROFILE_SCO &&
++ worker->ba_pcm.codec == 0) {
++ debug("Skipping SCO with codec not selected");
++ goto stop;
++ }
++
++start:
++ return worker_start(worker);
++stop:
++ return worker_stop(worker);
++}
++
++static void
++worker_new(struct ba_pcm *pcm)
++{
++ struct worker *w = g_slice_new0 (struct worker);
++ memcpy(&w->ba_pcm, pcm, sizeof(struct ba_pcm));
++ w->ba_pcm_fd = -1;
++ w->ba_pcm_ctrl_fd = -1;
++ g_hash_table_insert(workers, w->ba_pcm.pcm_path, w);
++ supervise_pcm_worker(w);
++}
++
++static DBusHandlerResult
++dbus_signal_handler(DBusConnection *conn, DBusMessage *message, void *data)
++{
++ (void)conn;
++ (void)data;
++
++ const char *path = dbus_message_get_path(message);
++ const char *interface = dbus_message_get_interface(message);
++ const char *signal = dbus_message_get_member(message);
++
++ DBusMessageIter iter;
++ struct worker *worker;
++
++ if (strcmp(interface, BLUEALSA_INTERFACE_MANAGER) == 0) {
++
++ if (strcmp(signal, "PCMAdded") == 0) {
++ struct ba_pcm pcm;
++ if (!dbus_message_iter_init(message, &iter) ||
++ !bluealsa_dbus_message_iter_get_pcm(&iter, NULL, &pcm)) {
++ error("Couldn't add new PCM: %s", "Invalid signal signature");
++ goto fail;
++ }
++ worker_new(&pcm);
++ return DBUS_HANDLER_RESULT_HANDLED;
++ }
++
++ if (strcmp(signal, "PCMRemoved") == 0) {
++ if (!dbus_message_iter_init(message, &iter) ||
++ dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_OBJECT_PATH) {
++ error("Couldn't remove PCM: %s", "Invalid signal signature");
++ goto fail;
++ }
++ dbus_message_iter_get_basic(&iter, &path);
++ g_hash_table_remove(workers, path);
++ return DBUS_HANDLER_RESULT_HANDLED;
++ }
++
++ }
++
++ if (strcmp(interface, DBUS_INTERFACE_PROPERTIES) == 0) {
++ worker = g_hash_table_lookup(workers, path);
++ if (!worker)
++ goto fail;
++ if (!dbus_message_iter_init(message, &iter) ||
++ dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING) {
++ error("Couldn't update PCM: %s", "Invalid signal signature");
++ goto fail;
++ }
++ dbus_message_iter_get_basic(&iter, &interface);
++ dbus_message_iter_next(&iter);
++ if (!bluealsa_dbus_message_iter_get_pcm_props(&iter, NULL, &worker->ba_pcm))
++ goto fail;
++ supervise_pcm_worker(worker);
++ return DBUS_HANDLER_RESULT_HANDLED;
++ }
++
++fail:
++ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
++}
++
++static void
++destroy_worker(void *worker)
++{
++ struct worker *w = worker;
++ worker_stop(w);
++ g_slice_free(struct worker, w);
++}
++
++int
++main(int argc, char *argv[])
++{
++ int ret = EXIT_SUCCESS;
++
++ log_open(argv[0], false, false);
++ gst_init(&argc, &argv);
++ dbus_threads_init_default();
++
++ DBusError err = DBUS_ERROR_INIT;
++ if (!bluealsa_dbus_connection_ctx_init(&dbus_ctx, BLUEALSA_SERVICE, &err)) {
++ error("Couldn't initialize D-Bus context: %s", err.message);
++ return EXIT_FAILURE;
++ }
++
++ bluealsa_dbus_connection_signal_match_add(&dbus_ctx,
++ BLUEALSA_SERVICE, NULL, BLUEALSA_INTERFACE_MANAGER, "PCMAdded", NULL);
++ bluealsa_dbus_connection_signal_match_add(&dbus_ctx,
++ BLUEALSA_SERVICE, NULL, BLUEALSA_INTERFACE_MANAGER, "PCMRemoved", NULL);
++ bluealsa_dbus_connection_signal_match_add(&dbus_ctx,
++ BLUEALSA_SERVICE, NULL, DBUS_INTERFACE_PROPERTIES, "PropertiesChanged",
++ "arg0='"BLUEALSA_INTERFACE_PCM"'");
++
++ if (!dbus_connection_add_filter(dbus_ctx.conn, dbus_signal_handler, NULL, NULL)) {
++ error("Couldn't add D-Bus filter: %s", err.message);
++ return EXIT_FAILURE;
++ }
++
++ workers = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, destroy_worker);
++
++ {
++ struct ba_pcm *pcms = NULL;
++ size_t pcms_count = 0, i;
++
++ if (!bluealsa_dbus_get_pcms(&dbus_ctx, &pcms, &pcms_count, &err))
++ warn("Couldn't get BlueALSA PCM list: %s", err.message);
++
++ for (i = 0; i < pcms_count; i++) {
++ worker_new(&pcms[i]);
++ }
++
++ free(pcms);
++ }
++
++ struct sigaction sigact = { .sa_handler = main_loop_stop };
++ sigaction(SIGTERM, &sigact, NULL);
++ sigaction(SIGINT, &sigact, NULL);
++
++ /* Ignore SIGPIPE, which may be received when writing to the bluealsa
++ socket when it is closed on the remote end */
++ signal(SIGPIPE, SIG_IGN);
++
++ debug("Starting main loop");
++ while (main_loop_on) {
++
++ struct pollfd pfds[10];
++ nfds_t pfds_len = ARRAYSIZE(pfds);
++
++ if (!bluealsa_dbus_connection_poll_fds(&dbus_ctx, pfds, &pfds_len)) {
++ error("Couldn't get D-Bus connection file descriptors");
++ ret = EXIT_FAILURE;
++ goto out;
++ }
++
++ if (poll(pfds, pfds_len, -1) == -1 &&
++ errno == EINTR)
++ continue;
++
++ if (bluealsa_dbus_connection_poll_dispatch(&dbus_ctx, pfds, pfds_len))
++ while (dbus_connection_dispatch(dbus_ctx.conn) == DBUS_DISPATCH_DATA_REMAINS)
++ continue;
++
++ }
++
++out:
++ g_hash_table_unref(workers);
++ return ret;
++}
+--
+2.24.0
+
diff --git a/recipes-connectivity/bluez-alsa/bluez-alsa/bluealsa-gst-helper@.service b/recipes-connectivity/bluez-alsa/bluez-alsa/bluealsa-gst-helper@.service
new file mode 100644
index 000000000..495ab6222
--- /dev/null
+++ b/recipes-connectivity/bluez-alsa/bluez-alsa/bluealsa-gst-helper@.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Bluetooth audio helper for user %i
+Requires=pipewire@%i.socket bluez-alsa.service
+After=pipewire@%i.socket bluez-alsa.service
+
+[Service]
+Type=simple
+Restart=on-failure
+ExecStart=/usr/bin/bluealsa-gst-helper
+
+Environment=XDG_RUNTIME_DIR=/run/user/%i
+Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%i/bus
+
+User=%i
+Slice=user-%i.slice
+SupplementaryGroups=audio
+UMask=0077
+CapabilityBoundingSet=
diff --git a/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb b/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb
new file mode 100644
index 000000000..010329ee7
--- /dev/null
+++ b/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Bluetooth Audio ALSA Backend"
+HOMEPAGE = "https://github.com/Arkq/bluez-alsa"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3d7d6ac7e2dbd2505652dceb3acdf1fe"
+
+SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master"
+SRCREV = "2cd6e4686f7808276480b430fb37df55dfdcc02b"
+
+SRC_URI += "file://bluez-alsa.service"
+
+S = "${WORKDIR}/git"
+
+DEPENDS += "alsa-lib bluez5 systemd glib-2.0 sbc"
+
+PACKAGECONFIG[aac] = "--enable-aac, --disable-aac, "
+PACKAGECONFIG[aptx] = "--enable-aptx,--disable-aptx,"
+PACKAGECONFIG[ofono] = "--enable-ofono, --disable-ofono,"
+
+inherit autotools pkgconfig
+inherit systemd
+
+SYSTEMD_AUTO_ENABLE = "enable"
+SYSTEMD_SERVICE_${PN} = "bluez-alsa.service"
+
+PACKAGECONFIG += "ofono"
+
+# enable debug tools in devel images
+PACKAGECONFIG[hcitop] = "--enable-hcitop, --disable-hcitop, libbsd ncurses"
+PACKAGECONFIG[rfcomm] = "--enable-rfcomm, --disable-rfcomm,"
+PACKAGECONFIG_append_agl-devel = " hcitop rfcomm"
+
+do_install_append () {
+ install -d ${D}${base_libdir}/systemd/system
+ install -m 0644 ${WORKDIR}/bluez-alsa.service ${D}${base_libdir}/systemd/system
+}
+
+FILES_${PN} += "\
+ ${datadir}/alsa/alsa.conf.d/20-bluealsa.conf\
+ ${libdir}/alsa-lib/libasound_module_ctl_bluealsa.so\
+ ${libdir}/alsa-lib/libasound_module_pcm_bluealsa.so\
+"
diff --git a/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend b/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend
new file mode 100644
index 000000000..bcb47888f
--- /dev/null
+++ b/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend
@@ -0,0 +1,35 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/bluez-alsa:"
+
+SRC_URI += "\
+ file://0001-utils-add-a-gstreamer-helper-application-for-interco.patch \
+ file://bluealsa-gst-helper@.service \
+ "
+
+PACKAGECONFIG += "gsthelper"
+PACKAGECONFIG[gsthelper] = "--enable-gsthelper, --disable-gsthelper, gstreamer1.0"
+
+do_install_append() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ # install the service file
+ mkdir -p ${D}${systemd_system_unitdir}/
+ install -m 0644 ${WORKDIR}/bluealsa-gst-helper@.service ${D}${systemd_system_unitdir}/bluealsa-gst-helper@.service
+
+ # enable the helper to start together with afm-user-session
+ mkdir -p ${D}${systemd_system_unitdir}/afm-user-session@.target.wants
+ ln -sf ../bluealsa-gst-helper@.service ${D}${systemd_system_unitdir}/afm-user-session@.target.wants/bluealsa-gst-helper@.service
+ fi
+}
+
+PACKAGES =+ "${PN}-pipewire"
+
+FILES_${PN}-pipewire = "\
+ ${bindir}/bluealsa-gst-helper \
+ ${systemd_system_unitdir}/bluealsa-gst-helper@.service \
+ ${systemd_system_unitdir}/afm-user-session@.target.wants/bluealsa-gst-helper@.service \
+ "
+RDEPENDS_${PN}-pipewire += "\
+ bluez-alsa \
+ pipewire \
+ gstreamer1.0-plugins-base \
+ gstreamer1.0-pipewire \
+ "
diff --git a/recipes-connectivity/bluez-alsa/files/bluez-alsa.service b/recipes-connectivity/bluez-alsa/files/bluez-alsa.service
new file mode 100644
index 000000000..b59302ee4
--- /dev/null
+++ b/recipes-connectivity/bluez-alsa/files/bluez-alsa.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Bluetooth Audio ALSA Backend
+After=bluetooth.service
+Requires=bluetooth.service
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/bluealsa -p a2dp-sink -p hfp-ofono
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-connectivity/bluez5/bluez5/bluetooth.conf b/recipes-connectivity/bluez5/bluez5/bluetooth.conf
new file mode 100644
index 000000000..1f2762de7
--- /dev/null
+++ b/recipes-connectivity/bluez5/bluez5/bluetooth.conf
@@ -0,0 +1,39 @@
+<!-- This configuration file specifies the required security policies
+ for Bluetooth core daemon to work. -->
+
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+
+ <!-- ../system.conf have denied everything, so we just punch some holes -->
+
+ <policy user="root">
+ <allow own="org.bluez"/>
+ <allow send_destination="org.bluez"/>
+ <allow send_interface="org.bluez.Agent1"/>
+ <allow send_interface="org.bluez.MediaEndpoint1"/>
+ <allow send_interface="org.bluez.MediaPlayer1"/>
+ <allow send_interface="org.bluez.ThermometerWatcher1"/>
+ <allow send_interface="org.bluez.AlertAgent1"/>
+ <allow send_interface="org.bluez.Profile1"/>
+ <allow send_interface="org.bluez.HeartRateWatcher1"/>
+ <allow send_interface="org.bluez.CyclingSpeedWatcher1"/>
+ <allow send_interface="org.bluez.GattCharacteristic1"/>
+ <allow send_interface="org.bluez.GattDescriptor1"/>
+ <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
+ <allow send_interface="org.freedesktop.DBus.Properties"/>
+ <allow receive_type="signal" receive_sender="org.bluez" receive_interface="org.freedesktop.DBus.Properties"/>
+ <allow receive_type="signal" receive_sender="org.bluez" receive_interface="org.freedesktop.DBus.ObjectManager"/>
+ </policy>
+
+ <policy at_console="true">
+ <allow send_destination="org.bluez"/>
+ </policy>
+
+ <!-- allow users of lp group (printing subsystem) to
+ communicate with bluetoothd -->
+ <policy group="lp">
+ <allow send_destination="org.bluez"/>
+ </policy>
+
+</busconfig>
diff --git a/recipes-connectivity/bluez5/bluez5/bluetooth.service b/recipes-connectivity/bluez5/bluez5/bluetooth.service
new file mode 100644
index 000000000..8ae83bd48
--- /dev/null
+++ b/recipes-connectivity/bluez5/bluez5/bluetooth.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Bluetooth service
+Documentation=man:bluetoothd(8)
+ConditionPathIsDirectory=/sys/class/bluetooth
+
+[Service]
+Type=dbus
+BusName=org.bluez
+ExecStartPre=-/usr/bin/hciconfig hci0 aclmtu 930:10
+ExecStart=/usr/libexec/bluetooth/bluetoothd
+NotifyAccess=main
+#WatchdogSec=10
+#Restart=on-failure
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+LimitNPROC=1
+ProtectHome=true
+ProtectSystem=full
+
+[Install]
+WantedBy=bluetooth.target
+Alias=dbus-org.bluez.service
diff --git a/recipes-connectivity/bluez5/bluez5/obex.service b/recipes-connectivity/bluez5/bluez5/obex.service
new file mode 100644
index 000000000..87ffff6ae
--- /dev/null
+++ b/recipes-connectivity/bluez5/bluez5/obex.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Bluetooth OBEX service
+
+[Service]
+Type=dbus
+BusName=org.bluez.obex
+ExecStart=/usr/libexec/bluetooth/obexd --root=/var/volatile/tmp
+
+[Install]
+Alias=dbus-org.bluez.obex.service
diff --git a/recipes-connectivity/bluez5/bluez5/tmpdir.conf b/recipes-connectivity/bluez5/bluez5/tmpdir.conf
new file mode 100644
index 000000000..8545d76ec
--- /dev/null
+++ b/recipes-connectivity/bluez5/bluez5/tmpdir.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment="TMPDIR=/run/user/%U/usrshr"
diff --git a/recipes-connectivity/bluez5/bluez5_%.bbappend b/recipes-connectivity/bluez5/bluez5_%.bbappend
new file mode 100644
index 000000000..18e694989
--- /dev/null
+++ b/recipes-connectivity/bluez5/bluez5_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'bluez5_agldemo.inc', '', d)}
diff --git a/recipes-connectivity/bluez5/bluez5_agldemo.inc b/recipes-connectivity/bluez5/bluez5_agldemo.inc
new file mode 100644
index 000000000..0e9cd62c1
--- /dev/null
+++ b/recipes-connectivity/bluez5/bluez5_agldemo.inc
@@ -0,0 +1,24 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/bluez5:"
+SRC_URI_append = " \
+ file://bluetooth.conf \
+ file://tmpdir.conf \
+ file://obex.service \
+ file://bluetooth.service \
+"
+
+FILES_${PN}_append = " ${systemd_user_unitdir}/obex.service.d/tmpdir.conf"
+
+do_install_append() {
+ install -m 0644 ${WORKDIR}/bluetooth.conf ${D}${sysconfdir}/dbus-1/system.d/bluetooth.conf
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ mkdir -p ${D}${systemd_user_unitdir}/obex.service.d
+
+ install -m 0644 ${WORKDIR}/obex.service ${D}${systemd_user_unitdir}
+ install -m 0644 ${WORKDIR}/tmpdir.conf ${D}${systemd_user_unitdir}/obex.service.d/tmpdir.conf
+ mkdir -p ${D}/etc/systemd/user
+ ln -sf ${systemd_user_unitdir}/obex.service ${D}/etc/systemd/user/dbus-org.bluez.obex.service
+ mkdir -p ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/bluetooth.service ${D}${systemd_system_unitdir}
+ fi
+}
diff --git a/recipes-connectivity/cluster-connman-conf/cluster-connman-conf/cluster.config b/recipes-connectivity/cluster-connman-conf/cluster-connman-conf/cluster.config
new file mode 100644
index 000000000..6ce2a76f5
--- /dev/null
+++ b/recipes-connectivity/cluster-connman-conf/cluster-connman-conf/cluster.config
@@ -0,0 +1,3 @@
+[service_cluster_ethernet]
+Type=ethernet
+IPv4=@CLUSTER_DEMO_SERVER_IP@/255.255.255.0
diff --git a/recipes-connectivity/cluster-connman-conf/cluster-connman-conf_1.0.bb b/recipes-connectivity/cluster-connman-conf/cluster-connman-conf_1.0.bb
new file mode 100644
index 000000000..78528aa7f
--- /dev/null
+++ b/recipes-connectivity/cluster-connman-conf/cluster-connman-conf_1.0.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Cluster demo connman configuration"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "file://cluster.config"
+
+CLUSTER_DEMO_SERVER_IP ?= "192.168.20.99"
+
+do_install() {
+ install -d ${D}${localstatedir}/lib/connman
+ sed "s/@CLUSTER_DEMO_SERVER_IP@/${CLUSTER_DEMO_SERVER_IP}/g" \
+ ${WORKDIR}/cluster.config > ${D}${localstatedir}/lib/connman/cluster.config
+}
+
+FILES_${PN} += "${localstatedir}/*"
diff --git a/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info/0001-remove-Fido-service-provider.patch b/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info/0001-remove-Fido-service-provider.patch
new file mode 100644
index 000000000..c1545c727
--- /dev/null
+++ b/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info/0001-remove-Fido-service-provider.patch
@@ -0,0 +1,31 @@
+diff --git a/serviceproviders.xml b/serviceproviders.xml
+index e7f36ac..f1a0ca3 100644
+--- a/serviceproviders.xml
++++ b/serviceproviders.xml
+@@ -2236,26 +2236,6 @@ conceived.
+
+ <!-- Canada -->
+ <country code="ca">
+- <provider>
+- <name>Fido</name>
+- <gsm>
+- <network-id mcc="302" mnc="370"/>
+- <apn value="internet.fido.ca">
+- <plan type="postpaid"/>
+- <usage type="internet"/>
+- <username>fido</username>
+- <password>fido</password>
+- <dns>204.92.15.211</dns>
+- <dns>207.181.101.4</dns>
+- </apn>
+- <apn value="mms.fido.ca">
+- <usage type="mms"/>
+- <name>Fido MMS</name>
+- <mmsc>http://mms.fido.ca</mmsc>
+- <mmsproxy>mm1.fido.ca:80</mmsproxy>
+- </apn>
+- </gsm>
+- </provider>
+ <provider>
+ <name>Rogers</name>
+ <gsm>
diff --git a/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_agldemo.inc b/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_agldemo.inc
new file mode 100644
index 000000000..f64bcfbc8
--- /dev/null
+++ b/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_agldemo.inc
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/mobile-broadband-provider-info:"
+
+SRC_URI += "file://0001-remove-Fido-service-provider.patch"
+
diff --git a/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bbappend b/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bbappend
new file mode 100644
index 000000000..afd888038
--- /dev/null
+++ b/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'mobile-broadband-provider-info_agldemo.inc', '', d)}
diff --git a/recipes-connectivity/neard/files/0001-systemd-neard-add-multi-user.target-to-neard.service.patch b/recipes-connectivity/neard/files/0001-systemd-neard-add-multi-user.target-to-neard.service.patch
new file mode 100644
index 000000000..c32951693
--- /dev/null
+++ b/recipes-connectivity/neard/files/0001-systemd-neard-add-multi-user.target-to-neard.service.patch
@@ -0,0 +1,25 @@
+From d8c03a31e2734e59af43dd50cbd7f5a94d798ab1 Mon Sep 17 00:00:00 2001
+From: Matt Ranostay <matt.ranostay@konsulko.com>
+Date: Tue, 10 Jul 2018 21:18:26 -0700
+Subject: [PATCH] systemd: neard: add multi-user.target to neard.service
+
+Allowing a service to be system level requires a WantedBy= target
+
+Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
+---
+ src/neard.service.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/neard.service.in b/src/neard.service.in
+index dfa238c..540da7e 100644
+--- a/src/neard.service.in
++++ b/src/neard.service.in
+@@ -9,4 +9,5 @@ ExecStart=@pkglibexecdir@/neard -n
+ LimitNPROC=1
+
+ [Install]
++WantedBy=multi-user.target
+ Alias=dbus-org.neard.service
+--
+2.17.1
+
diff --git a/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch b/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch
new file mode 100644
index 000000000..49c11a509
--- /dev/null
+++ b/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch
@@ -0,0 +1,33 @@
+From d7ea2a00e00795ad24897e3481b015a27d37d60f Mon Sep 17 00:00:00 2001
+From: Raquel Medina <raquel.medina@konsulko.com>
+Date: Tue, 22 Jan 2019 09:00:05 -0500
+Subject: [PATCH] ndef: avoid dbus property_get_type method on empty record
+
+Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
+---
+ src/ndef.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/ndef.c b/src/ndef.c
+index 5656baf..883c6f4 100644
+--- a/src/ndef.c
++++ b/src/ndef.c
+@@ -2832,10 +2832,14 @@ GList *near_ndef_parse_msg(uint8_t *ndef_data, size_t ndef_length,
+ case RECORD_TYPE_WKT_ALTERNATIVE_CARRIER:
+ case RECORD_TYPE_WKT_COLLISION_RESOLUTION:
+ case RECORD_TYPE_WKT_ERROR:
+- case RECORD_TYPE_UNKNOWN:
+ case RECORD_TYPE_ERROR:
+ break;
+
++ case RECORD_TYPE_UNKNOWN:
++ if (record->header->tnf == RECORD_TNF_EMPTY)
++ goto fail;
++ break;
++
+ case RECORD_TYPE_WKT_HANDOVER_REQUEST:
+ case RECORD_TYPE_WKT_HANDOVER_SELECT:
+ /*
+--
+2.17.1
+
diff --git a/recipes-connectivity/neard/neard_0.16.bbappend b/recipes-connectivity/neard/neard_0.16.bbappend
new file mode 100644
index 000000000..2ab0381cc
--- /dev/null
+++ b/recipes-connectivity/neard/neard_0.16.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'neard_agldemo.inc', '', d)}
diff --git a/recipes-connectivity/neard/neard_agldemo.inc b/recipes-connectivity/neard/neard_agldemo.inc
new file mode 100644
index 000000000..f39fc9bcb
--- /dev/null
+++ b/recipes-connectivity/neard/neard_agldemo.inc
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI_append = "\
+ file://0001-systemd-neard-add-multi-user.target-to-neard.service.patch \
+ file://0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch \
+ "
+SYSTEMD_SERVICE_${PN}_append = " neard.service"
diff --git a/recipes-connectivity/neardal/neardal.inc b/recipes-connectivity/neardal/neardal.inc
new file mode 100644
index 000000000..3bb6b24ec
--- /dev/null
+++ b/recipes-connectivity/neardal/neardal.inc
@@ -0,0 +1,22 @@
+SUMMARY = "Neard Abstraction Library (NeardAL)"
+
+DESCRIPTION = "NeardAL is a library that provides a simple C API \
+to exchange data with NFC daemon (Neard)."
+
+HOMEPAGE = "https://github.com/connectivity/neardal"
+SECTION = "libs"
+LICENSE = "LGPLv2"
+
+DEPENDS = "glib-2.0 readline glib-2.0-native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6a6e689d19255cf0557f3fe7d7068212 \
+ file://lib/neardal.h;endline=20;md5=a53e93aea9357387078ed217565c0a99"
+
+inherit autotools pkgconfig
+
+PACKAGES =+ "${PN}-tools ${PN}-tools-dbg"
+
+FILES_${PN}-tools = "${libexecdir}/ncl"
+FILES_${PN}-tools-dbg += "${libexecdir}/.debug"
+
+RDEPENDS_${PN}-tools = "bash"
diff --git a/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch b/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch
new file mode 100644
index 000000000..596fe0579
--- /dev/null
+++ b/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch
@@ -0,0 +1,27 @@
+From 795308b2452ee617da4096914b53ba3a1142e3db Mon Sep 17 00:00:00 2001
+From: Matt Ranostay <matt.ranostay@konsulko.com>
+Date: Fri, 6 Jul 2018 17:19:09 -0700
+Subject: [PATCH] neardal: ncl: fix segfault on help page being displayed
+
+LISTCMD_NAME is declared as a const char due to being defined in a
+macro so g_strdup it to stop proceeding operations from segfaulting.
+
+Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
+
+---
+ ncl/ncl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ncl/ncl.c b/ncl/ncl.c
+index 590d13b..f4165b7 100644
+--- a/ncl/ncl.c
++++ b/ncl/ncl.c
+@@ -329,7 +329,7 @@ int main(int argc, char *argv[])
+ g_io_channel_unref(gNclCtx.channel);
+
+ if (show_help)
+- ncl_exec(LISTCMD_NAME);
++ ncl_exec(g_strdup(LISTCMD_NAME));
+
+ rl_callback_handler_install(NCL_PROMPT, ncl_parse_line);
+
diff --git a/recipes-connectivity/neardal/neardal/0002-neardal-lib-fix-memory-corruption.patch b/recipes-connectivity/neardal/neardal/0002-neardal-lib-fix-memory-corruption.patch
new file mode 100644
index 000000000..d40d9a4fe
--- /dev/null
+++ b/recipes-connectivity/neardal/neardal/0002-neardal-lib-fix-memory-corruption.patch
@@ -0,0 +1,58 @@
+From ee6267f357b3d158f0a0e88460782e8b9d44274a Mon Sep 17 00:00:00 2001
+From: Raquel Medina <raquel.medina@konsulko.com>
+Date: Fri, 4 Jan 2019 07:43:03 -0500
+Subject: [PATCH] neardal: lib: fix memory corruption
+
+ The current commit fixes an invalid memory access
+ which manifests as a random segfault when executing
+ continuous tag read operations.
+
+ The corruption happens when releasing the memory allocated to a
+ record: in the time between the memory being g_free'd and the
+ subsequent memset operation, the memory could have been reused by
+ some other process. And since memory allocation depends on
+ system-wide factors, it makes this bug hard to track.
+
+ Tested using ACR122U reader and NTAG213
+ tags on Automotive Grade Linux (flounder,
+ guppy and master branches)
+
+Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
+---
+ lib/neardal_record.c | 1 -
+ lib/neardal_tools.c | 5 ++++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/lib/neardal_record.c b/lib/neardal_record.c
+index 669012c..cfed5e8 100644
+--- a/lib/neardal_record.c
++++ b/lib/neardal_record.c
+@@ -31,7 +31,6 @@ void neardal_record_free(neardal_record *r)
+ {
+ g_return_if_fail(r);
+ neardal_g_strfreev((void **) r, &r->uriObjSize);
+- memset(r, 0, sizeof(*r));
+ }
+
+ void neardal_free_record(neardal_record *record) \
+diff --git a/lib/neardal_tools.c b/lib/neardal_tools.c
+index f0d6157..f307df6 100644
+--- a/lib/neardal_tools.c
++++ b/lib/neardal_tools.c
+@@ -32,9 +32,12 @@
+ void neardal_g_strfreev(void **array, void *end)
+ {
+ void **p = array;
+- for (; (void *) p < end; p++)
++ for (; (void *) p < end; p++) {
+ g_free(*p);
++ *p = NULL;
++ }
+ g_free(array);
++ array = NULL;
+ }
+
+ void neardal_g_variant_add_parsed(GVariant **v, const char *format, ...)
+--
+2.17.1
+
diff --git a/recipes-connectivity/neardal/neardal/ncl.patch b/recipes-connectivity/neardal/neardal/ncl.patch
new file mode 100644
index 000000000..baef6ccaa
--- /dev/null
+++ b/recipes-connectivity/neardal/neardal/ncl.patch
@@ -0,0 +1,25 @@
+From eab402bae42c3ea5caa8d540b6702d39e56c84c1 Mon Sep 17 00:00:00 2001
+From: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
+Date: Tue, 10 Feb 2015 12:58:39 +0200
+Subject: [PATCH] build: Install ncl
+
+Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
+---
+ ncl/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ncl/Makefile.am b/ncl/Makefile.am
+index beda75b..c06742f 100644
+--- a/ncl/Makefile.am
++++ b/ncl/Makefile.am
+@@ -1,6 +1,6 @@
+ AM_CPPFLAGS = @gio_CFLAGS@ -I$(top_builddir)/lib -I$(top_srcdir)/lib
+
+-noinst_PROGRAMS=ncl
++libexec_PROGRAMS = ncl
+
+ ncl_SOURCES = \
+ $(srcdir)/ncl.c $(srcdir)/ncl.h \
+--
+2.1.0
+
diff --git a/recipes-connectivity/neardal/neardal_0.14.bb b/recipes-connectivity/neardal/neardal_0.14.bb
new file mode 100644
index 000000000..f8634c468
--- /dev/null
+++ b/recipes-connectivity/neardal/neardal_0.14.bb
@@ -0,0 +1,10 @@
+require neardal.inc
+
+SRC_URI = "git://github.com/connectivity/neardal.git;protocol=https \
+ file://ncl.patch \
+ file://0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch \
+ file://0002-neardal-lib-fix-memory-corruption.patch \
+ "
+SRCREV = "fe0fa79c94e9a0f1c2cfa1f58b3acc9bdc7d5e13"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-connectivity/ofono/files/0001-provision-allow-duplicate-entries-from-mbpi_lookup_a.patch b/recipes-connectivity/ofono/files/0001-provision-allow-duplicate-entries-from-mbpi_lookup_a.patch
new file mode 100644
index 000000000..7b44e483e
--- /dev/null
+++ b/recipes-connectivity/ofono/files/0001-provision-allow-duplicate-entries-from-mbpi_lookup_a.patch
@@ -0,0 +1,27 @@
+From 7782f8f9d9634ebeddafefedab10ba254f9cc34a Mon Sep 17 00:00:00 2001
+From: Matt Ranostay <matt.ranostay@konsulko.com>
+Date: Fri, 1 Mar 2019 17:53:17 +0900
+Subject: [PATCH] provision: allow duplicate entries from mbpi_lookup_apn()
+ results
+
+Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
+---
+ plugins/provision.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/provision.c b/plugins/provision.c
+index 99c299eb..aa0b05e4 100644
+--- a/plugins/provision.c
++++ b/plugins/provision.c
+@@ -50,7 +50,7 @@ static int provision_get_settings(const char *mcc, const char *mnc,
+
+ DBG("Provisioning for MCC %s, MNC %s, SPN '%s'", mcc, mnc, spn);
+
+- apns = mbpi_lookup_apn(mcc, mnc, FALSE, &error);
++ apns = mbpi_lookup_apn(mcc, mnc, TRUE, &error);
+ if (apns == NULL) {
+ if (error != NULL) {
+ ofono_error("%s", error->message);
+--
+2.20.1
+
diff --git a/recipes-connectivity/ofono/files/ofono.conf b/recipes-connectivity/ofono/files/ofono.conf
new file mode 100644
index 000000000..e47214c76
--- /dev/null
+++ b/recipes-connectivity/ofono/files/ofono.conf
@@ -0,0 +1,30 @@
+<!-- This configuration file specifies the required security policies
+ for oFono core daemon to work. -->
+
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+
+ <!-- ../system.conf have denied everything, so we just punch some holes -->
+
+ <policy user="root">
+ <allow own="org.ofono"/>
+ <allow send_destination="org.ofono"/>
+ <allow send_interface="org.ofono.Manager"/>
+ <allow send_interface="org.ofono.SimToolkitAgent"/>
+ <allow send_interface="org.ofono.PushNotificationAgent"/>
+ <allow send_interface="org.ofono.SmartMessagingAgent"/>
+ <allow send_interface="org.ofono.PositioningRequestAgent"/>
+ <allow send_interface="org.ofono.HandsfreeAudioAgent"/>
+ <allow send_interface="org.ofono.Modem"/>
+ </policy>
+
+ <policy at_console="true">
+ <allow send_destination="org.ofono"/>
+ </policy>
+
+ <policy context="default">
+ <deny send_destination="org.ofono"/>
+ </policy>
+
+</busconfig>
diff --git a/recipes-connectivity/ofono/ofono_%.bbappend b/recipes-connectivity/ofono/ofono_%.bbappend
new file mode 100644
index 000000000..0386aa9c9
--- /dev/null
+++ b/recipes-connectivity/ofono/ofono_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'agldemo', 'ofono_agldemo.inc', '', d)}
diff --git a/recipes-connectivity/ofono/ofono_agldemo.inc b/recipes-connectivity/ofono/ofono_agldemo.inc
new file mode 100644
index 000000000..b02d6ee22
--- /dev/null
+++ b/recipes-connectivity/ofono/ofono_agldemo.inc
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+SRC_URI_append = "\
+ file://ofono.conf \
+ file://0001-provision-allow-duplicate-entries-from-mbpi_lookup_a.patch \
+ "
+
+do_install_append() {
+ install -m 0644 ${WORKDIR}/ofono.conf ${D}${sysconfdir}/dbus-1/system.d/ofono.conf
+}
+
+SYSTEMD_AUTO_ENABLE = "enable"
diff --git a/recipes-connectivity/rtl-sdr/rtl-sdr/0001-remove-I-usr-include-in-pkg-config.patch b/recipes-connectivity/rtl-sdr/rtl-sdr/0001-remove-I-usr-include-in-pkg-config.patch
new file mode 100644
index 000000000..86b7392df
--- /dev/null
+++ b/recipes-connectivity/rtl-sdr/rtl-sdr/0001-remove-I-usr-include-in-pkg-config.patch
@@ -0,0 +1,40 @@
+From 3aeaf8054fcb2617ca8f6196ca32be3e69337f77 Mon Sep 17 00:00:00 2001
+From: Martin Kelly <mkelly@xevo.com>
+Date: Fri, 21 Apr 2017 10:29:19 -0700
+Subject: [PATCH] remove -I/usr/include in pkg-config
+
+This shouldn't be necessary as it's part of the default compiler include
+paths anyway. Morever, it can cause GCC 6 C++ build failures in
+downstream packages when combined with QMake (such as
+qtmultimedia-rtlfm-radio-plugin).
+
+Fix these issues by removing it.
+
+Upstream-Status: Inappropriate [disable-feature]
+
+This patch should not go upstream because it breaks the ability to build
+with --prefix. That's not a problem for Openembedded, but it is for
+upstream more generally. See this mail thread for more information:
+
+http://lists.osmocom.org/pipermail/osmocom-sdr/2017-April/001580.html
+
+Signed-off-by: Martin Kelly <mkelly@xevo.com>
+---
+ librtlsdr.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/librtlsdr.pc.in b/librtlsdr.pc.in
+index 5e55049..84b6d0c 100644
+--- a/librtlsdr.pc.in
++++ b/librtlsdr.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@
+ Name: RTL-SDR Library
+ Description: C Utility Library
+ Version: @VERSION@
+-Cflags: -I${includedir}/ @RTLSDR_PC_CFLAGS@
++Cflags: @RTLSDR_PC_CFLAGS@
+ Libs: -L${libdir} -lrtlsdr -lusb-1.0
+ Libs.private: @RTLSDR_PC_LIBS@
+--
+2.1.4
+
diff --git a/recipes-connectivity/rtl-sdr/rtl-sdr_0.5.3.bb b/recipes-connectivity/rtl-sdr/rtl-sdr_0.5.3.bb
new file mode 100644
index 000000000..b442d9f46
--- /dev/null
+++ b/recipes-connectivity/rtl-sdr/rtl-sdr_0.5.3.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Turns a Realtek RTL2832U-based DVB dongle into a SDR receiver"
+DESCRIPTION = "DVB-T dongles based on the Realtek RTL2832U chipset can be used as Software Digital Radio adapters, since the chip allows transferring raw I/Q samples to the host, which is really used for DAB/DAB+/FM demodulation."
+HOMEPAGE = "http://sdr.osmocom.org/trac/wiki/rtl-sdr"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+ file://src/librtlsdr.c;endline=18;md5=1b05599c3ebd4d74857a0a7c45f3d4ef"
+
+DEPENDS = "libusb1"
+
+SRC_URI = "git://git.osmocom.org/rtl-sdr \
+ file://0001-remove-I-usr-include-in-pkg-config.patch \
+ "
+SRCREV = "e3c03f738f5aef4dc51e2b741fbdb542b9cc1bb1"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--enable-driver-detach"
+
+do_configure_append() {
+ # remove included temporary path from pc file due to pass-through of OE CFLAGS
+ # debug-prefix-map
+ # See: http://lists.openembedded.org/pipermail/openembedded-devel/2016-May/107456.html
+ sed -i -e "s# -fdebug-prefix-map=.*##g;s# -fmacro-prefix-map=.*##g" librtlsdr.pc
+}
+
+do_install_append() {
+ install -D -m 0644 ${S}/rtl-sdr.rules ${D}${sysconfdir}/udev/rules.d/55-rtl-sdr.rules
+ sed -i 's/MODE:="0666"/GROUP="audio", MODE="0660", SECLABEL{smack}="*"/' \
+ ${D}${sysconfdir}/udev/rules.d/55-rtl-sdr.rules
+}