SUMMARY = "Bluetooth Connectivity Application"
DESCRIPTION = "The example is to demonstrate BLE provisioning and BLE 	\
	Transparent Services.						\
	the application is written using the BlueZ GATT service and it	\
	enables the WILC to host two GATT services,		 	\
	1) transparent service 2) WiFi provisioning service 		\
	The Microchip MBD application can be used to connect to WILC	\
	and transact BLE data through these BLE applications"

AUTHOR = "Microchip Technology Inc"
SECTION = "examples"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=2aadfbb30f3dc663d0c881ccb240fc4c"

DEPENDS = "bluez5 wilc-demo-fs-overlay"
SRC_URI = "git://github.com/MicrochipTech/wilcbtapps-buildroot-external-microchip.git;protocol=git"
SRCREV  = "ef37a75f4105289c12c83849e2b85112a78f81a2"

S = "${WORKDIR}/git"

do_compile () {
        ${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} ${TOOLCHAIN_OPTIONS} -Wall    \
	-std=gnu11 -g -D_REENTRANT -static -I${STAGING_INCDIR}/bluez5_utils \
        -L ${STAGING_LIBDIR}/bluez5_utils/lib transparent_service.c	    \
	-o transparent_service -lshared-mainloop -lbluetooth-internal	    \
	-lgdbus-internal -lc

        ${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} ${TOOLCHAIN_OPTIONS} -Wall    \
	-std=gnu11 -g -D_REENTRANT -static -I${STAGING_INCDIR}/bluez5_utils \
	-L ${STAGING_LIBDIR}/bluez5_utils/lib wifi_prov_service.c	    \
	-o wifi_prov_service -lshared-mainloop -lbluetooth-internal 	    \
	-lgdbus-internal -lc
}

do_install () {
    install -d ${D}${bindir}
    install -m 0755 transparent_service ${D}${bindir}
    install -m 0755 wifi_prov_service ${D}${bindir}
}

PACKAGE_ARCH = "${MACHINE_ARCH}"

FILES_${PN} += "${bindir}/transparent_service"
FILES_${PN} += "${bindir}/wifi_prov_service"

COMPATIBLE_MACHINE = "(at91sam9|sama5)"

Add BLE applications for WILC
wilc-ble-demo: Add BLE applications for WILC

The recipe builds BLE applications for WILC. It demonstrates the
transparent GATT service and WiFi Provision over BLE GATT service, the
MBD application can connect to WILC and exchange BLE data.

Signed-off-by: Hemanth Tenkod <fef5e02c7e3e52809c0cf02b038c03af0abda99c@microchip.com>
Signed-off-by: Codrin Ciubotariu <97034fe81dd68ee5e1fa3aa6216f6373b034daef@microchip.com>
[97034fe81dd68ee5e1fa3aa6216f6373b034daef@microchip.com: fixed trailing whitespaces & newlines]
[97034fe81dd68ee5e1fa3aa6216f6373b034daef@microchip.com: title used as description, new title]
